-
Notifications
You must be signed in to change notification settings - Fork 0
feat: update Google OAuth routes and enhance Google Sheets integration #60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| {"root":["./src/index.ts","./src/routes/google_callback.ts","./src/routes/nodes.routes.ts","./src/routes/userRoutes/userMiddleware.ts","./src/routes/userRoutes/userRoutes.ts","./src/scheduler/token-scheduler.ts","./src/services/token-refresh.service.ts"],"version":"5.7.3"} | ||
| {"root":["./src/index.ts","./src/routes/google_callback.ts","./src/routes/nodes.routes.ts","./src/routes/userroutes/usermiddleware.ts","./src/routes/userroutes/userroutes.ts","./src/scheduler/token-scheduler.ts","./src/services/token-refresh.service.ts"],"version":"5.7.3"} | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Check if tsbuildinfo is in gitignore
echo "=== Checking .gitignore for tsbuildinfo ==="
if [ -f .gitignore ]; then
cat .gitignore | grep -i 'tsbuild' && echo "Found tsbuildinfo reference" || echo "No tsbuildinfo reference found"
else
echo ".gitignore not found"
fi
echo ""
echo "=== Full .gitignore content ==="
cat .gitignore 2>/dev/null | head -50
echo ""
echo "=== Checking for *.tsbuildinfo files in repo ==="
find . -name "*.tsbuildinfo" -type f 2>/dev/null | head -20
echo ""
echo "=== Git status for tsbuildinfo files ==="
git ls-files | grep tsbuildinfo || echo "No tsbuildinfo files tracked in git"Repository: Dev-Pross/BuildFlow Length of output: 1677 Fix The Replace scattered entries with a single glob pattern 🤖 Prompt for AI Agents |
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -6,7 +6,7 @@ export const googleSheetActionConfig: NodeConfig = { | |||||||||||||||||||||||||||||
| label: "Google Sheet", | ||||||||||||||||||||||||||||||
| icon: "📊", | ||||||||||||||||||||||||||||||
| description: "Read or write data to Google Sheets", | ||||||||||||||||||||||||||||||
| credentials: "google", // Requires Google OAuth | ||||||||||||||||||||||||||||||
| credentials: "google_oauth", // Requires Google OAuth | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| fields: [ | ||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||
|
|
@@ -18,20 +18,20 @@ export const googleSheetActionConfig: NodeConfig = { | |||||||||||||||||||||||||||||
| description: "Choose which Google account to use" | ||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||
| name: "spreadsheetId", | ||||||||||||||||||||||||||||||
| label: "Spreadsheet", | ||||||||||||||||||||||||||||||
| name: "spreadsheetId", | ||||||||||||||||||||||||||||||
| type: "dropdown", | ||||||||||||||||||||||||||||||
| label: "Spreadsheet", | ||||||||||||||||||||||||||||||
| required: true, | ||||||||||||||||||||||||||||||
| description: "Select the Google Spreadsheet", | ||||||||||||||||||||||||||||||
| dependsOn: "credentialId" // Only show after credential is selected | ||||||||||||||||||||||||||||||
| dependsOn: "credentialId", // <-- This field depends on credentialId | ||||||||||||||||||||||||||||||
| fetchOptions: "google.getDocuments", // <-- API method to call | ||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||
| name: "sheetName", | ||||||||||||||||||||||||||||||
| label: "Sheet Name", | ||||||||||||||||||||||||||||||
| type: "dropdown", | ||||||||||||||||||||||||||||||
| type: "dropdown", | ||||||||||||||||||||||||||||||
| label: "Sheet", | ||||||||||||||||||||||||||||||
| required: true, | ||||||||||||||||||||||||||||||
| description: "Select the specific sheet within the spreadsheet", | ||||||||||||||||||||||||||||||
| dependsOn: "spreadsheetId" // Only show after spreadsheet is selected | ||||||||||||||||||||||||||||||
| dependsOn: "spreadsheetId", | ||||||||||||||||||||||||||||||
| fetchOptions: "google.getSheets", | ||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||
| name: "action", | ||||||||||||||||||||||||||||||
|
|
@@ -45,6 +45,13 @@ export const googleSheetActionConfig: NodeConfig = { | |||||||||||||||||||||||||||||
| required: true, | ||||||||||||||||||||||||||||||
| defaultValue: "read_rows", | ||||||||||||||||||||||||||||||
| description: "What operation to perform on the sheet" | ||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||
| name: "Range", | ||||||||||||||||||||||||||||||
| type: "text", | ||||||||||||||||||||||||||||||
| label: "range", | ||||||||||||||||||||||||||||||
| value: "A1:Z100", | ||||||||||||||||||||||||||||||
| required: true | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
Comment on lines
+49
to
55
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix naming conventions and use The new
Suggested fix {
- name: "Range",
+ name: "range",
type: "text",
- label: "range",
- value: "A1:Z100",
+ label: "Range",
+ defaultValue: "A1:Z100",
required: true
}📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||
| ], | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -37,7 +37,7 @@ export const getCredentials = async(type: string)=>{ | |||||||||
| console.log("response from config: ",response); | ||||||||||
|
|
||||||||||
| const Data = JSON.stringify(response.data.Data); | ||||||||||
| return response.data.Data; | ||||||||||
| return response.data.data; | ||||||||||
|
Comment on lines
39
to
+40
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: # Read the file around lines 39-40 with context
cat -n apps/web/app/workflow/lib/config.ts | sed -n '30,50p'Repository: Dev-Pross/BuildFlow Length of output: 707 🏁 Script executed: # Search for all usages of response.data.Data and response.data.data in the file
rg -n 'response\.data\.[Dd]ata' apps/web/app/workflow/lib/config.tsRepository: Dev-Pross/BuildFlow Length of output: 388 🏁 Script executed: # Check if the Data variable on line 39 is used anywhere after its declaration
rg -n '\bData\b' apps/web/app/workflow/lib/config.ts | head -20Repository: Dev-Pross/BuildFlow Length of output: 595 🏁 Script executed: # Get full context of the function containing lines 39-40
sed -n '25,55p' apps/web/app/workflow/lib/config.tsRepository: Dev-Pross/BuildFlow Length of output: 748 Remove unused variable and verify response field casing consistency. The Additionally, this function now uses Suggested fix console.log("response from config: ",response);
-
- const Data = JSON.stringify(response.data.Data);
return response.data.data;📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||
| } | ||||||||||
| catch(e){ | ||||||||||
| console.error("Error fetching credentials:", e); | ||||||||||
|
|
||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -5,6 +5,7 @@ import { HOOKS_URL } from "@repo/common/zod"; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import { useAppSelector } from "@/app/hooks/redux"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import { toast } from "sonner"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import { useCredentials } from "@/app/hooks/useCredential"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import { api } from "@/app/lib/api"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| interface ConfigModalProps { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| isOpen: boolean; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -22,8 +23,36 @@ export default function ConfigModal({ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| workflowId, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }: ConfigModalProps) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const [config, setConfig] = useState<Record<string, any>>({}); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const [dynamicOptions, setDynamicOptions] = useState<Record<string, any[]>>({}); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const [loading, setLoading] = useState(false); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const userId = useAppSelector((state) => state.user.userId) as string; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const fetchOptionsMap: Record<string, (params: any) => Promise<any>> = { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "google.getDocuments" : ({credentialId}) => api.google.getDocuments(credentialId), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "google.getSheets" : ({spreadsheetId, credentialId}) => api.google.getSheets(spreadsheetId, credentialId) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const handleFieldChange = async (fieldName: string, value: string, nodeConfig: any) => { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // Update config with new value | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const updatedConfig = ({ ...config, [fieldName]: value }) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| console.log(fieldName, " ", value, " ", nodeConfig) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| console.log(config, "from handle field function - 1") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| setConfig((prev) => ({ ...prev, [fieldName]: value })); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| console.log(config, "from handle field fun - 2") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| console.log({ ...config, [fieldName]: value }, "what we're setting") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // Find fields that depend on this field | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const dependentFields = nodeConfig.fields.filter((f:any) => f.dependsOn === fieldName); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| for (const depField of dependentFields) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const fetchFn = depField.fetchOptions ? fetchOptionsMap[depField.fetchOptions] : undefined; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| console.log(fetchFn, "fecth FN") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (fetchFn) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const options = await fetchFn(updatedConfig); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // console.log(({ ...config, [depField.name]: options }), "optiops setting") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| setDynamicOptions((prev) => ({ ...prev, [depField.name]: options })); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+35
to
+53
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Handle option fetch failures to prevent unhandled rejections. 🛠️ Suggested fix for (const depField of dependentFields) {
const fetchFn = depField.fetchOptions ? fetchOptionsMap[depField.fetchOptions] : undefined;
console.log(fetchFn, "fecth FN")
if (fetchFn) {
- const options = await fetchFn(updatedConfig);
- // console.log(({ ...config, [depField.name]: options }), "optiops setting")
- setDynamicOptions((prev) => ({ ...prev, [depField.name]: options }));
+ try {
+ const options = await fetchFn(updatedConfig);
+ setDynamicOptions((prev) => ({ ...prev, [depField.name]: options }));
+ } catch (err) {
+ console.error("Failed to load dependent options", err);
+ toast.error(`Failed to load ${depField.label ?? depField.name} options`);
+ setDynamicOptions((prev) => ({ ...prev, [depField.name]: [] }));
+ }
}
}📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // console.log("This is the credential Data from config from backend" , config); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // Fetch credentials with hook based on node config (google, etc) if appropriate | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| let credType: string | null = null; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -53,7 +82,7 @@ export default function ConfigModal({ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const renderField = (field: any) => { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const renderField = (field: any, nodeConfig: any) => { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const fieldValue = config[field.name] || ""; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (field.type === "dropdown" && field.name === "credentialId") { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -68,12 +97,10 @@ export default function ConfigModal({ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <select | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| value={fieldValue} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| onChange={(e) => | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| setConfig({ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ...config, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| [field.name]: e.target.value, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| onChange={async(e) => { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| await handleFieldChange(field.name, e.target.value, nodeConfig); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| console.log(field.name, nodeConfig, e.target.value) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| className="w-full p-3 border border-gray-900 bg-black text-white rounded-md" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| required={field.required} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| > | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -126,6 +153,8 @@ export default function ConfigModal({ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (field.type === "dropdown") { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // Use dynamicOptions if available, otherwise fall back to field.options | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const options = dynamicOptions[field.name] || field.options || []; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <div key={field.name} className="form-group"> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <label className="block text-sm font-medium text-white mb-1"> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -134,27 +163,24 @@ export default function ConfigModal({ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </label> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <select | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| value={fieldValue} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| onChange={(e) => | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| setConfig({ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ...config, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| [field.name]: e.target.value, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| onChange={async(e) => { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 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} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| > | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <option value="">Select {field.label.toLowerCase()}</option> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {(field.options || []).map((opt: any) => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <option key={opt.value || opt} value={opt.value || opt}> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {opt.label || opt} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {options.map((opt: any) => ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <option key={opt.value || opt.id || opt} value={opt.value || opt.id || opt}> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {opt.label || opt.name || opt} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </option> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ))} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </select> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (field.type === "textarea") { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (field.type === "text") { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <div key={field.name} className="form-group"> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <label className="block text-sm font-medium text-white mb-1"> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -330,7 +356,7 @@ export default function ConfigModal({ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <div className="space-y-4"> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {nodeConfig.fields.map(renderField)} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| {nodeConfig.fields.map((field) => renderField(field, nodeConfig))} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| })()} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: Dev-Pross/BuildFlow
Length of output: 283
🏁 Script executed:
Repository: Dev-Pross/BuildFlow
Length of output: 45
🏁 Script executed:
Repository: Dev-Pross/BuildFlow
Length of output: 45
🏁 Script executed:
Repository: Dev-Pross/BuildFlow
Length of output: 960
🏁 Script executed:
# Check the useCredential hook for OAuth endpoint references cat -n apps/web/app/hooks/useCredential.tsRepository: Dev-Pross/BuildFlow
Length of output: 1948
🏁 Script executed:
# Check the google-oauth-service for endpoint configuration cat -n packages/nodes/src/common/google-oauth-service.tsRepository: Dev-Pross/BuildFlow
Length of output: 6420
🏁 Script executed:
# Check the google_callback routes to see what endpoints are defined cat -n apps/http-backend/src/routes/google_callback.tsRepository: Dev-Pross/BuildFlow
Length of output: 11196
Remove debug comment and fix incomplete route migration.
The inline comment
// ← CHANGED THIS LINE!must be removed before merging.More critically, the route path change from
/oauth/googleto/auth/googleis incomplete. Frontend code still references the old paths and will fail:apps/web/app/hooks/useCredential.ts(line 31) references/oauth/google/initiatepackages/nodes/src/common/google-oauth-service.ts(line 19) references/oauth/google/callbackBoth frontend files must be updated to use
/auth/google/initiateand/auth/google/callbackrespectively, or the OAuth flow will break.🤖 Prompt for AI Agents