Skip to content
This repository was archived by the owner on Sep 2, 2026. It is now read-only.

[Spec #26] Shipped fade & auto-archive - #67

Merged
64ix merged 10 commits into
mainfrom
spec/26-shipped-fade-archive
Aug 25, 2026
Merged

64ix merged 10 commits into
mainfrom
spec/26-shipped-fade-archive

Conversation

@64ix

@64ix 64ix commented Aug 25, 2026 •

Copy link
Copy Markdown
Owner
Files Added Deleted Net
Test 3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​309 $\color{#cf222e}{\Huge{\mathbf{−}}}$​3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​306
Prod 21 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​523 $\color{#cf222e}{\Huge{\mathbf{−}}}$​13 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​510

Summary

Implements the shipped fade & auto-archive: a configurable delay (default 14 days, in settings) counted from the moment a feature-board card enters shipped (any path). At the deadline the card auto-archives into a collapsed Archived sink on the feature board (count in the header, expandable, 1-click restore). The stage stays shipped — archive is a display/storage rule, never a stage change. Restore returns the card to shipped and re-arms the delay. Manual archive stays available any time; worktree deletion remains the separate existing action.

Built on the merged foundation: the feature board (#24 / #44) supplies the shipped column; the existing isArchived worktree flag (spec 1) and spec-29 sync allowlist carry the archive state.

Spec & Tickets

Closes #26
Closes #51

Acceptance criteria

Criterion Verdict Evidence
Fade check is pure: (shipped-at, delay) → archived, boundary tested ✅ shipped-fade.ts isShippedFaded (pure); boundary cases in shipped-fade.test.ts (exact-deadline archives, day-before doesn't)
Entry time captured for both merged-PR and manual paths ✅ Manual stamp on first observation + merged-PR backfill via mergedPrObservedAtFor; tests in use-shipped-fade-archive.test.ts
Auto-archive applies on read + a periodic/idle pass ✅ use-shipped-fade-archive.ts: pass on mount/every worktree/settings change + 60s interval (SHIPPED_FADE_CHECK_INTERVAL_MS)
Auto-archived cards appear in the collapsed sink with a count ✅ FeatureBoardArchiveSink.tsx — collapsed by default, header shows "Archived (n)", expandable; FeatureBoardArchiveCard.tsx renders rows
Restore returns the card to shipped and re-arms the delay ✅ restoredShippedCardMeta re-stamps shippedAt and clears isArchived; stage untouched; tested in shipped-fade.test.ts
Archiving never changes the stage ✅ Fade pass only writes isArchived/shippedAt; test asserts no workflowStage in updates
The delay is configurable in settings ✅ autoArchiveDelayDays setting (default 14) in General settings section (GeneralWorkspaceSettingsSection.tsx, settings.ts)
Manual archive works any time; deletion stays separate ✅ Card-actions Archive menu item on board cards (FeatureBoardCard.tsx); no delete path touched

Changes

  • Fade core (shipped-fade.ts): pure isShippedFaded deadline check, resolveShippedEntryTime entry-time fallback, restoredShippedCardMeta restore patch.
  • Applier (use-shipped-fade-archive.ts): app-wide pass on read + 60s idle interval; captures shipped entry times, auto-archives overdue cards, skips folder workspaces and already-archived cards.
  • Board UI: collapsed Archived sink with count + 1-click restore (FeatureBoardArchiveSink.tsx); manual Archive action on every board card (FeatureBoardCard.tsx).
  • Settings: autoArchiveDelayDays (days, default 14) wired through global settings types, store slice, and the General settings section.

QA plan

  • Ship a card manually → within a minute it gains a shippedAt and stays visible before the delay elapses.
  • With autoArchiveDelayDays = 1, wait past the deadline (or backdate) → card moves into the collapsed Archived sink; header reads "Archived (1)".
  • Expand the sink → Restore returns the card to the shipped column and it does not immediately re-archive.
  • Change the delay in Settings → new cards honor the configured value.
  • Archive a card manually from its card menu → lands in the sink immediately; its workflow stage still shows shipped everywhere.
  • Delete a worktree of a shipped card → unchanged behavior; archive never deletes anything.

Decisions (Problem → Resolution)

  • Merge timestamp unavailable per-worktree → proxy with PRInfo.updatedAt (frozen after merge), falling back to fetch time for pre-migration rows.
  • Folder workspaces lack persisted meta / git-only batch applier → fade pass skips them rather than persisting stray entries.
  • Cold PR cache at pass time → entry time falls back to now, granting a fresh delay window (documented degradation).
  • Review round: restore re-arm was inline and untested → extracted to pure restoredShippedCardMeta with tests; dead ternary guard removed; test cache key built via getGitHubPRCacheKey.
  • Prior fix round merged in late: shared FeatureBoardCardActions/branch-row components dedupe the card dropdown; buildStageDeclarationMeta stamps shippedAt at the moment a manual stage write ships a card (entry time from the ship action, not first observation).

64ix added 8 commits August 25, 2026 08:47
Add a pure shipped-fade check, shippedAt entry capture (merged-PR and manual),
auto-archive on read + periodic pass, and an Archived sink column with restore.
Persist shippedAt end-to-end (Worktree/WorktreeMeta, IPC, RPC schema+forward,
sync allowlist) and add the autoArchiveDelayDays setting. refs #51
Folder workspaces carry no persisted shippedAt and the batch meta applier is
git-worktree-only; exclude them so a shipped folder never persists a stray
meta entry. refs #51
Every board card gets an Archive menu item (stage untouched) so manual archive
stays available any time, separate from worktree delete. refs #51
Dedupe the card actions dropdown + branch row into a shared component,
drop the always-true onArchiveCard guard, and stamp shippedAt at the moment
a manual stage write ships a card. Add a merged-PR entry-capture test.

Refs: #26
- extract restoredShippedCardMeta pure fn + vitest coverage (restore re-arm)
- remove dead onArchiveCard ternary guard in FeatureBoardCard
- build test prCache key via getGitHubPRCacheKey instead of hand-built string

Refs #51
@64ix
64ix marked this pull request as ready for review August 25, 2026 09:21
@64ix
64ix merged commit a65989b into main Aug 25, 2026
47 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Shipped fade & auto-archive with Archived sink [Spec] Shipped fade & auto-archive

1 participant