Skip to content

fix(ai-vault): hide Orca's chat-naming requests from Session History - #30029

Merged
nwparker merged 1 commit into
mainfrom
nwparker/session-history-hide-chat-naming
Oct 17, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/session-history-hide-chat-naming

Conversation

@nwparker

@nwparker nwparker commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​163 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​163
Prod 3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​30 $\color{#cf222e}{\Huge{\mathbf{−}}}$​2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​28

ELI5

To name a new chat, Orca quietly asks the agent CLI for a short title. The CLI saves that small question-and-answer in the same folder as the user's real chats, so Session History showed it as if it were a chat. Tapping it opened the naming request instead of the conversation.

What Changed

  • Before: Session History (desktop and phone) listed a "Claude Code" entry whose only content was "Name this chat from the user's first request…" and a one-line title. On a phone whose chat tab had gone missing ([Bug]: Mobile loses the Claude chat tab on a headless orca serve host; notification opens a workspace with no chat #29968), this was the entry users tapped. It resumed the naming transcript, not the live chat, so the chat's pending question was never shown.
  • After: the scanner skips any transcript whose only user turn is Orca's chat-naming prompt and which is at most six messages long. This includes transcripts already on disk. The real chat stays listed and still opens its live structured session through the existing ownership projection.
  • Mechanism: the new isConversationNameRequestSession check reads the session's preview messages and is applied in parseSessionCandidates. Freshly parsed and cached rows both pass through that function, and so do local, runtime-host and in-scope scans. The prompt's first line is now an exported constant (CONVERSATION_NAME_PROMPT_OPENING), so the generator and the filter can't drift apart.

Why

Filtering in the scanner hides the transcripts users already have, works with every agent CLI version, and needs no parse-cache schema bump, because it reads fields that cached rows already carry. The alternative is to stop the CLI from saving the run (--no-session-persistence for Claude). That would leave existing transcripts listed, and an older CLI that doesn't know the flag would reject it and break chat naming and commit-message generation. A naming transcript the user kept typing into has more than one user turn, so it stays listed.

Linked Issue

Fixes #29973

Visual Proof

N/A. Session History list contents, verified over RPC (see Testing).

Testing

  • Unit tests: src/main/ai-vault/session-scanner-conversation-name-requests.test.ts checks three cases. The naming request is hidden while the chat stays listed (this failed before the fix: both were listed). A chat that quotes the prompt later stays listed. A naming transcript the user continued stays listed.

  • E2E: tests/e2e/headless-serve-session-history-naming-requests.spec.ts runs an isolated headless serve and a scripted paired phone calling aiVault.listSessions, with a chat transcript and a naming transcript in the host's Claude project folder. The chat is listed and the naming request is not.

  • Verified live: macOS headless orca serve (isolated profile and HOME) with the scripted phone. Not verified with a real claude -p naming run, because the isolated HOME has no Claude login. The transcript shape follows the issue's evidence. Not verified live on Linux or Windows: the logic is platform-neutral.

  • pnpm tc:node, oxlint and the changed-code quality gate pass.

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

Review

Codex review (gpt-6.1-sol, high) found that a naming transcript the user later continued would be hidden. Fixed: the transcript must have the naming prompt as its only user turn. The final review found nothing.

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Wire compatibility: this adds no fields. Older phones simply receive one row fewer. SSH and runtime hosts run the same scanner, so they hide these rows as well.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

Naming a chat runs a one-shot agent CLI request in the chat's folder, and the CLI saves it beside the user's chats. Session History listed it, and opening it from a phone resumed the naming request instead of the chat.

Fixes #29973

Co-Authored-By: Claude <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1fd4379e-bdfe-4d7e-b4dc-95984db24c2a
📥 Commits

Reviewing files that changed from the base of the PR and between 98d8257 and 4d10218.

📒 Files selected for processing: 5
  • src/main/ai-vault/conversation-name-request-sessions.ts
  • src/main/ai-vault/session-scanner-conversation-name-requests.test.ts
  • src/main/ai-vault/session-scanner.ts
  • src/shared/conversation-name-generation.ts
  • tests/e2e/headless-serve-session-history-naming-requests.spec.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.

📝 Walkthrough

The session scanner now omits parsed sessions that meet the conversation-naming request criteria. The prompt opening is shared through an exported constant. Tests cover standalone naming requests, real conversations that include the prompt, continued naming-request sessions, and headless Session History.

Priority: ➖ Normal

Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to 4d102

The Session History filter is ready to merge based on the available evidence. A live Claude naming run would provide additional confidence.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 5 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: hiding Orca chat-naming requests from Session History.
Description check Passed The description is complete and follows the repository template. It explains the user impact, implementation, rationale, linked issue, testing, platform coverage, and checklist status.
Linked Issues check Passed The PR satisfies the coding requirements in #29973. isConversationNameRequestSession identifies the Orca naming prompt by its shared opening marker, requires one user turn, and limits the transcript…
Out of Scope Changes check Passed The changes stay within #29973. The shared prompt constant prevents drift between prompt generation and filtering. The unit and E2E tests verify the required scanner and Session History behavior. No u…
Full details: Linked Issues check

Explanation

The PR satisfies the coding requirements in #29973. isConversationNameRequestSession identifies the Orca naming prompt by its shared opening marker, requires one user turn, and limits the transcript to six messages. parseSessionCandidates applies the filter to parsed candidates, including cached and host-scanned rows. The added unit and E2E tests verify that the naming transcript is hidden while the real chat remains listed. The PR also preserves the existing structured-session ownership projection for a live chat. Issue #29968 is background context and adds no requirement.

Full details: Out of Scope Changes check

Explanation

The changes stay within #29973. The shared prompt constant prevents drift between prompt generation and filtering. The unit and E2E tests verify the required scanner and Session History behavior. No unrelated production behavior or unrelated files are changed.

  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nwparker
nwparker merged commit 7adcefb into main Oct 17, 2026
39 checks passed
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.

[Bug]: Mobile Session History opens Orca's internal chat-title transcript instead of the live Claude chat (pending AskUserQuestion never shown)

1 participant