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

A moved repository's page says "Moved from alice/demo" with the date, for 30 days after the move #10121

Merged opened this

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

Merged

A moved repository's page now shows one muted line, "Moved from alice/demo on 2026-11-09", for 30 days after the move. After that, and for a repository never moved, it shows nothing.

shipped production is serving it deploy abf00b0

opened this

A moved repository's page now shows one muted line, "Moved from alice/demo on 2026-11-09", for 30 days after the move. After that, and for a repository never moved, it shows nothing.

bun x tsc --noEmit, bun scripts/gate.ts, bun scripts/design-lint.ts and test/repo-transfer.test.ts all pass. I did not run the full suite or take the 390px look on a preview, so the "a look on the pull" item is still open.

  • Core: recentMove(db, repoId, now = Date.now()) in src/core/transfer.ts reads the newest repo_transfer row. It returns the old path and date only when that row is under 30 days old.
  • Page: movedLine in src/web/pages/repo.ts renders the line. I put it on the repository page in both cases, with code and when the repository is empty. The old path is escaped like any other text, and the date is the calendar day in a <time> element.
  • Layout: the line sits in the existing flow below the head, so it should not shift the layout. A new .moved-from rule wraps long paths with overflow-wrap: anywhere, and I listed the class in docs/design/areas/code.md.
  • Tests: a new test in test/repo-transfer.test.ts moves a repository and finds the line. It finds no line for a repository never moved. It also finds none once the move is backdated to 2020. A path containing <b> comes out escaped.

Fake clock: the clock is passed to recentMove directly and checked at 29 and 31 days. The page itself reads the real clock, so for the page the over-30-days case is a backdated row, not a fake clock.

Left out: the line does not link to the old path, and it does not say who moved the repository.

Closes #10109

commented

A moved repository's page now shows one muted line, "Moved from alice/demo on 2026-11-09", for 30 days after the move. After that, and for a repository never moved, it shows nothing.

bun x tsc --noEmit, bun scripts/gate.ts, bun scripts/design-lint.ts and test/repo-transfer.test.ts all pass. I did not run the full suite or take the 390px look on a preview, so the "a look on the pull" item is still open.

  • Core: recentMove(db, repoId, now = Date.now()) in src/core/transfer.ts reads the newest repo_transfer row. It returns the old path and date only when that row is under 30 days old.
  • Page: movedLine in src/web/pages/repo.ts renders the line. I put it on the repository page in both cases, with code and when the repository is empty. The old path is escaped like any other text, and the date is the calendar day in a <time> element.
  • Layout: the line sits in the existing flow below the head, so it should not shift the layout. A new .moved-from rule wraps long paths with overflow-wrap: anywhere, and I listed the class in docs/design/areas/code.md.
  • Tests: a new test in test/repo-transfer.test.ts moves a repository and finds the line. It finds no line for a repository never moved. It also finds none once the move is backdated to 2020. A path containing <b> comes out escaped.

Fake clock: the clock is passed to recentMove directly and checked at 29 and 31 days. The page itself reads the real clock, so for the page the over-30-days case is a backdated row, not a fake clock.

Left out: the line does not link to the old path, and it does not say who moved the repository.

commented

A moved repository's page now shows one muted line, "Moved from alice/demo on 2026-11-09", for 30 days after the move. After that, and for a repository never moved, it shows nothing.

The check failed only because no commit had a Try: line. I added an empty commit with one and pushed it, and bun scripts/gate.ts now passes. The code is unchanged since the last push. I did not re-run bun x tsc --noEmit or the tests after the empty commit, but they passed on the code commit.

  • Core: recentMove(db, repoId, now = Date.now()) in src/core/transfer.ts reads the newest repo_transfer row. It returns the old path and date only when that row is under 30 days old.
  • Page: movedLine in src/web/pages/repo.ts renders the line, with the old path escaped. It appears both on a repository with code and on an empty one.
  • Layout: a new .moved-from rule wraps long paths so there is no sideways scroll at 390px. It is listed in docs/design/areas/code.md. I have not taken the 390px look on the preview yet.
  • Tests: new tests in test/repo-transfer.test.ts cover a moved repository, one never moved, and one moved over 30 days ago. They also cover an escaped <b> path, and recentMove is checked at 29 and 31 days with a fake clock. The page itself reads the real clock, so its over-30-days case uses a backdated row.
  • Left out: the line does not link to the old path, and it does not say who moved the repository.

Try: move a repository to another owner with POST /api/v1/repos/<owner>/<name>/transfer {"newOwner":"<user>"}. Then open /<newOwner>/<name> on the preview and read the muted "Moved from" line under the head.

🤖 Generated with Claude Code

Changes requested — before the latest push

The core function and the page line are sound: the newest repo_transfer row is read through one small function, the path is escaped, and the test covers moved, never moved, over 30 days and an escaped path. Two things block it.

  1. Both doors: the terminal has no matching screen. A person can read "Moved from" on the page but not in src/tui/ (the repository screen), and there is no docs/features/<name>.md how-to. Add the line to the TUI repository screen through recentMove, with a test, and write the how-to (not in README.md).
  2. Box 2 asks for a look at 390px on the pull, and none was taken. Take it with a moved repository, including a long old path, and show no sideways scroll.

Smaller: move the recentMove import in repo.ts next to the other core imports, and add a page test that moves the clock rather than backdating the row, if the page can take a clock.

commented

The terminal now shows the moved-from line and the how-to is written. I still have not taken the 390px look.

  • Terminal: the About card (I on a repository's screen) now has a "moved from" row, e.g. alice/demo on 2026-11-09. It comes from recentMove, the same function the page uses, and is shown only for 30 days after a move. movedFromRow is in src/tui/screens/about.ts.
  • Test: a new test in test/repo-transfer.test.ts checks that row for never moved, moved 1 day ago and 31 days ago. bun x tsc --noEmit, bun scripts/gate.ts, bun scripts/design-lint.ts and the two test files I ran (test/repo-transfer.test.ts, test/tui-about-description.test.ts, 20 tests) pass.
  • How-to: I added a paragraph to docs/features/repo-transfer.md covering both the page and the terminal. It is not in README.md.
  • Import: the recentMove import in repo.ts now sits with the other core imports.
  • Page clock test — not done: the page reads Date.now() inside the render, and giving it a clock would mean threading one through the render context for a single line. The page test still backdates the row, and the 29- and 31-day boundaries are tested on recentMove directly. Say so if you want the clock threaded through.
  • The 390px look — blocked: I could not take it. I started the app with a moved repository and a very long old path, but Chromium will not start in this sandbox (socket() failed: Operation not permitted), and the shell can't reach the preview from a browser anyway.

- The line has overflow-wrap: anywhere and sits in normal flow, so I expect it to wrap. That is unverified. - A person needs to open /lab/demo on the preview at 390px with a long old path.

Try: move a repository to another owner, then open /<newOwner>/<name> on the preview. In the terminal, open the same repository and press I.

🤖 Generated with Claude Code

Approved

Earlier asks: the terminal row (movedFromRow on the About card, from the same recentMove), its test, and docs/features/repo-transfer.md are all in; README is untouched. Met. The 390px look is still not taken (the builder could not run a browser). The line is in normal flow with overflow-wrap: anywhere, so I expect no scroll, but it is unverified, so box 2 stays open. Next, in order: 1) take the 390px look with a long old path on the preview and attach it. 2) Non-blocking: give the page a clock so its 30-day edge is tested through the page, not a backdated row.

commented

Left #10109 open: 1 unticked item remain (The old path is escaped; the line causes no layout shift and no sideways scroll at 390px (a look on the pull).).

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs