You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(timeline): date picker and custom date ranges - #383
Adds a date picker and custom date ranges to the Timeline. Stacked on #382 (prompts and questions behind each wait), which is stacked on #381 (Timeline revamp).
Calendar popover. The toolbar's date is now a button that opens a calendar.
Days with activity carry a dot, sized from the per-day totals the page already has.
Days outside the loaded range are disabled.
Month navigation, a Today action, and quick picks: Last 7 days, Last 30 days and This month, each kept within the loaded days.
‹ › and ← → still step: by an active day or week, or by the range's own length.
Custom range. A Range view sits beside Day / Week / Families, and Week stays Monday–Sunday. In the same popover, A range picks the first and last day.
The lanes, axis ticks, KPIs, callouts, the impact table and the strip highlight all follow the range.
Axis ticks are every 6 h for 2–3 days, daily up to 14 days, every other day up to a month, then Mondays. That keeps the gridlines per lane at 16 or fewer.
A one-day range is drawn like a Day.
A dense session builds its lane and family without overflowing the call stack. A lane's first and last moments, and a family's longest unattended stretch, depth and fan-out, are found with a loop, not Math.min(...values).
Ranges are capped at 92 days. A longer pick is cut, and the page says so; past a month it suggests picking fewer days.
On real data, a 92-day range is about 500 lanes and 38k DOM nodes, and takes about 0.8 s per full redraw.
Moving around the calendar redraws only the picker, not the lanes. On that range an arrow key takes about 8 ms; before this, each key redrew the whole page and took about 850 ms.
Day strip, grounded in the filters. The strip now opens the view, right under the filters, as the navigator over the loaded days ("Pick a day · Turns per day · first → last").
With a lane filter on, its bars, tooltips and the calendar's dots count only the sessions the filters show. Each day is judged as the Day view judges it: a session counts when its lane that day passes the filters. The header then says "only sessions your filters show".
Its footer equals the KPIs: the Day and Range views total their own lanes; the Week view gives the selected day's.
Without filters, the totals are unchanged. Filtered totals are cached by filters and mask, and are computed again only when those change. Each session's activity is sorted into its days once: a 300,000-turn session over 209 days takes about 0.06 s. On real data (77 days, 536 sessions) they take about 5 ms; turning a filter on redraws in about 130 ms.
Deep link and view state. The view is kept by dates, both in the webview state and in the address: #view=range&from=…&to=…, and also view=day|week&date=… and view=families.
Nav hints accept the same form. Opening such an address starts the dashboard on the Timeline, and leaving the Timeline clears it.
A picked day stays when the Timeline reloads, even with no activity, while it is within the loaded days.
A linked range is clamped to the loaded days. A range with no loaded day opens the Day view.
Opening a parent, child or fork source from the Range view keeps the range when that session has a lane in it; otherwise it opens the session's busiest day.
Show prompts and questions works for a range lane too. Its text read lists each turn once, and the webview and host share one limit, 50,000 turns (it was 5,000, set for a day or a week). A lane past it says so and suggests fewer days. Each turn's predecessor is looked up once rather than searched for, so a long lane's read stays linear.
Correctness. A range uses the same window rules as a day: intervals are built over the whole log and clipped half-open at its midnights. So its additive values equal the sum of its days, and they match the summary export for the same dates. This holds across daylight-saving changes, tested in Europe/Berlin and America/New_York whatever the machine's zone. Where the clock skips midnight (Santiago, Havana, Beirut), that day starts at 1:00 and ends at the next midnight, the axis names it there, and its week starts at its Monday's midnight whichever day is picked.
Accessibility. Keyboard:
← → move a day, ↑ ↓ a week, Page Up/Down a month, and Home/End go to the ends of the week.
Enter picks and Esc closes. Clicking outside also closes it, and focus returns to the date unless that click focused something else.
Focus is trapped while the calendar is open and returns to the date button. If a month button that has focus turns disabled at the first or last loaded month, focus moves to that month's day.
The popover uses the existing CSS variables, so it reads in light and dark themes. At 560 px it shifts to stay in view. No new dependency.
New files:
src/core/timeline-range.ts: browser-safe range math (month grid, clamp, step, quick picks, ticks).
src/webview/timeline-date-picker.ts: the popover, a Preact component that redraws itself.
Token Coverage by day stays a separate follow-up, as agreed.
date validation, clamping, the 92-day cap, stepping and its edges, quick picks, the month grid and ticks;
whole-day steps across DST in two zones, axis ticks staying on whole hours across a half-hour change (Lord Howe Island), and, where midnight is skipped (Santiago, Havana, Beirut), every day named on the axis, the day's window, a range's end and its work ending at the next midnight, and one week window whichever of its days is picked;
a range equal to the sum of its days and to the export, with synthetic Copilot logs, also over the spring change in both zones.
src/core/timeline-text.test.ts › "finds each turn's predecessor without searching" checks that a 20,000-turn read makes no per-turn search.
src/webview/panel-rpc-timeline-text.test.ts (2 tests): a 6,000-turn range lane's scope reaches the reader; nothing is read past the shared limit. timeline-model.test.ts › filteredDayTotals checks that each day's filtered totals equal that day's KPIs (harness, "you typed in it" and "hide one-turn" filters) and that the unfiltered totals are unchanged, and that a 300,000-turn session filters in less time than preparing it; › textScope checks the dedupe, and › "a dense session" builds a 300,000-turn lane with 150,000 unattended stretches, its view family, KPIs, callouts and Families view. It threw a RangeError before.
src/webview/timeline-date-picker.test.ts (4 tests, jsdom): moving around the calendar, changing month and starting a range don't redraw the page; picking a range redraws it once; Esc and an outside click return focus to the date, unless the click focused something else.
activity dots and disabled days; a picked day with no activity surviving a reload; focus staying in the calendar when a month button turns disabled; the strip above the callouts and KPIs, its footer equal to the KPIs with a harness filter (Day) and with "you typed in it" (Range), and the calendar dots following the filter; arrows, Enter and Esc with focus returning; the focus trap;
a two-day range adding up its days (7 of 14); stepping by length; strip clicks; Today and the quick picks; closing on an outside click, with focus returning to the date; opening a parent active in the range keeps the range;
links opened from the address without a sidebar click (the start page follows a #view=… hash, which is cleared when you leave the Timeline), clamped, and falling back; state restore;
560 px in a light theme.
Other runs:
npm run build: passed.
E2E_PORT=4853 npm run test:e2e: 235 passed, 7 skipped.
npm run package: 1.73 MB. npm run check-size: within budget.
npm run test:vscode -- --vsix …: 1, 3 and 7 passing.
Local real-data check (read-only, aggregates only): 7-, 15-, 21-, 30- and 92-day ranges each equal the sum of their days and the summary export. The 15-day range crosses the October daylight-saving change. With the day strip grounded in the filters: unfiltered 17 Nov is unchanged (8.3 h, 41 of 156 typed), and with a harness filter or "you typed in it", the strip's figures for 17 Nov and for a 7-day range equal their KPIs. Rendered with Mask names on, the view showed 0 private strings.
Documentation updated (if applicable): docs/content/observe/timeline.md (Picking dates, window rules, the strip and lanes), plus a new synthetic screenshot, the refreshed Timeline screenshot (strip under the filters) and the README feature row.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Timeline links open Dashboard instead of Timeline, and reloading replaces valid inactive-date selections with active dates, potentially showing the wrong week.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The range axis misaligns tick positions and labels by 30 minutes across a half-hour daylight-saving transition, requiring local-clock boundary generation and a regression test.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Calendar-only interactions trigger full Timeline redraws, unnecessarily rebuilding unchanged lanes and potentially making the picker sluggish for large displayed ranges.
No open issues 🎉
1 previously missed issue
In code that hasn't changed since last review
Calendar navigation unnecessarily rebuilds the entire Timeline
src/webview/page-timeline.ts:381
Every calendar arrow-key movement, month change and first range endpoint calls the full Timeline draw(), rebuilding lanes, families, KPIs and lane VNodes even though the plotted window has not changed. Calendar navigation therefore scales with the displayed Timeline on each keypress, which can make the picker sluggish for large ranges. Give the picker an isolated render/update path, or cache the unchanged Timeline content, so picker-only interactions do not rebuild the lanes.
…alendar
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>
Copilot review note "Calendar navigation unnecessarily rebuilds the entire Timeline" (page-timeline.ts:381, shown only in the review overview): valid, fixed in 4dd5238.
The date picker is now a Preact component that redraws itself while you move around the calendar: arrow keys, Page Up/Down, Home/End, the month buttons, the day/range switch, the first day of a range, opening, closing and a click outside. The page and its lanes are drawn again only when a day or a range is picked. PickerActions.redraw is gone, and so is the page's focusPicker call. Focus and the narrow-panel fit now run after each picker draw.
Failing-first unit test: src/webview/timeline-date-picker.test.ts (jsdom). Before the fix, calendar-only actions drew the page 4 times; now 0, and picking a range draws it once and returns focus to the date.
Measured on a 92-day range with 519 lanes (about 38k nodes): an arrow key in the calendar took 846 ms (median) before and 7.7 ms after.
Also rebased onto #382's new head 73db9d8. Gates: npm run check (spellcheck with Node 24), build, package, check-size, npm run test:e2e (225 passed, 7 skipped) and the packaged-VSIX VS Code suites (7 passing) all pass.
…alendar
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>
…endar
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>
- 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>
… 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>
…-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>
…alendar
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>
…endar
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>
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>
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Repeated indexOf scans at the 50,000-turn limit can search roughly 1.25 billion array entries, delaying text, image, and session-detail reads on the shared worker queue.
…'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>
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Human assessment is needed because unpublished findings identify daylight-saving range and axis errors alongside substantial synchronous filtering costs for large sessions.
…idnight
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>
…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>
The round 12 overview notes weren't published as threads ("daylight-saving range and axis errors", "substantial synchronous filtering costs for large sessions"). Both were valid:
Daylight saving, fixed in 4dc419e. Where the clock springs forward at midnight (Santiago, Havana, Beirut), that day starts at 1:00. addDays kept the clock time it was given, so the next day also started at 1:00. As a result, 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 returns the later day's start, read from its date. A 2–3 day range's axis also had no marker for a day starting at 1:00; it now names it there. Full-hour changes in Berlin and New York were already right. Tests: timeline-range.test.ts › "names every day on a short range's axis when … skips midnight", for the three zones. It checks the day markers, the day's and the range's window end, and how work splits across that midnight. Before the fix it failed.
Filtering cost, fixed in 6090826. With a filter on, the strip filtered all of a session's turns, work and waits once for every day its activity spans. 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, with the same result: about 0.06 s. Test: timeline-model.test.ts › "reads a long, busy session once, not once per day". Filtering must take less time than preparing the same data; before the fix it took about 2.5 times as long.
Gates on this head: npm run check (spellcheck run with Node 24), build, package, check-size, npm run test:e2e (235 passed, 7 skipped) and the packaged-VSIX VS Code suites (1, 3 and 7 passing) all pass. On real data, the unfiltered 17 Nov is unchanged (8.3 h, 41 of 156), and the filtered strip for that day and for a 7-day range equals the KPIs.
… 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>
The round 13 overview note "a skipped-midnight timezone edge case can omit an hour from Week view and make totals depend on the selected day" was valid, and it's fixed in 4c23e84. weekStart kept the picked day's clock time, so picking the day that starts at 1:00 gave a week from Monday 1:00. It now starts at its Monday's start whichever day is picked.
The midnight-skip test now also checks that all seven days of that week give one window, from Monday's start to the next Monday's. Before the fix it found two.
Gates on this head pass: npm run check, build, package, check-size, npm run test:e2e (235 passed, 7 skipped) and the VSIX suites. One unrelated unit test, Xcode human turns, timed out once while the machine was busy; it passed alone and in a full rerun (3,948 passed).
The wait details branch now includes the Timeline revamp merged with main.
No conflicts. CACHE_VERSION stays 33, as on the wait details branch and
above the revamp branch's 32.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
… 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>
Brings in the Timeline revamp's Claude Code fork resolution fix through
the wait details branch. No conflicts; CACHE_VERSION stays 33.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Merged the updated wait details branch (#382, which now includes the revamp and main) into this branch. Head is now b9dc714. The merges were clean, with no conflicts.
New fix (128c7c5): after the merge, the e2e test "keeps focus in the calendar when a month button it was on turns disabled" failed in CI. It passed on the old toolchain. Main moved Playwright to 1.65 (Chromium 159), and Chromium now moves focus off a control that becomes disabled only at its next frame. When the calendar's draw finished, focus was still on the disabled month button inside the calendar, so it wasn't moved to a day, and the browser then dropped it to the page. VS Code webviews run Chromium too. A disabled control that still holds focus now counts as having lost it. A jsdom test, which failed first, covers the same state, and the e2e spec passes 54/54 repeated.
CACHE_VERSION stays 33, the same as #382 and above #381's 32.
Gates on b9dc714
typecheck ✅ · lint 0 errors, 490 warnings (old head 470; no warning beyond the union) · cspell 0 issues · knip ✅ · lockfile-lint ✅
CI: all checks green · Copilot review: no open issues; all threads resolved
Real-data check (read-only, aggregates only): the built dashboard loads the Timeline from local logs. For 2026-11-17 it shows agent time 8.3 h, 41 of 156 turns typed, and 17 waits (4 h 54 m waiting on you), the same as before the merge. That day's activity is Copilot App sessions plus one short Claude Code session (2 typed turns, no forks or compactions) and no Codex. Main's Claude Code and Codex parser fixes therefore don't change it.
* 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>
…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>
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
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.
Description
Adds a date picker and custom date ranges to the Timeline. Stacked on #382 (prompts and questions behind each wait), which is stacked on #381 (Timeline revamp).
Calendar popover. The toolbar's date is now a button that opens a calendar.
Custom range. A Range view sits beside Day / Week / Families, and Week stays Monday–Sunday. In the same popover, A range picks the first and last day.
Math.min(...values).Day strip, grounded in the filters. The strip now opens the view, right under the filters, as the navigator over the loaded days ("Pick a day · Turns per day · first → last").
Deep link and view state. The view is kept by dates, both in the webview state and in the address:
#view=range&from=…&to=…, and alsoview=day|week&date=…andview=families.Correctness. A range uses the same window rules as a day: intervals are built over the whole log and clipped half-open at its midnights. So its additive values equal the sum of its days, and they match the summary export for the same dates. This holds across daylight-saving changes, tested in Europe/Berlin and America/New_York whatever the machine's zone. Where the clock skips midnight (Santiago, Havana, Beirut), that day starts at 1:00 and ends at the next midnight, the axis names it there, and its week starts at its Monday's midnight whichever day is picked.
Accessibility. Keyboard:
The popover uses the existing CSS variables, so it reads in light and dark themes. At 560 px it shifts to stay in view. No new dependency.
New files:
src/core/timeline-range.ts: browser-safe range math (month grid, clamp, step, quick picks, ticks).src/webview/timeline-date-picker.ts: the popover, a Preact component that redraws itself.Token Coverage by day stays a separate follow-up, as agreed.
Related Issues
Relates to #381 and #382. Rebased on #382 at 5aabe7e.
Checklist
npm run checkpasses (typecheck + lint + spellcheck + knip + tests). Run step by step on this machine:npm run typecheck: passed.npm run lint: 0 errors, 470 warnings, the same as the base.src/**/*.ts,docs/**/*.mdand*.md: 0 issues.npm run knipandnpm run lockfile-lint: passed.npm test: 3,948 passed, 5 skipped.src/core/timeline-range.test.ts(12 tests) covers:src/core/timeline-text.test.ts› "finds each turn's predecessor without searching" checks that a 20,000-turn read makes no per-turn search.src/webview/panel-rpc-timeline-text.test.ts(2 tests): a 6,000-turn range lane's scope reaches the reader; nothing is read past the shared limit.timeline-model.test.ts›filteredDayTotalschecks that each day's filtered totals equal that day's KPIs (harness, "you typed in it" and "hide one-turn" filters) and that the unfiltered totals are unchanged, and that a 300,000-turn session filters in less time than preparing it; ›textScopechecks the dedupe, and › "a dense session" builds a 300,000-turn lane with 150,000 unattended stretches, its view family, KPIs, callouts and Families view. It threw a RangeError before.src/webview/timeline-date-picker.test.ts(4 tests, jsdom): moving around the calendar, changing month and starting a range don't redraw the page; picking a range redraws it once; Esc and an outside click return focus to the date, unless the click focused something else.tests/e2e/timeline-range.spec.ts(18 tests) covers:#view=…hash, which is cleared when you leave the Timeline), clamped, and falling back; state restore;npm run build: passed.E2E_PORT=4853 npm run test:e2e: 235 passed, 7 skipped.npm run package: 1.73 MB.npm run check-size: within budget.npm run test:vscode -- --vsix …: 1, 3 and 7 passing.docs/content/observe/timeline.md(Picking dates, window rules, the strip and lanes), plus a new synthetic screenshot, the refreshed Timeline screenshot (strip under the filters) and the README feature row.