chore(copilot): remove the training controls feature - #6257
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview Settings and API surface: Terminal UI: The inert Train Sim control (database/pause icons) is removed from the workflow terminal and output panel, along with related props, env gating, and stub training handlers. The DB column Reviewed by Cursor Bugbot for commit cb2f9fe. Configure here. |
Greptile SummaryThe PR consistently removes the inactive Copilot training-controls feature while deliberately retaining its database column for a later migration.
Confidence Score: 5/5The PR appears safe to merge; the retired feature is removed consistently across its UI, contracts, routes, settings flow, and environment configuration. No concrete reachable failure remains: repository callers of the deleted routes and flag were absent, and the retained database field is safely ignored and preserved by unrelated settings updates.
|
| Filename | Overview |
|---|---|
| apps/sim/app/api/copilot/training/route.ts | Deletes the authenticated training-data proxy; no remaining repository caller or contract reference was found. |
| apps/sim/app/api/copilot/training/examples/route.ts | Deletes the authenticated training-example proxy; no remaining repository caller was found. |
| apps/sim/lib/api/contracts/copilot.ts | Removes only the schemas and route contracts associated with the deleted training endpoints. |
| apps/sim/lib/api/contracts/user.ts | Removes showTrainingControls consistently from the settings response and update schemas. |
| apps/sim/lib/users/queries.ts | Stops selecting and defaulting the retired setting while safely leaving the retained database column untouched. |
| apps/sim/hooks/queries/general-settings.ts | Removes the retired field and selector from the client settings model without affecting other settings. |
| apps/sim/app/workspace/[workspaceId]/settings/components/general/general.tsx | Removes the feature-gated training toggle and its handler cleanly. |
| apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/terminal/terminal.tsx | Removes inert training state, callbacks, UI, and OutputPanel prop wiring. |
| apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/terminal/components/output-panel/output-panel.tsx | Removes the inert training button and associated props and icon imports. |
| apps/sim/lib/core/config/env.ts | Removes the unused public training flag from both validation and runtime exposure with no remaining consumers. |
Reviews (1): Last reviewed commit: "chore(copilot): remove the training cont..." | Re-trigger Greptile
Summary
showTrainingControlshandlerisTrainingwas hardcodedfalseand both callbacks were no-ops)useShowTrainingControls, theshowTrainingControlsfield fromGeneralSettings, the user settings contracts, and the server-side settings read/api/copilot/trainingand/api/copilot/training/examplesplus their contracts and body schemas — nothing in the app called themNEXT_PUBLIC_COPILOT_TRAINING_ENABLEDenv varpackages/db/schema.tsis deliberately untouched — thesettings.show_training_controlscolumn stays for a follow-up contract migration, same as the scheduled-tasks removal.Type of Change
Testing
tsc --noEmit,bun run lint,check:api-validation, andcheck:react-queryall pass. Related vitest suites pass (the 3 failures inhooks/queriesare a pre-existing tailwind/postcss config error on an emcn CSS module, unrelated to this diff).Checklist