feat(web): @ autocomplete to cite other sessions by title - #1217
Merged
Conversation
Composer @ ranks fleet session titles (and id prefixes), inserting the same Copy-reference citation grammar. Codex file @ mentions remain and follow session hits. Bare /sessions/<id> paths autolink for in-app nav. Closes tiann#1213. Co-authored-by: Cursor <cursoragent@cursor.com>
Selecting a session from @ autocomplete adds an attachment-style chip (flavor + title + active dot) instead of expanding prose in the textarea. On send, chips serialize to markdown session links that render as chips in the transcript. Part of tiann#1213 dogfood. Co-authored-by: Cursor <cursoragent@cursor.com>
Attachment-style composer chips cannot express positional "this → session A / that → session B" intent. Keep @ autocomplete and Copy-reference text insert for v1; rich segmented composer is v2. Part of tiann#1213. Co-authored-by: Cursor <cursoragent@cursor.com>
Reject dotted session-id tails and stop treating `.ext` as a soft path end so citations like `routes/sessions/chat.tsx` stay file-path links. Part of tiann#1213. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Findings
- [Major] Session citation anchors drop the configured Vite base path —
buildSessionReferencePath()emitsBASE_URL-prefixed citations andparseSessionPathHref()accepts those paths, but the rendered anchor rewrites every match to root/sessions/<id>atweb/src/components/assistant-ui/markdown-text.tsx:515. In documented static-hosted builds under a subpath, copy/open-in-new-tab/modified clicks on these new citation links leave the PWA scope or 404 instead of preserving/repo/sessions/<id>.
Suggested fix:import { buildSessionReferencePath } from '@/lib/sessionReference' const href = buildSessionReferencePath(props.targetSessionId)
Summary
- Review mode: initial
- One issue found: BASE_URL-prefixed session citations are parsed but then rendered as root-relative links. Residual risk: no browser-level coverage for subpath-hosted markdown session links.
Testing
- Not run (automation)
HAPI Bot
SessionPathAnchor href now uses buildSessionReferencePath so copy / open-in-new-tab stay in the PWA subpath scope. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Findings
No issues found.
Questions
None.
Summary
- Review mode: follow-up after new commits
- The previous BASE_URL session-link finding is addressed in this head. Residual risk: no browser-level coverage for subpath-hosted markdown session links or manual composer autocomplete behavior.
Testing
- Not run (review only)
HAPI Bot
Reuse the share/sidebar matcher (name + summary + path + id + machine) while still labeling and inserting getSessionTitle (name before summary). Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Findings
No issues found.
Questions
None.
Summary
Review mode: follow-up after new commits
No issues found in the full latest diff. Residual risk: coverage is limited to unit tests for session-reference ranking/parsing and the remark plugin; no browser-level coverage for composer autocomplete insertion or markdown SPA navigation.
Testing
Not run (review only)
HAPI Bot
Collaborator
Author
8 tasks
heavygee
added a commit
to heavygee/hapi
that referenced
this pull request
Jul 29, 2026
Commit unfinished meta/fork WIP that was stranding hapi-sync-fork-main: DROPPED tiann#1205/tiann#1217 soup layers + rich-composer tip note, Meta remat playwright.config policy docs, hapi-from-active PATH wrapper + ping-peer delegation, and in-use soup-heals 60/61. Co-authored-by: Cursor <cursoragent@cursor.com>
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
@fuzzy-ranks fleet session titles (and id prefixes) and inserts the same plain-text citation as Copy reference (See session "…" (/sessions/<id>) for context).@mentions still work and follow session hits./sessions/<id>paths in chat markdown autolink for in-app navigation.routes/sessions/chat.tsxstay file-path links.Out of scope (v2): rich/segmented composer with inline session tokens. Attachment-style chips were dogfooded and reverted — they cannot express positional "this clause → session A" intent.
Fixes #1213
Test plan
bun typecheckcd web && bun run test(sessionReference + remark-session-path-links + suite)cd hub && bun run test@+ partial session title → citation text inserted@still offers files after sessions/sessions/<id>in transcript → SPA navigateweb/src/routes/sessions/chat.tsxstill file-autolinks