mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-09-30 12:39:42 +02:00
Building on COD-140's firstPrompt backfill, surface each session's most recent user prompt too, so a long-running session is identifiable by both where it started and where it is now. - session-routes: add extractLastUserPrompt() (mirrors extractFirstUserPrompt with last-match semantics + same noise/secret/slash-command filters + 120 cap); scanProjectDir computes lastPrompt from the file tail (reads a tail for large files; small files scan head); thread lastPrompt through HistorySession and the /api/sessions/unified history rows. - unified-session-service: add lastPrompt to UnifiedSessionItem + HistoryInput, set it from history in the merge, and extend the backfill with parallel by-uuid / newest-by-workingDir indexes (never overwrites); add lastPrompt to the filterAndPaginate search haystack. - terminal-ui: render a 'Last prompt' detail row, omitted when absent or equal to the first prompt (single-prompt sessions show one line). Tests: unified-session-service.test.ts +5 (uuid-join, workingDir fallback, newest-wins, no-overwrite, search). Beta-verified: /api/sessions/unified populated firstPrompt+lastPrompt on all 200 rows (12 distinct); Playwright on the session-manager modal rendered 12 'Last prompt' rows, 0 console errors. (cherry picked from commit 115f4d397e91decc1a6381b47a99d74922e9055b)