Skip to content

Routine creation without an invited agent; /routine passes a visible preselection (CL-7357, CL-7356) - #556

Merged
TheGreatAxios merged 4 commits into
cl-7355-target-pickerfrom
cl-7357-routine-entry
Sep 2, 2026
Merged

Routine creation without an invited agent; /routine passes a visible preselection (CL-7357, CL-7356)#556
TheGreatAxios merged 4 commits into
cl-7355-target-pickerfrom
cl-7357-routine-entry

Conversation

@TheGreatAxios

@TheGreatAxios TheGreatAxios commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Linear: https://linear.app/abklabs/issue/CL-7357, https://linear.app/abklabs/issue/CL-7356

CL-7357 — Allow routine creation without an invited chat agent

Already satisfied on this base branch (cl-7355-target-picker): CL-7355 deleted
resolveCreateTarget/listWorkbenchAgents(...)[0] and every "no agent
invited" guard around routine creation when it replaced target inference
with the explicit DefinitionTargetPicker. Verified no guard remains at any
entry point (routines page, command palette new-routine, composer
/routine) — opening the panel with zero, one, or several agents in scope
behaves identically; empty-target messaging comes only from the picker's own
empty state. No code change was needed for this half.

CL-7356 — /routine passes only a visible, replaceable preselection

Wires DefinitionTargetPicker's existing preselectedAssetId prop end to
end: ChatWorkspace resolves the active workbench's agent participants
(already fetched for the failed-turn model picker) and, only when there is
exactly one, passes its definitionAssetId through onCreateRoutineInSpace
to RoutinePanelSubject.preselectedAssetId. Zero or several participants
means no preselection. The picker shows the preselected target already
chosen but never disables changing or clearing it; only the person's final
explicit pick is ever sent to POST /routines.

Test plan

  • bunx tsc --noEmit -p apps/web
  • bunx tsc --noEmit -p packages/chat-ui
  • bun test test/routine-panel.test.tsx (apps/web)
  • bun test test/chat-workspace.test.tsx (packages/chat-ui)
  • bunx eslint on touched files

Resolves CL-7357
Resolves CL-7356

…-7356)

Covers the routine panel honoring RoutinePanelSubject.preselectedAssetId
(shown chosen, and freely replaceable) and ChatWorkspace computing that
preselection from the conversation's own agent participants: none when
there are zero or several, the single agent's definitionAssetId when
there is exactly one.
CL-7355 already removed every invited-agent guard around routine
creation (CL-7357): DefinitionTargetPicker never auto-selects, and the
panel opens identically whether invoked from the routines page, the
palette, or a chat with no agents — there was nothing left to delete.

This wires DefinitionTargetPicker's existing preselectedAssetId prop
end to end: ChatWorkspace resolves the active workbench's agent
participants (already fetched for the failed-turn model picker) and,
only when there is exactly one, hands its definitionAssetId through
onCreateRoutineInSpace to RoutinePanelSubject.preselectedAssetId. The
picker shows it chosen but never disables changing or clearing it, and
only the person's final explicit selection is ever sent to
POST /routines — unchanged from CL-7355.
@TheGreatAxios
TheGreatAxios marked this pull request as ready for review September 2, 2026 11:09
@TheGreatAxios
TheGreatAxios merged commit 3235cd3 into main Sep 2, 2026
7 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