Repository navigation
Adopt server session titles in the desktop app - #787
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
PR Summary by QodoAdopt server session titles across the desktop app
AI Description
Diagram
High-Level Assessment
Files changed (23)
|
Code Review by Qodo
1.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0eb263794b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| var serverTitle = Normalize(await _server.GetTitleAsync(sessionId, ct)); | ||
| serverReadOk = true; | ||
|
|
||
| if (serverTitle is not null && !IsPromptEcho(serverTitle, agent.Prompt)) serverReal = serverTitle; |
There was a problem hiding this comment.
Preserve later native-title revisions
When a Claude transcript initially yields title A, the first tick pushes A to the server; once a later tick reads A back here, it becomes serverReal. If Claude subsequently revises its ai-title to B, serverReal ?? native keeps applying A and the non-null server value prevents B from being pushed, so the documented last native title never reaches either the desktop or server. Distinguish the resolver's own PushedTitle from an independently changed server title so a newer native value can advance it.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 76e16de — a server title equal to the loop's own PushedTitle no longer counts as an independent server title, so a later native revision applies and pushes; pinned by The_loops_own_pushed_title_does_not_block_a_native_revision (with An_independent_server_title_still_wins_over_a_native_revision as the control).
| var line = raw.Trim(); | ||
| if (line.Length == 0) continue; | ||
|
|
||
| return line.StartsWith(t, StringComparison.Ordinal); |
There was a problem hiding this comment.
Match only actual prompt-seed forms
When a genuine generated server title happens to be a prefix of the launch prompt—for example, title Fix login timeout for prompt Fix login timeout by adding retries—this classifies it as the watcher's seed and ignores it. The watcher emits only the full short first line or its near-80-character truncation, not arbitrary shorter prefixes, so this can trigger a duplicate local generation after five minutes and overwrite an already valid server title. Compare against the exact watcher/daemon seed forms instead.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 76e16de — a bare prefix only counts as an echo when it carries the truncation ellipsis; otherwise only an exact first-line match does. Pinned by A_short_real_title_that_prefixes_the_prompt_is_still_adopted.
| var result = await TitleGeneration.GenerateAsync( | ||
| agent.Prompt!, null, msg => _logger.LogDebug("Title generation ({AgentId}): {Message}", agent.Id, msg), | ||
| _config.Profiles.Resolution.Profile, _home, | ||
| vendor: agent.Vendor == "codex" ? "codex" : "claude"); |
There was a problem hiding this comment.
Forward shutdown cancellation to title generation
When shutdown begins during a local title generation, this method receives the daemon cancellation token but does not pass it through TitleGeneration.GenerateAsync to the Claude/Codex runners, even though those runners support cancellation and kill their subprocesses. The headless CLI can therefore continue running—and potentially consuming a paid request—after daemon teardown starts, until its 15–30 second timeout; thread ct through the shared generation helper.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 76e16de — the token now threads through TitleGeneration.GenerateAsync to both runners.
A server title equal to the loop's own push is not authoritative, a failed summary read blocks the push as well as generation, only ellipsis-marked prefixes count as prompt echoes, and cancellation now reaches the headless title subprocess.
…Capacitor.Models.Transcripts
#780) A confirmed push suppressed reconvergence even after the server was observed silent again, and a single attempt slot let a delayed echo of an older unacked push pass the ours-filter and freeze as authority.
Clear-on-overflow erased the whole provenance window (even on a duplicate retry), a transient extraction gap demoted the ladder to the generated fallback, and a title landing during the long model call could be overwritten by the fallback's push.
fd126d0 to
ead36c6
Compare
Closes #780 — AI-2527
What & why
The web labels sessions with the server's title; the desktop app never read it, so the same session was labeled differently in the two places. The daemon now resolves a title per hosted agent — native transcript title (Claude's
ai-titlelines, with the oldersummaryshape still accepted), then the server's title, then at most one local generation — and carries it in the existingAgentStatusDto.Titlefield, so the rail, workspace header, Home cards, and tray all upgrade over the same status lane. Locally resolved titles are pushed through/hooks/set-title, and the server's title stays authoritative, so both UIs converge on the identical string.Where to look
TitleResolveLoop's two guards: a server title that prefixes the launch prompt is treated as the watcher's initial echo (not adopted, doesn't block the push), and a failed server read is not "silence" — it must never trigger a paid generation for a session the watcher already titled.Verification
dotnet runper suite: Core 3020, CLI 3984, App 1416, Integration 245 — all green; daemon suite green except two environmental failures (installed codex 0.153.0 vs vendored 0.147.0 schema pin; a PSI env-absence assert that trips under any kcap-hosted shell) and known CPU-contention flakes that pass in isolation.dotnet publish -c Releaseon kcap and kcap-daemon: no IL2026/IL3050 warnings.🤖 Generated with Claude Code