Repository navigation
feat(timeline): show the prompts and questions behind each wait - #382
Sanjay Singh (san360) merged 24 commits into
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Active issues can expose generated file contents as replies, merge distinct turns sharing a timestamp, and incorrectly include or omit question text in day-filtered lanes.
3 open issues
What changed in this PR
Extends the autonomy Timeline from #381 with locally loaded prompts, questions, and answers, helping users understand why an agent stopped for input.
Changes:
- Captures question, answer, permission, and reply text for on-demand session reads.
- Adds text scrubbing and a panel-only RPC, keeping this content outside the Timeline dataset, chat tool, and summary export.
- Adds lane-detail text, a persistent toggle, masking, clickable waits, documentation, and tests.
| File | Description |
|---|---|
tests/vscode/suite/populated.spec.ts |
Updates packaged-extension checks for the text section. |
tests/e2e/timeline.spec.ts |
Tests text display, masking, persistence, and wait navigation. |
tests/e2e/harness.html |
Adds mock session text and persistent webview state. |
src/webview/styles-timeline.css |
Styles text details and highlighted waits. |
src/webview/panel-rpc.ts |
Loads and scrubs one session’s text on demand. |
src/webview/page-timeline.ts |
Renders prompts, questions, answers, and wait links. |
src/core/types/timeline-types.ts |
Defines scrubbed Timeline text payloads. |
src/core/types/session-types.ts |
Adds text fields for user waits. |
src/core/types/rpc-types.ts |
Declares the session-text RPC contract. |
src/core/timeline-text.ts |
Builds scrubbed, length-limited session text. |
src/core/timeline-text.test.ts |
Tests text extraction, timing, scrubbing, and output boundaries. |
src/core/session-labels.ts |
Adds free-text privacy scrubbing. |
src/core/session-labels.test.ts |
Tests sensitive-pattern replacement and preserved text. |
src/core/parser-vscode-cli.ts |
Captures Copilot questions, relays, permissions, and answers. |
src/core/parser-vscode-cli.test.ts |
Tests captured wait text and stripping. |
src/core/parser-shared.ts |
Removes wait text from analyzer-held sessions. |
src/core/parser-claude.ts |
Captures Claude question text, choices, and answers. |
src/core/parser-claude.test.ts |
Tests Claude question-text extraction. |
docs/content/observe/timeline.md |
Documents text details, navigation, and privacy behavior. |
Review effort: Balanced
…st, questions by window Copilot review of #382: - A turn's reply and the text before a question are the agent's own messages (SessionRequest.replyText), never the code its edit or write tools wrote (which responseText keeps for code analysis); stripped from analyzed sessions like the rest of the text. - Timeline turns carry their request ID, and the detail panel joins each turn's text by it, so two turns at the same moment keep their own text. - A question belongs to a window when it was asked in it, its measured wait overlaps it, or it was answered in it (waitInWindow). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
281a2c9 to
87efb78
Compare
…st, questions by window Copilot review of #382: - A turn's reply and the text before a question are the agent's own messages (SessionRequest.replyText), never the code its edit or write tools wrote (which responseText keeps for code analysis); stripped from analyzed sessions like the rest of the text. - Timeline turns carry their request ID, and the detail panel joins each turn's text by it, so two turns at the same moment keep their own text. - A question belongs to a window when it was asked in it, its measured wait overlaps it, or it was answered in it (waitInWindow). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
87efb78 to
ef2bfb8
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Active issues can hide logged prompts and final summaries, display file contents as agent replies, and associate idle waits with the wrong overlapping turn.
5 open issues
Set replyText when Claude turns have no assistant text · New Include task-completion summaries in agent messages · New Set replyText when CLI turns have no assistant message · New Keep prompt identity stable across assistant events · New Associate idle waits with the turn that ended at the boundary · New
3 resolved since last review
Review effort: Balanced
The lane detail panel can now show, for the lane you open, the text behind each turn and each wait: your typed prompt, the agent's question with its choices and your answer, a permission prompt's request, reason and decision, a relayed question and your reply, and the agent's last message before it waited. Copilot CLI/App and Claude Code AskUserQuestion are covered. The text is read on demand per lane through a new getTimelineSessionText RPC, scrubbed (home paths, links, emails, secret-like tokens, names) and cut. It is never part of the Timeline dataset, the chat tool or the summary export. Mask names hides it. A persistent "Show prompts and questions" toggle controls it, and clicking a hatched wait scrolls to its question. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…st, questions by window Copilot review of #382: - A turn's reply and the text before a question are the agent's own messages (SessionRequest.replyText), never the code its edit or write tools wrote (which responseText keeps for code analysis); stripped from analyzed sessions like the rest of the text. - Timeline turns carry their request ID, and the detail panel joins each turn's text by it, so two turns at the same moment keep their own text. - A question belongs to a window when it was asked in it, its measured wait overlaps it, or it was answered in it (waitInWindow). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…d the turn behind each idle wait - Copilot CLI/App and Claude Code always log replyText, empty when the agent wrote no message, so a turn that only wrote files never shows their contents as its reply. - A successful session.task_complete summary joins the turn's reply, once. - Turns join their text by turnIdentity (prompt event, else request ID), which stays the same while a live Copilot turn gains messages; withAnalyzedTurns uses the same key. - A wait for your next prompt carries the turn whose end started it (after), so overlapping turns show the right reply. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
ef2bfb8 to
767b852
Compare
…d the Timeline reloaded under - OpenCode logs replyText (the assistant's text parts, empty when it wrote none), so its lanes never show the code a write tool wrote as the agent's reply. - A lane's text read applies only while its own loading entry is still current, so a read from before a reload can't replace the fresh one or mark it unavailable. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Human judgment is needed to weigh unreported risks involving unintended text exposure, keyboard-inaccessible wait actions, and unstable live-turn matching.
No open issues 🎉
2 resolved since last review
Review effort: Balanced
…mes and flags Copilot's review of #382 asked for a closer look at keyboard access and unintended text exposure: - A hatched wait on a lane was a click-only shortcut to its text. It is now a focusable button (role, label from its tooltip, Enter or Space), with a focus outline. - scrubText missed a secret whose key is part of a longer name, such as DB_PASSWORD=... or SERVICE_API_KEY=..., and flags with a space, such as --password ... or --client-secret .... Both are now replaced. Words that only contain a key name, and flags such as --token-file or --max-tokens, stay. Matches start only at a name's start, so the scan stays linear. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Follow-up on the last Copilot review's "Needs a closer look" note (it had no inline threads). 73db9d8 addresses these:
|
… turn's text when its prompt logged no ID Copilot's second "closer look" on #382: - Reasoning shown as reply text: Codex put agent_reasoning, and VS Code its thinking parts, into responseText, which the Timeline falls back to as the agent's reply. Both now log replyText, the agent's own messages (empty when there are none). responseText is unchanged for code analysis. - Prompt identity that can hide logged messages: a Copilot turn whose prompt was logged without an ID is known by its latest reply, so a live turn changes identity as it gains messages, and its lane said no message text was logged. The panel's join is now textTurnFinder in the shared model. It uses the identity, else the time when only one text turn has it, so two turns at the same time are still never mixed up. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
System/harness turns still render replies despite the documented no-text behavior, and the unchanged cache version can reuse stale Copilot waits that incorrectly mark unanswered questions as answered.
2 open issues
Review effort: Balanced
…turn's note names what is hidden Copilot review of #382 at 8694ca6: - Cache: Copilot CLI logs beside editor chats are cached with their workspace, and 5b4875e changed which of their waits count as answered. CACHE_VERSION goes to 33, so an upgraded install re-parses them instead of keeping a later question that reused an answered one's tool call ID marked answered. A test reloads a version-32 cache of a mixed editor/Copilot workspace. - Harness turns: their reply showed under a note saying "Its text isn't shown". The reply is the agent's own words, and can be the last thing it said before it needed you, so it stays. The note now says the message that started the turn isn't shown, and takes the turn's kind from the text read. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The revamp branch now includes main. The only conflict was the Claude Code parser's imports: keep this branch's UserWaitText with main's streamed reader (MAX_FILE_SIZE, skipped-line reporting) and compactions. CACHE_VERSION stays 33, above the revamp branch's 32. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
The reply extractor misses markdown text stored in content.value, leaving replyText empty and causing the Timeline to omit logged agent answers and idle-wait context.
1 open issue
2 resolved since last review
Review effort: Balanced
Keep this branch's AskUserQuestion wait-text test beside the revamp's two new Claude Code fork regressions; both added tests at the same place. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Merged the updated Timeline revamp (#381, which now includes Conflicts
Review: Copilot's new finding (read Gates on
|
* feat(timeline): date picker and custom date ranges - The toolbar's date opens a calendar: activity dots from the per-day totals, days outside the loaded range disabled, month navigation, Today and the quick picks Last 7 days, Last 30 days and This month. ‹ › and ← → still step. - A Range view beside Day, Week and Families shows any run of whole days (up to 92; longer picks are cut, and the page says so). Lanes, axis ticks (6-hourly, daily, every other day or weekly), KPIs, callouts, the impact table and the strip highlight all follow the range. - The view is kept by dates in the webview state and in the address: #view=range&from=…&to=…. - Ranges use the same window rules as days, so a range equals its days added up and the summary export of the same dates, also over daylight-saving changes (timeline-range.test.ts). - Keyboard: arrows, Page Up/Down, Home/End, Enter, Esc; focus stays in the calendar and returns to the date. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): open Timeline links on load, keep picked dates without activity - A #view=… address opens the Timeline at that view on load, without a click on the sidebar; leaving the Timeline clears it, so a reload elsewhere doesn't reopen the Timeline. - A picked or restored date within the loaded days stays when the Timeline loads again, with or without activity; only a missing, invalid or out-of-range date falls back to the nearest active day. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): keep axis ticks on whole hours over half-hour daylight-saving changes hourTicks stepped by elapsed hours, so after a half-hour change (Lord Howe Island) every later tick sat at :30 under a whole-hour label. A step that lands off the hour now moves onto the clock's next whole hour; an hour the clock repeats still gets its tick twice. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * perf(timeline): redraw only the date picker while moving around the calendar Arrow keys, Page Up/Down, Home/End, month buttons, the day/range switch, the first day of a range, opening, closing and a click outside used to redraw the whole Timeline (lanes, families, KPIs) on every press. The picker is now a Preact component that redraws itself for those; the page is drawn again only when a day or a range is picked. On a 92-day range with 519 lanes, a calendar arrow key took 846 ms (median) before and 7.7 ms after. Addresses the Copilot review note on #383 (page-timeline.ts:381). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): return focus to the date after a click outside the calendar Closing the calendar with a click on a part of the page that takes no focus removed the focused day and left focus on the page body. Focus now goes back to the date button, as after Esc or Close, unless the click focused something else. It is checked once the browser has handled the press. Addresses the Copilot review comment on #383 (timeline-date-picker.ts:301). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): keep the Range view when opening a session active in it Opening a parent, child or fork source from the Range view fell back to the Day view whenever the day last shown on the Day view was outside the range, even when the session had a lane in the range, so it could open on a day where that session has none. The range now stays when it holds the day asked for or, with none asked, when the session has a lane in it; otherwise the session opens on its busiest day. Addresses the Copilot review comment on #383 (page-timeline.ts:1082). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): read the text of a long Range lane, and say when it has too many turns A Range view of up to 92 days can list more turns in one lane than the 5,000 the host accepted for a text read, so Show prompts and questions failed with the message for a log that couldn't be read. The lane's scope now lists each turn once (a wait's preceding turn is often a listed one), the webview and the host share one limit, MAX_TEXT_SCOPE_TURNS (50,000), and a lane past it says so and suggests picking fewer days instead of asking the host. Addresses the Copilot review comment on #383 (page-timeline.ts:517). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): keep focus in the calendar when a month button turns disabled Clicking ‹ onto the first loaded month, or › onto the last, disabled the button that held focus, so focus fell to the page body and Tab left the open calendar. When a calendar redraw drops focus that was inside it, focus now goes to the month's day reached by Tab. Addresses the Copilot review note on #383 (round 7 overview, not published as a thread). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): build the lane of a dense session without overflowing the stack A lane's first and last moments, and a family member's, were taken with Math.min(...values) over every turn, work and wait edge. A session with a few hundred thousand of them in a long Range threw a RangeError before the page could draw. They are now found with a loop. Addresses the Copilot review note on #383 (round 8 overview, not published as a thread). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): find a family's longest unattended stretch without overflowing the stack familyUnattendedMs spread every unattended stretch of a family into Math.max, so a dense Range (150,000 stretches) threw a RangeError in buildViewFamilies. It, the view's longest unattended stretch, and a family's depth and fan-out (and their maxima) now use maxOf, floored at zero as before. The dense-session test now uses measured turns and runs buildViewFamilies, timelineKpis, viewInsights, buildFamilies and familiesInsights. Addresses the Copilot review comment on #383 (timeline-model.ts:608). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): ground the day strip and calendar dots in the filters, and put the strip first The day strip, its tooltips, its footer and the calendar's activity dots counted every session, before the lane filters, while the KPIs beside them counted the filtered lanes, so with a filter on the strip's footer disagreed with the day's KPIs. The strip also sat between the KPIs and the lanes, where it read as part of the selected day. - With a filter on, each day counts the sessions whose lane that day passes the filters, as the Day view does (filteredDayTotals). Without filters the prepared totals are used unchanged. The totals are cached by filters and mask, and computed again only when they change, not when you move between days. - The footer gives the totals of the view's own lanes in the Day and Range views, so it equals their KPIs; the Week view gives the selected day's. - The calendar's dots follow the same totals. - The strip now opens the view, under the filters, and its header reads "Pick a day · … · first → last", with "only sessions your filters show" when filtered. On real data (77 days, 536 sessions), the filtered totals of every day take about 5 ms; turning a filter on redraws in about 160 ms. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * perf(timeline): find each turn's predecessor once when reading a lane's text Reading a lane's text looked each one-word prompt's preceding turn up with requests.indexOf, a search per turn. With the text scope raised to 50,000 turns for long ranges, that is quadratic: a 50,000-turn lane of one-word prompts took about 1.15 s on the shared worker, now about 0.56 s. The predecessors are mapped once; what the read returns is unchanged. Addresses the Copilot review comment on #383 (timeline-text.ts:91). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): end a day at the next midnight where the clock skips midnight In zones where daylight saving starts at midnight (Santiago, Havana, Beirut), that day starts at 1:00. addDays kept the clock time it was given, so the day after such a day also started at 1:00: that day's window and a range ending on it ran an hour into the next day, its work took the next day's first hour, and the axis's later day markers sat at 1:00. addDays now gives the start of the later day, read from its date. A short range's axis also names a day that starts at 1:00, where it had no marker. Addresses the Copilot review note on #383 (round 12 overview, not published as a thread). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * perf(timeline): sort a session's activity into its days once for the filtered strip With a filter on, the strip judged each session's lane for every day its activity spans, filtering all of its turns, work and waits each time: a 300,000-turn session over 209 days took about 0.73 s, on the page's thread. Each session's activity is now sorted into its days once, and each day's lane is built from that day's part, with the same result: about 0.06 s. Addresses the Copilot review note on #383 (round 12 overview, not published as a thread). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): start a week at its Monday's midnight whichever day is picked weekStart kept the clock time of the picked day's start. Where the clock skips midnight, that day starts at 1:00, so picking it gave a week from Monday 1:00: an hour short, with totals that depended on the day picked. The week now starts at its Monday's start whatever day holds it. Addresses the Copilot review note on #383 (round 13 overview, not published as a thread). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): keep calendar focus when a month button turns disabled in newer Chromium Chromium moves focus off a control that turns disabled only at its next frame. When the calendar's last draw ran, focus was still on the just-disabled month button inside the calendar, so it wasn't moved to a day, and the browser then dropped it to the page. A disabled control that still holds focus now counts as having lost it. The e2e test failed once the toolchain moved to Playwright 1.65 (Chromium 159); a jsdom test now covers the same state. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ers are measured" The long paragraph under the lanes repeated the docs' definitions in one block of text. It is now a collapsed details box with six plain-language points (agent time, waiting on you, ranges, whose turn it is, credits and how sessions are linked), the names rule, and a pointer to the Definitions on the Timeline docs page. The privacy notes moved to the controls they describe, as tooltips and accessible descriptions: "Show prompts and questions" says it reads that session's log on this machine, replaces links, emails, secret-like tokens, the home folder and your names, and sends nothing off the page; "Mask names" now also lists model names and that text, on this page only. The docs point to the new box and state that the text never leaves the page. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…it on The lane details read a session's prompts and questions from its log as soon as a lane opened, unless you had turned the setting off. Now nothing is read or shown until you turn it on; once you do, the choice is kept for the panel as before. The docs say so. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
A reused tool call ID can cause an early response record to attach to a previous closed question despite differing request IDs, leaving the new question without its recorded answer and timestamp.
1 open issue
Review effort: Balanced
…sed its tool call ID Address review: when a Copilot tool call ID is reused and the new question's human_response.recorded arrives before its own start entry, the record went to the earlier, closed question, so the new one lost its answer and its time. A record whose request ID differs from the closed question's is now kept for the next question on that ID. CACHE_VERSION 34: Copilot logs beside editor chats are cached with their workspace. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Human assessment is needed because supported Codex agent_message events are excluded from reply tracking, causing the Timeline to report no reply despite a logged answer.
No open issues 🎉
1 resolved since last review
Review effort: Balanced
|
Follow-ups added on top of the squash-merged #383 (
Gates on |
…they're off With "Show prompts and questions" off by default, the lane details now say, on the toggle's own line, that turning it on reads the lane's prompts, questions and answers from its log, so the section adds no height. Clicking a wait while it's off still only selects the lane. New tests: on first load with nothing stored, the toggle is unchecked and no text is read, also after clicking a wait; a stored choice to show it is kept. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
fc65d7e
into
san360-feat-timeline-revamp
…Timeline (#381) * feat(timeline): autonomy lanes, session families and coaching on the Timeline Replace the Gantt Timeline with a Day/Week view of autonomy lanes and a Families view that judges each delegated piece of work. - Lanes show agent working time and hatched waits on you, a marker per sender (typed, agent/relay, autopilot, compaction/system) and sub-agent runs; sessions sit under the session that started them. - KPIs: agent time, turns you typed, agent time per prompt, longest unattended stretch, waits on you and peak parallel agents (replaces "Max concurrent"). - Day strip (typed vs automated, or agent hours), impact by family, a detail panel without prompt text, three coaching callouts, filters, Mask names, keyboard navigation and drill-downs to Context Health. - Families: verdicts (worked alone, needed you, wide fan-out), ranked list with credits and running total, and a detail aside with one habit. - Parsing: Copilot CLI/App child sessions from create_session, open_pr_session and open_issue_session results, the relay sender of a session's first message only, per-turn AI credits and tokens, and the scrubbed name, branch and repository from workspace.yaml; Codex and OpenCode parent links. - Shared, browser-safe timeline model used by the webview, the new aiEngineerCoach_timeline chat tool and the summary export. - Tests: unit tests for links, scrubbing, waits, unattended, peak, verdicts and filters; Playwright specs on synthetic data; a new packaged-VSIX "families" scenario with synthetic Copilot App sessions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): date families to their last activity and honor the chat tool's requested day Explain that the longest unattended stretch counts work that runs past your next prompt in a session you didn't prompt, and word the callout that way. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): measure Codex and OpenCode agent time to the end of the turn's work Codex turns ran to the next prompt and OpenCode turns stopped at the first assistant message, so the Timeline drew the wrong working time and waits. A turn without a logged duration no longer counts a wait across it. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): ignore quoted relay headers and follow the theme for typed markers Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): leave waits on you out of agent time, clip days, link forks Review fixes for the Timeline revamp: - Waits inside a turn: answered Copilot ask_user and relayed questions, user-decided permission prompts and Claude Code AskUserQuestion calls are waits on you, kept by their own timestamps. They are left out of agent time, peak parallel and unattended stretches. Policy decisions and older builds that don't log who decided aren't counted. An answer in a child session counts as needing you. - Unattended: from a prompt or an answer, for as long as the family's agent work keeps running; a pause over 2 min ends it. - Codex: a turn ends at task_complete or turn_aborted, not at the next turn's task_started, settings, context or developer lines. - Days and weeks: waits, stretches and agent time are computed over the whole range and clipped to the window, so days add up to the week; ticks follow the clock on daylight-saving days. - Sentences: each callout is conditional on the data (time away, the coordinator out of view, briefs as the lever, "needed no prompt or answer", parent hidden by a filter vs not active). - Labels: generic account names are never removed, only signed-in handles are stripped as branch prefixes, and a repository is never "unknown". YAML block values and comments are read. - Links: the started session is read from the labelled ID or link of the result, also for MCP-prefixed tool names. - Forks: Codex forked_from_id and Claude Code forks (copied history) are linked as forks, not family links, and copied turns count once. - Chat tool: names are masked unless includeNames is set; no branches. - Webview: selection, collapsed families and the selected family are keyed by session ID; up/down only when the timeline has focus; light-theme colors; Token Types link only with token reporting on. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): count range-edge work, attach waits to their turn, nested forks Copilot review fixes: - Turns that started before the date range and run into it, and the last turn before it, come as context: the work and waits crossing into the range count for their part inside it, never as turns. The dataset carries the range bounds and every total is clipped to them. - A question or permission prompt is attached to the turn that asked, even when its answer or the evidence that you decided it comes during a later turn. - Claude Code: each prompt a fork copied is marked, so a fork of a fork also leaves the prompts it took over from the fork in between to that fork. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * test(timeline): mark copied prompts in the fork test without a string replace CodeQL flagged replace('*', '') in the fork test helper as incomplete escaping. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): build every measure from whole-log intervals, separate inputs from blocking, and state only what the logs show Round-2 fixes from the independent review of 085df13. Windows and export (M1, M2, V3, V5, D06-D08, X01): - The analyzer sends the range bounds, the turns just outside the range that a total needs (back to the last input, running into it, the first turn after it), and every other family member as a context record, also those the sidebar filters hide. - The model builds per-session work, waits and inputs over the whole dataset, then clips to the range and the window. Any window gives the same per-day values (0 mismatches over 60 real days); wait-only days and lanes are shown. Inputs and blocking (M3-M5, V10, F03, F06): - Every question and permission prompt is kept with an answered flag, also zero-length ones; policy decisions are dropped. Blocked time is the union per session, never agent time. - Waiting on you is the per-session union of idle gaps and answered requests; answers count on the day you gave them; relayed questions count once, in the child. - Unattended follows the strict rule: from any input in the family to its next one, through the family's running work (2 min bridge). Peak parallel counts sessions. Forks (R01, R02, D28, X02): - Claude Code copied turns are removed once, globally (src/core/fork-ownership.ts), so every tab and the export count them once; the direct source of a fork of a fork is linked; a fork whose source isn't loaded says so. - Codex forks count only their own tokens; the prompt acknowledgment is no agent work; Codex spawn_agent counts as a sub-agent launch. Privacy (P01, V1, V2): - Automatic Copilot titles (user_named: false, or a copy of the first prompt) are never shown. - Mask names clears both searches; models are scrubbed; quoted paths and paths with spaces are scrubbed; short signed-in handles leave branch prefixes. - The chat tool always masks names; includeNames is removed. Dates are validated, and requested and observed bounds are reported separately. Copy and rendering (V4, V6-V9, V11, D/F items): - Callouts, verdicts and insights state only observations; habits are suggestions. Verdicts are "No input in children", "You stepped in" and "Wide fan-out". - Bars and hatches are clipped to the plotted window; zero or unknown shares show a dash. - Selection stays on visible rows; arrow keys act only with focus in the timeline; family headers, impact rows and family sessions open with Enter or Space; light-theme contrast; narrow layout. - Direct parent and depth labels, connectors at creation time, exact small token counts. Parsers: Copilot CLI is told from the App by workspace.yaml client_name; child links reject sessions opened rather than created; OpenCode assistant messages go to the prompt they name. Tests: the reviewer's 23-check boundary fixture is ported to src/core/timeline-boundaries.test.ts (all pass), plus tests for each defect above. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * docs(timeline): refresh the Timeline and Families screenshots for the new copy Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): pair late Claude answers, keep unanswered questions, index OpenCode replies, no Xcode titles as repositories Copilot review round 5 (b3ca3ff): - Claude Code: AskUserQuestion results are indexed once per transcript, so an answer logged after your next prompt still belongs to the question; a question with no result is kept as an unanswered stop that ends at the next logged line. - OpenCode: assistant messages are grouped by the prompt they name in one pass over the session, instead of a scan of every message per prompt. - Xcode: the workspace name is the conversation's title, so it is never shown as the repository. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): keep a fork's detail view to its own turns, and scrub any absolute path Follow-ups to the areas Copilot review round 6 flagged for a closer look: - The Sessions detail view re-reads a transcript from disk; for a fork it now keeps only the turns the analysis kept, so copied turns stay counted once there too. - Labels redact any absolute path of two or more segments (not only /Users and /home); a single /word such as a slash command stays. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * test(timeline): remove every temp workspace the automatic-title tests create Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): address the third independent review round - Keep a session whose only record is a permission or question you answered (no messages), so its wait and answer are counted. - Show family filters on the family's structural size, so a family with one active member on the day is never hidden. - Mask names disables both searches and masks custom model names. - An ask or permission that never closed ends at the next logged event and is not counted as agent work or as an answer. - Count answers on their own dates (including midnight and zero-length ones), and count a relayed answer once: in the child when it logged the same answer. - Keep a child's first creation time when it is reopened later. - Subtract each turn's own waits before the per-session union of work. - Date points at midnight to their own day; show 0% shares instead of a dash. - Claude forks without a lead are detected by an ordered shared prefix; Codex fork baselines use per-response usage, otherwise usage is unknown. - Keep Copilot CLI event logs found outside a session-state folder. - Only names set by the user are shown; branch names keep OS names masked in place; more path forms are scrubbed. - Callouts and the export state only what was measured; the DST test is timezone-independent. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): compare coordinator turns for Claude prefix forks; keep the Sessions list unchanged - Claude prefix-fork detection compares only coordinator turns, so a sub-agent turn merged into the source can no longer break the match or make the source look like the fork; the fork's copied sub-agent turns count once, in the source. - The Timeline alone sees sessions without turns: the Sessions list and the work-life view keep to sessions with turns. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * docs(timeline): describe agent time per turn in the chat tool notes Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): address the fourth independent review round - A session that only holds a permission or question takes its harness, name and branch from its own workspace.yaml (Copilot CLI vs App). - Mask names aliases every model name; a provider prefix is no proof a name is public. - A relayed answer pairs, one to one, only with a question answer logged by a session it started, so an unrelated permission can't absorb it, and a range and its day count it alike. - A day inside an unanswered stop isn't active, even when a reply follows. - A result-less ask that a human_response record answered ends, and counts, at that record. - create_session children are timed by the app's request; open_pr_session and open_issue_session only count a session that began with the call. - Claude forks without a lead are told from their source by the turns the source logged live (queue, API request and cost records); without that witness and with both sides continuing, neither is taken for a fork. - Codex forks count their own responses' usage records by thread and response ID, whatever cumulative snapshots they hold or copied. - The cache fingerprints a Copilot CLI log and sidecar beside editor chats, so an edit or deletion re-reads that workspace. - Unquoted paths with spaces are scrubbed to their end; an OS name before an underscore is marked; a name that repeats a prompt's first words is withheld. - A fork holding only copied turns stays in the Sessions list. - UI: a child with only an answer opens on its day, selected; lanes without a turn say what they hold; a wait that ended in the period isn't called instantaneous; a real 0% share shows; family rows name an active repository; context rows keep full text contrast; timing copy matches the arithmetic. - The no-logs and error pages wait for the dashboard page's ready message, so that page's own load can't replace them (the flaky empty VS Code scenario). - Desktop tests: the palette runs a command only once it lists it, and the tester is told the cached VS Code version instead of spawning code -v. - Docs and screenshots updated. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): link a lead-less fork to a fork it copied; scrub POSIX paths with spaces - A Claude fork with a clock lead can be the source of a fork that lost its opening lines, so a fork of a fork no longer keeps its direct source's copied turns or links past it. - Unquoted absolute POSIX paths are scrubbed like drive paths: to their first word with a file extension, else up to the next path or the clause's end. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): attribute a Claude queue record to the prompt it precedes A prompt's queue record is logged just before it, and its API request, last-prompt and cost records after it. Counting a queue record for the turn before it marked a fork's last copied turn as logged live when the fork's own next prompt was queued, so the copies stayed counted twice. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): date answers by their own record, allocate Codex fork usage per turn, scrub every path Fifth review round (C1-C8): - C1: a question or permission keeps the time Copilot recorded your answer (human_response.recorded) apart from its result. The answer point, input, unattended stretch, day, verdict, chat tool and export use that record; the wait itself stays on the tool's clock. A question answered before it was even logged has no measurable start and adds no waiting time. - C2: the child connector is named for what it marks: when the parent requested the child (the earlier of its two records of the call), not when the child began. - C3: a Codex fork's usage is allocated per native turn: each turn's own response records, else its snapshot growth. Requests, session totals and Token Coverage come from the same allocation. - C4: every drive, network and POSIX path in a clause is scrubbed, not only the first. - C5: a Claude transcript pair with no live-logging witness is no fork in either direction; length is no proof of direction. - C6: a create_session result wins over another session's open call. - C7: relays pair with the child's answer by request ID first, then by time for the rest, never with an answer for another request. - C8: no prompt or response body wording; Families docs describe the zero-turn fallback and the italic context rows; one repository basis in the Families row, detail and chat tool. Also: the packaged VS Code driver re-enters the webview when the extension swaps in its no-data page after `ready` (the cause of the flaky empty scenario); a test guards transcripts with paths over 260 characters. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * test(timeline): make the long-path transcript guard long on every temp folder Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): count a copied sub-agent turn that ran after the last shared prompt once A sub-agent a shared Claude Code prompt launched can run after that prompt. A turn the source also holds, logged before the fork's first prompt of its own, is a copy too, so it counts once, in the source. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * test(vscode): re-enter the webview after a lookup that fails on a replaced frame Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * docs(timeline): state exactly which short account names are left in labels Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): one input per decision, half-open ranges, Codex fork turn counters Sixth review round (E1-E9): - E1: a relayed answer paired with the child's own record of it is one input: family unattended stretches use counted answers only. - E2: a session is active in a range by an answer at a moment in it, or a measured wait on you overlapping it (half-open); never by the span between an answer and a result logged on either side of the range. - E3: a turn outside the range that holds an answer inside it (recorded before its own prompt, or after a later prompt) is kept and makes the session active, so bounded and whole-range views agree. - E4: CACHE_VERSION 32: caches written before answers kept their own time are re-parsed once. - E5: a Codex fork's own usage is anchored on the native counters (the first own record's thread less turn usage); each turn takes the largest lower bound the logs give, so a missing response record never drops a turn's usage. Fallback: turn_token_usage, records, snapshot growth; a snapshot never takes another turn's last call as its own. - E6: an extensionless path with spaces is redacted up to the next path, keeping a joining word. - E7: an answer with no waiting time measured is no longer called instantaneous, nor said to end a wait that ended the day before. - E8: when two sessions hold a Claude fork's copied history equally, the fork is linked to neither (its copies still count once). - E9: singular copy for one answer and one credit. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): pair relays over the whole log, keep known Codex usage per turn, tie-safe Claude forks Seventh review round (G1-G6): - G1: relayed answers are paired with the child's own record once, over the whole log and every family member, and the pairing is carried into every bounded dataset (TimelineTurnWait.pr). A range that leaves out the child's answer no longer turns the delivery into a second input, answer or verdict, in the Day, chat tool or export. - G2: a paired delivery is no activity: it opens no session, day, lane or family. - G3: a Codex fork turn's own usage is the larger of its distinct responses' sum and its turn counter: a partial counter never overrides known responses. - G4: where the next turn began (its thread less turn counter) bounds the previous turn's end, so a missing tail stays with its own turn. - G5: when two Claude sources tie, sub-agent turns stay with the transcript that holds them, whatever order the logs are read in. - G6: such a fork says its source can't be told from these logs, not that it is missing. Tests: Timeline CLI fixtures move to src/test/timeline-cli.ts; the relay cases are in timeline-relays.test.ts. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): a paired relay keeps its blocked time in every range; pair by identity Eighth review round: - H1: a relay paired with the child's own answer is no answer and no input of the relaying session, but the time it stopped that session's agent is still its waiting, and its positive stop makes the session active where it lies, in range admission and retained context alike, as the model counts it. A Day opened fresh or from a wider range, the chat tool and the export now agree, and the days add up to the range. Docs state that waiting is summed over sessions (session-minutes). - H2: the pairing pass traces each paired wait back to the logged wait it came from, by identity, so two relays with the same times stay two decisions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): admit a stop held by a later turn; drop an unmeasured claim Ninth review round: - I1: a turn outside the range now keeps a session in it when it holds a measured wait overlapping the range, not only an answer inside it. A permission asked before a session's first prompt belongs to that turn; when midnight falls inside it, the earlier day keeps its share, opened fresh or from a wider range, in chat and the export. The turn is kept as context only: its prompt isn't counted, and its answer counts where it lies. - I2: the docs and model no longer say relayed and child answers are logged in the same second; the 10-second fallback is unchanged. - The Families empty state says "1 session". Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * refactor: keep the merged Codex parser and tests within the lint limits Merging main added main's compaction state and checks to functions that this branch also grew, which pushed createCodexState and handleTokenCountEvent, and parser-codex.test.ts, over their limits. Move the fork state defaults and the main-agent call bookkeeping into helpers, and the Codex turn-end tests from both sides into their own file. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix: resolve Claude Code forks from their own evidence before counting turns once Address review: the merged parser counted each turn once by transcript order before the fork resolver ran, so it linked a source that nothing proved, and dropped a fork that held only copied turns. - parseClaudeSessions resolves forks first (withInheritedTurnsRemoved, the same rules as before): a fork loses its copies and records its source or that the source is unknown, and a fork of only copies stays listed. The removed ids go to the session's source, so its detail leaves them out. - keepEachTurnOnce then counts a turn still held twice once, as main does, and marks the session that lost it as having an unknown source instead of naming one. - A prompt older than its transcript's first line is a copy, so the queue record a fork writes before its copied history no longer marks it as logged live. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * feat(timeline): show the prompts and questions behind each wait (#382) * feat(timeline): show the prompts and questions behind each wait The lane detail panel can now show, for the lane you open, the text behind each turn and each wait: your typed prompt, the agent's question with its choices and your answer, a permission prompt's request, reason and decision, a relayed question and your reply, and the agent's last message before it waited. Copilot CLI/App and Claude Code AskUserQuestion are covered. The text is read on demand per lane through a new getTimelineSessionText RPC, scrubbed (home paths, links, emails, secret-like tokens, names) and cut. It is never part of the Timeline dataset, the chat tool or the summary export. Mask names hides it. A persistent "Show prompts and questions" toggle controls it, and clicking a hatched wait scrolls to its question. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): reply text without written code, turns joined by request, questions by window Copilot review of #382: - A turn's reply and the text before a question are the agent's own messages (SessionRequest.replyText), never the code its edit or write tools wrote (which responseText keeps for code analysis); stripped from analyzed sessions like the rest of the text. - Timeline turns carry their request ID, and the detail panel joins each turn's text by it, so two turns at the same moment keep their own text. - A question belongs to a window when it was asked in it, its measured wait overlaps it, or it was answered in it (waitInWindow). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): empty replies, task summaries, stable turn identity and the turn behind each idle wait - Copilot CLI/App and Claude Code always log replyText, empty when the agent wrote no message, so a turn that only wrote files never shows their contents as its reply. - A successful session.task_complete summary joins the turn's reply, once. - Turns join their text by turnIdentity (prompt event, else request ID), which stays the same while a live Copilot turn gains messages; withAnalyzedTurns uses the same key. - A wait for your next prompt carries the turn whose end started it (after), so overlapping turns show the right reply. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): OpenCode replies without written code; drop a text read the Timeline reloaded under - OpenCode logs replyText (the assistant's text parts, empty when it wrote none), so its lanes never show the code a write tool wrote as the agent's reply. - A lane's text read applies only while its own loading entry is still current, so a read from before a reload can't replace the fresh one or mark it unavailable. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): waits open from the keyboard; scrub prefixed secret names and flags Copilot's review of #382 asked for a closer look at keyboard access and unintended text exposure: - A hatched wait on a lane was a click-only shortcut to its text. It is now a focusable button (role, label from its tooltip, Enter or Space), with a focus outline. - scrubText missed a secret whose key is part of a longer name, such as DB_PASSWORD=... or SERVICE_API_KEY=..., and flags with a space, such as --password ... or --client-secret .... Both are now replaced. Words that only contain a key name, and flags such as --token-file or --max-tokens, stay. Matches start only at a name's start, so the scan stays linear. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): no reasoning in Codex and VS Code replies; find a live turn's text when its prompt logged no ID Copilot's second "closer look" on #382: - Reasoning shown as reply text: Codex put agent_reasoning, and VS Code its thinking parts, into responseText, which the Timeline falls back to as the agent's reply. Both now log replyText, the agent's own messages (empty when there are none). responseText is unchanged for code analysis. - Prompt identity that can hide logged messages: a Copilot turn whose prompt was logged without an ID is known by its latest reply, so a live turn changes identity as it gains messages, and its lane said no message text was logged. The panel's join is now textTurnFinder in the shared model. It uses the identity, else the time when only one text turn has it, so two turns at the same time are still never mixed up. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): scrub camelCase secret names again 73db9d8 matched a secret's key as the end of a longer name only after an _ or -, so accessToken=, refreshToken: and clientSecret: were no longer replaced. A key may now end any name. Matching still starts only where a name starts, so the scan stays linear. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): a recorded answer goes to its own question only; scrub the permission kind Copilot's third "closer look" on #382: - Colliding question identifiers: an answer text from human_response.recorded was kept by its tool call ID after its question closed, so a later question that reused the ID, with no answer of its own, showed it. It now goes to the question still open (else the one it closed), and is dropped when that question closes. - Unsanitized permission kinds: the request kind shown in the Timeline is scrubbed and cut like the other text, as the log can hold any string there. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): a recorded answer marks only the question it answered Hardens Copilot CLI code from #381. human_response.recorded was kept by its tool call ID (humanResponses) and never cleared, so a later question that reused the ID, failed or unanswered, was marked answered at the earlier answer's time. A record now goes to the wait still open on its key, else to the one it closed, and is cleared when that wait closes, along with its request ID and answer text. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): no compaction summary as a reply; a highlight ends with its click; scrub command-line credentials Copilot's fourth "closer look" on #382: - Hidden summaries shown: a compaction's reply (the summary, as OpenCode logs it) appeared under a turn whose text the panel says isn't shown. A compaction now shows neither. - Question navigation: the prompt or wait a click highlighted stayed highlighted when its lane was selected another way, and could match an item in another lane with the same key. Selecting a lane now clears it, and a click while the text is off or masked leaves no pending scroll. - Credential exposure: curl -u user:password, -u user -p password, and names ending in access_key or private_key are now replaced. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): scrub credentials in three layers, before the text leaves the extension Copilot's fifth "closer look" on #382 named critical credential exposure. A synthetic corpus of 22 credential shapes found 13 of them reaching a lane's text: Authorization values in JSON, GCP and Azure keys, connection-string passwords with spaces, 32-hex and base32 keys, GitLab and SendGrid tokens, PGP and unterminated key blocks, .npmrc auth, query-string keys, quoted JSON values with spaces, escaped and doubled-quote JSON, -p and pass: flags, and random strings beside a credential word. scrubText now calls scrubSecrets (new, browser-safe), which applies three layers: 1. redactSecrets, the masking the chat tools use; 2. token formats, whole Authorization headers, connection-string fields, key = value pairs whose name ends in a credential word (whole value when quoted), credential flags, and long hex, base32 or random keys; 3. on a line that names a credential, any 16+ run of letters and digits. Text is scrubbed in the extension host, so the webview never receives it. Fixes found along the way: - Every pattern is bounded and starts only where a name starts. The old link and email patterns took 16 s on a 100 KB input. - redactSecrets' scheme://user:pass@ pattern took 6 s on a long run of letters and dashes; its scheme length is now bounded (same matches). - The new corpus test builds fake tokens at run time, and the tests' token literals are built the same way, so no token-shaped string is in the repo. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): a reply once, the agent's words before a question shown, no stale highlight Copilot's fifth "closer look" on #382, reply visibility and question navigation: - Codex can log an assistant message both as an event and as a response item. Its reply showed twice; it is now read from the response items when the turn has any, else from the events. - What the agent said before it asked is open, not folded away. - A wait for your next prompt after a compaction says so, instead of claiming no reply was logged. - A wait's highlight no longer survives a Timeline reload. A click while the text is masked or turned off sets none, so no stale highlight appears when the text shows again. - Docs list what is scrubbed and what a reply is. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): mask a credential value to its delimiter, however long Copilot round 9 on #382: values were matched up to 2,000 characters, so a longer quoted password kept its tail, and a longer quoted --password flag value wasn't masked at all; token formats stopped at 255. Every recognized value is now consumed to its delimiter, with no length limit: the closing quote, or the line's end when the quote is never closed, whitespace, ';', or the end of the token. It is still one pass per value. The corpus gains oversized quoted, unclosed, bare, header and token values; the linear-time test gains long unclosed flags and headers and many short quoted pairs. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): build a lane's text in the parse worker, for what the lane shows only Copilot's round-10 "closer look" on #382 named hidden-turn text exposure, ambiguous wait navigation and extension-host blocking. - Host blocking: the lane-text RPC parsed the whole session in the worker, then validated all of it and scrubbed every turn on the extension host. A new 'timeline-text' worker request now reads, filters and scrubs in the parse worker. The host gets a small reply that a strict schema validates; a reply carrying anything more is refused. - Hidden turns: the read returned every turn and stop of the session, including other days and a fork's copied turns, and left the filtering to the page. The request now names the lane's window and the turns it lists, plus the turn before each wait for your next prompt. Only those, and the stops in the window, are built. A fork's copied turns and their stops are never read. - Ambiguous navigation: two questions of a kind that began together were both highlighted. A click now carries the wait's end, so only the matching one is. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): keep the Timeline's raw text out of the session detail reply Copilot round 11 on #382 again flagged credential exposure. The session detail RPC (Sessions page) gets the session the worker re-reads, which since this PR also held the Timeline-only text unscrubbed: replyText and each wait's text (questions, your answers, permission commands and URLs). The detail view shows none of it, yet it crossed to the host and the webview. The worker's session-detail reply now leaves those fields out. They reach the extension only through the scoped, scrubbed timeline-text read. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): mask credentials given in context, and drop lane reads a newer one replaced Copilot round 12 on #382 flagged secret-redaction gaps and obsolete queued Timeline reads. Redaction: the corpus gains the shapes still missed, now masked: - context: your answer to a question that asks for a password, token or key, and a lone word you send right after the agent asks for one; - prose such as "change the password to ..." (short words like "expired" stay); - *_PASS names, Cookie, Set-Cookie and Private-Token headers; - pretty-printed JSON with the value on the next line; - Entra ID client secrets, dapi/shpat_/SK hex keys and 64-hex secrets (a sha256 digest stays); - long lower-case values of a key. Version pins, "bypass" and "compass" stay readable. Queued reads: lane-text reads run one at a time in the worker, so stepping through days queued reads the panel had already moved past. A read still queued behind a newer one is now dropped unread as { superseded: true }. The page forgets it, and reads it again if that lane is the one shown. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): re-parse caches from before the answer fix; a harness turn's note names what is hidden Copilot review of #382 at 8694ca6: - Cache: Copilot CLI logs beside editor chats are cached with their workspace, and 5b4875e changed which of their waits count as answered. CACHE_VERSION goes to 33, so an upgraded install re-parses them instead of keeping a later question that reused an answered one's tool call ID marked answered. A test reloads a version-32 cache of a mixed editor/Copilot workspace. - Harness turns: their reply showed under a note saying "Its text isn't shown". The reply is the agent's own words, and can be the last thing it said before it needed you, so it stays. The note now says the message that started the turn isn't shown, and takes the turn's kind from the text read. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * feat(timeline): date picker and custom date ranges (#383) * feat(timeline): date picker and custom date ranges - The toolbar's date opens a calendar: activity dots from the per-day totals, days outside the loaded range disabled, month navigation, Today and the quick picks Last 7 days, Last 30 days and This month. ‹ › and ← → still step. - A Range view beside Day, Week and Families shows any run of whole days (up to 92; longer picks are cut, and the page says so). Lanes, axis ticks (6-hourly, daily, every other day or weekly), KPIs, callouts, the impact table and the strip highlight all follow the range. - The view is kept by dates in the webview state and in the address: #view=range&from=…&to=…. - Ranges use the same window rules as days, so a range equals its days added up and the summary export of the same dates, also over daylight-saving changes (timeline-range.test.ts). - Keyboard: arrows, Page Up/Down, Home/End, Enter, Esc; focus stays in the calendar and returns to the date. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): open Timeline links on load, keep picked dates without activity - A #view=… address opens the Timeline at that view on load, without a click on the sidebar; leaving the Timeline clears it, so a reload elsewhere doesn't reopen the Timeline. - A picked or restored date within the loaded days stays when the Timeline loads again, with or without activity; only a missing, invalid or out-of-range date falls back to the nearest active day. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): keep axis ticks on whole hours over half-hour daylight-saving changes hourTicks stepped by elapsed hours, so after a half-hour change (Lord Howe Island) every later tick sat at :30 under a whole-hour label. A step that lands off the hour now moves onto the clock's next whole hour; an hour the clock repeats still gets its tick twice. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * perf(timeline): redraw only the date picker while moving around the calendar Arrow keys, Page Up/Down, Home/End, month buttons, the day/range switch, the first day of a range, opening, closing and a click outside used to redraw the whole Timeline (lanes, families, KPIs) on every press. The picker is now a Preact component that redraws itself for those; the page is drawn again only when a day or a range is picked. On a 92-day range with 519 lanes, a calendar arrow key took 846 ms (median) before and 7.7 ms after. Addresses the Copilot review note on #383 (page-timeline.ts:381). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): return focus to the date after a click outside the calendar Closing the calendar with a click on a part of the page that takes no focus removed the focused day and left focus on the page body. Focus now goes back to the date button, as after Esc or Close, unless the click focused something else. It is checked once the browser has handled the press. Addresses the Copilot review comment on #383 (timeline-date-picker.ts:301). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): keep the Range view when opening a session active in it Opening a parent, child or fork source from the Range view fell back to the Day view whenever the day last shown on the Day view was outside the range, even when the session had a lane in the range, so it could open on a day where that session has none. The range now stays when it holds the day asked for or, with none asked, when the session has a lane in it; otherwise the session opens on its busiest day. Addresses the Copilot review comment on #383 (page-timeline.ts:1082). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): read the text of a long Range lane, and say when it has too many turns A Range view of up to 92 days can list more turns in one lane than the 5,000 the host accepted for a text read, so Show prompts and questions failed with the message for a log that couldn't be read. The lane's scope now lists each turn once (a wait's preceding turn is often a listed one), the webview and the host share one limit, MAX_TEXT_SCOPE_TURNS (50,000), and a lane past it says so and suggests picking fewer days instead of asking the host. Addresses the Copilot review comment on #383 (page-timeline.ts:517). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): keep focus in the calendar when a month button turns disabled Clicking ‹ onto the first loaded month, or › onto the last, disabled the button that held focus, so focus fell to the page body and Tab left the open calendar. When a calendar redraw drops focus that was inside it, focus now goes to the month's day reached by Tab. Addresses the Copilot review note on #383 (round 7 overview, not published as a thread). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): build the lane of a dense session without overflowing the stack A lane's first and last moments, and a family member's, were taken with Math.min(...values) over every turn, work and wait edge. A session with a few hundred thousand of them in a long Range threw a RangeError before the page could draw. They are now found with a loop. Addresses the Copilot review note on #383 (round 8 overview, not published as a thread). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): find a family's longest unattended stretch without overflowing the stack familyUnattendedMs spread every unattended stretch of a family into Math.max, so a dense Range (150,000 stretches) threw a RangeError in buildViewFamilies. It, the view's longest unattended stretch, and a family's depth and fan-out (and their maxima) now use maxOf, floored at zero as before. The dense-session test now uses measured turns and runs buildViewFamilies, timelineKpis, viewInsights, buildFamilies and familiesInsights. Addresses the Copilot review comment on #383 (timeline-model.ts:608). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): ground the day strip and calendar dots in the filters, and put the strip first The day strip, its tooltips, its footer and the calendar's activity dots counted every session, before the lane filters, while the KPIs beside them counted the filtered lanes, so with a filter on the strip's footer disagreed with the day's KPIs. The strip also sat between the KPIs and the lanes, where it read as part of the selected day. - With a filter on, each day counts the sessions whose lane that day passes the filters, as the Day view does (filteredDayTotals). Without filters the prepared totals are used unchanged. The totals are cached by filters and mask, and computed again only when they change, not when you move between days. - The footer gives the totals of the view's own lanes in the Day and Range views, so it equals their KPIs; the Week view gives the selected day's. - The calendar's dots follow the same totals. - The strip now opens the view, under the filters, and its header reads "Pick a day · … · first → last", with "only sessions your filters show" when filtered. On real data (77 days, 536 sessions), the filtered totals of every day take about 5 ms; turning a filter on redraws in about 160 ms. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * perf(timeline): find each turn's predecessor once when reading a lane's text Reading a lane's text looked each one-word prompt's preceding turn up with requests.indexOf, a search per turn. With the text scope raised to 50,000 turns for long ranges, that is quadratic: a 50,000-turn lane of one-word prompts took about 1.15 s on the shared worker, now about 0.56 s. The predecessors are mapped once; what the read returns is unchanged. Addresses the Copilot review comment on #383 (timeline-text.ts:91). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): end a day at the next midnight where the clock skips midnight In zones where daylight saving starts at midnight (Santiago, Havana, Beirut), that day starts at 1:00. addDays kept the clock time it was given, so the day after such a day also started at 1:00: that day's window and a range ending on it ran an hour into the next day, its work took the next day's first hour, and the axis's later day markers sat at 1:00. addDays now gives the start of the later day, read from its date. A short range's axis also names a day that starts at 1:00, where it had no marker. Addresses the Copilot review note on #383 (round 12 overview, not published as a thread). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * perf(timeline): sort a session's activity into its days once for the filtered strip With a filter on, the strip judged each session's lane for every day its activity spans, filtering all of its turns, work and waits each time: a 300,000-turn session over 209 days took about 0.73 s, on the page's thread. Each session's activity is now sorted into its days once, and each day's lane is built from that day's part, with the same result: about 0.06 s. Addresses the Copilot review note on #383 (round 12 overview, not published as a thread). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): start a week at its Monday's midnight whichever day is picked weekStart kept the clock time of the picked day's start. Where the clock skips midnight, that day starts at 1:00, so picking it gave a week from Monday 1:00: an hour short, with totals that depended on the day picked. The week now starts at its Monday's start whatever day holds it. Addresses the Copilot review note on #383 (round 13 overview, not published as a thread). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): keep calendar focus when a month button turns disabled in newer Chromium Chromium moves focus off a control that turns disabled only at its next frame. When the calendar's last draw ran, focus was still on the just-disabled month button inside the calendar, so it wasn't moved to a day, and the browser then dropped it to the page. A disabled control that still holds focus now counts as having lost it. The e2e test failed once the toolchain moved to Playwright 1.65 (Chromium 159); a jsdom test now covers the same state. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * feat(timeline): replace the footnote with a collapsed "How these numbers are measured" The long paragraph under the lanes repeated the docs' definitions in one block of text. It is now a collapsed details box with six plain-language points (agent time, waiting on you, ranges, whose turn it is, credits and how sessions are linked), the names rule, and a pointer to the Definitions on the Timeline docs page. The privacy notes moved to the controls they describe, as tooltips and accessible descriptions: "Show prompts and questions" says it reads that session's log on this machine, replaces links, emails, secret-like tokens, the home folder and your names, and sends nothing off the page; "Mask names" now also lists model names and that text, on this page only. The docs point to the new box and state that the text never leaves the page. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * feat(timeline): keep "Show prompts and questions" off until you turn it on The lane details read a session's prompts and questions from its log as soon as a lane opened, unless you had turned the setting off. Now nothing is read or shown until you turn it on; once you do, the choice is kept for the panel as before. The docs say so. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): keep a recorded answer for the later question that reused its tool call ID Address review: when a Copilot tool call ID is reused and the new question's human_response.recorded arrives before its own start entry, the record went to the earlier, closed question, so the new one lost its answer and its time. A record whose request ID differs from the closed question's is now kept for the next question on that ID. CACHE_VERSION 34: Copilot logs beside editor chats are cached with their workspace. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * feat(timeline): say how to show a lane's prompts and questions while they're off With "Show prompts and questions" off by default, the lane details now say, on the toggle's own line, that turning it on reads the lane's prompts, questions and answers from its log, so the section adds no height. Clicking a wait while it's off still only selects the lane. New tests: on first load with nothing stored, the toggle is unchecked and no text is read, also after clicking a wait; a stored choice to show it is kept. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(timeline): stop a superseded lane-text read, and scrub paths whose first folder has spaces Address review: - A lane-text read already running for a lane no longer shown is now stopped when a newer lane is read (its worker ends; the caller gets "superseded", so the lane is read again if it's shown). The newer read no longer waits behind it, so the webview's request timeout, which counts that wait, isn't spent on a lane no longer shown. Image and session-detail reads are never stopped this way. - An unquoted absolute path whose first folder holds spaces (/Secret Project/notes.txt) is now replaced in labels, up to its first word with a file extension, as the docs say. A slash command and the words after it stay (/fix the build and/or tests). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Description
Stacked on #381 (base
san360-feat-timeline-revamp). Review #381 first.The Timeline shows that an agent waited for you, but not what it asked. When a coordinator or child keeps stopping for you, the useful question is what did it ask, and what did I say? That's how you tighten the brief so the next run goes on without you. This PR adds that to the lane detail panel, locally and on demand.
What the lane detail shows (a new Show prompts and questions section, off until you turn it on, in time order, for the lane's day, week or range)
ask_user, Claude CodeAskUserQuestion): the question, its choices, what the agent said just before (shown, not folded), your answer and how long you took. The time is measured to Copilot's own record of your answer when one was logged (see feat(timeline): autonomy lanes, session families and coaching on the Timeline #381).Privacy and scope
@aicoachchat tool, the summary export and the Sessions detail reply never carry this text. There is no telemetry.Authorizationvalues,password=…-style pairs and flags, long random strings), your home folder (as~) and your names (as[name]).Now also in this PR
b4554a1) and closed, so its work ships with this PR: a calendar under the date with active-day dots and keyboard navigation, a Range view for whole-day ranges with presets, the Range in the address link, and the calendar focus fix for Chromium 159. Its description, review rounds and gates are on feat(timeline): date picker and custom date ranges #383.0378b90). The long paragraph under the lanes is now a collapsed details box with six plain-language points (agent time, waiting on you, ranges, whose turn it is, credits, how sessions are linked), the names rule, and a pointer to the Definitions on the Timeline docs page. The privacy notes moved to the controls they describe, as tooltips and accessible descriptions: Show prompts and questions (reads that session's log on this machine; links, emails, secret-like tokens, your home folder and your names are replaced; nothing leaves the page) and Mask names (now also lists model names and that text, on this page only, not the sidebar). The docs keep every rule the paragraph held.78229be). Opening a lane reads nothing from its log until you check the toggle; a one-line note beside it says so (25567d1). Your choice is then kept for the panel.2a76573): a recorded answer for a later question that reuses a tool call ID, logged before that question, stays with it.CACHE_VERSION34.Code
src/core/timeline-text.ts(new): builds one lane's text: the scope's turns and stops, only the turns the analysis kept (a fork's copied turns count once, in their source).src/core/session-images.ts,parse-worker.ts,session-image-loader.ts: atimeline-textworker request. A newer read replaces one still queued, so stepping through days doesn't keep the shown lane waiting.schemas.ts: the strict reply schema.replyText(the agent's own messages) for Copilot CLI/App, Claude Code, OpenCode, Codex and VS Code. Wait text (question, choices, answer, permission request, intention, last agent message) for Copilot and Claude Code.stripSingleSessiondrops both from the sessions the analyzers hold.secret-scrub.tsandsession-labels.ts(scrubText): the scrubbing above.panel-rpc.ts: the scoped RPC.page-timeline.ts: the section, the toggle, and keyboard-accessible waits.Review fixes (Copilot rounds 1–13)
CACHE_VERSION33, now 34: an upgraded install re-parses Copilot logs cached beside editor chats, whose answered flags changed.Real-data check (local, never published)
Related Issues
N/A
Checklist
npm run checkpasses (typecheck + lint + spellcheck + knip + tests)Validation (head 25567d1)
This branch includes
mainthrough #381 (merge conflicts resolved there; see the merge comments on #381 and here).npm run typechecknpm run lintmain's, merged through #381)npm run spellchecknpm run knipnpm run lockfile-lintnpm testnpm run buildE2E_PORT=4175 npm run test:e2enpm run packagenpm run check-sizenpm run test:vscode -- --vsix ai-engineer-coach-0.1.0.vsixtimeline-text(scope, kept turns, order, cut text, compaction, identity joins; never in the dataset, chat tool or export).session-image-loader(worker request, strict reply, superseded reads, Sessions detail without the Timeline text).session-labelsandtimeline-secrets(scrubbing, readability, linear time).