Skip to content

fix(workspaces): all adapters enabled on every create path (quick-chat agent default)#354

Merged
luokerenx4 merged 1 commit into
masterfrom
UI-issue
Jun 16, 2026
Merged

fix(workspaces): all adapters enabled on every create path (quick-chat agent default)#354
luokerenx4 merged 1 commit into
masterfrom
UI-issue

Conversation

@luokerenx4

Copy link
Copy Markdown
Contributor

Summary

  • Quick-chat created chat workspaces with only claude+codex. The "every registered adapter enabled" policy lived solely in the frontend create hook; quick-chat is a backend-only caller that hits WorkspaceCreator.create() directly, so it fell through to the bare template.defaultAgents (["claude","codex"]) — the default the hook's own comment already called "wrong". From Ask Alice, the daily workspace silently dropped opencode + pi.
  • Moved the policy into the domain layer. New resolveCreateAgents() in workspace-creator.ts is the single source of truth: an explicit subset wins verbatim, otherwise all registered adapters with template.defaultAgents as the order-head (so agents[0], the new-session default, still follows template intent). Form, quick-chat, and headless converge on it.
  • Thinned the frontend. useCreateWorkspace no longer expands/sends an agent set; createWorkspace's agents arg is optional; the now-dead agents prop is dropped from CreateWorkspaceForm / CreateWorkspaceDialog and its three call sites (display-only agents in Sidebar / TemplateDetail untouched).
  • Demo consistency. /quick-chat handler returned demoWorkspaces[0] (the aapl-q1 workspace, agents:['claude']) — wrong target that reproduced the same visual bug; now points at demoChatWorkspace, which already carries all four agents.

Test plan

  • npx tsc --noEmit (Alice) clean
  • cd ui && npx tsc -b clean
  • pnpm test workspaces suite green — 139 tests incl. 5 new resolveCreateAgents cases (no-pin → all; head only orders; dedupe; explicit subset verbatim; empty array = not pinned)

Boundary touch

None. Workspace launcher only — no trading / auth / broker credentials / migrations.

🤖 Generated with Claude Code

…plate head

Quick-chat (Ask Alice → POST /quick-chat) created its daily chat workspace
with only claude+codex. Root cause: the "every registered adapter enabled"
policy lived solely in the frontend create hook, which expanded the list
before POSTing. Quick-chat is a backend-only caller — it calls
WorkspaceCreator.create() directly with no agent set, so it fell through to
the bare template.defaultAgents (["claude","codex"]), the same default the
hook's comment already called "wrong".

Move the policy into the domain layer: new resolveCreateAgents() in
workspace-creator.ts is the single home — explicit subset wins verbatim,
otherwise all registered adapters with template.defaultAgents as the
order-head (so agents[0], the new-session default, still follows template
intent). Form, quick-chat, and headless now converge on it.

Thin the frontend: useCreateWorkspace sends no agent set; createWorkspace's
agents arg is optional; the now-dead `agents` prop is dropped from
CreateWorkspaceForm/Dialog and its three call sites (display-only `agents`
in Sidebar/TemplateDetail is untouched).

Demo: /quick-chat handler returned demoWorkspaces[0] (the aapl-q1 workspace,
agents:['claude']) — wrong target and it reproduced the same visual bug.
Point it at demoChatWorkspace, which already carries all four agents.

Test plan:
- npx tsc --noEmit (Alice) clean; cd ui && npx tsc -b clean
- workspaces suite green (139 tests incl. 5 new resolveCreateAgents cases)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
openalice-demo Building Building Preview, Comment Jun 16, 2026 12:20pm

Request Review

@luokerenx4 luokerenx4 merged commit 08af518 into master Jun 16, 2026
4 of 5 checks passed
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