You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up from the Critical Carl review (CRITICAL_CARL_REVIEW.md, PR #1334).
Suggestion
Delete the duplicated backend-form state and reuse a single shared form hook.
Why this matters
src/components/features/backends/backend-form-modal.tsx declares the same name / host / apiKey / connectionError / isSubmitting state plus a handleSubmittwice — once in BackendForm (backend-form-modal.tsx:336-376) and again, near-identically, in ManualConnectionColumn (backend-form-modal.tsx:563-577). The duplicate drifts independently and doubles the surface to test.
This is a bounded "reuse instead of duplicate" subtraction (CARL: reuse third). It is intentionally scoped to the duplication only — the broader "this 877-line file is a controller" decomposition is left as documented structural debt in the review, not part of this issue.
Suggested scope
Extract one useBackendForm() hook holding the shared field/submit state.
Delete the duplicated state block + handleSubmit in ManualConnectionColumn and consume the hook instead.
Keep behavior identical (validation, connection test, submit); no UX change.
Add or update tests so both entry points exercise the shared hook.
Duplicate check
I searched the open agent-canvas issue set for "backend form" and related terms and did not find an equivalent open issue.
This is the bounded, subtraction-shaped slice of review finding 6 (the open-ended controller decomposition is deliberately excluded per the issue-creation methodology).
This issue was created by an AI agent (OpenHands) on behalf of the user.
Follow-up from the Critical Carl review (
CRITICAL_CARL_REVIEW.md, PR #1334).Suggestion
Delete the duplicated backend-form state and reuse a single shared form hook.
Why this matters
src/components/features/backends/backend-form-modal.tsxdeclares the samename/host/apiKey/connectionError/isSubmittingstate plus ahandleSubmittwice — once inBackendForm(backend-form-modal.tsx:336-376) and again, near-identically, inManualConnectionColumn(backend-form-modal.tsx:563-577). The duplicate drifts independently and doubles the surface to test.This is a bounded "reuse instead of duplicate" subtraction (CARL: reuse third). It is intentionally scoped to the duplication only — the broader "this 877-line file is a controller" decomposition is left as documented structural debt in the review, not part of this issue.
Suggested scope
useBackendForm()hook holding the shared field/submit state.handleSubmitinManualConnectionColumnand consume the hook instead.Duplicate check
I searched the open agent-canvas issue set for "backend form" and related terms and did not find an equivalent open issue.
Related context
CRITICAL_CARL_REVIEW.md(PR WIP Add Critical Carl review report #1334)This issue was created by an AI agent (OpenHands) on behalf of the user.