molecule-core/canvas/src/hooks
Hongming Wang 3ba924d174 review: drop destructive Override + single-fetch configuredKeys
Self-review of #2460 found two issues:

1. Critical: Override button in ProviderPickerModal called
   /settings/secrets when no workspaceId, overwriting the GLOBAL
   secret used by every workspace. The only consumers of this
   modal today (TemplatePalette, EmptyState via useTemplateDeploy)
   never pass workspaceId, so Override was always destructive.
   Removed entirely — the picker still solves the user-reported
   bug (always-ask + reuse saved keys); per-workspace key override
   can be a separate PR that plumbs secrets through POST /workspaces.

2. Optional: /settings/secrets was being fetched twice — once
   inside checkDeploySecrets (silently) and again in the hook to
   populate configuredKeys. Surfaced configuredKeys on
   PreflightResult so the hook re-uses the existing fetch.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 13:40:58 -07:00
..
__tests__ review: drop destructive Override + single-fetch configuredKeys 2026-05-01 13:40:58 -07:00
use-keyboard-shortcut.ts initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
useSocketEvent.ts refactor(canvas): route panel WS subscriptions through global socket 2026-04-27 13:12:47 -07:00
useTemplateDeploy.tsx review: drop destructive Override + single-fetch configuredKeys 2026-05-01 13:40:58 -07:00
useWorkspaceName.ts initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00