Repository navigation
Fix thread citations rendering as "Thread no longer available" - #61
Merged
Merged
Conversation
Angle-bracketed link destinations ([label](<t3-thread://...>)) were not parsed as labeled links: the inner <...> matched as an autolink, the label was discarded, and an unresolved title substituted "Thread no longer available" as the destination text. Thread titles were also resolved only from the shell snapshot, which omits idle subagent children and all but the 25 newest settled threads, so live threads cited from chat read as deleted. Mobile and web now mount the cited thread's family read (the on-demand rows search and the Settled shelf already use) until its title lands. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
Owner
Author
|
Superseded by upstream PR pingdotgg#30709, rebuilt directly on upstream main (this fork's main has diverged too far for a clean upstream PR). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Thread citations in chat could render as
[Title](Thread no longer available)for threads that exist. Two compounding causes:[label](<t3-thread://v2/...>), valid CommonMark and what agents emit) weren't parsed as labeled links inthreadLinks. The inner<...>matched as an autolink, the label was discarded, and an unresolved title substitutedThread no longer availableas the destination text — the literal broken markdown users saw. Resolved links would have produced nested[label]([Title](...))instead.shellThreadFamilies) and all but the 25 newest settled threads (shellOlderSettled). A cited delegated-task child or settled thread therefore read as deleted on mobile (string relabel) and web (unresolved chip).Fixes:
packages/shared/src/threadLinks.ts: labeled-link pattern accepts an optional<...>destination; same fix in mobile'sthreadChipTargetsregex.useLiveThreadLinkLabelsand webMarkdownThreadLinknow mount the cited thread's family read (the on-demand rows search and the Settled shelf already use) while the shell lacks it, so its title loads and the chip renders. "No longer available" now only shows after a settled read proves the thread is gone.Test plan
packages/shared/src/threadLinks.test.ts(angle-bracketed labeled links: resolved, unresolved keeps label, refs listed) andapps/mobile/src/lib/enrichedLinkPresentation.test.ts(chip targets).relabelThreadLinks: refs found, unresolved keeps written labels, resolved produces clean labeled links.vp run check:changedpasses (format, lint, knip, typecheck, tests).Generated with Devin