fleetlens 0.13.0 → 0.13.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (211) hide show
  1. package/app/apps/web/.next/BUILD_ID +1 -1
  2. package/app/apps/web/.next/build-manifest.json +8 -8
  3. package/app/apps/web/.next/prerender-manifest.json +3 -3
  4. package/app/apps/web/.next/server/app/_global-error/page/build-manifest.json +5 -5
  5. package/app/apps/web/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  6. package/app/apps/web/.next/server/app/_global-error.html +1 -1
  7. package/app/apps/web/.next/server/app/_global-error.rsc +7 -7
  8. package/app/apps/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +2 -2
  9. package/app/apps/web/.next/server/app/_global-error.segments/_full.segment.rsc +7 -7
  10. package/app/apps/web/.next/server/app/_global-error.segments/_head.segment.rsc +3 -3
  11. package/app/apps/web/.next/server/app/_global-error.segments/_index.segment.rsc +3 -3
  12. package/app/apps/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  13. package/app/apps/web/.next/server/app/_not-found/page/build-manifest.json +5 -5
  14. package/app/apps/web/.next/server/app/_not-found/page.js +1 -1
  15. package/app/apps/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  16. package/app/apps/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  17. package/app/apps/web/.next/server/app/api/ask/route.js.nft.json +1 -1
  18. package/app/apps/web/.next/server/app/api/digest/day/[date]/route.js +1 -1
  19. package/app/apps/web/.next/server/app/api/digest/day/[date]/route.js.nft.json +1 -1
  20. package/app/apps/web/.next/server/app/api/digest/month/[yearMonth]/route.js +1 -1
  21. package/app/apps/web/.next/server/app/api/digest/month/[yearMonth]/route.js.nft.json +1 -1
  22. package/app/apps/web/.next/server/app/api/digest/month-index/route.js.nft.json +1 -1
  23. package/app/apps/web/.next/server/app/api/digest/week/[startDate]/route.js +1 -1
  24. package/app/apps/web/.next/server/app/api/digest/week/[startDate]/route.js.nft.json +1 -1
  25. package/app/apps/web/.next/server/app/api/digest/week-index/route.js.nft.json +1 -1
  26. package/app/apps/web/.next/server/app/api/events/route.js.nft.json +1 -1
  27. package/app/apps/web/.next/server/app/api/jobs/route.js.nft.json +1 -1
  28. package/app/apps/web/.next/server/app/api/pdf/[key]/route.js.nft.json +1 -1
  29. package/app/apps/web/.next/server/app/api/runs/[runId]/route.js.nft.json +1 -1
  30. package/app/apps/web/.next/server/app/api/runs/[runId]/stream/route.js.nft.json +1 -1
  31. package/app/apps/web/.next/server/app/api/runs/route.js.nft.json +1 -1
  32. package/app/apps/web/.next/server/app/api/settings/route.js.nft.json +1 -1
  33. package/app/apps/web/.next/server/app/api/team-config/route.js.nft.json +1 -1
  34. package/app/apps/web/.next/server/app/api/workflow-agent/route.js.nft.json +1 -1
  35. package/app/apps/web/.next/server/app/changelog/page/build-manifest.json +5 -5
  36. package/app/apps/web/.next/server/app/changelog/page.js +1 -1
  37. package/app/apps/web/.next/server/app/changelog/page.js.nft.json +1 -1
  38. package/app/apps/web/.next/server/app/changelog/page_client-reference-manifest.js +1 -1
  39. package/app/apps/web/.next/server/app/day/[date]/page/build-manifest.json +5 -5
  40. package/app/apps/web/.next/server/app/day/[date]/page.js +1 -1
  41. package/app/apps/web/.next/server/app/day/[date]/page.js.nft.json +1 -1
  42. package/app/apps/web/.next/server/app/day/[date]/page_client-reference-manifest.js +1 -1
  43. package/app/apps/web/.next/server/app/day/page/build-manifest.json +5 -5
  44. package/app/apps/web/.next/server/app/day/page.js +1 -1
  45. package/app/apps/web/.next/server/app/day/page.js.nft.json +1 -1
  46. package/app/apps/web/.next/server/app/day/page_client-reference-manifest.js +1 -1
  47. package/app/apps/web/.next/server/app/digest/[date]/page/build-manifest.json +5 -5
  48. package/app/apps/web/.next/server/app/digest/[date]/page.js +1 -1
  49. package/app/apps/web/.next/server/app/digest/[date]/page.js.nft.json +1 -1
  50. package/app/apps/web/.next/server/app/digest/[date]/page_client-reference-manifest.js +1 -1
  51. package/app/apps/web/.next/server/app/digest/page/build-manifest.json +5 -5
  52. package/app/apps/web/.next/server/app/digest/page.js +1 -1
  53. package/app/apps/web/.next/server/app/digest/page.js.nft.json +1 -1
  54. package/app/apps/web/.next/server/app/digest/page_client-reference-manifest.js +1 -1
  55. package/app/apps/web/.next/server/app/insights/[key]/page/build-manifest.json +5 -5
  56. package/app/apps/web/.next/server/app/insights/[key]/page.js +1 -1
  57. package/app/apps/web/.next/server/app/insights/[key]/page.js.nft.json +1 -1
  58. package/app/apps/web/.next/server/app/insights/[key]/page_client-reference-manifest.js +1 -1
  59. package/app/apps/web/.next/server/app/insights/page/build-manifest.json +5 -5
  60. package/app/apps/web/.next/server/app/insights/page.js +3 -2
  61. package/app/apps/web/.next/server/app/insights/page.js.nft.json +1 -1
  62. package/app/apps/web/.next/server/app/insights/page_client-reference-manifest.js +1 -1
  63. package/app/apps/web/.next/server/app/page/build-manifest.json +5 -5
  64. package/app/apps/web/.next/server/app/page.js +1 -1
  65. package/app/apps/web/.next/server/app/page.js.nft.json +1 -1
  66. package/app/apps/web/.next/server/app/page_client-reference-manifest.js +1 -1
  67. package/app/apps/web/.next/server/app/parallelism/page/build-manifest.json +5 -5
  68. package/app/apps/web/.next/server/app/parallelism/page.js +1 -1
  69. package/app/apps/web/.next/server/app/parallelism/page.js.nft.json +1 -1
  70. package/app/apps/web/.next/server/app/parallelism/page_client-reference-manifest.js +1 -1
  71. package/app/apps/web/.next/server/app/print/[key]/page/build-manifest.json +5 -5
  72. package/app/apps/web/.next/server/app/print/[key]/page.js +1 -1
  73. package/app/apps/web/.next/server/app/print/[key]/page.js.nft.json +1 -1
  74. package/app/apps/web/.next/server/app/print/[key]/page_client-reference-manifest.js +1 -1
  75. package/app/apps/web/.next/server/app/projects/[slug]/page/build-manifest.json +5 -5
  76. package/app/apps/web/.next/server/app/projects/[slug]/page.js +1 -1
  77. package/app/apps/web/.next/server/app/projects/[slug]/page.js.nft.json +1 -1
  78. package/app/apps/web/.next/server/app/projects/[slug]/page_client-reference-manifest.js +1 -1
  79. package/app/apps/web/.next/server/app/projects/page/build-manifest.json +5 -5
  80. package/app/apps/web/.next/server/app/projects/page.js +1 -1
  81. package/app/apps/web/.next/server/app/projects/page.js.nft.json +1 -1
  82. package/app/apps/web/.next/server/app/projects/page_client-reference-manifest.js +1 -1
  83. package/app/apps/web/.next/server/app/runs/page/build-manifest.json +5 -5
  84. package/app/apps/web/.next/server/app/runs/page.js +1 -1
  85. package/app/apps/web/.next/server/app/runs/page.js.nft.json +1 -1
  86. package/app/apps/web/.next/server/app/runs/page_client-reference-manifest.js +1 -1
  87. package/app/apps/web/.next/server/app/sessions/[id]/page/build-manifest.json +5 -5
  88. package/app/apps/web/.next/server/app/sessions/[id]/page.js +1 -1
  89. package/app/apps/web/.next/server/app/sessions/[id]/page.js.nft.json +1 -1
  90. package/app/apps/web/.next/server/app/sessions/[id]/page_client-reference-manifest.js +1 -1
  91. package/app/apps/web/.next/server/app/sessions/page/build-manifest.json +5 -5
  92. package/app/apps/web/.next/server/app/sessions/page.js +1 -1
  93. package/app/apps/web/.next/server/app/sessions/page.js.nft.json +1 -1
  94. package/app/apps/web/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  95. package/app/apps/web/.next/server/app/settings/page/build-manifest.json +5 -5
  96. package/app/apps/web/.next/server/app/settings/page.js +1 -1
  97. package/app/apps/web/.next/server/app/settings/page.js.nft.json +1 -1
  98. package/app/apps/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  99. package/app/apps/web/.next/server/app/team/page/build-manifest.json +5 -5
  100. package/app/apps/web/.next/server/app/team/page.js +1 -1
  101. package/app/apps/web/.next/server/app/team/page.js.nft.json +1 -1
  102. package/app/apps/web/.next/server/app/team/page_client-reference-manifest.js +1 -1
  103. package/app/apps/web/.next/server/app/usage/page/build-manifest.json +5 -5
  104. package/app/apps/web/.next/server/app/usage/page.js +1 -1
  105. package/app/apps/web/.next/server/app/usage/page.js.nft.json +1 -1
  106. package/app/apps/web/.next/server/app/usage/page_client-reference-manifest.js +1 -1
  107. package/app/apps/web/.next/server/chunks/[root-of-the-server]__0gril0u._.js +9 -0
  108. package/app/apps/web/.next/server/chunks/[root-of-the-server]__0n79hpm._.js +9 -0
  109. package/app/apps/web/.next/server/chunks/[root-of-the-server]__0~utv~v._.js +9 -0
  110. package/app/apps/web/.next/server/chunks/packages_parser_dist_06d9se1._.js +1 -1
  111. package/app/apps/web/.next/server/chunks/packages_parser_dist_10ihc3~._.js +1 -1
  112. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0exckd4._.js +1 -1
  113. package/app/apps/web/.next/server/chunks/ssr/{[root-of-the-server]__0-1_njm._.js → [root-of-the-server]__0k1x-c9._.js} +2 -2
  114. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0lhwp-k._.js +8 -0
  115. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0n-ax-5._.js +1 -1
  116. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0~.f_3z._.js +3 -3
  117. package/app/apps/web/.next/server/chunks/ssr/_0kajk31._.js +1 -1
  118. package/app/apps/web/.next/server/chunks/ssr/_0s3n5mz._.js +8 -0
  119. package/app/apps/web/.next/server/chunks/ssr/_0xu2pvc._.js +1 -1
  120. package/app/apps/web/.next/server/chunks/ssr/{_0jw2sm7._.js → _12mbgs5._.js} +2 -2
  121. package/app/apps/web/.next/server/chunks/ssr/apps_web_app_day_[date]_day-view_tsx_0wjoe1u._.js +1 -1
  122. package/app/apps/web/.next/server/chunks/ssr/apps_web_app_insights_page_tsx_071kwyw._.js +3 -0
  123. package/app/apps/web/.next/server/chunks/ssr/apps_web_app_sessions_sessions-grid_tsx_0bri5x.._.js +3 -0
  124. package/app/apps/web/.next/server/chunks/ssr/apps_web_components_0l6hsch._.js +6 -0
  125. package/app/apps/web/.next/server/chunks/ssr/apps_web_lib_changelog_ts_0n7_p1d._.js +1 -1
  126. package/app/apps/web/.next/server/chunks/ssr/apps_web_lib_changelog_ts_0nb5_-s._.js +1 -1
  127. package/app/apps/web/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_0cepfi8._.js +3 -0
  128. package/app/apps/web/.next/server/chunks/ssr/packages_entries_dist_node_0_271yr.js +1 -1
  129. package/app/apps/web/.next/server/chunks/ssr/packages_parser_dist_0mx_509._.js +1 -1
  130. package/app/apps/web/.next/server/middleware-build-manifest.js +8 -8
  131. package/app/apps/web/.next/server/middleware-manifest.json +5 -5
  132. package/app/apps/web/.next/server/pages/500.html +1 -1
  133. package/app/apps/web/.next/server/server-reference-manifest.js +1 -1
  134. package/app/apps/web/.next/server/server-reference-manifest.json +1 -1
  135. package/app/apps/web/.next/static/chunks/02xxpexzk3rf-.js +1 -0
  136. package/app/apps/web/.next/static/chunks/{07lbm-sdh9c2j.js → 0389wb_f0j78j.js} +1 -1
  137. package/app/apps/web/.next/static/chunks/03gy1evbn94qu.js +6 -0
  138. package/app/apps/web/.next/static/chunks/03rd.3cc_t~yf.js +4 -0
  139. package/app/apps/web/.next/static/chunks/{0l4e3as18eexy.js → 0g223u9amib0q.js} +1 -1
  140. package/app/apps/web/.next/static/chunks/{0h3.-_s-k0mj3.js → 0i.hc~2bj0_3d.js} +1 -1
  141. package/app/apps/web/.next/static/chunks/0m7dd-2zd9vl2.js +4 -0
  142. package/app/apps/web/.next/static/chunks/0nqklmbs5s3ax.js +6 -0
  143. package/app/apps/web/.next/static/chunks/{073081qv4uyn8.js → 0p--hzrway8~3.js} +1 -1
  144. package/app/apps/web/.next/static/chunks/{0gblp_v.kiu-..js → 0qv-gw888_5nu.js} +1 -1
  145. package/app/apps/web/.next/static/chunks/{14bjditmmrn7l.js → 0tirv_vo6q8uc.js} +1 -1
  146. package/app/apps/web/.next/static/chunks/0uyctl-m8iydb.js +1 -0
  147. package/app/apps/web/.next/static/chunks/0~qdw1b2uz._5.js +10 -0
  148. package/app/apps/web/.next/static/chunks/{0n0n.0279ot6c.js → 14vx702c32kn6.js} +1 -1
  149. package/app/apps/web/.next/static/chunks/{turbopack-0lb9w090w5ezx.js → turbopack-0mxu3~9vk.brh.js} +1 -1
  150. package/app/apps/web/app/api/digest/_shared/digest-route-helpers.ts +178 -0
  151. package/app/apps/web/app/api/digest/day/[date]/route.ts +34 -128
  152. package/app/apps/web/app/api/digest/month/[yearMonth]/route.ts +36 -121
  153. package/app/apps/web/app/api/digest/week/[startDate]/route.ts +36 -123
  154. package/app/apps/web/app/insights/page.tsx +20 -5
  155. package/app/apps/web/app/parallelism/burst-detail-modal.tsx +637 -0
  156. package/app/apps/web/app/parallelism/concurrency-info-modal.tsx +228 -0
  157. package/app/apps/web/app/parallelism/gantt-chart-utils.ts +49 -0
  158. package/app/apps/web/app/parallelism/gantt-chart.tsx +24 -903
  159. package/app/apps/web/app/sessions/[id]/session-view/colors.ts +31 -0
  160. package/app/apps/web/app/sessions/[id]/session-view/debug-list.tsx +78 -0
  161. package/app/apps/web/app/sessions/[id]/session-view/drawer.tsx +414 -0
  162. package/app/apps/web/app/sessions/[id]/session-view/entry-day-strip.tsx +124 -0
  163. package/app/apps/web/app/sessions/[id]/session-view/header-stats.tsx +217 -0
  164. package/app/apps/web/app/sessions/[id]/session-view/helpers.ts +135 -0
  165. package/app/apps/web/app/sessions/[id]/session-view/minimap.tsx +1587 -0
  166. package/app/apps/web/app/sessions/[id]/session-view/subagent-drawer.tsx +339 -0
  167. package/app/apps/web/app/sessions/[id]/session-view/token-stats.tsx +111 -0
  168. package/app/apps/web/app/sessions/[id]/session-view/tooltip.tsx +63 -0
  169. package/app/apps/web/app/sessions/[id]/session-view/types.ts +46 -0
  170. package/app/apps/web/app/sessions/[id]/session-view/workflows-panel.tsx +944 -0
  171. package/app/apps/web/app/sessions/[id]/session-view/workflows-shared.tsx +104 -0
  172. package/app/apps/web/app/sessions/[id]/session-view.tsx +1513 -5018
  173. package/app/apps/web/app/sessions/[id]/team-tab/minimap-hover-card.tsx +201 -0
  174. package/app/apps/web/app/sessions/[id]/team-tab/minimap-idle-band.tsx +53 -0
  175. package/app/apps/web/app/sessions/[id]/team-tab/minimap-shared.ts +20 -0
  176. package/app/apps/web/app/sessions/[id]/team-tab/team-minimap.tsx +10 -265
  177. package/app/apps/web/app/sessions/sessions-grid.tsx +10 -10
  178. package/app/apps/web/components/digest-actions.tsx +103 -0
  179. package/app/apps/web/components/job-queue-widget.tsx +1 -1
  180. package/app/apps/web/components/month-digest-view.tsx +19 -64
  181. package/app/apps/web/components/searchable-select.tsx +215 -0
  182. package/app/apps/web/components/tail-mode.tsx +46 -9
  183. package/app/apps/web/components/week-digest-view.tsx +16 -71
  184. package/app/apps/web/lib/changelog-data.generated.ts +1 -1
  185. package/app/apps/web/lib/entries-index.ts +7 -8
  186. package/app/apps/web/lib/entries.ts +0 -9
  187. package/app/apps/web/lib/format.test.ts +221 -0
  188. package/app/apps/web/lib/format.ts +17 -0
  189. package/app/apps/web/lib/utilization-tone.test.ts +56 -0
  190. package/app/apps/web/package.json +1 -1
  191. package/app/apps/web/tsconfig.tsbuildinfo +1 -1
  192. package/dist/daemon-worker.js +35 -43
  193. package/dist/index.js +37 -49
  194. package/package.json +1 -1
  195. package/app/apps/web/.next/server/chunks/[root-of-the-server]__04j3tng._.js +0 -9
  196. package/app/apps/web/.next/server/chunks/[root-of-the-server]__0cnh3k4._.js +0 -9
  197. package/app/apps/web/.next/server/chunks/[root-of-the-server]__132eosx._.js +0 -9
  198. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__136-0me._.js +0 -8
  199. package/app/apps/web/.next/server/chunks/ssr/_0w.cv64._.js +0 -8
  200. package/app/apps/web/.next/server/chunks/ssr/apps_web_components_01d-iwx._.js +0 -6
  201. package/app/apps/web/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_0-lmm4p._.js +0 -3
  202. package/app/apps/web/.next/static/chunks/05k84gif3ucxm.js +0 -6
  203. package/app/apps/web/.next/static/chunks/0nnjldasalwdu.js +0 -4
  204. package/app/apps/web/.next/static/chunks/0okg13phslr1..js +0 -4
  205. package/app/apps/web/.next/static/chunks/0pzt9vemtzct8.js +0 -10
  206. package/app/apps/web/.next/static/chunks/0qmh5da6gfm56.js +0 -1
  207. package/app/apps/web/.next/static/chunks/0rnay-a.-jr8-.js +0 -1
  208. package/app/apps/web/.next/static/chunks/0snv3-2ux2xvv.js +0 -6
  209. /package/app/apps/web/.next/static/{rbp9x3iPbzrz-wxS-DAU5 → bZs5UyzsYBqC6MFY5n-M_}/_buildManifest.js +0 -0
  210. /package/app/apps/web/.next/static/{rbp9x3iPbzrz-wxS-DAU5 → bZs5UyzsYBqC6MFY5n-M_}/_clientMiddlewareManifest.js +0 -0
  211. /package/app/apps/web/.next/static/{rbp9x3iPbzrz-wxS-DAU5 → bZs5UyzsYBqC6MFY5n-M_}/_ssgManifest.js +0 -0
