Skip to content

feat(web): copy session reference from context menu#951

Open
heavygee wants to merge 2 commits into
tiann:mainfrom
heavygee:feat/session-copy-link
Open

feat(web): copy session reference from context menu#951
heavygee wants to merge 2 commits into
tiann:mainfrom
heavygee:feat/session-copy-link

Conversation

@heavygee

Copy link
Copy Markdown
Collaborator

Summary

Adds Copy reference to the session More actions menu (session list long-press/right-click and session header overflow). Clipboard text is a cross-session citation, not a share URL:

See session "upstream issue/pr discovery" (/sessions/abc-def) for context

Closes #950

Test plan

  • web: SessionActionMenu + sessionReference unit tests
  • web: typecheck
  • Manual: right-click session in list → Copy reference → paste into another session composer

Made with Cursor

Refs tiann#950

Adds a More actions item that copies a cross-session citation
(see session "title" (/sessions/id) for context) instead of a
bare share URL.

Co-authored-by: Cursor <cursoragent@cursor.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Findings

  • [Major] Unsanitized session titles are copied into cross-session prompts. See inline comment at web/src/lib/sessionReference.ts:10.

Summary
Review mode: initial
One issue found. The new copied reference text includes the session title verbatim; session titles are not constrained by the schema and can be generated by agent/tool output, so pasting this into another agent session can carry prompt-injection text or multiline instructions along with the citation.

Testing
Not run (automation)

Comment thread web/src/lib/sessionReference.ts Outdated
JSON-escape titles and collapse whitespace so arbitrary session
names cannot inject prompt text into cross-session citations.

Addresses Codex review on tiann#951.

Co-authored-by: Cursor <cursoragent@cursor.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Findings

  • No issues found with confidence >= 80% in the added/modified lines.

Summary

  • Review mode: initial
  • Reviewed the full PR diff for the session action menu, session reference helper, locale additions, and related unit tests. Residual risk: I could not execute the web test/typecheck commands in this runner because bun is unavailable.

Testing

  • Not run (automation): bun not found in PATH, so bun run --cwd web test src/lib/sessionReference.test.ts src/components/SessionActionMenu.test.tsx and bun run --cwd web typecheck could not execute.

HAPI Bot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(web): copy session reference from context menu

1 participant