mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-03 05:59:43 +02:00
The unified session list only set firstPrompt from the transcript-history view, keyed by the Claude transcript file's UUID. A live/persisted row keyed by its Codeman id only inherited a prompt when that id happened to equal an on-disk transcript filename; when it didn't (stale/wrong claudeSessionId, post-/clear new uuid, resumed/attached/worktree session), the session manager showed "(no prompt captured)" even though a real transcript for that working dir existed under a different UUID. Add a pure firstPrompt backfill pass in mergeUnifiedSessions (after the merge loops, using the already-passed history source): for any row with no firstPrompt, join by claudeSessionId first, then fall back to the newest transcript in the same workingDir. Never overwrites a non-empty prompt, so rows keyed to their own transcript are untouched; rows with genuinely no transcript still show the placeholder. Pure, unit-tested (+5). (cherry picked from commit 1f9f53ec64a61c9fa7f77d29efcbdd1d2794ec38)