Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/web/app/lib/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export const api = {
})
const tabs = data.data.files.data
return tabs.map((tab: any) =>({
id: tab.id,
id: tab.name,
name: tab.name
}))
},
Expand Down
6 changes: 3 additions & 3 deletions apps/web/app/lib/nodeConfigs/googleSheet.action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ export const googleSheetActionConfig: NodeConfig = {
label: "Action",
type: "dropdown",
options: [
{ label: "Read Rows", value: "read_rows" },
{ label: "Append Row", value: "append_row" },
{ label: "Update Row", value: "update_row" }
{ label: "Read Rows", id: "read_rows" },
{ label: "Append Row", id: "append_row" },
{ label: "Update Row", id: "update_row" }
],
required: true,
defaultValue: "read_rows",
Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/lib/types/node.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export interface ConfigField {
placeholder?: string;
fetchOptions?: string,
value? : string,
options?: Array<{ label: string; value: string | number }>; // For dropdowns
options?: Array<{ label: string; id: string | number }>; // For dropdowns
dependsOn?: string; // Name of another field this depends on
description?: string; // Help text for this field
multiline?: boolean; // For textarea: allow specifying multiline
Expand Down
2 changes: 2 additions & 0 deletions apps/web/app/workflows/[id]/components/ConfigModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,13 @@ export default function ConfigModal({
<select
value={fieldValue}
onChange={async(e) => {
console.log("log for options: ",fieldValue)
await handleFieldChange(field.name, e.target.value, nodeConfig);
}}
className="w-full p-3 border border-gray-900 bg-black text-white rounded-md"
required={field.required}
>
{console.log(options)}
Comment on lines +167 to +173

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major

Remove debug console.log statements before merging.

These debug logging statements should be removed:

  • Line 167: logs fieldValue on every dropdown change
  • Line 173: {console.log(options)} inside JSX renders on every component render and returns undefined

The console.log inside JSX (line 173) is particularly problematic as it executes on every render cycle, not just during development interaction.

🧹 Remove debug logs
           <select
             value={fieldValue}
             onChange={async(e) => {
-              console.log("log for options: ",fieldValue)
               await handleFieldChange(field.name, e.target.value, nodeConfig);
             }}
             className="w-full p-3 border border-gray-900 bg-black text-white rounded-md"
             required={field.required}
           >
-            {console.log(options)}
             <option value="">Select {field.label.toLowerCase()}</option>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
console.log("log for options: ",fieldValue)
await handleFieldChange(field.name, e.target.value, nodeConfig);
}}
className="w-full p-3 border border-gray-900 bg-black text-white rounded-md"
required={field.required}
>
{console.log(options)}
await handleFieldChange(field.name, e.target.value, nodeConfig);
}}
className="w-full p-3 border border-gray-900 bg-black text-white rounded-md"
required={field.required}
>
🤖 Prompt for AI Agents
In `@apps/web/app/workflows/`[id]/components/ConfigModal.tsx around lines 167 -
173, Remove the two debug console.log calls introduced in the ConfigModal
component: delete the console.log("log for options: ", fieldValue) inside the
select onChange handler (where handleFieldChange is invoked) and remove the JSX
expression {console.log(options)} that runs during render; ensure no other stray
console.log statements remain in the component (particularly around
handleFieldChange, fieldValue, and options usage).

<option value="">Select {field.label.toLowerCase()}</option>
{options.map((opt: any) => (
<option key={opt.value || opt.id || opt} value={opt.value || opt.id !== undefined ? opt.id : opt }>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ class GoogleSheetsNodeExecutor{
try{
const rows = await sheetsService.readRows({
spreadsheetId: context.config.spreadsheetId,
range: context.config.range
range: `${context.config.sheetName}!${context.config.range}`
});

return {
Expand Down