Repository navigation
fix(clients): links to archived threads show as archived again - #41367
clintebbesen wants to merge 1 commit into
Conversation
Since thread links started reading title and project for threads that are not loaded (pingdotgg#32830), a link to an archived thread looks exactly like a live one and opens the new-thread screen. Before that, archived links fell back to the plain icon, so a list of links showed which threads were archived. Thread link metadata now says whether the thread is archived. Web shows an archived link with the archive icon and the unresolved accent, its hover card says it is archived, and clicking it opens Settings > Archive, where it can be unarchived. Mobile shows the plain thread icon again. Servers without the flag keep today's behaviour. Fixes pingdotgg#40685
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Thanks for this. #40928 makes the same change and is the one being kept. #40928 addresses the same archived-link regression and makes the mobile state explicit with an archive icon and label, including thread mentions. This version only restores the plain mobile thread icon, which does not clearly identify why the project icon disappeared. Your metadata approach addresses the same underlying problem. The other pull request also covers restoring the live presentation after unarchiving and leaves archived-thread navigation to its separate fix, so it is the more complete change to keep for this issue. Closing as a duplicate. |
Problem
Since #32830, a link to an archived thread looks exactly like a link to a live one: same title, same project icon, same "Open thread" tooltip. Clicking it opens the new-thread screen, because an archived thread has no page. Before 0.1.11, archived links fell back to the plain icon, so a list of links (for example an agent's "these threads are ready to archive" list) showed which ones were already archived. Now there is no way to tell without clicking each one.
Repro: have a message link several threads, archive two of them, go back to the message. Details in #40685.
Change
getThreadLinkMetadataalso returnsarchived(fromarchived_at). The key is optional in the contract, so servers that predate it keep today's behaviour.unresolvedaccent, its hover card says it is archived, and clicking it opens Settings > Archive, where it can be unarchived, instead of the new-thread screen. Its label reads "Archived thread, {title}".isArchivedThreadLinkTargetin@t3tools/shared/threadLinksreads the state from a loaded shell (archivedAt) or from link metadata, for both clients.The live-thread fixes from #32830 are unchanged: unloaded live threads still show their title and project icon.
Scope
Fixes #40685, a regression from #32830 (0.1.7 showed archived links apart, 0.1.11 does not).
Verification
ProjectionStore.test.ts"worktree path and title lookups..." now expectsarchived: false/true. It fails onmain(the field is missing) and passes with the fix.MarkdownThreadLink.browser.test.tsx"resolves an unloaded thread..." now also checks an archived target: it is labelled "Archived thread, Older essay", shows no project icon, and opens/settings/archived. It fails onmainand passes with the fix, in all three cases.threadLinks.test.tscovers the helper, including servers without the flag.vp run check:changedpasses (format, lint, knip, typecheck, tests, React Compiler).vp run i18n:checkpasses.vp run devon an isolated home: five demo threads linked from one reply, two archived through the sidebar. Before and after, same data:Not checked: the mobile change on a device or simulator. It only drops the project icon for archived targets, using the same helper as web.
Implemented with Claude Opus 5.5 through the Claude Code harness in T3 Code.