@@ -1,3 +1,3 @@
1
1
  // AUTOGENERATED by scripts/build-changelog.mjs from CHANGELOG.md.
2
2
  // Do not edit by hand — run `pnpm changelog:sync`.
3
- export const RAW_CHANGELOG = "# Changelog\n\nAll notable user-facing changes to the Fleetlens CLI (`fleetlens` on npm) are\nrecorded here. Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).\nThe team-server has its own log at `packages/team-server/CHANGELOG.md`.\n\n## [0.13.0] — 2026-06-18\n\n### Added\n- **Day-scoped session timeline.** A long-running session that spans several days no longer crams every day into one unreadable strip. The timeline map gives you Prev/Next day controls (with the day's date) to step through the run one day at a time, and as you scroll the transcript the timeline follows along — auto-advancing to whichever day you're reading. Each day's perception digest card now sits inline at that day's first entry instead of stacked at the top, so the summary travels with the work it describes.\n- **LIVE now sees background agents and workflows.** A session whose main transcript has gone quiet but is still running background subagents or a workflow now correctly reads as live: liveness is computed from the newest activity across the session's nested subagent/workflow transcripts, not just the main JSONL. The live badge, the Running/Idle state, and the live-sessions widget all reflect in-flight background work, and the dashboard auto-refreshes when a background agent writes.\n- **Keep the usage daemon running across reboots (macOS).** New `fleetlens autostart <install|uninstall|status>` installs a launchd LaunchAgent that runs `fleetlens daemon start` at login, so usage polling survives a restart. `fleetlens start` offers to set this up the first time (a simple Y/n, with \"don't ask again\"); it's daemon-only and entirely opt-in. On non-macOS it prints how to add a login item manually.\n- **Per-member CLI version reported to Team Edition.** The daemon now stamps its installed Fleetlens CLI version into each team push, so the team roster can show who's up to date. Harmless to older servers, which ignore the field.\n\n### Changed\n- **Session view tabs renamed** to Timeline / Workflows / Log (from Transcript / Workflows / Debug).\n\n### Fixed\n- **Harness-injected lines no longer render as your messages.** Post-compact continuation summaries (\"This session is being continued…\") and session-scoped Stop-hook notices arrive with a user role but aren't things you typed — they're now hidden from the transcript and excluded from turn counts and digests, like other framework boilerplate.\n- **Sessions list hydration error** on pending session cards (a nested link inside the card link) is gone.\n\n## [0.12.3] — 2026-06-15\n\n### Fixed\n- **Opening a session under-counted its tokens everywhere afterward.** Viewing a session that spawned subagents returned parent-only token totals and overwrote the shared in-memory cache with them, so the dashboard, estimated cost, daily heatmap, and project rollups all dropped that session's subagent tokens until the server restarted. The detail path now applies the same subagent-inclusive recompute as the list path, so totals stay correct and consistent no matter which page you open first.\n- **`fleetlens usage --history` cost accuracy.** A single session on an unpriced model (e.g. `<synthetic>`) no longer nulls a whole day's cost — each day now sums the cost of its priced sessions and marks the figure as a lower bound (`≥`) when some sessions couldn't be priced. The Total row sums every priced day (it previously dropped them while still counting their tokens) and is likewise marked `≥` when any usage was unpriced, so Total cost and Total tokens no longer imply different scopes.\n- **`fleetlens usage --history` model labels.** A day with two minor model versions could render a duplicated/inconsistent label (e.g. `opus-4, opus-4`); model names now use one normalization for both de-duplication and display.\n- **Sidebar project count matches the Projects page.** The sidebar nav badge and footer counted Claude Code projects only, disagreeing with the all-source `/projects` page and omitting Codex / Cowork / Gemini / Antigravity projects. Both now reflect every agent source.\n- **A stale or corrupt digest file no longer 500s the dashboard.** Cached day/week/month digests are now validated on read (schema version + shape); an incompatible or damaged file is ignored and the page renders without it, honoring the \"a schema bump regenerates digests\" contract.\n- **A failed stale-server restart can't leave an invisible orphan.** If the replacement server can't take the port, `fleetlens start`/`web` now escalate to a force-kill and re-record the old server's pid so `status`/`stop` can still see and stop it, instead of leaving an untracked process serving the old bundle.\n- **Live-sessions count hydration.** The \"Live · N\" badge is time-derived and could briefly mismatch between server render and hydration; it's now marked so React doesn't warn.\n\n## [0.12.2] — 2026-06-15\n\n### Fixed\n- **A stale web server could survive an update and serve a broken dashboard.** After `fleetlens` updated itself, the CLI binary and usage daemon came up on the new version, but a web server that was already running kept serving the old build. Once npm removed the previous install directory, any dashboard route the old server hadn't already loaded into memory returned a 500 (Insights was the usual casualty). `fleetlens start` and `fleetlens web` now record the running server's version in the pid file and automatically restart it when it no longer matches the installed CLI; `fleetlens status` shows the served version and warns when it's stale.\n\n## [0.12.1] — 2026-06-15\n\n### Fixed\n- **Per-day metrics for cross-midnight sessions.** A session that ran past midnight had its agent time split across calendar days but its tokens, tool calls, turns, and session count pinned to the start day — so on the dashboard (and team rollups) the continuation days showed agent time with 0 tokens / 0 sessions. Each tool call, turn, and token is now attributed to the day its own event happened, and a session counts on every local day it worked. The split is sum-preserving (totals are unchanged) and keeps `sum(per-day tokens) === session total` even across subagents that run past midnight.\n\n### Changed\n- **Team push carries a `unique_sessions` count.** Because the per-day `sessions` figure is now \"session-days\" (a cross-midnight session counts on each day it touched), the daemon also pushes the start-day count so the team-server's roster/header/maturity aggregates keep exact unique-session semantics. Requires team-server ≥ 0.12.3; older servers ignore the extra field.\n\n## [0.12.0] — 2026-06-15\n\n### Added\n- **Dynamic workflow visualization.** A single `Workflow` tool call collapses a whole fan-out — 200+ spawned agents — into one opaque transcript row. Fleetlens now reads the aggregate journals Claude Code persists per run and surfaces the real fleet work:\n - **Workflows tab** on the session page (next to Transcript / Team / Debug) with a run-count badge. Each run is a card showing status, spawned-agent count, tool calls, tokens, and duration.\n - **Fleet stat** in the session header (`N workflows · M agents`) plus a spawned-agent badge on session-list cards, so workflow-driven sessions stand out at a glance.\n - **Per-phase action tabs** inside each run — the phases the workflow declared (e.g. Build / Panel / Skeptic / Merge), each listing the agents that ran in that phase.\n - **Full per-agent step log.** Clicking an agent opens a right side-sheet with its Task, the complete ordered step list (every tool call — expand any step for the full multi-line command), and the Result. Loaded on demand so even 100+ step, 200+ agent sessions stay fast; sections are collapsed by default.\n - **Workflow lanes** on the timeline minimap (distinct from subagent lanes); click a lane to open that run in the Workflows tab.\n- **Workflow execution counts as agent time.** A run's wall-clock span is folded into the session's \"agent time\" and carved out of the minimap idle bands, so the stretch where the parent waits on a workflow reads as active fleet work, not dead air.\n\n## [0.11.2] — 2026-05-27\n\n### Changed\n- **`fleetlens start` and `fleetlens web` no longer auto-launch the browser.** The dashboard URL is printed so you can click it (every modern terminal makes `http://localhost:…` clickable), but no browser tab opens unless you pass the new `--open` flag. Auto-launch was surprising users whose default browser had moved to a different desktop, was a corp-managed profile they didn't want spawned, or was simply already in flow on another window. The previous `--no-open` flag is still accepted as a no-op — existing scripts and aliases keep working without changes.\n\n## [0.11.1] — 2026-05-21\n\n### Added\n- **Team workspace seeding script.** Added `scripts/seed-team-workspace.mjs` for local end-to-end telemetry testing.\n\n### Changed\n- **Plan page layout grid consistency.** Enhanced the Team Edition Plan page layout grid consistency and renamed the 'Latest cycle' column to 'Current cycle'.\n- **Completed cycles alignment.** Modified the completed cycles strip to show a maximum of 4 historical cycles, padded on the left with empty placeholders for visual right-alignment and grid uniformity.\n\n### Fixed\n- **Mini-burndown SVG typings and filtering.** Resolved mini-burndown SVG typings and parameterized cycle strip filtering.\n- **Active cycle query performance.** Batched active cycle loads in a single query to eliminate N+1 DB lookups.\n\n## [0.11.0] — 2026-05-21\n\n### Added\n- **Team-issued commands to the daemon.** When you've paired with a Team Edition server, a team admin can now queue a 30-day activity backfill against your daemon from the team dashboard. The daemon picks the command up on its next 5-minute sync and re-pushes the last 30 days of daily activity rollups (server upserts, fully idempotent). No member-side UI changes — the existing \"last sync N ago\" tick on `/settings → Team connection` is the only feedback signal. Commands ride piggyback on the existing `/api/ingest/metrics` response; no new connections, no new polling. The privacy boundary holds: the dispatcher's switch has a single case (`backfill-activity`) and only calls existing aggregate-push helpers, so commands can widen the time window but never change the data shape. No transcripts, prompts, or project content can leak through a command. Always-on when paired (pairing implies consent); no opt-out env var. Requires `team-server v0.9.0+` to actually receive any commands; older servers simply don't issue any (the additive `commandResults` field is ignored, no harm).\n\n## [0.10.6] — 2026-05-21\n\n### Added\n- **Team-pairing visibility in the Personal Edition dashboard.** When you've paired with a Team Edition server (`fleetlens team join …`), the dashboard now surfaces what's syncing without you having to open a terminal. A sidebar chip with a health dot (green / amber / red — re-derived client-side every 30 s so it ages correctly even when the daemon stops) and a live-aging \"synced N ago\" label. A `/settings → Team connection` panel showing team metadata, a labeled last-push preview (Agent time / Session count / Tool call count / Turn count / Token total / Plan tier), an explicit \"What does NOT leave your machine\" block, and a \"Sync now\" button that spawns `fleetlens team sync` as a subprocess and renders its output inline. A first-run welcome banner on the overview after pairing, dismissable per pairing. The preview also includes a \"Show raw JSON payload\" disclosure that displays the literal `IngestPayload` from disk — verify byte-for-byte that no transcripts, prompts, or project content leave your machine. Solo users see no change.\n\n### Changed\n- **Wire-format types now live in `@claude-lens/parser`.** `IngestPayload`, `DailyRollup`, `LastPushRecord`, and the rest of the daemon→server wire shape moved out of `packages/cli/src/team/push.ts` so the CLI and the dashboard share a single canonical definition — no drift risk on future schema changes. The CLI's `team-config` module also moved to the parser (`@claude-lens/parser/fs`) for the same reason.\n\n## [0.10.5] — 2026-05-21\n\n### Changed\n- **Team backfill now rides the consolidated `/api/ingest/metrics` path.** Same endpoint as the daemon's regular 5-min push, just with the optional `snapshotHistory` field set. Removes the need for a separate path-allowlist entry on deployments fronted by a proxy (IAP, WAF, Cloud Run / GLB path matcher), and as a side-effect the old `/api/ingest/usage-history` route is now a thin deprecation shim. Requires `team-server v0.8.4+` — older servers will return 200 without a `snapshotHistory` result block, and the CLI aborts the backfill loudly rather than silently advancing the high-water mark.\n\n### Fixed\n- **Backfill no longer silently advances the high-water mark on an older team-server.** Previously, a server that didn't recognize `snapshotHistory` would return 200 (zod `passthrough()` swallows unknown fields), `runTeamSync` would persist `lastSyncedUsageSnapshotAt` as if all rows landed, and the dropped rows would never be retried after the server upgraded. Backfill now requires an explicit `snapshotHistory` result block in the response.\n\n## [0.10.4] — 2026-05-21\n\n### Fixed\n- **Fleetlens's own LLM runs no longer show up in the dashboard.** The tmux-driven runner records its enrichment / digest / `/ask` calls as real Claude Code transcripts under `~/.claude/projects/` (cwd `~/.cclens/runtime`), since tailing that transcript is how it reads the model's reply. Those self-generated sessions were surfacing as a `.cclens/runtime` project and inflating session, project, and token-calibration rollups. The tmux runner now deletes each transcript once the response is captured (kill-session before unlink so claude can't rewrite it, gated by `FLEETLENS_TMUX_KEEP_WRAPPER`), and the parser excludes the runtime project dir at the scan chokepoint as a safety net for any transcript that outlives cleanup.\n\n## [0.10.3] — 2026-05-16\n\n### Added\n- **Daemon auto-update every 6 hours.** The local daemon now hourly-checks `registry.npmjs.org/fleetlens/latest` and spawns a detached `fleetlens update` child when a newer version exists. Timestamp persisted in `~/.cclens/daemon-update.json` so closing the laptop lid for days and reopening triggers an immediate catch-up check instead of waiting out the interval. Opt-out via `FLEETLENS_DAEMON_AUTO_UPDATE=0`.\n\n### Changed\n- **Unified team sync.** `runTeamSync` now drives history backfill, daily activity, live utilization, queue drain, and tier propagation through a single path. `team join` and the daemon's 5-min tick both call the same function — so a user disconnected from the team server for days will autonomously catch up on next sync, no manual `team backfill` needed.\n- New `lastSyncedUsageSnapshotAt` high-water mark in `~/.cclens/team.json` means incremental syncs only ship eligible new snapshots. Cold-start full backfill is bypass-able via `fleetlens team backfill --force` (and still runs unconditionally on first pair).\n- Team sync cadence is now independent of Claude OAuth polling, so an expired Claude token can no longer turn team sync into a 5-second retry storm.\n\n### Fixed\n- `lastSyncedDay` no longer advances past a failed day on partial outage — previously a transient mid-stream 5xx left a permanent hole in the team-server's daily-activity coverage.\n- Both `/api/ingest/metrics` and `/api/ingest/usage-history` POSTs now have a 15-second `AbortSignal.timeout` to bound hangs on network stalls.\n\n## [0.10.2] — 2026-05-15\n\n### Fixed\n- **Session-detail minimap no longer paints subagent runtime as idle.** Long agent runs that dispatched many subagents were reading as wall-to-wall \"Session idle\" stripes because the parent's tool_use → tool_result gap (the subagent's actual runtime) was classified as in-turn idle. `rawIdleBands` now carves subagent run spans out of every candidate gap; for in-turn gaps that overlap any subagent run the entire gap is dropped, and between-turn gaps with background subagent activity keep only the genuinely-unwatched residue.\n- **First-response thinking stops registering as idle.** Anchors now include every timestamped event (agent-thinking, meta, etc.), and the loop tracks an \"awaiting first response\" phase across intermediate thinking anchors. A `user → thinking → thinking → agent` sequence where the model takes a while to compose its first reply is now treated as response latency rather than painted as a stripe.\n- **Turn duration no longer shows `0ms` for single-row turns.** `buildMegaRows` now anchors a turn's `tOffsetMs` and `durationMs` at the originating user message rather than at the first agent row. Single-row turns show the actual user → agent latency, and the visual span of the turn rectangle on the minimap covers the whole arc.\n- **Single `Session idle` divider per band.** A user row and the turn-collapsed row that follows it now share a `tOffsetMs`, so the body's `IdleDivider` emitter dedupes per band to stop two consecutive identical idle markers around the same boundary.\n\n### Changed\n- Minimap idle threshold raised from 10s to 30s. Ordinary tool latency (slow Bash, big-file Read, between-anchor model thinking) no longer registers as idle.\n\n## [0.10.1] — 2026-05-14\n\n### Added\n- **Alternative claude runtime via tmux.** When `tmux` is on PATH, both the LLM pipeline (digest synth, entry enrichment, top-session perception) and the `/ask` feature now drive `claude` through a detached tmux session instead of `claude -p`. Sessions produced this way carry `entrypoint: cli` in their JSONL, which is also extracted by the parser and surfaced as a small badge on `/sessions/<id>` next to the model chip — green for `cli` / `claude-desktop`, amber for `sdk-*`. The path falls back to `claude -p` whenever tmux is unavailable or the run errors; set `FLEETLENS_FORCE_PRINT_MODE=1` to disable the tmux path entirely.\n- **`CCLENS_HOME` env override.** All `~/.cclens/` state (pid file, daemon log, perception state, usage snapshot log, llm-runs traces) is now reached through a shared `cclensHome()` helper that honors `CCLENS_HOME`. Lets multiple installs / workspaces run side-by-side without stomping on each other's state.\n\n### Fixed\n- `/api/runs` rendered every successful tmux-driven run as `status=error`. Tmux runs have no subprocess exit code (the session is killed by cleanup), and the runs viewer was treating a missing code as failure. End records now stamp `exit_code: 0` on success and the active-process filter no longer requires the literal `claude -p` flag, so tmux-driven processes also show up in the \"active\" panel while they're running.\n- `JobQueueWidget`'s `/api/jobs` polling effect listed `jobs` in its deps, so each tick re-armed the effect on the freshly-set state ref — effective cadence collapsed to a 1–4 ms refetch loop. Now tracks `hasActive` in a closure-local var and runs the effect once on mount.\n\n### Conductor\n- New `conductor.json` + `scripts/conductor-{setup,run,archive}.sh` so each Conductor workspace allocates its own 3-port band (web / team-server / postgres) and boots its own `fleetlens-<workspace>` Compose stack against `.harness/cclens-state`. Replaces ~30 hard-coded `join(homedir(), \".cclens\", …)` call sites with the shared `cclensHome()/cclensPath()` helper so a second workspace can boot without colliding with the user's primary install.\n\n## [0.10.0] — 2026-05-08\n\n### Changed\n- **Plan utilization reframed.** High utilization is now \"getting plan value\" (green); low utilization is \"paying for unused headroom\" (red). Mirrors how an operator actually looks at the dashboard: the wasteful outcome is paying for a plan and barely touching it, not running near the cap. Applied across `/usage` burndown, gauges, sidebar, and previous-cycles strip.\n- **In-progress cycles colored by pace, not peak.** A 50% peak halfway through a 7-day cycle reads on-pace green, not amber — the chart no longer cries wolf on a fresh cycle that just hasn't burnt yet. Completed cycles still use peak tone.\n- **Pace label ±15pp band.** \"On pace\" now covers a ±15pp window around ideal; outside that, label is \"below pace\" (under-burning) or \"may exhaust early\" (over-burning). The previous +5/-50 thresholds flipped amber every time the user took a night off.\n- **Pace label collapses to three states.** \"May exhaust early\" / \"below pace\" / \"on pace\" — same color tones, one fewer qualifier to read.\n- **Wording softened across the utilization views** to describe the pattern rather than judge the user. \"Behind schedule\" → \"below pace\"; \"on track (+x%)\" → \"on pace (+xpp vs ideal)\".\n\n### Added\n- **Conductor multi-agent workspace support.** Sessions inside Conductor's worktree-style agent workspaces (`~/conductor/workspaces/<repo>/<agent>/...`) now group correctly under their parent project, with each agent shown as a separate worktree. Mirrors the existing `.worktrees/` handling.\n\n### Fixed\n- Hydration mismatch on `/usage` when pace labels rendered before client mount.\n\n### Notes for operators\n- The CLI's team push now ships **only Claude Code usage snapshots** to the team server. Codex snapshots stay local until `plan_utilization` gets a per-agent partition — without one, the team-server's \"latest snapshot\" pick flips between agents and miscolors the in-progress cycle. Existing rows in `plan_utilization` stay; new pushes are claude-code only.\n\n## [0.9.0] — 2026-05-07\n\n### Added\n- **Gemini CLI** as the third agent source. Sessions written to `~/.gemini/tmp/<slug>/chats/session-*.jsonl` are now read, parsed, and rendered alongside Claude Code and Codex. Tool calls (`read_file`, `list_directory`, `glob`, `run_shell_command`, `update_topic`, …) and their results show in the session timeline; thinking blocks, multi-write status replay, `$set` / `$rewindTo` semantics, and the legacy single-JSON file shape all handled. Slug → cwd inversion via `~/.gemini/projects.json`. `✺` glyph + purple accent in the UI.\n\n### Changed\n- Session detail timeline drops in-turn idle hatching. Within a turn, every wait — model loading, tool execution, network — is the agent's active time. Only between-turn idle (user reading + composing the next message) renders as hatched.\n- Gemini parser anchors `firstTimestamp`, `lastTimestamp`, and `activeSegments` on conversational events only. Login/OAuth `info` records and `metadata.startTime` (file-creation moment) no longer stretch the session bar back to before the first user message.\n\n## [0.7.1] — 2026-05-07\n\n### Fixed\n- Cycle-peaks trend no longer renders two bars labeled the same day. When Anthropic's rolling 7-day window slid its anchor between consecutive polls, the daemon's bucketer (hour-rounded) recorded both reset boundaries as distinct cycles. They're now merged within a 12 h tolerance — same fix in `apps/web/lib/cycle-peaks.ts` (used by `/usage`) and in `packages/cli/src/team/sync.ts` (the daemon's team-server push), so both the personal `/usage` chart and the team-server's plan-utilization view stay consistent. 5-hour cycles keep no merge tolerance (their anchor is stable; merging would collapse legitimate distinct cycles).\n\n## [0.7.0] — 2026-05-06\n\n### Added\n- **Multi-agent observability — Codex as the first non-Claude adapter.** The parser now defines an `AgentSource` registry; new agents land as a single file plus one registry entry. Codex CLI rollouts at `~/.codex/sessions/` flow through the same pipeline as Claude Code: their sessions appear in the dashboard, timeline, calendar, and per-project rollups alongside Claude sessions, with `agent: \"codex\"` carried through every event so consumers can split or aggregate.\n- **Per-agent representation in the UI.** Each session row carries an agent badge; top-sessions guarantees a multi-agent representation when both agents are active; the Gantt rail uses a per-agent glyph and outcome pills.\n- **Usage page is now agent-tabbed.** Switch between Claude and Codex views; cross-agent comparisons stay readable rather than smashed onto a single chart.\n- **Codex sessions blend into the day + week digest narratives** so the insights pipeline summarises across agents instead of treating Codex as a footnote.\n- **`fleetlens` → \"Ask\"** (agent-neutral). Previously labelled \"Ask Claude\"; the underlying prompt-routing stays Claude-backed, but the surface name no longer implies single-agent.\n\n### Changed\n- Dashboard default time range moved to **90 d** to match how multi-agent fleets actually use the tool — week-only views were truncating Codex activity that lands in week-old session files.\n- `AgentSource` interface opened up so future agents (OpenCode, Gemini CLI, …) are pure additive plug-ins; no parser core changes required.\n- Daemon auto-backfills *yesterday's* day digest on boot when `ai_features.auto_backfill_yesterday` is on, so `--no-daemon` users still get a yesterday digest on first homepage visit.\n\n### Fixed\n- **Codex calibration math no longer pollutes the Claude window.** Non-Claude snapshots are excluded from the Claude-side cycle-peaks calibration that drives plan-fit advice — previously a Codex-heavy run skewed the projected exhaustion line.\n- **Minimap idle bands** are now derived from raw event timestamps (not row kind) and coalesced per turn, so Codex sessions with sub-minute back-and-forth no longer paint as wall-to-wall idle.\n- Sessions filter state preserved in the URL so refresh / share doesn't lose the active filter.\n- `/insights` persists forced current-week digests so the page actually shows them on next load.\n\n## [0.6.4] — 2026-05-04\n\n### Fixed\n- Cached calibration events per-file so `/usage` warm renders complete in well under a second on large session histories.\n\n## [0.6.3] — 2026-05-04\n\n### Fixed\n- Dropped poisoned auto-week locks left behind by interrupted runs; backfill now gates on the live pipeline lock instead.\n\n## [0.6.2] — 2026-05-04\n\n### Added\n- Last week's digest auto-generates on launch when AI features are on. Disable in Settings → AI features.\n\n## [0.6.1] — 2026-05-04\n\n### Changed\n- Smaller install size — published bundle no longer drags in unused workspace metadata.\n\n## [0.6.0] — 2026-04-30\n\n### Added\n- V2 perception layer. Daily, weekly, and monthly digests synthesized from per-session entries via a strict hierarchical pipeline (entry → day → week → month). Past-period digests are immutable on disk; current-period digests use a 10-min in-memory TTL.\n- `/insights` route with on-demand week and month digest generation, picker history, and force-regen.\n- `fleetlens digest day | week | month [--json]` — CLI surface that reproduces the same digests served at `/insights`.\n- `fleetlens entries [--day | --session | --all] [--json]` — inspect the per-session entry primitive.\n\n### Changed\n- Renamed \"active time\" to \"agent time\" across the dashboard and CLI for clarity.\n\n## [0.4.1] — 2026-04-23\n\n### Added\n- Concurrency view on `/parallelism` page. Bursts colored teal for same-project and purple for cross-project (the genuinely interesting fleet-work signal).\n- Plan utilization sparkline on the sidebar, fed by the usage daemon's 5-min snapshots.\n\n### Fixed\n- Auto-update no longer leaves a zombie web server on the old binary; both server and daemon are torn down before re-exec.\n\n## [0.4.0] — 2026-04-18\n\n### Added\n- Usage daemon (`fleetlens daemon …`) polls `/api/oauth/usage` every 5 min and appends snapshots to `~/.cclens/usage.jsonl`. `fleetlens start` and `fleetlens stop` manage server + daemon together.\n- `fleetlens usage --history` for inspecting past plan utilization.\n\n## [0.3.0] — 2026-04-10\n\n### Added\n- Project rollups with worktree aggregation. Sessions inside `<project>/.worktrees/<name>` roll up under their parent canonical project with a `+N wt` badge.\n- Pinned projects in the sidebar (per-browser via localStorage).\n\n## [0.2.0] — 2026-04-01\n\n### Changed\n- Active-segment computation now uses all timestamped events (system + summary + sidechain + conversational) instead of conversational-only. Earlier filter undercounted by up to 100x on tool-heavy sessions.\n\n## [0.1.0] — 2026-03-15\n\n### Added\n- Initial release. Local-only dashboard for Claude Code sessions: timeline, projects, daily activity bucketing, parallelism detection, per-model cost estimation. Reads JSONL transcripts from `~/.claude/projects/`.\n";
3
+ export const RAW_CHANGELOG = "# Changelog\n\nAll notable user-facing changes to the Fleetlens CLI (`fleetlens` on npm) are\nrecorded here. Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).\nThe team-server has its own log at `packages/team-server/CHANGELOG.md`.\n\n## [0.13.2] — 2026-06-29\n\nTimeline and session-view polish, plus the second half of the session-view modularization. Mostly day-scope refinements — jumping into a session now lands on the right day, and the minimap and idle dividers read far more cleanly on long multi-day runs. Safe upgrade from 0.13.1.\n\n### Added\n- **Click a session, land on the day you were looking at.** Opening a session from the Day view or a Concurrency gantt now pins it to *that* day instead of the session's most-recent day — and actually scrolls the transcript there. Previously the day selector moved but the transcript stayed at the very top, a latent bug that also affected the plain last-day jump. Days that are entirely background-agent work — which live in the Workflows tab, not the transcript — fall back to the nearest rendered content instead of getting stuck at the top.\n- **Idle gaps that cross a day now show when work resumed.** A \"Session idle · 1d\" divider told you how long but not when; for a gap that picks back up on a later day it now reads \"Session resumed Jun 18, 11:02 AM\". Sub-day gaps keep their duration, since the pause length is the useful signal there.\n\n### Fixed\n- **The minimap no longer shreds a long run into idle slivers.** A collapsed turn now owns its internal idle (model thinking, long tool calls, a workflow it's waiting on) instead of fragmenting into a stutter of hatched bars; consecutive idle bands fuse into one; the gap between two days no longer leaks across the day-window edge as a giant block; and a day no longer opens on the overnight gap leading into it (which could be 60–70% of the whole bar) — the day's actual activity now fills the timeline.\n- **Cleaner day boundaries.** When a resume divider already names the new day, the redundant \"Start of \\<day\\>\" jump marker below it is dropped — the boundary is just the resume band plus an \"End of \\<prev day\\>\" back-nav, instead of three stacked elements restating the same date.\n- **Two workflow-panel bugs.** WorkflowPhaseTabs now reactively falls back to the first phase with agents until you pick one (and resets per run); WorkflowAgentDrawer paints synchronously from its detail cache on reopen, and a failed revalidation no longer blanks an already-shown detail.\n\n### Changed\n- **Internal: session-view.tsx modularization, part two.** The session-scoped Minimap (~1,580 LOC) and the WorkflowsPanel cluster (~940 LOC) were extracted into colocated `session-view/` modules. Pure code moves — `tsc --noEmit` clean throughout. Plus small review-surfaced cleanups: three dead imports removed, the gantt day-param simplified to the already-canonical date string, and a tail-mode effect dependency corrected.\n\n## [0.13.1] — 2026-06-26\n\nA quality-and-correctness release rolled up from a full code audit, plus the timeline scroll-follow polish from PR #73. No new surface — every change either fixes a bug, removes dead weight, or makes the codebase easier to work in. Safe upgrade from 0.13.0.\n\n### Fixed\n- **Day-scoped timeline now actually follows scroll across days, without flicker.** The minimap's selected day used to revert to the previous day when you scrolled into a new one on a long session, because the day-jump's `scrollIntoView` undershot tall preceding turn-blocks and the scroll-spy then read that block's offset as \"still on the old day.\" The follower now reads from the same playhead signal the minimap already uses, the day-jump self-corrects against the live header height across a few frames so the next day's strip lands exactly at the header line, and live sessions skip the mount day-jump entirely so tail-follow can land on the latest tail without being yanked back. Live-follow scrolls are now instant (not smooth) so they don't self-cancel mid-animation. (PR #73)\n- **Inline cross-day jump shortcuts.** New \"↓ Start of \\<day\\>\" and \"↑ End of \\<day\\>\" buttons sit at each day boundary in the transcript, so reading across a long idle gap is one click — not a hand-scroll across thousands of pixels. (PR #73)\n- **Searchable project filter on the sessions list.** The `<select>` project picker is replaced with a filterable combobox: type to filter, arrow keys + Enter/Escape to navigate, Tab to close. Painful with dozens of project folders before; now a few keystrokes. (PR #73)\n- **Six correctness bugs surfaced by a full audit:**\n - `INSTRUCTION_RE` in `extractUserInstructions` leaked `lastIndex` across calls. Once a turn hit the 5-cap break, later entries got truncated or empty `user_instructions` until the module re-loaded. Fixed; regression test added.\n - Linear/Jira ticket-ref matching was anchored only at the end of the identifier, so `\\m` matched `XKIP-315` against `KIP-315` — inflating AI-linked PR share and joining unrelated PRs into work-timeline cycle stats. Both `\\m` and `\\M` now anchor both sides.\n - **Usage dedup re-introduced 2–3× token inflation** on transcripts where two JSONL lines for the same `message.id` differed in whether they carried `requestId` (`msg_1:` vs `msg_1:req_a` keyed as distinct messages). Dedup now keys on `mid` alone — the comment already called it the stable identifier. Regression test added.\n - `loadUsageByDay`'s early break assumed strictly chronological JSONL; out-of-order timestamps from sleep-resume clock skew or backfill silently terminated the scan and dropped later in-range snapshots. Switched to a continue.\n - `enrichmentStatusBySession` depended on filesystem iteration order — a session whose newest day was pending could surface as enriched (or vice versa). Now reads from the most-recent entry after explicitly sorting by `local_day` desc.\n - `runDaemonUpdateCheck` could leave `updateCheckInFlight=true` forever if a registry fetch hung past its 3-second timeout, blocking all future update checks behind the 5-second watchdog tick. The in-flight return path now advances `nextUpdateCheckAtMs` properly.\n\n### Changed\n- **Five dead exports removed** surfaced by the audit (zero callers anywhere, verified by ripgrep): `predictUtilization` + `dollarsInWindow` from `parser/src/calibration.ts`; `parseDateArg` from `cli/src/args.ts`; `lastCompletedMonth` from `apps/web/lib/entries.ts`; `coworkSessionLocalDay` + its `parser/src/fs.ts` re-export.\n- **Type-safety + perf cleanups** to load-bearing primitives surfaced by the audit (no behavior change, but the code is now easier to refactor without surprises).\n- **Internal: six large files split for maintainability.** Pure code moves — every chunk landed with `tsc --noEmit` clean and the parser's `entries --all --json` output byte-identical to master.\n - `apps/web/app/sessions/[id]/session-view.tsx` 6,612 → 5,208 LOC, with 11 colocated modules extracted under `session-view/`.\n - `apps/web/app/parallelism/gantt-chart.tsx` 1,774 → 888 LOC, with `gantt-chart-utils.ts`, `concurrency-info-modal.tsx`, `burst-detail-modal.tsx` extracted.\n - `apps/web/app/sessions/[id]/team-tab/team-minimap.tsx` 682 → 427 LOC, with `minimap-shared.ts`, `minimap-idle-band.tsx`, `minimap-hover-card.tsx` extracted.\n - `packages/team-server/src/lib/team-report-aggregate.ts` 1,713 → 1,559 LOC, with `ticket-velocity.ts` extracted.\n - `apps/web/app/api/digest/{day,week,month}/[…]/route.ts` thinned to ~30 LOC each via a shared `digest-route-helpers.ts`.\n - `apps/web/components/{week,month}-digest-view.tsx` deduplicated through a shared `digest-actions.tsx`.\n- **Parser `antigravity.ts` tightened** from `any[]` to `unknown[]` with a local `RawEvent` / `RawToolCall` record cast (16 implicit-any property accesses eliminated). Verified byte-identical `SessionEvent` dump on a fixture exercising every parser branch.\n- **+83 unit tests** backfilling load-bearing primitives that had no coverage: `formatTokens`, `formatGap`, `formatDuration`, `prettyProjectName`, `formatUsage`, `mondayFor`, plus the parser/team-server regression tests for the dedup and word-boundary fixes above. Total: 1,275 → 1,358.\n\n## [0.13.0] — 2026-06-18\n\n### Added\n- **Day-scoped session timeline.** A long-running session that spans several days no longer crams every day into one unreadable strip. The timeline map gives you Prev/Next day controls (with the day's date) to step through the run one day at a time, and as you scroll the transcript the timeline follows along — auto-advancing to whichever day you're reading. Each day's perception digest card now sits inline at that day's first entry instead of stacked at the top, so the summary travels with the work it describes.\n- **LIVE now sees background agents and workflows.** A session whose main transcript has gone quiet but is still running background subagents or a workflow now correctly reads as live: liveness is computed from the newest activity across the session's nested subagent/workflow transcripts, not just the main JSONL. The live badge, the Running/Idle state, and the live-sessions widget all reflect in-flight background work, and the dashboard auto-refreshes when a background agent writes.\n- **Keep the usage daemon running across reboots (macOS).** New `fleetlens autostart <install|uninstall|status>` installs a launchd LaunchAgent that runs `fleetlens daemon start` at login, so usage polling survives a restart. `fleetlens start` offers to set this up the first time (a simple Y/n, with \"don't ask again\"); it's daemon-only and entirely opt-in. On non-macOS it prints how to add a login item manually.\n- **Per-member CLI version reported to Team Edition.** The daemon now stamps its installed Fleetlens CLI version into each team push, so the team roster can show who's up to date. Harmless to older servers, which ignore the field.\n\n### Changed\n- **Session view tabs renamed** to Timeline / Workflows / Log (from Transcript / Workflows / Debug).\n\n### Fixed\n- **Harness-injected lines no longer render as your messages.** Post-compact continuation summaries (\"This session is being continued…\") and session-scoped Stop-hook notices arrive with a user role but aren't things you typed — they're now hidden from the transcript and excluded from turn counts and digests, like other framework boilerplate.\n- **Sessions list hydration error** on pending session cards (a nested link inside the card link) is gone.\n\n## [0.12.3] — 2026-06-15\n\n### Fixed\n- **Opening a session under-counted its tokens everywhere afterward.** Viewing a session that spawned subagents returned parent-only token totals and overwrote the shared in-memory cache with them, so the dashboard, estimated cost, daily heatmap, and project rollups all dropped that session's subagent tokens until the server restarted. The detail path now applies the same subagent-inclusive recompute as the list path, so totals stay correct and consistent no matter which page you open first.\n- **`fleetlens usage --history` cost accuracy.** A single session on an unpriced model (e.g. `<synthetic>`) no longer nulls a whole day's cost — each day now sums the cost of its priced sessions and marks the figure as a lower bound (`≥`) when some sessions couldn't be priced. The Total row sums every priced day (it previously dropped them while still counting their tokens) and is likewise marked `≥` when any usage was unpriced, so Total cost and Total tokens no longer imply different scopes.\n- **`fleetlens usage --history` model labels.** A day with two minor model versions could render a duplicated/inconsistent label (e.g. `opus-4, opus-4`); model names now use one normalization for both de-duplication and display.\n- **Sidebar project count matches the Projects page.** The sidebar nav badge and footer counted Claude Code projects only, disagreeing with the all-source `/projects` page and omitting Codex / Cowork / Gemini / Antigravity projects. Both now reflect every agent source.\n- **A stale or corrupt digest file no longer 500s the dashboard.** Cached day/week/month digests are now validated on read (schema version + shape); an incompatible or damaged file is ignored and the page renders without it, honoring the \"a schema bump regenerates digests\" contract.\n- **A failed stale-server restart can't leave an invisible orphan.** If the replacement server can't take the port, `fleetlens start`/`web` now escalate to a force-kill and re-record the old server's pid so `status`/`stop` can still see and stop it, instead of leaving an untracked process serving the old bundle.\n- **Live-sessions count hydration.** The \"Live · N\" badge is time-derived and could briefly mismatch between server render and hydration; it's now marked so React doesn't warn.\n\n## [0.12.2] — 2026-06-15\n\n### Fixed\n- **A stale web server could survive an update and serve a broken dashboard.** After `fleetlens` updated itself, the CLI binary and usage daemon came up on the new version, but a web server that was already running kept serving the old build. Once npm removed the previous install directory, any dashboard route the old server hadn't already loaded into memory returned a 500 (Insights was the usual casualty). `fleetlens start` and `fleetlens web` now record the running server's version in the pid file and automatically restart it when it no longer matches the installed CLI; `fleetlens status` shows the served version and warns when it's stale.\n\n## [0.12.1] — 2026-06-15\n\n### Fixed\n- **Per-day metrics for cross-midnight sessions.** A session that ran past midnight had its agent time split across calendar days but its tokens, tool calls, turns, and session count pinned to the start day — so on the dashboard (and team rollups) the continuation days showed agent time with 0 tokens / 0 sessions. Each tool call, turn, and token is now attributed to the day its own event happened, and a session counts on every local day it worked. The split is sum-preserving (totals are unchanged) and keeps `sum(per-day tokens) === session total` even across subagents that run past midnight.\n\n### Changed\n- **Team push carries a `unique_sessions` count.** Because the per-day `sessions` figure is now \"session-days\" (a cross-midnight session counts on each day it touched), the daemon also pushes the start-day count so the team-server's roster/header/maturity aggregates keep exact unique-session semantics. Requires team-server ≥ 0.12.3; older servers ignore the extra field.\n\n## [0.12.0] — 2026-06-15\n\n### Added\n- **Dynamic workflow visualization.** A single `Workflow` tool call collapses a whole fan-out — 200+ spawned agents — into one opaque transcript row. Fleetlens now reads the aggregate journals Claude Code persists per run and surfaces the real fleet work:\n - **Workflows tab** on the session page (next to Transcript / Team / Debug) with a run-count badge. Each run is a card showing status, spawned-agent count, tool calls, tokens, and duration.\n - **Fleet stat** in the session header (`N workflows · M agents`) plus a spawned-agent badge on session-list cards, so workflow-driven sessions stand out at a glance.\n - **Per-phase action tabs** inside each run — the phases the workflow declared (e.g. Build / Panel / Skeptic / Merge), each listing the agents that ran in that phase.\n - **Full per-agent step log.** Clicking an agent opens a right side-sheet with its Task, the complete ordered step list (every tool call — expand any step for the full multi-line command), and the Result. Loaded on demand so even 100+ step, 200+ agent sessions stay fast; sections are collapsed by default.\n - **Workflow lanes** on the timeline minimap (distinct from subagent lanes); click a lane to open that run in the Workflows tab.\n- **Workflow execution counts as agent time.** A run's wall-clock span is folded into the session's \"agent time\" and carved out of the minimap idle bands, so the stretch where the parent waits on a workflow reads as active fleet work, not dead air.\n\n## [0.11.2] — 2026-05-27\n\n### Changed\n- **`fleetlens start` and `fleetlens web` no longer auto-launch the browser.** The dashboard URL is printed so you can click it (every modern terminal makes `http://localhost:…` clickable), but no browser tab opens unless you pass the new `--open` flag. Auto-launch was surprising users whose default browser had moved to a different desktop, was a corp-managed profile they didn't want spawned, or was simply already in flow on another window. The previous `--no-open` flag is still accepted as a no-op — existing scripts and aliases keep working without changes.\n\n## [0.11.1] — 2026-05-21\n\n### Added\n- **Team workspace seeding script.** Added `scripts/seed-team-workspace.mjs` for local end-to-end telemetry testing.\n\n### Changed\n- **Plan page layout grid consistency.** Enhanced the Team Edition Plan page layout grid consistency and renamed the 'Latest cycle' column to 'Current cycle'.\n- **Completed cycles alignment.** Modified the completed cycles strip to show a maximum of 4 historical cycles, padded on the left with empty placeholders for visual right-alignment and grid uniformity.\n\n### Fixed\n- **Mini-burndown SVG typings and filtering.** Resolved mini-burndown SVG typings and parameterized cycle strip filtering.\n- **Active cycle query performance.** Batched active cycle loads in a single query to eliminate N+1 DB lookups.\n\n## [0.11.0] — 2026-05-21\n\n### Added\n- **Team-issued commands to the daemon.** When you've paired with a Team Edition server, a team admin can now queue a 30-day activity backfill against your daemon from the team dashboard. The daemon picks the command up on its next 5-minute sync and re-pushes the last 30 days of daily activity rollups (server upserts, fully idempotent). No member-side UI changes — the existing \"last sync N ago\" tick on `/settings → Team connection` is the only feedback signal. Commands ride piggyback on the existing `/api/ingest/metrics` response; no new connections, no new polling. The privacy boundary holds: the dispatcher's switch has a single case (`backfill-activity`) and only calls existing aggregate-push helpers, so commands can widen the time window but never change the data shape. No transcripts, prompts, or project content can leak through a command. Always-on when paired (pairing implies consent); no opt-out env var. Requires `team-server v0.9.0+` to actually receive any commands; older servers simply don't issue any (the additive `commandResults` field is ignored, no harm).\n\n## [0.10.6] — 2026-05-21\n\n### Added\n- **Team-pairing visibility in the Personal Edition dashboard.** When you've paired with a Team Edition server (`fleetlens team join …`), the dashboard now surfaces what's syncing without you having to open a terminal. A sidebar chip with a health dot (green / amber / red — re-derived client-side every 30 s so it ages correctly even when the daemon stops) and a live-aging \"synced N ago\" label. A `/settings → Team connection` panel showing team metadata, a labeled last-push preview (Agent time / Session count / Tool call count / Turn count / Token total / Plan tier), an explicit \"What does NOT leave your machine\" block, and a \"Sync now\" button that spawns `fleetlens team sync` as a subprocess and renders its output inline. A first-run welcome banner on the overview after pairing, dismissable per pairing. The preview also includes a \"Show raw JSON payload\" disclosure that displays the literal `IngestPayload` from disk — verify byte-for-byte that no transcripts, prompts, or project content leave your machine. Solo users see no change.\n\n### Changed\n- **Wire-format types now live in `@claude-lens/parser`.** `IngestPayload`, `DailyRollup`, `LastPushRecord`, and the rest of the daemon→server wire shape moved out of `packages/cli/src/team/push.ts` so the CLI and the dashboard share a single canonical definition — no drift risk on future schema changes. The CLI's `team-config` module also moved to the parser (`@claude-lens/parser/fs`) for the same reason.\n\n## [0.10.5] — 2026-05-21\n\n### Changed\n- **Team backfill now rides the consolidated `/api/ingest/metrics` path.** Same endpoint as the daemon's regular 5-min push, just with the optional `snapshotHistory` field set. Removes the need for a separate path-allowlist entry on deployments fronted by a proxy (IAP, WAF, Cloud Run / GLB path matcher), and as a side-effect the old `/api/ingest/usage-history` route is now a thin deprecation shim. Requires `team-server v0.8.4+` — older servers will return 200 without a `snapshotHistory` result block, and the CLI aborts the backfill loudly rather than silently advancing the high-water mark.\n\n### Fixed\n- **Backfill no longer silently advances the high-water mark on an older team-server.** Previously, a server that didn't recognize `snapshotHistory` would return 200 (zod `passthrough()` swallows unknown fields), `runTeamSync` would persist `lastSyncedUsageSnapshotAt` as if all rows landed, and the dropped rows would never be retried after the server upgraded. Backfill now requires an explicit `snapshotHistory` result block in the response.\n\n## [0.10.4] — 2026-05-21\n\n### Fixed\n- **Fleetlens's own LLM runs no longer show up in the dashboard.** The tmux-driven runner records its enrichment / digest / `/ask` calls as real Claude Code transcripts under `~/.claude/projects/` (cwd `~/.cclens/runtime`), since tailing that transcript is how it reads the model's reply. Those self-generated sessions were surfacing as a `.cclens/runtime` project and inflating session, project, and token-calibration rollups. The tmux runner now deletes each transcript once the response is captured (kill-session before unlink so claude can't rewrite it, gated by `FLEETLENS_TMUX_KEEP_WRAPPER`), and the parser excludes the runtime project dir at the scan chokepoint as a safety net for any transcript that outlives cleanup.\n\n## [0.10.3] — 2026-05-16\n\n### Added\n- **Daemon auto-update every 6 hours.** The local daemon now hourly-checks `registry.npmjs.org/fleetlens/latest` and spawns a detached `fleetlens update` child when a newer version exists. Timestamp persisted in `~/.cclens/daemon-update.json` so closing the laptop lid for days and reopening triggers an immediate catch-up check instead of waiting out the interval. Opt-out via `FLEETLENS_DAEMON_AUTO_UPDATE=0`.\n\n### Changed\n- **Unified team sync.** `runTeamSync` now drives history backfill, daily activity, live utilization, queue drain, and tier propagation through a single path. `team join` and the daemon's 5-min tick both call the same function — so a user disconnected from the team server for days will autonomously catch up on next sync, no manual `team backfill` needed.\n- New `lastSyncedUsageSnapshotAt` high-water mark in `~/.cclens/team.json` means incremental syncs only ship eligible new snapshots. Cold-start full backfill is bypass-able via `fleetlens team backfill --force` (and still runs unconditionally on first pair).\n- Team sync cadence is now independent of Claude OAuth polling, so an expired Claude token can no longer turn team sync into a 5-second retry storm.\n\n### Fixed\n- `lastSyncedDay` no longer advances past a failed day on partial outage — previously a transient mid-stream 5xx left a permanent hole in the team-server's daily-activity coverage.\n- Both `/api/ingest/metrics` and `/api/ingest/usage-history` POSTs now have a 15-second `AbortSignal.timeout` to bound hangs on network stalls.\n\n## [0.10.2] — 2026-05-15\n\n### Fixed\n- **Session-detail minimap no longer paints subagent runtime as idle.** Long agent runs that dispatched many subagents were reading as wall-to-wall \"Session idle\" stripes because the parent's tool_use → tool_result gap (the subagent's actual runtime) was classified as in-turn idle. `rawIdleBands` now carves subagent run spans out of every candidate gap; for in-turn gaps that overlap any subagent run the entire gap is dropped, and between-turn gaps with background subagent activity keep only the genuinely-unwatched residue.\n- **First-response thinking stops registering as idle.** Anchors now include every timestamped event (agent-thinking, meta, etc.), and the loop tracks an \"awaiting first response\" phase across intermediate thinking anchors. A `user → thinking → thinking → agent` sequence where the model takes a while to compose its first reply is now treated as response latency rather than painted as a stripe.\n- **Turn duration no longer shows `0ms` for single-row turns.** `buildMegaRows` now anchors a turn's `tOffsetMs` and `durationMs` at the originating user message rather than at the first agent row. Single-row turns show the actual user → agent latency, and the visual span of the turn rectangle on the minimap covers the whole arc.\n- **Single `Session idle` divider per band.** A user row and the turn-collapsed row that follows it now share a `tOffsetMs`, so the body's `IdleDivider` emitter dedupes per band to stop two consecutive identical idle markers around the same boundary.\n\n### Changed\n- Minimap idle threshold raised from 10s to 30s. Ordinary tool latency (slow Bash, big-file Read, between-anchor model thinking) no longer registers as idle.\n\n## [0.10.1] — 2026-05-14\n\n### Added\n- **Alternative claude runtime via tmux.** When `tmux` is on PATH, both the LLM pipeline (digest synth, entry enrichment, top-session perception) and the `/ask` feature now drive `claude` through a detached tmux session instead of `claude -p`. Sessions produced this way carry `entrypoint: cli` in their JSONL, which is also extracted by the parser and surfaced as a small badge on `/sessions/<id>` next to the model chip — green for `cli` / `claude-desktop`, amber for `sdk-*`. The path falls back to `claude -p` whenever tmux is unavailable or the run errors; set `FLEETLENS_FORCE_PRINT_MODE=1` to disable the tmux path entirely.\n- **`CCLENS_HOME` env override.** All `~/.cclens/` state (pid file, daemon log, perception state, usage snapshot log, llm-runs traces) is now reached through a shared `cclensHome()` helper that honors `CCLENS_HOME`. Lets multiple installs / workspaces run side-by-side without stomping on each other's state.\n\n### Fixed\n- `/api/runs` rendered every successful tmux-driven run as `status=error`. Tmux runs have no subprocess exit code (the session is killed by cleanup), and the runs viewer was treating a missing code as failure. End records now stamp `exit_code: 0` on success and the active-process filter no longer requires the literal `claude -p` flag, so tmux-driven processes also show up in the \"active\" panel while they're running.\n- `JobQueueWidget`'s `/api/jobs` polling effect listed `jobs` in its deps, so each tick re-armed the effect on the freshly-set state ref — effective cadence collapsed to a 1–4 ms refetch loop. Now tracks `hasActive` in a closure-local var and runs the effect once on mount.\n\n### Conductor\n- New `conductor.json` + `scripts/conductor-{setup,run,archive}.sh` so each Conductor workspace allocates its own 3-port band (web / team-server / postgres) and boots its own `fleetlens-<workspace>` Compose stack against `.harness/cclens-state`. Replaces ~30 hard-coded `join(homedir(), \".cclens\", …)` call sites with the shared `cclensHome()/cclensPath()` helper so a second workspace can boot without colliding with the user's primary install.\n\n## [0.10.0] — 2026-05-08\n\n### Changed\n- **Plan utilization reframed.** High utilization is now \"getting plan value\" (green); low utilization is \"paying for unused headroom\" (red). Mirrors how an operator actually looks at the dashboard: the wasteful outcome is paying for a plan and barely touching it, not running near the cap. Applied across `/usage` burndown, gauges, sidebar, and previous-cycles strip.\n- **In-progress cycles colored by pace, not peak.** A 50% peak halfway through a 7-day cycle reads on-pace green, not amber — the chart no longer cries wolf on a fresh cycle that just hasn't burnt yet. Completed cycles still use peak tone.\n- **Pace label ±15pp band.** \"On pace\" now covers a ±15pp window around ideal; outside that, label is \"below pace\" (under-burning) or \"may exhaust early\" (over-burning). The previous +5/-50 thresholds flipped amber every time the user took a night off.\n- **Pace label collapses to three states.** \"May exhaust early\" / \"below pace\" / \"on pace\" — same color tones, one fewer qualifier to read.\n- **Wording softened across the utilization views** to describe the pattern rather than judge the user. \"Behind schedule\" → \"below pace\"; \"on track (+x%)\" → \"on pace (+xpp vs ideal)\".\n\n### Added\n- **Conductor multi-agent workspace support.** Sessions inside Conductor's worktree-style agent workspaces (`~/conductor/workspaces/<repo>/<agent>/...`) now group correctly under their parent project, with each agent shown as a separate worktree. Mirrors the existing `.worktrees/` handling.\n\n### Fixed\n- Hydration mismatch on `/usage` when pace labels rendered before client mount.\n\n### Notes for operators\n- The CLI's team push now ships **only Claude Code usage snapshots** to the team server. Codex snapshots stay local until `plan_utilization` gets a per-agent partition — without one, the team-server's \"latest snapshot\" pick flips between agents and miscolors the in-progress cycle. Existing rows in `plan_utilization` stay; new pushes are claude-code only.\n\n## [0.9.0] — 2026-05-07\n\n### Added\n- **Gemini CLI** as the third agent source. Sessions written to `~/.gemini/tmp/<slug>/chats/session-*.jsonl` are now read, parsed, and rendered alongside Claude Code and Codex. Tool calls (`read_file`, `list_directory`, `glob`, `run_shell_command`, `update_topic`, …) and their results show in the session timeline; thinking blocks, multi-write status replay, `$set` / `$rewindTo` semantics, and the legacy single-JSON file shape all handled. Slug → cwd inversion via `~/.gemini/projects.json`. `✺` glyph + purple accent in the UI.\n\n### Changed\n- Session detail timeline drops in-turn idle hatching. Within a turn, every wait — model loading, tool execution, network — is the agent's active time. Only between-turn idle (user reading + composing the next message) renders as hatched.\n- Gemini parser anchors `firstTimestamp`, `lastTimestamp`, and `activeSegments` on conversational events only. Login/OAuth `info` records and `metadata.startTime` (file-creation moment) no longer stretch the session bar back to before the first user message.\n\n## [0.7.1] — 2026-05-07\n\n### Fixed\n- Cycle-peaks trend no longer renders two bars labeled the same day. When Anthropic's rolling 7-day window slid its anchor between consecutive polls, the daemon's bucketer (hour-rounded) recorded both reset boundaries as distinct cycles. They're now merged within a 12 h tolerance — same fix in `apps/web/lib/cycle-peaks.ts` (used by `/usage`) and in `packages/cli/src/team/sync.ts` (the daemon's team-server push), so both the personal `/usage` chart and the team-server's plan-utilization view stay consistent. 5-hour cycles keep no merge tolerance (their anchor is stable; merging would collapse legitimate distinct cycles).\n\n## [0.7.0] — 2026-05-06\n\n### Added\n- **Multi-agent observability — Codex as the first non-Claude adapter.** The parser now defines an `AgentSource` registry; new agents land as a single file plus one registry entry. Codex CLI rollouts at `~/.codex/sessions/` flow through the same pipeline as Claude Code: their sessions appear in the dashboard, timeline, calendar, and per-project rollups alongside Claude sessions, with `agent: \"codex\"` carried through every event so consumers can split or aggregate.\n- **Per-agent representation in the UI.** Each session row carries an agent badge; top-sessions guarantees a multi-agent representation when both agents are active; the Gantt rail uses a per-agent glyph and outcome pills.\n- **Usage page is now agent-tabbed.** Switch between Claude and Codex views; cross-agent comparisons stay readable rather than smashed onto a single chart.\n- **Codex sessions blend into the day + week digest narratives** so the insights pipeline summarises across agents instead of treating Codex as a footnote.\n- **`fleetlens` → \"Ask\"** (agent-neutral). Previously labelled \"Ask Claude\"; the underlying prompt-routing stays Claude-backed, but the surface name no longer implies single-agent.\n\n### Changed\n- Dashboard default time range moved to **90 d** to match how multi-agent fleets actually use the tool — week-only views were truncating Codex activity that lands in week-old session files.\n- `AgentSource` interface opened up so future agents (OpenCode, Gemini CLI, …) are pure additive plug-ins; no parser core changes required.\n- Daemon auto-backfills *yesterday's* day digest on boot when `ai_features.auto_backfill_yesterday` is on, so `--no-daemon` users still get a yesterday digest on first homepage visit.\n\n### Fixed\n- **Codex calibration math no longer pollutes the Claude window.** Non-Claude snapshots are excluded from the Claude-side cycle-peaks calibration that drives plan-fit advice — previously a Codex-heavy run skewed the projected exhaustion line.\n- **Minimap idle bands** are now derived from raw event timestamps (not row kind) and coalesced per turn, so Codex sessions with sub-minute back-and-forth no longer paint as wall-to-wall idle.\n- Sessions filter state preserved in the URL so refresh / share doesn't lose the active filter.\n- `/insights` persists forced current-week digests so the page actually shows them on next load.\n\n## [0.6.4] — 2026-05-04\n\n### Fixed\n- Cached calibration events per-file so `/usage` warm renders complete in well under a second on large session histories.\n\n## [0.6.3] — 2026-05-04\n\n### Fixed\n- Dropped poisoned auto-week locks left behind by interrupted runs; backfill now gates on the live pipeline lock instead.\n\n## [0.6.2] — 2026-05-04\n\n### Added\n- Last week's digest auto-generates on launch when AI features are on. Disable in Settings → AI features.\n\n## [0.6.1] — 2026-05-04\n\n### Changed\n- Smaller install size — published bundle no longer drags in unused workspace metadata.\n\n## [0.6.0] — 2026-04-30\n\n### Added\n- V2 perception layer. Daily, weekly, and monthly digests synthesized from per-session entries via a strict hierarchical pipeline (entry → day → week → month). Past-period digests are immutable on disk; current-period digests use a 10-min in-memory TTL.\n- `/insights` route with on-demand week and month digest generation, picker history, and force-regen.\n- `fleetlens digest day | week | month [--json]` — CLI surface that reproduces the same digests served at `/insights`.\n- `fleetlens entries [--day | --session | --all] [--json]` — inspect the per-session entry primitive.\n\n### Changed\n- Renamed \"active time\" to \"agent time\" across the dashboard and CLI for clarity.\n\n## [0.4.1] — 2026-04-23\n\n### Added\n- Concurrency view on `/parallelism` page. Bursts colored teal for same-project and purple for cross-project (the genuinely interesting fleet-work signal).\n- Plan utilization sparkline on the sidebar, fed by the usage daemon's 5-min snapshots.\n\n### Fixed\n- Auto-update no longer leaves a zombie web server on the old binary; both server and daemon are torn down before re-exec.\n\n## [0.4.0] — 2026-04-18\n\n### Added\n- Usage daemon (`fleetlens daemon …`) polls `/api/oauth/usage` every 5 min and appends snapshots to `~/.cclens/usage.jsonl`. `fleetlens start` and `fleetlens stop` manage server + daemon together.\n- `fleetlens usage --history` for inspecting past plan utilization.\n\n## [0.3.0] — 2026-04-10\n\n### Added\n- Project rollups with worktree aggregation. Sessions inside `<project>/.worktrees/<name>` roll up under their parent canonical project with a `+N wt` badge.\n- Pinned projects in the sidebar (per-browser via localStorage).\n\n## [0.2.0] — 2026-04-01\n\n### Changed\n- Active-segment computation now uses all timestamped events (system + summary + sidechain + conversational) instead of conversational-only. Earlier filter undercounted by up to 100x on tool-heavy sessions.\n\n## [0.1.0] — 2026-03-15\n\n### Added\n- Initial release. Local-only dashboard for Claude Code sessions: timeline, projects, daily activity bucketing, parallelism detection, per-model cost estimation. Reads JSONL transcripts from `~/.claude/projects/`.\n";
@@ -82,17 +82,16 @@ export async function buildEntriesIndex(): Promise<EntriesIndex> {
82
82
  const repo = projectRepoName(e.project);
83
83
  const plist = byProject.get(repo);
84
84
  if (plist) plist.push(e); else byProject.set(repo, [e]);
85
-
86
- // Most recent enrichment status wins for the session-level summary
87
- const cur = enrichmentStatusBySession.get(e.session_id);
88
- if (!cur || cur === "pending" || cur === "error") {
89
- enrichmentStatusBySession.set(e.session_id, e.enrichment.status);
90
- }
91
85
  }
