molecule-core/canvas/src
Hongming Wang 9abc9a0487 feat(canvas): always prompt provider+model on template deploy
Previously the picker modal opened only when preflight failed OR the
template offered ≥2 provider options. Single-provider templates with
saved keys (claude-code, langgraph) deployed silently using the
template's compiled-in default model — denying the user a final
chance to override before an EC2 boots and burns billing on the
wrong tier.

The picker UI already supports the "all-keys-saved single-provider"
case as a confirm-only prompt (provider radio is hidden, model input
is pre-filled with template.model), so flipping shouldShowPicker to
unconditional is a one-line change with the picker UX absorbing it.

Test plan
- Existing "single-provider skips picker when preflight.ok" regression
  guard inverted to assert picker always opens.
- Three happy-path tests refactored to drive through the picker via
  a new deployThroughPicker helper instead of expecting an immediate
  POST.
- POST-failure tests likewise refactored — the failure now surfaces
  through the picker click-through path, not the direct deploy()
  call.
- 15/15 tests pass; deploy-preflight.test.ts unchanged + 20/20.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 17:19:14 -07:00
..
__tests__ fix(canvas): include NEXT_PUBLIC_PLATFORM_URL in CSP connect-src 2026-04-20 12:55:03 -07:00
app feat(canvas): add /api/buildinfo for version-display parity with tenant 2026-04-30 12:00:35 -07:00
components review: drop destructive Override + single-fetch configuredKeys 2026-05-01 13:40:58 -07:00
hooks feat(canvas): always prompt provider+model on template deploy 2026-05-01 17:19:14 -07:00
lib review: drop destructive Override + single-fetch configuredKeys 2026-05-01 13:40:58 -07:00
store refactor(canvas): route panel WS subscriptions through global socket 2026-04-27 13:12:47 -07:00
stores initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
styles feat(canvas+platform): chat attachments, model selection, deploy/delete UX 2026-04-24 13:27:51 -07:00
types feat(canvas): audit trail visualization panel (issue #753) 2026-04-17 16:03:28 +00:00
middleware.ts feat(router): /cp/* reverse-proxy to CP + same-origin canvas fetches 2026-04-20 13:01:40 -07:00