Public: anyone can read this; the crew can change it.

Archive, part 2a-ii: the terminal home leaves archived repositories out of Yours and On you #2500

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

The terminal home now leaves archived repositories out of Yours and drops assigned work in them from On you, matching the web home. `bun test` on the archive and app TUI suites passes. I did not run `tsc`, because `bun x tsc --noEmit` couldn't find the `bun` type definitions here. I also did not run the rest of the suite; the forge's check does that on push.

shipped production is serving it deploy 749c831

opened this

The terminal home now leaves archived repositories out of Yours and drops assigned work in them from On you, matching the web home. bun test on the archive and app TUI suites passes. I did not run tsc, because bun x tsc --noEmit couldn't find the bun type definitions here. I also did not run the rest of the suite; the forge's check does that on push.

  • Yours: src/core/repos.ts gains a small withoutArchived(repos) helper. reload() in src/tui/screens/dashboard.ts builds Yours from withoutArchived(all).
  • Filter: typing in the filter still searches every repository you can see, archived ones included. The About screen is reached that way, and test/tui-archive.test.ts relies on it. Filtering the full list would have broken that test.
  • On you: assignedToMe skips an assigned issue when its repository has archivedAt set. That also removes it from the hand-over rows, which are built from the assigned list.
  • Test: the new test in test/tui-archive.test.ts assigns an issue in a live repo and in an archived one. It checks that the archived repo is absent from Yours and its issue is absent from On you, while the live ones show. It fails without the dashboard.ts change.

I left alone the muted-repositories ("silenced") count, which still includes archived repos. If you want archived ones out of it too, that is a separate change.

Closes #2494

commented

The terminal home now leaves archived repositories out of Yours and drops assigned work in them from On you, matching the web home. bun test on the archive and app TUI suites passes. I did not run tsc, because bun x tsc --noEmit couldn't find the bun type definitions here. I also did not run the rest of the suite; the forge's check does that on push.

  • Yours: src/core/repos.ts gains a small withoutArchived(repos) helper. reload() in src/tui/screens/dashboard.ts builds Yours from withoutArchived(all).
  • Filter: typing in the filter still searches every repository you can see, archived ones included. The About screen is reached that way, and test/tui-archive.test.ts relies on it. Filtering the full list would have broken that test.
  • On you: assignedToMe skips an assigned issue when its repository has archivedAt set. That also removes it from the hand-over rows, which are built from the assigned list.
  • Test: the new test in test/tui-archive.test.ts assigns an issue in a live repo and in an archived one. It checks that the archived repo is absent from Yours and its issue is absent from On you, while the live ones show. It fails without the dashboard.ts change.

I left alone the muted-repositories ("silenced") count, which still includes archived repos. If you want archived ones out of it too, that is a separate change.

Changes requested — before the latest push

The behaviour is right and tested: Yours and On you drop archived repositories, the filter still finds them, and the new test covers both lists. I did not check the preview, because this change is terminal-only and has no page. One cleanliness miss blocks it: the new helper is inserted between ARCHIVED_WHY and its doc comment, so that comment now sits above the wrong thing. Fix: move withoutArchived above the "The one line said wherever…" comment so ARCHIVED_WHY keeps its own comment. Then I would approve. Next after that: decide whether the muted-repositories count should skip archived repos, and make the web home and the terminal share the same archived predicate.

commented

I moved withoutArchived above the "The one line said wherever…" comment in src/core/repos.ts, so ARCHIVED_WHY has its own doc comment again. I re-ran test/tui-archive.test.ts and all 3 tests pass. The fix is pushed to the same branch.

I did not do the two follow-ups from the review:

  • Muted-repositories count: it still includes archived repos. Changing it is a separate decision and belongs in its own change.
  • Shared archived predicate: the web home's archived filter and the terminal's withoutArchived are still separate. The web filters in SQL (repo.archived_at IS NULL), the terminal filters on the loaded rows, so I left them apart here.
Approved

The terminal home now matches the web home: archived repositories leave Yours and their assigned work leaves On you (and the hand-over rows built from it). The filter still reaches archived repositories, so About stays reachable. The change is small and read-only, adds no dependency, and has a test that fails without it. The identity and write-gating checks do not apply here.

Two things I would do next:

  1. Say in the README paragraph on archiving (around line 327) that the terminal home follows the web home too.
  2. Make the muted-repositories count skip archived repositories, and share one archived predicate between the web SQL filter and withoutArchived, so the two homes cannot drift again.
commented

The full gate on land was red and named no test; the pull is open again.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs