Replace routine-panel target inference with an explicit definition picker (CL-7355) - #554
Open
TheGreatAxios wants to merge 6 commits into
Open
Replace routine-panel target inference with an explicit definition picker (CL-7355)#554TheGreatAxios wants to merge 6 commits into
TheGreatAxios wants to merge 6 commits into
Conversation
TheGreatAxios
force-pushed
the
cl-7355-target-picker
branch
from
September 2, 2026 06:25
1c4c862 to
72459a9
Compare
TheGreatAxios
changed the base branch from
cl-7351-target-discovery
to
cl-7353-retarget-authz
September 2, 2026 06:25
TheGreatAxios
force-pushed
the
cl-7355-target-picker
branch
from
September 2, 2026 07:44
72459a9 to
2e760a6
Compare
TheGreatAxios
force-pushed
the
cl-7355-target-picker
branch
from
September 2, 2026 08:15
2e760a6 to
aed622f
Compare
TheGreatAxios
force-pushed
the
cl-7355-target-picker
branch
from
September 2, 2026 08:31
aed622f to
3209b20
Compare
A create or PATCH-carried retarget now must clear the same two gates before it is persisted: resolveLaunchableDefinition must resolve the asset, and the acting principal must be authorized for workflow-definition:<id>/read — the same verb listRoutineTargets already checks per row. A denial is a typed 403 alongside the existing 400/404/409 target envelopes, on both the tenant-session and Myra's workflow-run-authenticated routine surfaces. Also routes a pre-existing catch in postRoutineEnabledNotice through reportError, since this change's diff now touches that line and check:report-error requires it.
Replaces the old chat-participant-inference tests with coverage that no target is ever inferred from a workbench's agents, that create sends the explicitly picked definitionAssetId, and that the picker's loading/empty/ error/stale states hold.
…cker (CL-7355) The routine panel used to derive a create target from the conversation's own agent (listWorkbenchAgents(...)[0]) — silently wrong the moment a workbench hosted more than one agent, or none, and it could never target a workflow. DefinitionTargetPicker instead lists every deployed, frozen target from GET /api/tenants/:tenantId/workflows/targets, grouped by kind (Agents / Workflows), and never auto-selects one. Create now requires a picked target; delivery (which workbench the routine posts back into) stays independent, unchanged from before. Existing-routine mode shows the current target's name read-only — editing it is CL-7358.
TheGreatAxios
force-pushed
the
cl-7355-target-picker
branch
from
September 2, 2026 10:37
3209b20 to
b2dc49b
Compare
TheGreatAxios
marked this pull request as ready for review
September 2, 2026 11:18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes https://linear.app/abklabs/issue/CL-7355
Summary
resolveCreateTargetand itslistWorkbenchAgents/ensureMyraWorkbench-for-target inference fromapps/web/src/shell/routine-panel.tsx— a routine's create target is no longer derived from the conversation's own agent.DefinitionTargetPicker(apps/web/src/shell/definition-target-picker.tsx): loadslistAllRoutineTargets, groups bykind(Agents / Workflows), never auto-selects, and covers loading/empty/error/stale-selection states.definitionAssetId) before the first write can fire; delivery workbench resolution (subject.workbenchIdor the tenant's default Myra workbench) is unchanged and independent of the target.Test plan
bunx tsc --noEmit -p apps/webbun test ./test/routine-panel.test.tsx(run fromapps/web) — 21/21 pass, including no-inference and picked-target-create coveragebun test ./test/routine-activity.test.ts ./test/routine-detail-page.test.tsx ./test/routine-schedule.test.ts ./test/routines-page.test.tsx— 75/75 passbunx eslint apps/web/src/shellbun run scripts/checks/report-error.ts— 0 new findingsResolves CL-7355