Repository navigation
feat: deck-level refresh-all button + r/Shift-R keyboard shortcuts - #68
Merged
Merged
Conversation
11th rung on the per-column/deck UX axis. The previous 10 (tab groups, collapse, JSON export, search, pin, duplicate, color, deck color, width, deck DnD, keyboard nav) all targeted individual-column or single-deck ergonomics; this one is the first dashboard-level batch verb. At 10+ columns per deck the manual hunt-and-click on each per-column refresh button was the friction the keyboard nav (PR #66) made half a solution to: j/k/c// gave the operator a way to focus a column without the mouse, but every fresh-feed action still needed a click. What ships: - Deck-view top-bar Refresh-all button next to the column count. Tooltip Refresh all columns; brand-hover styling matches the existing column-card per-column refresh button. Visible whenever the active deck has at least one column. Spins while any pendingRefreshIds id belongs to the active deck — the visual confirmation 12+ off-screen columns need so the operator knows the action took effect. - r shortcut: refresh the focused column. Quiet, surgical — pair with j/k to walk a deck and freshen one stale feed without touching the others. - Shift-R shortcut: refresh every visible column in the active tab. Same set the deck-header button hits when no tab filter is active, scoped down when one is. Collapsed columns in the active tab are visibleColumnIds and get refreshed; columns hidden by a different tab filter do not. - New pendingRefreshIds: Set<string> on the deck store. Populated by requestRefreshColumns(ids), drained by each ColumnCard's useEffect via clearPendingRefresh(id) the moment it fires its own onRefresh(). Three design decisions: 1. **Set, not boolean.** A parallel sweep across 15 columns lands on every column exactly once, not just the last one rendered. Same lifetime as pendingSearchOpen / focusedColumnId — view-state only, clears on reload. 2. **In-flight refresh blocks the signal, doesn't drop it.** When a column is already mid-fetch (isFetching=true), the useEffect sees the pending id but doesn't re-fire; once the in-flight fetch completes the effect re-runs and the new refresh kicks off. The Set already guards against double-enqueue from a hot click. Result: clicking Refresh-all mid-fetch always gives the operator a fresh fetch on every column, never a no-op. 3. **r refreshes focused, Shift-R refreshes visible, button refreshes deck.** Three intentions, three verbs. r without focus is a no-op (same rationale as / without focus). Shift-R works without focus because the implicit target is the deck the operator is looking at. The button works without focus because that's the deck-level action. Cleanup: deleteDeck and removeColumn scrub the deleted ids from pendingRefreshIds so a stale signal can't make a freshly-deleted column keep firing onRefresh in the next render tick. NO DB schema, NO migration, NO server round-trip, NO plugin contract touched, NO version bump on DECK_EXPORT_VERSION. Pure view-state + UI. Could NOT run Next 16 build/typecheck (offline sandbox — same constraint as PRs #49-#66). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…cope, settle-time drain, quiet sweep toasts
- deck-view: style TooltipTrigger as the button itself instead of
asChild + nested <button> — the repo's tooltip is Base UI, which has
no asChild prop (build typecheck failed) and renders its own <button>,
so the old markup nested buttons. Mirrors every trigger in column-card.
- Refresh-all now enqueues only columns the deck-board actually mounts:
the button and Shift-R share getVisibleColumnIds (extracted from
deck-board's memo into the store module next to TAB_GROUP_ALL).
Enqueueing all deck columnIds stranded pending ids for columns a
non-"All" tab filter keeps unmounted — the header spinner never
stopped and switching tabs later fired surprise refreshes. Chose
enqueue-side scoping over store-side draining because visibility is
already a pure derivation of store state; sharing the exact
computation guarantees "what refreshes" can never drift from "what
mounts", whereas a store-side GC would have to duplicate the same
tab/pin rules. Unregistered column types (card renders the error
shell and returns before the drain effect) are filtered centrally in
requestRefreshColumns.
- column-card: store-routed refreshes call onRefresh({ quiet: true })
to suppress per-column success toasts — a 12-column sweep stacked 13+
toasts on top of the deck-header's aggregate "Refreshing N columns"
toast. Error toasts stay loud (unlike the fully-silent interval
auto-refresh, the operator explicitly asked for this fetch).
- column-card: drain the pending id when the fetch settles (.finally)
instead of before it fires, so pendingRefreshIds tracks real in-flight
state and the header spinner spins for the duration of the sweep
instead of one frame. The .finally closure survives unmount, so a
column that leaves the screen mid-flight still drains its id; an
in-flight ref guards re-entry in the window before isFetching
re-renders true.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
8 tasks
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.
What
11th rung on the per-column/deck UX axis. Adds a deck-level "Refresh all" button in the top bar and two keyboard shortcuts (
r/ Shift-R) that finally close the gap the keyboard nav (PR #66) made half a solution to.pendingRefreshIdsid belongs to the active deck — visual confirmation 12+ off-screen columns need.rshortcut: refresh the focused column. Quiet, surgical — pair withj/kto walk a deck and freshen one stale feed without touching the others.Rshortcut: refresh every visible column in the active tab. Same set the deck-header button hits when no tab filter is active, scoped down when one is. Collapsed columns in the active tab arevisibleColumnIdsand get refreshed; columns hidden by a different tab filter do not.Why
The previous 10 rungs (tab groups, collapse, JSON export, search, pin, duplicate, column color, deck color, width, deck DnD, keyboard nav) all targeted individual-column or single-deck ergonomics. The keyboard nav PR #66 explicitly noted that "cross-deck and keyboard ergonomics become the bottleneck" once those are shipped.
j/k/c//gave the operator a way to focus a column without the mouse, but every fresh-feed action still needed a click on the per-column refresh button. At 10+ columns per deck the manual hunt-and-click was the friction.This PR is the first dashboard-level batch verb. Three intentions — one column / visible columns / whole deck — get three distinct verbs.
Built from inspecting minitor's current state on this fork (no fresh repo-actions idea for minitor in yesterday's article — keyboard nav PR #66 burned Jun-08 idea #3; no open ai-build issues; no remaining minitor-tagged priorities). The codebase itself surfaced this rung:
RefreshCwis already imported on every column, but no top-level affordance exists to fire refresh across them in one gesture.Three design decisions
Set<string>, not a boolean signal. A parallel sweep across 15 columns lands on every column exactly once, not just the last one rendered. Same lifetime aspendingSearchOpen/focusedColumnId— view-state only, clears on reload.isFetching=true), theuseEffectsees the pending id but doesn't re-fire; once the in-flight fetch completes the effect re-runs and the new refresh kicks off. TheSetalready guards against double-enqueue from a hot click. Result: clicking Refresh-all mid-fetch always gives the operator a fresh fetch on every column, never a silent no-op.rrefreshes focused, Shift-Rrefreshes visible, button refreshes whole deck.rwithout focus is a no-op (same rationale as/without focus). Shift-Rworks without focus because the implicit target is the deck the operator is looking at. The button works without focus because that's the deck-level action.Cleanup
deleteDeckandremoveColumnscrub the deleted ids frompendingRefreshIdsso a stale signal can't make a freshly-deleted column keep firingonRefreshin the next render tick (same pattern PR #66 used forfocusedColumnId/pendingSearchOpen).Files changed (4)
lib/store/use-deck-store.ts(+57 / -2) —pendingRefreshIds: Set<string>state field,requestRefreshColumns(ids)+clearPendingRefresh(id)actions, dedup-against-pending + skip-nonexistent guards on enqueue, cleanup indeleteDeck+removeColumn.components/column/column-card.tsx(+24) —pendingRefreshIds.has(column.id)subscription,onRefreshRefto capture the latestonRefreshwithout re-running the effect on every render, useEffect that firesonRefreshRef.current()thenclearPendingRefresh(column.id), in-flight guard viaisFetching.components/deck/deck-view.tsx(+44) —RefreshCwimport from lucide-react, Tooltip wrapper,anyActiveDeckRefreshingselector that subscribes to a stable boolean (not the Set) so the deck-view doesn't re-render on every Set mutation, refresh button next to the column count.components/deck/deck-board.tsx(+24 / -3) —requestRefreshColumnsstore subscription,r/ Shift-Rcases in the keyboard switch, comment block extended to document the new shortcuts.What's not changed
pendingRefreshIdsis pure view-state).DECK_EXPORT_VERSION— refresh signals don't round-trip through export/import/share-links/snapshots, same pattern ascollapsedColumnIds/searchByColumn/widthByColumn/focusedColumnId/pendingSearchOpen.Sandbox constraint
Could NOT run Next 16 build / typecheck locally (offline sandbox — same constraint as PRs #49-#66). Types and imports were authored against the existing patterns in the file (
pendingSearchOpenwas the model forpendingRefreshIds;searchByColumncleanup was the model for the cleanup logic indeleteDeck/removeColumn; theTooltipimport path matchescomponents/column/column-card.tsx:39which already wraps the column-level refresh button with the same component).Built autonomously by Aeon