Skip to content

chore(copilot): remove the training controls feature - #6257

Merged
waleedlatif1 merged 1 commit into
stagingfrom
worktree-remove-training-controls
Aug 4, 2026
Merged

chore(copilot): remove the training controls feature#6257
waleedlatif1 merged 1 commit into
stagingfrom
worktree-remove-training-controls

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Remove the "Training controls" toggle from general settings, along with its showTrainingControls handler
  • Remove the "Train Sim" button from the terminal and the output panel (it was already inert — isTraining was hardcoded false and both callbacks were no-ops)
  • Drop useShowTrainingControls, the showTrainingControls field from GeneralSettings, the user settings contracts, and the server-side settings read
  • Delete /api/copilot/training and /api/copilot/training/examples plus their contracts and body schemas — nothing in the app called them
  • Drop the NEXT_PUBLIC_COPILOT_TRAINING_ENABLED env var

packages/db/schema.ts is deliberately untouched — the settings.show_training_controls column stays for a follow-up contract migration, same as the scheduled-tasks removal.

Type of Change

  • Chore (code removal)

Testing

tsc --noEmit, bun run lint, check:api-validation, and check:react-query all pass. Related vitest suites pass (the 3 failures in hooks/queries are a pre-existing tailwind/postcss config error on an emcn CSS module, unrelated to this diff).

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Aug 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Aug 4, 2026 7:06pm

Request Review

@cursor

cursor Bot commented Aug 4, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Dead-feature removal with no remaining in-app callers; user settings may still store the old column until a later migration, which is low risk.

Overview
Removes the copilot training controls feature end-to-end: internal API routes that forwarded examples and operations to the agent indexer, Zod contracts for those bodies, and the NEXT_PUBLIC_COPILOT_TRAINING_ENABLED env flag.

Settings and API surface: showTrainingControls is dropped from general settings hooks, user settings schemas, update payloads, and server-side user settings reads/defaults. The Training controls switch in workspace general settings is removed.

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 settings.show_training_controls is intentionally left in schema for a follow-up migration.

Reviewed by Cursor Bugbot for commit cb2f9fe. Configure here.

@greptile-apps

greptile-apps Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR consistently removes the inactive Copilot training-controls feature while deliberately retaining its database column for a later migration.

  • Removes the training toggle and inert terminal/output-panel controls.
  • Deletes the two training proxy routes and their request contracts.
  • Removes the setting from client/server contracts, queries, and defaults.
  • Removes the associated public environment variable.

Confidence Score: 5/5

The 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.

Important Files Changed

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

@waleedlatif1
waleedlatif1 merged commit fb7fd5b into staging Aug 4, 2026
24 checks passed
@waleedlatif1
waleedlatif1 deleted the worktree-remove-training-controls branch August 4, 2026 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant