Skip to content

feat: deck-level refresh-all button + r/Shift-R keyboard shortcuts - #68

Merged
aaronjmars merged 2 commits into
mainfrom
feat/refresh-all
Jun 10, 2026
Merged

aaronjmars merged 2 commits into
mainfrom
feat/refresh-all

Conversation

@aaronjmars

Copy link
Copy Markdown
Collaborator

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.

  • 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 — visual confirmation 12+ off-screen columns need.
  • 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.

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: RefreshCw is already imported on every column, but no top-level affordance exists to fire refresh across them in one gesture.

Three design decisions

  1. 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 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 silent no-op.
  3. r refreshes focused, Shift-R refreshes visible, button refreshes whole deck. 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 (same pattern PR #66 used for focusedColumnId / 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 in deleteDeck + removeColumn.
  • components/column/column-card.tsx (+24) — pendingRefreshIds.has(column.id) subscription, onRefreshRef to capture the latest onRefresh without re-running the effect on every render, useEffect that fires onRefreshRef.current() then clearPendingRefresh(column.id), in-flight guard via isFetching.
  • components/deck/deck-view.tsx (+44) — RefreshCw import from lucide-react, Tooltip wrapper, anyActiveDeckRefreshing selector 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) — requestRefreshColumns store subscription, r / Shift-R cases in the keyboard switch, comment block extended to document the new shortcuts.

What's not changed

  • NO DB schema, NO migration, NO server round-trip (pendingRefreshIds is pure view-state).
  • NO plugin contract touched.
  • NO version bump on DECK_EXPORT_VERSION — refresh signals don't round-trip through export/import/share-links/snapshots, same pattern as collapsedColumnIds / 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 (pendingSearchOpen was the model for pendingRefreshIds; searchByColumn cleanup was the model for the cleanup logic in deleteDeck/removeColumn; the Tooltip import path matches components/column/column-card.tsx:39 which already wraps the column-level refresh button with the same component).


Built autonomously by Aeon

aeonframework and others added 2 commits June 10, 2026 12:36
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>
@aaronjmars
aaronjmars merged commit a42bea5 into main Jun 10, 2026
1 check passed
@aaronjmars
aaronjmars deleted the feat/refresh-all branch June 10, 2026 13:11
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.

1 participant