Skip to content

A routine can be configured before it is run (fix #1507) - #1634

Merged
suleimansh merged 1 commit into
mainfrom
configure-first-then-run
Aug 22, 2026
Merged

A routine can be configured before it is run (fix #1507)#1634
suleimansh merged 1 commit into
mainfrom
configure-first-then-run

Conversation

@suleimansh

Copy link
Copy Markdown
Contributor

Closes #1507.

The problem in one line: Run now on the Routine work card spends an agent on settings you cannot see from that card. The model and where it runs come from the Global options, so changing them meant leaving, editing preferences, and coming back.

What it looks like

Each Run now is now a split button. The chevron opens one item:

Configure first, then run
Opens the launcher with this prompt, so you can set the model and where it runs.

Clicking it hands the routine's prompt to the picked project's launcher, where the model, the location, and the prompt itself can all be changed before anything is spent.

Two decisions worth your eye

A split button, not a hover-revealed control. The issue floats "hovering a prompt button shows a secondary action ... maybe as a dropdown?" — I went with the dropdown half and made its trigger always visible. A control that exists only under a mouse is reachable by neither keyboard nor touch, and the chevron keeps the common click at one click. Say the word if you'd rather it were hover-gated.

The drain row says what it costs. "Spin up agents working on the AI queue" is the one row whose Run now fires a fan-out sweep, and the launcher can only ever send one agent — so its two halves really do different jobs. Its menu item reads "Opens the launcher with this prompt — one agent, not the fan-out." rather than looking like the same action.

How it's built

No new mechanism: the prompt travels on the draft stash a hot ticket already uses (#1066/#1139), which the launcher takes once as it mounts. Verified in the browser that a reload leaves the composer empty rather than re-seeding.

RoutineWork gains one prop, onSelectProject — the same one DashboardPage already passes to the Human Queue and the hot tickets.

Verification

Dogfooded on the real daemon, not only jsdom — the lesson from #1500 was that a component can render correctly and still be mounted where nobody sees it:

  • Overview → "Update from GitHub" chevron → menu opens with the item and its description
  • clicking it lands on the gemstack launcher with the routine's whole prompt in the box, model picker showing Opus, no agent started
  • reload → composer empty, so the draft is taken once
  • the drain row's chevron shows the fan-out caveat instead

Tests: 5 new, each proven by breaking the code it guards. Dropping the stash, pointing at the first project instead of the picked one, flattening the two descriptions to one, inverting the drain check, and gating the menu item on busy each failed exactly the intended test and nothing else. Full suite green: 1536 node + 788 dashboard.

RoutineWork.SPEC.md, its test SPEC, and FEATURES-SPEC.md all updated.

Next up is #1506 (tooltips on these same buttons), which is where "what model / where it runs" gets said on the card itself rather than only after you arrive at the launcher.

Run now spends an agent on settings that are nowhere on the Routine work
card: the model and where it runs come from the Global options, so the
only way to change them was to leave, edit the preferences, and come
back.

Each Run now becomes a split button. Its chevron opens one item,
"Configure first, then run", which hands the routine's prompt to the
picked project's launcher — where the model, the location, and the
prompt itself can all be changed before anything is spent.

The carry is the draft stash a hot ticket already uses (#1066/#1139)
rather than a second mechanism: the launcher takes it once as it mounts,
so a reload does not re-seed it.

A split button rather than the hover-revealed control the issue floats:
a control that only exists under a mouse is reachable by neither
keyboard nor touch, and the chevron keeps the common click at one click.

The drain row's two halves really do different jobs — its Run now fires
a fan-out sweep and the launcher can only ever send one agent — so its
menu item says so instead of looking like the same action.
@suleimansh

Copy link
Copy Markdown
Contributor Author

🤖 automated

Merging this — but one decision in it is yours, and it is cheap to reverse.

Run now on the Routine work card is now a split button. The chevron opens one item, "Configure first, then run", which hands the routine's prompt to the picked project's launcher, so the model and where it runs can be set before an agent is spent.

The issue floated "hovering a prompt button shows a secondary action … maybe as a dropdown?". I built the dropdown half and made its trigger always visible: a control that exists only under a mouse is reachable by neither keyboard nor touch. That is the one thing worth overruling if you disagree — it is a chevron, so switching it is a small follow-up, not a revert.

  • Option A — chevron always visible (what shipped).
  • Option B — chevron appears on hover only.

Second, smaller one: "Spin up agents working on the AI queue" is the only row whose Run now fires a fan-out sweep, and the launcher can only ever send one agent. Its menu item therefore reads "one agent, not the fan-out" instead of looking like the same action as the other rows. Say if that is more wording than it needs.

Next is #1506 — tooltips on these same buttons, where "what model / where it runs" gets said on the card itself instead of only after you arrive at the launcher.

@suleimansh
suleimansh merged commit 9bdf533 into main Aug 22, 2026
2 checks passed
@suleimansh
suleimansh deleted the configure-first-then-run branch August 22, 2026 13:46
suleimansh added a commit that referenced this pull request Aug 22, 2026
Run now spends an agent on settings that are nowhere on the Routine work
card: the model and where it runs come from the Global options, so the
only way to change them was to leave, edit the preferences, and come
back.

Each Run now becomes a split button. Its chevron opens one item,
"Configure first, then run", which hands the routine's prompt to the
picked project's launcher — where the model, the location, and the
prompt itself can all be changed before anything is spent.

The carry is the draft stash a hot ticket already uses (#1066/#1139)
rather than a second mechanism: the launcher takes it once as it mounts,
so a reload does not re-seed it.

A split button rather than the hover-revealed control the issue floats:
a control that only exists under a mouse is reachable by neither
keyboard nor touch, and the chevron keeps the common click at one click.

The drain row's two halves really do different jobs — its Run now fires
a fan-out sweep and the launcher can only ever send one agent — so its
menu item says so instead of looking like the same action.
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.

Add "Configure first, then run" to prompt buttons

1 participant