Refresh routines list after context-menu Run now - #441
Merged
TheGreatAxios merged 2 commits intoAug 29, 2026
Merged
TheGreatAxios merged 2 commits into
TheGreatAxios merged 2 commits into
Conversation
Covers the run-now success case (onRoutineRan called with the tenant id) and failure case (not called) so the fix below has a red/green pair to prove against.
Right-clicking a routine and choosing Run now only toasted — the routines list and run history stayed stale until an unrelated refetch, unlike the routine panel's own Run now button. Thread onRoutineRan through ShellContextMenuActions and reuse the panel's exact invalidation via a shared invalidateRoutineQueries helper. Fixes CL-7137.
TheGreatAxios
force-pushed
the
cl-7137-right-click-run-now-on-a-routine-leaves-the-routines-list
branch
from
August 29, 2026 04:46
d2c03a2 to
588d686
Compare
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.
Fixes CL-7137 — https://linear.app/abklabs/issue/CL-7137
Problem
The routine panel's Run now button (
apps/web/src/shell/routine-panel.tsx:611) invalidates the routines list and run history after a successful run. The shell context menu's Run now item (apps/web/src/shell/context-menu/items.tsx:149-159) calls the samerunRoutineNowbut only toasts —ShellContextMenuActions(items.tsx:40-45) had no way to trigger a refetch, so the routines list and run history stayed stale after a right-click Run now.Change
invalidateRoutineQueries(queryClient, tenantId)next totenantKeysinapps/web/src/query-client.ts, shared by both call sites.routine-panel.tsx's Run now button now calls the shared helper instead of duplicating the twoinvalidateQueriescalls.onRoutineRan(tenantId)toShellContextMenuActions; the context menu's run-now item calls it after a successful run.shell-context-menu.tsxwiresonRoutineRantoinvalidateRoutineQueriesviauseQueryClient().Tests
apps/web/src/shell/context-menu/items.test.tsx: run-now success callsonRoutineRanwith the tenant id; run-now failure does not call it.Ran locally:
bun test src/shell/context-menu/items.test.tsx test/routine-panel.test.tsx test/query-client.test.ts src/query-client.test.ts(all pass),bun run typecheck(clean), prettier + eslint on changed files (clean). The 1-minute load average on this shared machine was above 40 when finishing, so the fullbun run checkwas skipped locally per the builder brief — CI is the gate for that.