fix(sync): skip command envelopes when deriving session titles - #142
Merged
Conversation
The noise filter only matched `<command-message>`, but Claude Code emits `<command-name>` first, so slash-command envelopes became session titles. The existing test asserted the reverse tag order, which is why the gap never surfaced; 359 sessions in a local index carried command noise as their title instead of the user's intent. Collect the harness-written openers into one list and add the prefixes observed in real transcripts. Sessions whose messages are all noise still fall back to the first message rather than becoming `Untitled`. Also included: - Cargo.lock: h2 0.4.14 -> 0.4.16 for RUSTSEC-2026-0258, edited in place so the resolver does not also reshuffle windows-sys references. - release.yml: drop a stale comment about release-please creating the tag. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BPmEEDz7GeHXj2EBhhVyig Signed-off-by: samzong <samzong.lu@gmail.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
What's changed?
is_noise_first_messagenow tests one list of harness-written openers instead of three hard-codedstarts_withcalls, and covers the prefixes that actually appear in transcripts:<command-name>,<system-reminder>,<tool_use_error>,[Request interrupted, skill preambles, and resumed-session banners.<command-name>-led command envelope, and a skill preamble.Cargo.lock: h2 0.4.14 -> 0.4.16 for RUSTSEC-2026-0258..github/workflows/release.yml: drop a stale comment about release-please creating the tag, which no longer applies after dad8eba.Why
<command-message>, but Claude Code writes<command-name>first, sostarts_withnever fired and the raw slash-command envelope became the session title. The existing test asserted the reverse tag order, which is why the gap never surfaced.<command-name>envelopes and 104 from skill preambles. Those sessions are effectively unfindable by title in both search results and the TUI list.Untitled.auditstage ofmake checkfails without it (advisory published 2026-08-17), so this branch could not go green on its own.Cargo.lockwas edited in place rather than viacargo update, which would also have reshuffled ninewindows-sysreferences unrelated to this fix.Verification
make check->All checks passed(fmt --check, clippy -D warnings, cargo audit, full workspace test suite: 437 passed / 0 failed).sync --force: among sessions whose source files still exist, noise titles went 10 -> 1. The remaining one is a session whose only user message is/clear, where falling back to the first message is the intended behavior. Sessions whose source transcripts were deleted from disk cannot be backfilled, since titles are derived at sync time.