Skip to content

feat: add workflow navigator filter, rename, and confirmations#45

Open
gr3enarr0w wants to merge 4 commits into
QuintinShaw:mainfrom
gr3enarr0w:feat/navigator-enhancements
Open

feat: add workflow navigator filter, rename, and confirmations#45
gr3enarr0w wants to merge 4 commits into
QuintinShaw:mainfrom
gr3enarr0w:feat/navigator-enhancements

Conversation

@gr3enarr0w

Copy link
Copy Markdown
Contributor

Summary

Implements upstream #39, #40, and #41 for the /workflows navigator.

  • adds search/filter support for runs and saved workflows
  • keeps filtered cursor selection aligned with visible rows
  • adds saved workflow rename support in storage and navigator UI
  • adds confirmation flow before saved workflow delete and run stop actions
  • adds tests for filtering, rename, destructive confirmations, and storage rename behavior

Closes #39.
Closes #40.
Closes #41.

Review notes

Full scoped review completed before publishing. One issue was found and fixed before PR creation: saved workflow rename now rejects target names that already exist in project, legacy project, or user locations so a rename cannot shadow another workflow.

Verification

  • npx biome check src/workflow-saved.ts tests/workflow-saved.test.ts src/workflow-ui.ts tests/workflow-ui.test.ts
  • npm run build
  • npm run test:unit -- tests/workflow-saved.test.ts tests/workflow-ui.test.ts (project script ran full unit suite: 767 passing, 0 failing)

Clark Everson and others added 3 commits June 26, 2026 13:35
…ws navigator

Closes #6, #7, #8

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…entCount to respect filter

currentCount was returning the unfiltered total so j/k cursor-wrap worked on
the wrong range when a filter was active. Extracting helpers also eliminates
the duplicate inline logic from renderNavigator.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@QuintinShaw

Copy link
Copy Markdown
Owner

Filter and the confirm dialogs look good, and the storage-layer rename is well tested.

The rename is missing its other half though: it updates storage but never re-registers the command, so / is dead until reload. Mirror the save path — call registerSavedWorkflow(...) for the new name in the rename success branch. The legacy-dir rename gap and a README note for the new keys would be good to fold in too.

…r gap, document new keys

After a successful rename in the /workflows navigator, call registerSavedWorkflow
for the new name so /<newName> works immediately without a session reload. The old
/<oldName> slot remains but its exists predicate returns false, telling the user to
reload — consistent with the delete behaviour.

Also fix the legacy-dir rename gap: rename() now falls through to legacyProjectDir
(matching the delete() pattern) so workflows saved before the project-scoped path
migration can be renamed without requiring a manual file move.

Add a keyboard-shortcut reference table to README.md covering the new filter (/),
rename (n), and double-x confirmation dialogs introduced in this PR.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@QuintinShaw

Copy link
Copy Markdown
Owner

Found one bug that needs fixing before this can merge, plus a couple of gaps vs the issues it closes.

The bug: on the second x, the action target is recomputed from the current cursor (state.activeSavedName(model) / activeRunId(model)) instead of using what was captured in pendingConfirm. The navigator re-renders on manager events between the two keypresses, so the confirmed item and the executed item can differ — and if the item under the cursor changes kind, the deleteSaved branch sees a non-empty pendingConfirm and executes immediately, skipping the first warning entirely. Fix: validate pendingConfirm.action and target name against the current target before executing.

Gaps vs the issues: #41 also asks for a (lighter) confirmation on pause — not implemented; #39 asks for filtering by status — only name/runId (runs) and name/description (saved) are matched. Either add them or note the scope cut in the PR body so the issues don't auto-close on a partial.

Test ask: the new interaction logic (filter typing, rename buffer, double-x confirm) lives in openWorkflowNavigator.act() and none of it has key-event-flow tests — the tests only cover the pure functions, which is exactly where the bug above hides. Please add handleInput-level tests for the confirm flow and filter input, and cover the legacy-dir rename branch. Also the test comments reference issues #6/#7/#8 — should be #39/#40/#41.

Heads-up on ordering: #30 also rewrites renderNavigator and will likely land first, so expect a rebase.

@QuintinShaw

Copy link
Copy Markdown
Owner

Same for this one, @gr3enarr0w — no pressure. The main blocker is still the delete-confirmation race noted above (the target can shift between the two keypresses). Happy to wait for your update, or take it forward myself with attribution if you'd rather hand it off. Let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants