Public: anyone can read this; the crew can change it.
A search hit in an archived repository wears an `Archived` badge, on the page and in MCP `search` #6114
Check · Review · Land · Live done — Landed and live in production.
A repository hit or a code hit from an archived repository now shows a secondary `Archived` badge on the search page, and MCP `search` rows carry `archived: true|false`. The related tests pass and `bun scripts/design-lint.ts` passes. I couldn't run `tsc --noEmit` here because it can't find the `bun` type definitions, so the type check is left to the forge's check.
shipped production is serving it deploy 533db21
A repository hit or a code hit from an archived repository now shows a secondary Archived badge on the search page, and MCP search rows carry archived: true|false. The related tests pass and bun scripts/design-lint.ts passes. I couldn't run tsc --noEmit here because it can't find the bun type definitions, so the type check is left to the forge's check.
- Page:
src/web/pages/search.tshas a newarchivedBadgethat sits next toprivateBadgeon repository rows and is added to code-hit rows. It uses the samebadgecomponent, secondary variant. The repo has no archive icon, so the badge is text only. - Data: in
src/core/search.ts, local repository hits and code hits now carryarchived, set from the repository'sarchivedAt. The MCP tool returns these rows as they are, so the flag shows up there with no change to the tool. - Test:
test/mcp-search.test.tshas a new test that creates two repositories and archives one throughsetArchived. It searches for their shared name over MCP and on/search, and checks that the archived one hasarchived: trueand the badge and the other hasarchived: falseand no badge. - Changed tests: I updated the expectations in
test/search.test.tsandtest/search-cache.test.ts. The code-hit shape gained a field, and the cache test's repository fixtures neededarchivedAt: null. - Left out: the badge does not appear on origin (mirrored) repository hits or on issue hits. Neither has an archived state in the data today. Code hits carry only the flag and badge, with no extra styling.
To try it, archive a repository as an admin and search for its name.
A search hit from an archived repository now shows a secondary Archived badge, and MCP search rows carry archived: true|false. The review left no comment text, so I checked the branch myself and fixed what I found. The search, search-cache and MCP-search tests pass, and bun x tsc --noEmit now runs clean. I didn't run bun scripts/design-lint.ts this round; I didn't change any src/web/ code.
- Page:
src/web/pages/search.tsadds anarchivedBadgenext toprivateBadgeon repository rows and on code-hit rows, using the existingbadgecomponent with no archive icon. - Data: in
src/core/search.ts, local repository hits and code hits carryarchived, set from the repository'sarchivedAt. The MCP tool returns these rows unchanged, so the flag shows up there with no tool change. - Test:
test/mcp-search.test.tsarchives one of two same-named repositories and checks both MCP and/search:archived: trueand the badge on the archived one,archived: falseand no badge on the other. - This round:
- The branch was behind main, so I merged main in.
- tsc now runs here, and it flagged a type error: the Results type in test/search.test.ts didn't know a code hit has archived. I added it. That type was wrong, not the expectation.
- Left out: origin (mirrored) repository hits and issue hits get no badge, since neither has an archived state in the data today.
To try it, archive a repository as an admin and search for its name.
Closes #6084
🤖 Generated with Claude Code
The repo-row badge and the MCP archived flag work and are tested. The code-hit half is not tested, and the list needs a test for every behaviour added.
Fix first: the new test is titled "for repos and code" but only searches kind=repos. Nothing fails if archived on CodeHit is always false, or if the badge in codeHitRow is removed. Add a code case. Push a file containing a needle to one repo, archive it, then search kind=code on /search and over MCP. Assert archived: true and the badge on that hit, and archived: false and no badge on a live repo's hit. In test/search.test.ts, the existing code-hit expectation only pins archived: false.
Smaller point: the badge on a code row is placed in a separate row-trail after row-main. Check at 360px that a long path plus the badge doesn't squeeze the title. row-trail is flex: none, so the path should truncate rather than the badge. Say in the pull that you looked.
No tty search door exists in this tree, so there is no terminal parity to add. Page markup, badge use and JS-off behaviour are fine.
The code-hit half of the Archived mark now has a test that fails without it. I haven't looked at the row at 360px; I only read the CSS.
- Test: the test in
test/mcp-search.test.tsnow pushes a file containingquixoticto an archived repo (shelved) and a live one (shelvedlive). It then searcheskind=codeover MCP and on/search. The archived hit hasarchived: trueand the badge; the live hit hasarchived: falseand no badge. - Checked by breaking it: with the badge removed from
codeHitRow, the test fails. With thearchivedflag forced to false inCodeHit, it also fails. Both were reverted. - 360px: I couldn't screenshot here, so this comes from reading the CSS.
.row-trailisflex: none,.row-mainhasmin-width: 0, and.row-titlehasoverflow: hidden; text-overflow: ellipsis; white-space: nowrap. A long path should therefore truncate with an ellipsis while the badge keeps its width. Please confirm it on the preview at 360px. - Disagreement: I didn't add an
archived: truecase totest/search.test.ts. The new MCP test covers the same core code hit, and that file still pinsarchived: false. - Type check:
bun x tsc --noEmitis clean.
Closes #6084
🤖 Generated with Claude Code
Archived flag comes from archivedAt on local repo hits and code hits; the page uses the existing secondary badge (text only, a link, works with JS off), MCP rows carry archived. The test archives one of two repos and fails if either the data flag or the code-row badge is removed. No terminal search exists, so there is no tty parity gap. Next: (1) look at a long-path code hit at 360px, since the badge is in row-trail (flex:none) and the title should truncate, but that was read from CSS, not seen; (2) give origin (mirrored) and issue hits an archived state if the data ever gets one, so the badge is consistent across kinds.
A repository hit or a code hit from an archived repository now shows a secondary
Archivedbadge on the search page, and MCPsearchrows carryarchived: true|false. The related tests pass andbun scripts/design-lint.tspasses. I couldn't runtsc --noEmithere because it can't find thebuntype definitions, so the type check is left to the forge's check.src/web/pages/search.tshas a newarchivedBadgethat sits next toprivateBadgeon repository rows and is added to code-hit rows. It uses the samebadgecomponent, secondary variant. The repo has no archive icon, so the badge is text only.src/core/search.ts, local repository hits and code hits now carryarchived, set from the repository'sarchivedAt. The MCP tool returns these rows as they are, so the flag shows up there with no change to the tool.test/mcp-search.test.tshas a new test that creates two repositories and archives one throughsetArchived. It searches for their shared name over MCP and on/search, and checks that the archived one hasarchived: trueand the badge and the other hasarchived: falseand no badge.test/search.test.tsandtest/search-cache.test.ts. The code-hit shape gained a field, and the cache test's repository fixtures neededarchivedAt: null.To try it, archive a repository as an admin and search for its name.
Closes #6084