92
86
 
93
- // Sort each session's entries by local_day asc
94
- for (const list of bySession.values()) {
87
+ // Sort each session's entries by local_day asc; the latest day's
88
+ // enrichment status is the session's status. Reading after the sort
89
+ // avoids the prior order-dependent bug where readdir order decided
90
+ // whether a session showed 'enriched' (older day) or 'pending'
91
+ // (today, still queued).
92
+ for (const [sid, list] of bySession) {
95
93
  list.sort((a, b) => a.local_day.localeCompare(b.local_day));
94
+ enrichmentStatusBySession.set(sid, list[list.length - 1]!.enrichment.status);
96
95
  }
97
96
 
98
97
  const sessionOutcome = new Map<string, DayOutcome | null>();
@@ -54,15 +54,6 @@ export function currentYearMonth(nowMs: number = Date.now()): string {
54
54
  return today.slice(0, 7);
55
55
  }
56
56
 
57
- export function lastCompletedMonth(nowMs: number = Date.now()): string {
58
- const today = todayLocal(nowMs);
59
- const [y, m] = today.split("-");
60
- const yi = Number(y);
61
- const mi = Number(m);
62
- if (mi === 1) return `${yi - 1}-12`;
63
- return `${yi}-${String(mi - 1).padStart(2, "0")}`;
64
- }
65
-
66
57
  /** Validates and returns the Monday for `s` if `s` is itself a Monday in YYYY-MM-DD form. */
67
58
  export function asMonday(s: string): string | null {
68
59
  if (!isValidDate(s)) return null;
@@ -0,0 +1,221 @@
1
+ import { describe, it, expect } from "vitest";
2
+ import {
3
+ formatTokens,
4
+ formatGap,
5
+ formatDuration,
6
+ prettyProjectName,
7
+ } from "./format";
8
+
9
+ describe("formatTokens", () => {
10
+ // Boundary at 0 and small values: plain integer printing.
11
+ it("returns plain digit string for zero", () => {
12
+ expect(formatTokens(0)).toBe("0");
13
+ });
14
+
15
+ it("returns plain digit string just below the 'k' threshold", () => {
16
+ expect(formatTokens(999)).toBe("999");
17
+ });
18
+
19
+ it("switches to '<x>.<d>k' (1 decimal) at 1000", () => {
20
+ expect(formatTokens(1000)).toBe("1.0k");
21
+ });
22
+
23
+ it("keeps 1-decimal 'k' for mid-range below 10_000", () => {
24
+ // 5500 stays in the 1-decimal band; rounding to '6k' would only happen
25
+ // after the 10_000 threshold is crossed.
26
+ expect(formatTokens(5500)).toBe("5.5k");
27
+ });
28
+
29
+ it("rounds to '10.0k' at the upper edge of the 1-decimal band", () => {
30
+ expect(formatTokens(9999)).toBe("10.0k");
31
+ });
32
+
33
+ it("switches to 0-decimal 'k' at 10_000", () => {
34
+ expect(formatTokens(10_000)).toBe("10k");
35
+ });
36
+
37
+ it("keeps 'k' all the way up to just below 1M (no implicit rollover)", () => {
38
+ expect(formatTokens(999_999)).toBe("1000k");
39
+ });
40
+
41
+ it("switches to 2-decimal 'M' at 1_000_000", () => {
42
+ expect(formatTokens(1_000_000)).toBe("1.00M");
43
+ });
44
+
45
+ it("rounds to 2-decimal 'M' mid-band", () => {
46
+ expect(formatTokens(2_500_000)).toBe("2.50M");
47
+ });
48
+
49
+ it("rounds to '10.00M' at the upper edge of the 2-decimal band", () => {
50
+ expect(formatTokens(9_999_999)).toBe("10.00M");
51
+ });
52
+
53
+ it("switches to 1-decimal 'M' at 10_000_000 (no '10.00M' regression)", () => {
54
+ expect(formatTokens(10_000_000)).toBe("10.0M");
55
+ });
56
+
57
+ it("returns negative integers verbatim (treated as plain number, below threshold)", () => {
58
+ // Because the first branch is `n < 1000`, any negative number short-circuits
59
+ // before the suffix branches. Lock that behaviour in.
60
+ expect(formatTokens(-1000)).toBe("-1000");
61
+ });
62
+ });
63
+
64
+ describe("formatGap", () => {
65
+ it("emits raw 'ms' for zero", () => {
66
+ expect(formatGap(0)).toBe("0ms");
67
+ });
68
+
69
+ it("emits raw 'ms' for sub-second values", () => {
70
+ expect(formatGap(500)).toBe("500ms");
71
+ });
72
+
73
+ it("emits raw 'ms' at the just-below-1s boundary", () => {
74
+ expect(formatGap(999)).toBe("999ms");
75
+ });
76
+
77
+ it("switches to '<x>.<d>s' (1 decimal) at exactly 1s", () => {
78
+ expect(formatGap(1000)).toBe("1.0s");
79
+ });
80
+
81
+ it("keeps 1-decimal seconds below the minute boundary", () => {
82
+ expect(formatGap(30_500)).toBe("30.5s");
83
+ });
84
+
85
+ it("switches to '<m>m <s>s' at 61s", () => {
86
+ expect(formatGap(61_000)).toBe("1m 1s");
87
+ });
88
+
89
+ it("keeps minute-second formatting up to the just-below-hour boundary", () => {
90
+ expect(formatGap(3_599_000)).toBe("59m 59s");
91
+ });
92
+
93
+ it("emits bare '<h>h' when remaining minutes are zero (no '1h 0m')", () => {
94
+ // Regression guard: the function drops the minutes component when remM === 0.
95
+ expect(formatGap(3_600_000)).toBe("1h");
96
+ });
97
+
98
+ it("emits '<h>h <m>m' when minutes are non-zero", () => {
99
+ expect(formatGap(5_400_000)).toBe("1h 30m");
100
+ });
101
+
102
+ it("emits bare '<d>d' when remaining hours are zero (no '1d 0h')", () => {
103
+ expect(formatGap(86_400_000)).toBe("1d");
104
+ });
105
+
106
+ it("emits bare '<d>d' for an exact multi-day gap", () => {
107
+ expect(formatGap(172_800_000)).toBe("2d");
108
+ });
109
+
110
+ it("emits hours-component when day boundary is crossed unevenly", () => {
111
+ // 1d + 5h = 86_400_000 + 5*3_600_000 = 104_400_000
112
+ expect(formatGap(104_400_000)).toBe("1d 5h");
113
+ });
114
+
115
+ it("treats negative ms as raw 'ms' (first branch wins)", () => {
116
+ // Locks the current short-circuit: any value < 1000 (including negatives)
117
+ // takes the raw-ms branch.
118
+ expect(formatGap(-5000)).toBe("-5000ms");
119
+ });
120
+ });
121
+
122
+ describe("formatDuration", () => {
123
+ it("returns em-dash for undefined", () => {
124
+ expect(formatDuration(undefined)).toBe("—");
125
+ });
126
+
127
+ it("returns em-dash when called with no argument", () => {
128
+ expect(formatDuration()).toBe("—");
129
+ });
130
+
131
+ it("emits raw 'ms' for zero", () => {
132
+ expect(formatDuration(0)).toBe("0ms");
133
+ });
134
+
135
+ it("emits raw 'ms' at the just-below-1s boundary", () => {
136
+ expect(formatDuration(999)).toBe("999ms");
137
+ });
138
+
139
+ it("switches to integer seconds at exactly 1s", () => {
140
+ expect(formatDuration(1000)).toBe("1s");
141
+ });
142
+
143
+ it("rounds half-seconds upward via Math.round", () => {
144
+ // 1500ms → round(1.5) = 2s (banker's-rounding caveat noted but Math.round
145
+ // in JS rounds half-up positive, so 2s is correct).
146
+ expect(formatDuration(1500)).toBe("2s");
147
+ });
148
+
149
+ it("emits '<m>m <s>s' for minute+second mixed values", () => {
150
+ expect(formatDuration(65_000)).toBe("1m 5s");
151
+ });
152
+
153
+ it("drops seconds when they round to zero (no '1m 0s')", () => {
154
+ expect(formatDuration(60_000)).toBe("1m");
155
+ });
156
+
157
+ it("drops minutes when they're zero (no '1h 0m')", () => {
158
+ expect(formatDuration(3_600_000)).toBe("1h");
159
+ });
160
+
161
+ it("emits '<h>h <m>m' when minutes are non-zero", () => {
162
+ expect(formatDuration(5_400_000)).toBe("1h 30m");
163
+ });
164
+
165
+ it("keeps minute precision in the sub-hour band (no premature hour rollover)", () => {
166
+ // 3_570_000ms = 59m 30s exactly. The function should keep the 'm s' band,
167
+ // NOT round to '60m' (which would otherwise look like '1h').
168
+ expect(formatDuration(3_570_000)).toBe("59m 30s");
169
+ });
170
+ });
171
+
172
+ describe("prettyProjectName", () => {
173
+ it("returns the only segment when there's just one", () => {
174
+ expect(prettyProjectName("myproject")).toBe("myproject");
175
+ });
176
+
177
+ it("shows the last two segments of a normal absolute path", () => {
178
+ expect(prettyProjectName("/Users/me/Repo/kipwise/agentic-knowledge-system"))
179
+ .toBe("kipwise/agentic-knowledge-system");
180
+ });
181
+
182
+ it("rewrites a `.worktrees/<name>` path as `<parent>/<name>` so worktrees keep repo context", () => {
183
+ expect(prettyProjectName("/Users/me/Repo/kipwise/.worktrees/feature-branch"))
184
+ .toBe("kipwise/feature-branch");
185
+ });
186
+
187
+ it("returns the last two segments when the path is long but those segments are short", () => {
188
+ // The function does NOT count earlier path components — only the last two.
189
+ // For a path whose last two segments together are well under maxLen,
190
+ // no ellipsis prefix should appear.
191
+ expect(prettyProjectName("a/very/long/path/that/exceeds/maximum/length/project"))
192
+ .toBe("length/project");
193
+ });
194
+
195
+ it("respects a small custom maxLen by ellipsis-prefixing", () => {
196
+ // last two segments = "long/path" (9 chars). maxLen=10 → no truncation needed,
197
+ // so the bare "long/path" is returned. We assert the contract: result must
198
+ // never exceed maxLen, except the function appends "…" when it overflows.
199
+ const result = prettyProjectName("a/very/long/path", 10);
200
+ expect(result.length).toBeLessThanOrEqual(10);
201
+ expect(result).toBe("long/path");
202
+ });
203
+
204
+ it("ellipsis-prefixes when the last-two-segments name exceeds maxLen", () => {
205
+ const long = "/repo/" + "x".repeat(40);
206
+ const result = prettyProjectName(long, 20);
207
+ expect(result.startsWith("…")).toBe(true);
208
+ expect(result.length).toBe(20);
209
+ });
210
+
211
+ it("treats a leading slash as filtered empty segment", () => {
212
+ // filter(Boolean) drops the empty-string at the head.
213
+ expect(prettyProjectName("/kipwise/agentic-knowledge-system"))
214
+ .toBe("kipwise/agentic-knowledge-system");
215
+ });
216
+
217
+ it("treats a trailing slash as filtered empty segment", () => {
218
+ expect(prettyProjectName("kipwise/agentic-knowledge-system/"))
219
+ .toBe("kipwise/agentic-knowledge-system");
220
+ });
221
+ });
@@ -55,6 +55,23 @@ export function formatGap(ms: number): string {
55
55
  return remH ? `${d}d ${remH}h` : `${d}d`;
56
56
  }
57
57
 
58
+ const CLOCK_MONTHS = [
59
+ "Jan", "Feb", "Mar", "Apr", "May", "Jun",
60
+ "Jul", "Aug", "Sep", "Oct", "Nov", "Dec",
61
+ ];
62
+
63
+ /** Local "Jun 23, 9:30 AM" for an ISO timestamp. Fleetlens is local-only, so the
64
+ * server (CLI) and the browser share a timezone — local Date parts are
65
+ * hydration-stable here, unlike in a hosted app. */
66
+ export function formatResumeStamp(iso: string): string {
67
+ const d = new Date(iso);
68
+ if (Number.isNaN(d.getTime())) return "";
69
+ const ampm = d.getHours() >= 12 ? "PM" : "AM";
70
+ const h12 = d.getHours() % 12 || 12;
71
+ const min = String(d.getMinutes()).padStart(2, "0");
72
+ return `${CLOCK_MONTHS[d.getMonth()]} ${d.getDate()}, ${h12}:${min} ${ampm}`;
73
+ }
74
+
58
75
  export function formatDuration(ms?: number): string {
59
76
  if (ms === undefined) return "—";
60
77
  if (ms < 1000) return `${ms}ms`;
@@ -0,0 +1,56 @@
1
+ import { describe, it, expect } from "vitest";
2
+ import { utilizationTone, paceLabel, paceToneForCycle, UTILIZATION_THRESHOLDS } from "./utilization-tone";
3
+
4
+ describe("utilizationTone", () => {
5
+ it("flips at the 70 / 40 thresholds documented in the file", () => {
6
+ expect(utilizationTone(70)).toBe("success");
7
+ expect(utilizationTone(69.9)).toBe("warning");
8
+ expect(utilizationTone(40)).toBe("warning");
9
+ expect(utilizationTone(39.9)).toBe("danger");
10
+ expect(utilizationTone(0)).toBe("danger");
11
+ expect(utilizationTone(100)).toBe("success");
12
+ });
13
+ it("exposes the same thresholds as constants", () => {
14
+ expect(UTILIZATION_THRESHOLDS.good).toBe(70);
15
+ expect(UTILIZATION_THRESHOLDS.low).toBe(40);
16
+ });
17
+ });
18
+
19
+ describe("paceLabel", () => {
20
+ it("uses a ±15pp band around zero delta", () => {
21
+ expect(paceLabel(-15.1).tone).toBe("danger");
22
+ expect(paceLabel(-15).tone).toBe("success");
23
+ expect(paceLabel(0).tone).toBe("success");
24
+ expect(paceLabel(15).tone).toBe("success");
25
+ expect(paceLabel(15.1).tone).toBe("warning");
26
+ });
27
+ it("returns the right human label per band", () => {
28
+ expect(paceLabel(-20).label).toBe("may exhaust early");
29
+ expect(paceLabel(20).label).toBe("below pace");
30
+ expect(paceLabel(5).label).toBe("on pace");
31
+ });
32
+ });
33
+
34
+ describe("paceToneForCycle", () => {
35
+ const DAY = 24 * 60 * 60 * 1000;
36
+ it("at the start of a 7d cycle, low usage reads as on-pace (success)", () => {
37
+ const cycleEnd = 1_000_000_000;
38
+ const window = 7 * DAY;
39
+ const justStarted = cycleEnd - window + 5 * 60_000;
40
+ expect(paceToneForCycle(2, cycleEnd, window, justStarted)).toBe("success");
41
+ });
42
+ it("at the end of the cycle, very low usage reads as below-pace (warning)", () => {
43
+ const cycleEnd = 1_000_000_000;
44
+ const window = 7 * DAY;
45
+ const nearEnd = cycleEnd - DAY / 4;
46
+ // Ideal used ~96%, actual 50% → delta ~+46 → below pace.
47
+ expect(paceToneForCycle(50, cycleEnd, window, nearEnd)).toBe("warning");
48
+ });
49
+ it("burning faster than the ideal reads as danger (may exhaust early)", () => {
50
+ const cycleEnd = 1_000_000_000;
51
+ const window = 7 * DAY;
52
+ // Halfway through (ideal ~50%) but burned ~80% → delta -30 → danger.
53
+ const mid = cycleEnd - window / 2;
54
+ expect(paceToneForCycle(80, cycleEnd, window, mid)).toBe("danger");
55
+ });
56
+ });
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claude-lens/web",
3
- "version": "0.13.0",
3
+ "version": "0.13.2",
4
4
  "private": true,
5
5
  "description": "Local-only dashboard for Claude Code sessions. Reads ~/.claude/projects/*.jsonl and visualizes agent activity.",
6
6
  "license": "MIT",