fleetlens 0.4.0 → 0.6.0
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.
- package/app/apps/web/.next/BUILD_ID +1 -1
- package/app/apps/web/.next/app-path-routes-manifest.json +16 -7
- package/app/apps/web/.next/build-manifest.json +7 -7
- package/app/apps/web/.next/prerender-manifest.json +3 -3
- package/app/apps/web/.next/required-server-files.json +2 -1
- package/app/apps/web/.next/routes-manifest.json +86 -24
- package/app/apps/web/.next/server/app/_global-error/page/build-manifest.json +4 -4
- package/app/apps/web/.next/server/app/_global-error/page.js +1 -1
- package/app/apps/web/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/_global-error.html +1 -1
- package/app/apps/web/.next/server/app/_global-error.rsc +7 -7
- package/app/apps/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +2 -2
- package/app/apps/web/.next/server/app/_global-error.segments/_full.segment.rsc +7 -7
- package/app/apps/web/.next/server/app/_global-error.segments/_head.segment.rsc +3 -3
- package/app/apps/web/.next/server/app/_global-error.segments/_index.segment.rsc +3 -3
- package/app/apps/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/apps/web/.next/server/app/_not-found/page/build-manifest.json +4 -4
- package/app/apps/web/.next/server/app/_not-found/page.js +5 -4
- package/app/apps/web/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/api/digest/day/[date]/route/app-paths-manifest.json +3 -0
- package/app/apps/web/.next/server/app/api/digest/day/[date]/route.js +9 -0
- package/app/apps/web/.next/server/app/api/{insights/saved/[key] → digest/day/[date]}/route.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/api/digest/day/[date]/route_client-reference-manifest.js +3 -0
- package/app/apps/web/.next/server/app/api/digest/month/[yearMonth]/route/app-paths-manifest.json +3 -0
- package/app/apps/web/.next/server/app/api/digest/month/[yearMonth]/route.js +9 -0
- package/app/apps/web/.next/server/app/api/digest/month/[yearMonth]/route.js.nft.json +1 -0
- package/app/apps/web/.next/server/app/api/digest/month/[yearMonth]/route_client-reference-manifest.js +3 -0
- package/app/apps/web/.next/server/app/api/digest/month-index/route/app-paths-manifest.json +3 -0
- package/app/apps/web/.next/server/app/api/digest/month-index/route.js +7 -0
- package/app/apps/web/.next/server/app/api/{insights/months-index → digest/month-index}/route.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/api/{insights/pdf/[key] → digest/month-index}/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/api/digest/week/[startDate]/route/app-paths-manifest.json +3 -0
- package/app/apps/web/.next/server/app/api/digest/week/[startDate]/route.js +9 -0
- package/app/apps/web/.next/server/app/api/digest/week/[startDate]/route.js.nft.json +1 -0
- package/app/apps/web/.next/server/app/api/digest/week/[startDate]/route_client-reference-manifest.js +3 -0
- package/app/apps/web/.next/server/app/api/digest/week-index/route/app-paths-manifest.json +3 -0
- package/app/apps/web/.next/server/app/api/digest/week-index/route.js +7 -0
- package/app/apps/web/.next/server/app/api/{insights/weeks-index → digest/week-index}/route.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/api/digest/week-index/route_client-reference-manifest.js +3 -0
- package/app/apps/web/.next/server/app/api/jobs/route/app-paths-manifest.json +3 -0
- package/app/apps/web/.next/server/app/api/jobs/route.js +6 -0
- package/app/apps/web/.next/server/app/api/jobs/route.js.nft.json +1 -0
- package/app/apps/web/.next/server/app/api/jobs/route_client-reference-manifest.js +3 -0
- package/app/apps/web/.next/server/app/api/runs/[runId]/route/app-paths-manifest.json +3 -0
- package/app/apps/web/.next/server/app/api/runs/[runId]/route/build-manifest.json +9 -0
- package/app/apps/web/.next/server/app/api/runs/[runId]/route.js +6 -0
- package/app/apps/web/.next/server/app/api/{insights/saved → runs/[runId]}/route.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/api/runs/[runId]/route_client-reference-manifest.js +3 -0
- package/app/apps/web/.next/server/app/api/runs/[runId]/stream/route/app-paths-manifest.json +3 -0
- package/app/apps/web/.next/server/app/api/runs/[runId]/stream/route/build-manifest.json +9 -0
- package/app/apps/web/.next/server/app/api/runs/[runId]/stream/route/server-reference-manifest.json +4 -0
- package/app/apps/web/.next/server/app/api/runs/[runId]/stream/route.js +6 -0
- package/app/apps/web/.next/server/app/api/runs/[runId]/stream/route.js.map +5 -0
- package/app/apps/web/.next/server/app/api/{insights/pdf/[key] → runs/[runId]/stream}/route.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/api/runs/[runId]/stream/route_client-reference-manifest.js +3 -0
- package/app/apps/web/.next/server/app/api/runs/route/app-paths-manifest.json +3 -0
- package/app/apps/web/.next/server/app/api/runs/route/build-manifest.json +9 -0
- package/app/apps/web/.next/server/app/api/runs/route/server-reference-manifest.json +4 -0
- package/app/apps/web/.next/server/app/api/runs/route.js +6 -0
- package/app/apps/web/.next/server/app/api/runs/route.js.map +5 -0
- package/app/apps/web/.next/server/app/api/{insights → runs}/route.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/api/runs/route_client-reference-manifest.js +3 -0
- package/app/apps/web/.next/server/app/api/settings/route/app-paths-manifest.json +3 -0
- package/app/apps/web/.next/server/app/api/settings/route/build-manifest.json +9 -0
- package/app/apps/web/.next/server/app/api/settings/route/server-reference-manifest.json +4 -0
- package/app/apps/web/.next/server/app/api/settings/route.js +10 -0
- package/app/apps/web/.next/server/app/api/settings/route.js.map +5 -0
- package/app/apps/web/.next/server/app/api/settings/route.js.nft.json +1 -0
- package/app/apps/web/.next/server/app/api/{insights → settings}/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/day/[date]/page/app-paths-manifest.json +3 -0
- package/app/apps/web/.next/server/app/{insights/print/[key] → day/[date]}/page/build-manifest.json +4 -4
- package/app/apps/web/.next/server/app/day/[date]/page/server-reference-manifest.json +4 -0
- package/app/apps/web/.next/server/app/day/[date]/page.js +18 -0
- package/app/apps/web/.next/server/app/day/[date]/page.js.map +5 -0
- package/app/apps/web/.next/server/app/day/[date]/page.js.nft.json +1 -0
- package/app/apps/web/.next/server/app/day/[date]/page_client-reference-manifest.js +3 -0
- package/app/apps/web/.next/server/app/day/page/app-paths-manifest.json +3 -0
- package/app/apps/web/.next/server/app/day/page/build-manifest.json +17 -0
- package/app/apps/web/.next/server/app/day/page/next-font-manifest.json +6 -0
- package/app/apps/web/.next/server/app/day/page/react-loadable-manifest.json +1 -0
- package/app/apps/web/.next/server/app/day/page/server-reference-manifest.json +4 -0
- package/app/apps/web/.next/server/app/{insights/print/[key] → day}/page.js +11 -10
- package/app/apps/web/.next/server/app/day/page.js.map +5 -0
- package/app/apps/web/.next/server/app/day/page.js.nft.json +1 -0
- package/app/apps/web/.next/server/app/day/page_client-reference-manifest.js +3 -0
- package/app/apps/web/.next/server/app/digest/[date]/page/app-paths-manifest.json +3 -0
- package/app/apps/web/.next/server/app/digest/[date]/page/build-manifest.json +17 -0
- package/app/apps/web/.next/server/app/digest/[date]/page/next-font-manifest.json +6 -0
- package/app/apps/web/.next/server/app/digest/[date]/page/react-loadable-manifest.json +1 -0
- package/app/apps/web/.next/server/app/digest/[date]/page/server-reference-manifest.json +4 -0
- package/app/apps/web/.next/server/app/digest/[date]/page.js +17 -0
- package/app/apps/web/.next/server/app/digest/[date]/page.js.map +5 -0
- package/app/apps/web/.next/server/app/digest/[date]/page.js.nft.json +1 -0
- package/app/apps/web/.next/server/app/digest/[date]/page_client-reference-manifest.js +3 -0
- package/app/apps/web/.next/server/app/digest/page/app-paths-manifest.json +3 -0
- package/app/apps/web/.next/server/app/digest/page/build-manifest.json +17 -0
- package/app/apps/web/.next/server/app/digest/page/next-font-manifest.json +6 -0
- package/app/apps/web/.next/server/app/digest/page/react-loadable-manifest.json +1 -0
- package/app/apps/web/.next/server/app/digest/page/server-reference-manifest.json +4 -0
- package/app/apps/web/.next/server/app/digest/page.js +17 -0
- package/app/apps/web/.next/server/app/digest/page.js.map +5 -0
- package/app/apps/web/.next/server/app/digest/page.js.nft.json +1 -0
- package/app/apps/web/.next/server/app/digest/page_client-reference-manifest.js +3 -0
- package/app/apps/web/.next/server/app/insights/[key]/page/build-manifest.json +4 -4
- package/app/apps/web/.next/server/app/insights/[key]/page.js +7 -5
- package/app/apps/web/.next/server/app/insights/[key]/page.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/insights/[key]/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/insights/page/build-manifest.json +4 -4
- package/app/apps/web/.next/server/app/insights/page.js +7 -5
- package/app/apps/web/.next/server/app/insights/page.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/insights/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/page/build-manifest.json +4 -4
- package/app/apps/web/.next/server/app/page.js +7 -6
- package/app/apps/web/.next/server/app/page.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/parallelism/page/build-manifest.json +4 -4
- package/app/apps/web/.next/server/app/parallelism/page.js +6 -5
- package/app/apps/web/.next/server/app/parallelism/page.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/parallelism/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/projects/[slug]/page/build-manifest.json +4 -4
- package/app/apps/web/.next/server/app/projects/[slug]/page.js +6 -5
- package/app/apps/web/.next/server/app/projects/[slug]/page.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/projects/[slug]/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/projects/page/build-manifest.json +4 -4
- package/app/apps/web/.next/server/app/projects/page.js +5 -4
- package/app/apps/web/.next/server/app/projects/page.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/projects/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/runs/page/app-paths-manifest.json +3 -0
- package/app/apps/web/.next/server/app/runs/page/build-manifest.json +17 -0
- package/app/apps/web/.next/server/app/runs/page/next-font-manifest.json +6 -0
- package/app/apps/web/.next/server/app/runs/page/react-loadable-manifest.json +1 -0
- package/app/apps/web/.next/server/app/runs/page/server-reference-manifest.json +4 -0
- package/app/apps/web/.next/server/app/runs/page.js +17 -0
- package/app/apps/web/.next/server/app/runs/page.js.map +5 -0
- package/app/apps/web/.next/server/app/runs/page.js.nft.json +1 -0
- package/app/apps/web/.next/server/app/runs/page_client-reference-manifest.js +3 -0
- package/app/apps/web/.next/server/app/sessions/[id]/page/build-manifest.json +4 -4
- package/app/apps/web/.next/server/app/sessions/[id]/page.js +5 -4
- package/app/apps/web/.next/server/app/sessions/[id]/page.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/sessions/[id]/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/sessions/page/build-manifest.json +4 -4
- package/app/apps/web/.next/server/app/sessions/page.js +5 -4
- package/app/apps/web/.next/server/app/sessions/page.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app/settings/page/app-paths-manifest.json +3 -0
- package/app/apps/web/.next/server/app/settings/page/build-manifest.json +17 -0
- package/app/apps/web/.next/server/app/settings/page/next-font-manifest.json +6 -0
- package/app/apps/web/.next/server/app/settings/page/react-loadable-manifest.json +1 -0
- package/app/apps/web/.next/server/app/settings/page/server-reference-manifest.json +4 -0
- package/app/apps/web/.next/server/app/settings/page.js +18 -0
- package/app/apps/web/.next/server/app/settings/page.js.map +5 -0
- package/app/apps/web/.next/server/app/settings/page.js.nft.json +1 -0
- package/app/apps/web/.next/server/app/settings/page_client-reference-manifest.js +3 -0
- package/app/apps/web/.next/server/app/usage/page/build-manifest.json +4 -4
- package/app/apps/web/.next/server/app/usage/page.js +6 -5
- package/app/apps/web/.next/server/app/usage/page.js.nft.json +1 -1
- package/app/apps/web/.next/server/app/usage/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/app-paths-manifest.json +16 -7
- package/app/apps/web/.next/server/chunks/02dz_web__next-internal_server_app_api_digest_week_[startDate]_route_actions_0klqqsh.js +3 -0
- package/app/apps/web/.next/server/chunks/09og__next-internal_server_app_api_digest_month_[yearMonth]_route_actions_0i4ielu.js +3 -0
- package/app/apps/web/.next/server/chunks/[externals]__0o43ejh._.js +3 -0
- package/app/apps/web/.next/server/chunks/[root-of-the-server]__0-vgrh1._.js +3 -0
- package/app/apps/web/.next/server/chunks/[root-of-the-server]__00n3f9y._.js +3 -0
- package/app/apps/web/.next/server/chunks/[root-of-the-server]__02zukjw._.js +3 -0
- package/app/apps/web/.next/server/chunks/[root-of-the-server]__067~im1._.js +6 -0
- package/app/apps/web/.next/server/chunks/[root-of-the-server]__06b4cj-._.js +3 -0
- package/app/apps/web/.next/server/chunks/[root-of-the-server]__0_8zh-i._.js +9 -0
- package/app/apps/web/.next/server/chunks/[root-of-the-server]__0e8n_x4._.js +3 -0
- package/app/apps/web/.next/server/chunks/[root-of-the-server]__0ej_p3s._.js +9 -0
- package/app/apps/web/.next/server/chunks/[root-of-the-server]__0jprdks._.js +9 -0
- package/app/apps/web/.next/server/chunks/apps_web__next-internal_server_app_api_digest_day_[date]_route_actions_09sxie5.js +3 -0
- package/app/apps/web/.next/server/chunks/apps_web__next-internal_server_app_api_digest_month-index_route_actions_0wldpbu.js +3 -0
- package/app/apps/web/.next/server/chunks/apps_web__next-internal_server_app_api_digest_week-index_route_actions_12c2wj2.js +3 -0
- package/app/apps/web/.next/server/chunks/apps_web__next-internal_server_app_api_jobs_route_actions_08kx~8-.js +3 -0
- package/app/apps/web/.next/server/chunks/apps_web__next-internal_server_app_api_runs_[runId]_route_actions_0dfcghc.js +3 -0
- package/app/apps/web/.next/server/chunks/apps_web__next-internal_server_app_api_runs_[runId]_stream_route_actions_0.8e8-k.js +3 -0
- package/app/apps/web/.next/server/chunks/apps_web__next-internal_server_app_api_runs_route_actions_0xyx82f.js +3 -0
- package/app/apps/web/.next/server/chunks/apps_web__next-internal_server_app_api_settings_route_actions_0.xv7sx.js +3 -0
- package/app/apps/web/.next/server/chunks/node_modules_next_036my~r._.js +49 -0
- package/app/apps/web/.next/server/chunks/packages_0e7q9u_._.js +3 -0
- package/app/apps/web/.next/server/chunks/packages_0n6p2ot._.js +3 -0
- package/app/apps/web/.next/server/chunks/packages_entries_dist_node_0bckr7-.js +379 -0
- package/app/apps/web/.next/server/chunks/packages_parser_dist_fs_0bc7ptm.js +1 -1
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0-1_njm._.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0-94ji~._.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/{[root-of-the-server]__13xpdx0._.js → [root-of-the-server]__03uoeiw._.js} +2 -2
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0_6.inc._.js +1 -1
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0d~2~le._.js +8 -0
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0gio_ck._.js +1 -1
- package/app/apps/web/.next/server/chunks/ssr/{[root-of-the-server]__08.d5ia._.js → [root-of-the-server]__0jdyefm._.js} +10 -10
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0ln9jsw._.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/{[root-of-the-server]__0z45d0g._.js → [root-of-the-server]__0lz4a~g._.js} +2 -48
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0o1_g.~._.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0r4tks8._.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0rvzdnx._.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/{[root-of-the-server]__0euu8sa._.js → [root-of-the-server]__0u39afl._.js} +2 -2
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0u5d7de._.js +12 -0
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0w52fbc._.js +3 -3
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0wwa6gh._.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0xy1qim._.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0~_8vff._.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__10srpu0._.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__11v.eqw._.js +1 -1
- package/app/apps/web/.next/server/chunks/ssr/_02s1n-x._.js +8 -0
- package/app/apps/web/.next/server/chunks/ssr/_0fjbf--._.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/_0jw2sm7._.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/_0wj750k._.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/_0woap-3._.js +1 -1
- package/app/apps/web/.next/server/chunks/ssr/{_0xies90._.js → _0xu2pvc._.js} +2 -2
- package/app/apps/web/.next/server/chunks/ssr/apps_web__next-internal_server_app_day_[date]_page_actions_0u2kxb..js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/apps_web__next-internal_server_app_day_page_actions_1042maj.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/apps_web__next-internal_server_app_digest_[date]_page_actions_0olu967.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/apps_web__next-internal_server_app_digest_page_actions_0bl.eil.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/apps_web__next-internal_server_app_runs_page_actions_0485qy7.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/apps_web__next-internal_server_app_settings_page_actions_0f6epye.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/apps_web_app_day_[date]_day-view_tsx_0wjoe1u._.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/apps_web_app_settings_ai-features-form_tsx_01p699p._.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/apps_web_components_0b-4-4j._.js +1 -1
- package/app/apps/web/.next/server/chunks/ssr/apps_web_components_0ly1xes._.js +6 -0
- package/app/apps/web/.next/server/chunks/ssr/apps_web_components_0txtsv5._.js +16 -0
- package/app/apps/web/.next/server/chunks/ssr/apps_web_components_0xs658s._.js +10 -0
- package/app/apps/web/.next/server/chunks/ssr/apps_web_components_runs-live-board_tsx_0r6dkdq._.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/apps_web_components_usage-charts-dashboard_tsx_0bgr_uv._.js +1 -1
- package/app/apps/web/.next/server/chunks/ssr/apps_web_lib_usage-data_ts_0xtv99n._.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/node_modules_0i2xw~e._.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/node_modules_next_dist_0e1izl_._.js +1 -1
- package/app/apps/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0d3d4wn.js +4 -0
- package/app/apps/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0edz1ko.js +4 -0
- package/app/apps/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0eq.n-n.js +4 -0
- package/app/apps/web/.next/server/chunks/ssr/{node_modules_next_dist_esm_build_templates_app-page_0vz7_px.js → node_modules_next_dist_esm_build_templates_app-page_0hcvt-s.js} +3 -3
- package/app/apps/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0nd5zu0.js +4 -0
- package/app/apps/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_11j1qy0.js +4 -0
- package/app/apps/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_12n1lw_.js +1 -1
- package/app/apps/web/.next/server/chunks/ssr/packages_entries_dist_node_0_271yr.js +3 -0
- package/app/apps/web/.next/server/chunks/ssr/packages_parser_dist_0-jvt~a._.js +1 -1
- package/app/apps/web/.next/server/functions-config-manifest.json +11 -6
- package/app/apps/web/.next/server/middleware-build-manifest.js +7 -7
- package/app/apps/web/.next/server/pages/500.html +1 -1
- package/app/apps/web/.next/server/server-reference-manifest.js +1 -1
- package/app/apps/web/.next/server/server-reference-manifest.json +1 -1
- package/app/apps/web/.next/static/chunks/0-yc2_pjxwwuq.js +1 -0
- package/app/apps/web/.next/static/chunks/0257pdz1-imal.js +2 -0
- package/app/apps/web/.next/static/chunks/05m.oz3kmf1p7.js +1 -0
- package/app/apps/web/.next/static/chunks/{0pqt~8bl3ukh4.js → 073081qv4uyn8.js} +1 -1
- package/app/apps/web/.next/static/chunks/{0018dy-m-kusj.js → 07lbm-sdh9c2j.js} +1 -1
- package/app/apps/web/.next/static/chunks/0858bgw2i4vob.js +1 -0
- package/app/apps/web/.next/static/chunks/0_7303jr0sf0w.js +10 -0
- package/app/apps/web/.next/static/chunks/0byz8fqw.exef.js +1 -0
- package/app/apps/web/.next/static/chunks/0coa1800xqgfj.js +1 -0
- package/app/apps/web/.next/static/chunks/0fs3gxea5h0s3.css +1 -0
- package/app/apps/web/.next/static/chunks/0k1psab.bybh9.js +14 -0
- package/app/apps/web/.next/static/chunks/0k9pksi_i.odf.js +1 -0
- package/app/apps/web/.next/static/chunks/0m62vx92~0_0d.js +1 -0
- package/app/apps/web/.next/static/chunks/0mc8aa8z.0-5l.js +8 -0
- package/app/apps/web/.next/static/chunks/0mykrrv810ra-.js +31 -0
- package/app/apps/web/.next/static/chunks/0o9ayt8sknubd.js +1 -0
- package/app/apps/web/.next/static/chunks/0osdgl2.9cl1q.js +6 -0
- package/app/apps/web/.next/static/chunks/0xfu09fn_358k.js +4 -0
- package/app/apps/web/.next/static/chunks/171za22fv684..js +6 -0
- package/app/apps/web/.next/static/chunks/17u2ww8ya5dv1.js +6 -0
- package/app/apps/web/.next/static/chunks/{turbopack-169w-1._23ra_.js → turbopack-0_p36yduv.waj.js} +1 -1
- package/app/apps/web/app/api/digest/day/[date]/route.ts +152 -0
- package/app/apps/web/app/api/digest/month/[yearMonth]/route.ts +147 -0
- package/app/apps/web/app/api/digest/month-index/route.ts +103 -0
- package/app/apps/web/app/api/digest/week/[startDate]/route.ts +149 -0
- package/app/apps/web/app/api/{insights/weeks-index → digest/week-index}/route.ts +45 -33
- package/app/apps/web/app/api/jobs/route.ts +8 -0
- package/app/apps/web/app/api/runs/[runId]/route.ts +64 -0
- package/app/apps/web/app/api/runs/[runId]/stream/route.ts +154 -0
- package/app/apps/web/app/api/runs/route.ts +266 -0
- package/app/apps/web/app/api/settings/route.ts +35 -0
- package/app/apps/web/app/day/[date]/day-view.tsx +193 -0
- package/app/apps/web/app/day/[date]/page.tsx +175 -0
- package/app/apps/web/app/day/page.tsx +8 -0
- package/app/apps/web/app/digest/[date]/page.tsx +15 -0
- package/app/apps/web/app/digest/page.tsx +7 -0
- package/app/apps/web/app/insights/[key]/page.tsx +106 -48
- package/app/apps/web/app/insights/page.tsx +133 -3
- package/app/apps/web/app/layout.tsx +23 -3
- package/app/apps/web/app/page.tsx +33 -4
- package/app/apps/web/app/parallelism/gantt-chart.tsx +67 -1
- package/app/apps/web/app/parallelism/page.tsx +8 -278
- package/app/apps/web/app/projects/[slug]/page.tsx +153 -0
- package/app/apps/web/app/projects/page.tsx +49 -4
- package/app/apps/web/app/projects/projects-view.tsx +79 -68
- package/app/apps/web/app/runs/page.tsx +21 -0
- package/app/apps/web/app/sessions/[id]/page.tsx +12 -1
- package/app/apps/web/app/sessions/[id]/session-view.tsx +569 -21
- package/app/apps/web/app/sessions/page.tsx +19 -3
- package/app/apps/web/app/sessions/sessions-grid.tsx +172 -131
- package/app/apps/web/app/settings/ai-features-form.tsx +45 -0
- package/app/apps/web/app/settings/page.tsx +20 -0
- package/app/apps/web/app/usage/page.tsx +45 -3
- package/app/apps/web/components/auto-generate-yesterday.tsx +96 -0
- package/app/apps/web/components/backfill-drawer.tsx +309 -0
- package/app/apps/web/components/dashboard-view.tsx +4 -2
- package/app/apps/web/components/date-nav.tsx +385 -0
- package/app/apps/web/components/day-digest-view.tsx +180 -0
- package/app/apps/web/components/day-digest.tsx +489 -0
- package/app/apps/web/components/flag-chip.tsx +54 -0
- package/app/apps/web/components/goal-bar.tsx +63 -0
- package/app/apps/web/components/heatmap.tsx +78 -1
- package/app/apps/web/components/helpfulness-sparkline.tsx +82 -0
- package/app/apps/web/components/insights-history.tsx +211 -0
- package/app/apps/web/components/insights-top-bar.tsx +216 -0
- package/app/apps/web/components/job-queue-widget.tsx +274 -0
- package/app/apps/web/components/live-sessions-widget.tsx +38 -3
- package/app/apps/web/components/month-digest-view.tsx +138 -0
- package/app/apps/web/components/month-digest.tsx +216 -0
- package/app/apps/web/components/outcome-mix-row.tsx +37 -0
- package/app/apps/web/components/outcome-pill.tsx +101 -0
- package/app/apps/web/components/previous-cycles-trend.tsx +155 -0
- package/app/apps/web/components/recent-days-panel.tsx +83 -0
- package/app/apps/web/components/runs-live-board.tsx +513 -0
- package/app/apps/web/components/sidebar.tsx +38 -4
- package/app/apps/web/components/usage-chart-range.tsx +58 -6
- package/app/apps/web/components/usage-chart.tsx +94 -7
- package/app/apps/web/components/usage-charts-dashboard.tsx +20 -1
- package/app/apps/web/components/week-digest-view.tsx +226 -0
- package/app/apps/web/components/week-digest.tsx +2128 -0
- package/app/apps/web/components/yesterday-hero.tsx +110 -0
- package/app/apps/web/lib/auto-week-fire.ts +37 -0
- package/app/apps/web/lib/calibration-data.ts +171 -0
- package/app/apps/web/lib/entries-index.ts +174 -0
- package/app/apps/web/lib/entries.ts +72 -0
- package/app/apps/web/lib/inflight-coalesce.test.ts +43 -0
- package/app/apps/web/lib/inflight-coalesce.ts +19 -0
- package/app/apps/web/lib/jobs.ts +170 -0
- package/app/apps/web/lib/usage-data.ts +37 -0
- package/app/apps/web/lib/validate-settings.test.ts +25 -0
- package/app/apps/web/lib/validate-settings.ts +9 -0
- package/app/apps/web/next.config.ts +1 -1
- package/app/apps/web/package.json +4 -2
- package/app/apps/web/server.js +1 -1
- package/app/apps/web/tsconfig.tsbuildinfo +1 -1
- package/app/apps/web/vitest.config.ts +9 -0
- package/dist/daemon-worker.js +1758 -713
- package/dist/index.js +11308 -1888
- package/package.json +4 -1
- package/app/apps/web/.next/server/app/api/insights/months-index/route/app-paths-manifest.json +0 -3
- package/app/apps/web/.next/server/app/api/insights/months-index/route.js +0 -7
- package/app/apps/web/.next/server/app/api/insights/months-index/route_client-reference-manifest.js +0 -3
- package/app/apps/web/.next/server/app/api/insights/pdf/[key]/route/app-paths-manifest.json +0 -3
- package/app/apps/web/.next/server/app/api/insights/pdf/[key]/route.js +0 -6
- package/app/apps/web/.next/server/app/api/insights/route/app-paths-manifest.json +0 -3
- package/app/apps/web/.next/server/app/api/insights/route.js +0 -8
- package/app/apps/web/.next/server/app/api/insights/saved/[key]/route/app-paths-manifest.json +0 -3
- package/app/apps/web/.next/server/app/api/insights/saved/[key]/route.js +0 -6
- package/app/apps/web/.next/server/app/api/insights/saved/[key]/route_client-reference-manifest.js +0 -3
- package/app/apps/web/.next/server/app/api/insights/saved/route/app-paths-manifest.json +0 -3
- package/app/apps/web/.next/server/app/api/insights/saved/route.js +0 -6
- package/app/apps/web/.next/server/app/api/insights/saved/route_client-reference-manifest.js +0 -3
- package/app/apps/web/.next/server/app/api/insights/weeks-index/route/app-paths-manifest.json +0 -3
- package/app/apps/web/.next/server/app/api/insights/weeks-index/route.js +0 -7
- package/app/apps/web/.next/server/app/api/insights/weeks-index/route_client-reference-manifest.js +0 -3
- package/app/apps/web/.next/server/app/insights/print/[key]/page/app-paths-manifest.json +0 -3
- package/app/apps/web/.next/server/app/insights/print/[key]/page.js.nft.json +0 -1
- package/app/apps/web/.next/server/app/insights/print/[key]/page_client-reference-manifest.js +0 -3
- package/app/apps/web/.next/server/chunks/02dz_web__next-internal_server_app_api_insights_months-index_route_actions_0~h~zci.js +0 -3
- package/app/apps/web/.next/server/chunks/02dz_web__next-internal_server_app_api_insights_saved_[key]_route_actions_0a5j9yw.js +0 -3
- package/app/apps/web/.next/server/chunks/02dz_web__next-internal_server_app_api_insights_weeks-index_route_actions_0hh-1c7.js +0 -3
- package/app/apps/web/.next/server/chunks/[root-of-the-server]__0.hmj0z._.js +0 -3
- package/app/apps/web/.next/server/chunks/[root-of-the-server]__01h_g-p._.js +0 -3
- package/app/apps/web/.next/server/chunks/[root-of-the-server]__0nh-z10._.js +0 -3
- package/app/apps/web/.next/server/chunks/[root-of-the-server]__0ri7q~r._.js +0 -3
- package/app/apps/web/.next/server/chunks/[root-of-the-server]__0rr1~~x._.js +0 -3
- package/app/apps/web/.next/server/chunks/[root-of-the-server]__0s0gv.0._.js +0 -3
- package/app/apps/web/.next/server/chunks/apps_web__next-internal_server_app_api_insights_pdf_[key]_route_actions_0lu-lnx.js +0 -3
- package/app/apps/web/.next/server/chunks/apps_web__next-internal_server_app_api_insights_route_actions_0h8l5lz.js +0 -3
- package/app/apps/web/.next/server/chunks/apps_web__next-internal_server_app_api_insights_saved_route_actions_13rlblw.js +0 -3
- package/app/apps/web/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_00t2xj6.js +0 -68
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0.tsxpj._.js +0 -3
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__00z7zlm._.js +0 -3
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__08pen0k._.js +0 -3
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0b323~k._.js +0 -8
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0gx-4qa._.js +0 -3
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0wv27wt._.js +0 -3
- package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__13itnvx._.js +0 -3
- package/app/apps/web/.next/server/chunks/ssr/_09n75_5._.js +0 -8
- package/app/apps/web/.next/server/chunks/ssr/_0r~__0v._.js +0 -12
- package/app/apps/web/.next/server/chunks/ssr/apps_web__next-internal_server_app_insights_print_[key]_page_actions_0a853fw.js +0 -3
- package/app/apps/web/.next/server/chunks/ssr/apps_web_app_parallelism_08vub.0._.js +0 -3
- package/app/apps/web/.next/server/chunks/ssr/apps_web_components_06j3c.0._.js +0 -8
- package/app/apps/web/.next/server/chunks/ssr/apps_web_components_0bbo_pd._.js +0 -8
- package/app/apps/web/.next/server/chunks/ssr/apps_web_components_insight-report_tsx_13q2a-c._.js +0 -12
- package/app/apps/web/.next/server/chunks/ssr/apps_web_components_insights-view_tsx_11730ta._.js +0 -6
- package/app/apps/web/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_0nqz8dw._.js +0 -3
- package/app/apps/web/.next/server/chunks/ssr/node_modules_next_dist_0t-hj0x._.js +0 -3
- package/app/apps/web/.next/server/chunks/ssr/packages_parser_dist_analytics_0k4dgst.js +0 -3
- package/app/apps/web/.next/static/chunks/028_pmk40b69_.js +0 -6
- package/app/apps/web/.next/static/chunks/03.mv4y4.w-vb.js +0 -6
- package/app/apps/web/.next/static/chunks/03_7xtpi9sv4g.js +0 -4
- package/app/apps/web/.next/static/chunks/03g5dw5eskotd.js +0 -6
- package/app/apps/web/.next/static/chunks/063oimt30jeo9.js +0 -10
- package/app/apps/web/.next/static/chunks/08c1pcrocqq5s.js +0 -6
- package/app/apps/web/.next/static/chunks/0e-wrhqh4h3r5.js +0 -2
- package/app/apps/web/.next/static/chunks/0fc6dk2qtokwh.js +0 -1
- package/app/apps/web/.next/static/chunks/0i7er7_bfab36.js +0 -10
- package/app/apps/web/.next/static/chunks/0ipytyi01h0ta.js +0 -1
- package/app/apps/web/.next/static/chunks/0lsznd4_avzhv.js +0 -6
- package/app/apps/web/.next/static/chunks/0lty3v_i9mde7.js +0 -1
- package/app/apps/web/.next/static/chunks/0vekjjj4pidlz.css +0 -1
- package/app/apps/web/.next/static/chunks/137uw2-qbro07.js +0 -31
- package/app/apps/web/app/api/insights/months-index/route.ts +0 -80
- package/app/apps/web/app/api/insights/pdf/[key]/route.ts +0 -45
- package/app/apps/web/app/api/insights/route.ts +0 -508
- package/app/apps/web/app/api/insights/saved/[key]/route.ts +0 -11
- package/app/apps/web/app/api/insights/saved/route.ts +0 -9
- package/app/apps/web/app/insights/print/[key]/page.tsx +0 -73
- package/app/apps/web/components/insight-report.tsx +0 -1031
- package/app/apps/web/components/insights-view.tsx +0 -647
- package/app/apps/web/lib/ai/insights-prompt.ts +0 -71
- package/app/apps/web/lib/ai/saved-reports.ts +0 -83
- /package/app/apps/web/.next/server/app/api/{insights/months-index → digest/day/[date]}/route/build-manifest.json +0 -0
- /package/app/apps/web/.next/server/app/api/{insights/months-index → digest/day/[date]}/route/server-reference-manifest.json +0 -0
- /package/app/apps/web/.next/server/app/api/{insights/months-index → digest/day/[date]}/route.js.map +0 -0
- /package/app/apps/web/.next/server/app/api/{insights → digest/month/[yearMonth]}/route/build-manifest.json +0 -0
- /package/app/apps/web/.next/server/app/api/{insights → digest/month/[yearMonth]}/route/server-reference-manifest.json +0 -0
- /package/app/apps/web/.next/server/app/api/{insights → digest/month/[yearMonth]}/route.js.map +0 -0
- /package/app/apps/web/.next/server/app/api/{insights/pdf/[key] → digest/month-index}/route/build-manifest.json +0 -0
- /package/app/apps/web/.next/server/app/api/{insights/pdf/[key] → digest/month-index}/route/server-reference-manifest.json +0 -0
- /package/app/apps/web/.next/server/app/api/{insights/pdf/[key] → digest/month-index}/route.js.map +0 -0
- /package/app/apps/web/.next/server/app/api/{insights/saved → digest/week/[startDate]}/route/build-manifest.json +0 -0
- /package/app/apps/web/.next/server/app/api/{insights/saved → digest/week/[startDate]}/route/server-reference-manifest.json +0 -0
- /package/app/apps/web/.next/server/app/api/{insights/saved → digest/week/[startDate]}/route.js.map +0 -0
- /package/app/apps/web/.next/server/app/api/{insights/saved/[key] → digest/week-index}/route/build-manifest.json +0 -0
- /package/app/apps/web/.next/server/app/api/{insights/saved/[key] → digest/week-index}/route/server-reference-manifest.json +0 -0
- /package/app/apps/web/.next/server/app/api/{insights/saved/[key] → digest/week-index}/route.js.map +0 -0
- /package/app/apps/web/.next/server/app/api/{insights/weeks-index → jobs}/route/build-manifest.json +0 -0
- /package/app/apps/web/.next/server/app/api/{insights/weeks-index → jobs}/route/server-reference-manifest.json +0 -0
- /package/app/apps/web/.next/server/app/api/{insights/weeks-index → jobs}/route.js.map +0 -0
- /package/app/apps/web/.next/server/app/{insights/print/[key]/page → api/runs/[runId]/route}/server-reference-manifest.json +0 -0
- /package/app/apps/web/.next/server/app/{insights/print/[key]/page.js.map → api/runs/[runId]/route.js.map} +0 -0
- /package/app/apps/web/.next/server/app/{insights/print/[key] → day/[date]}/page/next-font-manifest.json +0 -0
- /package/app/apps/web/.next/server/app/{insights/print/[key] → day/[date]}/page/react-loadable-manifest.json +0 -0
- /package/app/apps/web/.next/static/{G_4ofKI9v9ARC_lb9JILZ → 8tTWPvUhtatZEoocIhamh}/_buildManifest.js +0 -0
- /package/app/apps/web/.next/static/{G_4ofKI9v9ARC_lb9JILZ → 8tTWPvUhtatZEoocIhamh}/_clientMiddlewareManifest.js +0 -0
- /package/app/apps/web/.next/static/{G_4ofKI9v9ARC_lb9JILZ → 8tTWPvUhtatZEoocIhamh}/_ssgManifest.js +0 -0
package/app/apps/web/.next/server/chunks/ssr/apps_web_app_day_[date]_day-view_tsx_0wjoe1u._.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[94561,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(5784),e=a.i(50522);let f=(0,a.i(70106).default)("Layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);var g=a.i(44220),h=a.i(68381);let i={"spec-review-loop":"Spec-review loop","chunk-implementation":"Chunk implementation","research-then-build":"Research-then-build","reviewer-triad":"Reviewer triad","background-coordinated":"Background-coordinated","solo-continuation":"Solo continuation","solo-design":"Solo design","solo-build":"Solo build",mixed:"Mixed"},j={teammate:"<teammate-message>","task-notification":"<task-notification>","local-command-caveat":"<local-command-caveat>","image-attached":"[Image #N]","slash-command":"/command","handoff-prose":"Handoff prose"};function k({digest:a,entries:f,aiEnabled:i,actions:j}){let[p,q]=(0,c.useState)(!1),s=new Date(`${a.key}T12:00:00`).toLocaleDateString("en-US",{weekday:"long",month:"short",day:"numeric",year:"numeric"}),t=a.agent_min/60,u=t>=1?`${t.toFixed(1)}h`:`${Math.round(a.agent_min)}m`,v=[...f].sort((a,b)=>Date.parse(b.start_iso)-Date.parse(a.start_iso));return(0,b.jsxs)("div",{style:{maxWidth:980,margin:"0 auto",padding:"24px 40px"},children:[(0,b.jsxs)("header",{style:{marginBottom:28},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:8,fontSize:12,color:"var(--af-text-tertiary)",fontWeight:500,flexWrap:"wrap"},children:[(0,b.jsx)("span",{children:s}),(0,b.jsx)(g.OutcomePill,{outcome:a.outcome_day,size:"lg"}),(0,b.jsx)("span",{style:{color:"var(--af-text-tertiary)"},children:"·"}),(0,b.jsxs)("span",{style:{fontFamily:"var(--font-mono)",color:"var(--af-text-secondary)"},children:[u," agent time · ",a.projects.length," project",1===a.projects.length?"":"s"," · ",a.shipped.length," PR",1===a.shipped.length?"":"s"," shipped",a.concurrency_peak>1&&` \xb7 peak concurrency \xd7${a.concurrency_peak}`]}),j&&(0,b.jsx)("div",{style:{marginLeft:"auto",display:"inline-flex",alignItems:"center",gap:8},children:j})]}),a.headline?(0,b.jsx)("h1",{style:{fontSize:26,fontWeight:700,lineHeight:1.3,letterSpacing:"-0.02em",margin:"0 0 8px",maxWidth:820,color:"var(--af-text)"},children:a.headline}):(0,b.jsx)("h1",{style:{fontSize:20,color:"var(--af-text-secondary)",margin:"0 0 14px"},children:i?"No narrative yet — click Regenerate.":`Worked ${u} across ${a.projects.length} project${1===a.projects.length?"":"s"}.`}),a.day_signature&&(0,b.jsx)("p",{style:{margin:"0 0 14px",fontSize:14,fontStyle:"italic",color:"var(--af-text-secondary)",maxWidth:820,lineHeight:1.5},children:a.day_signature})]}),!i&&(0,b.jsxs)("div",{style:{padding:14,marginBottom:24,background:"var(--af-accent-subtle)",borderRadius:8,fontSize:13,color:"var(--af-text)"},children:["Enable AI features in ",(0,b.jsx)("a",{href:"/settings",style:{color:"var(--af-accent)"},children:"Settings"})," to see daily narratives."]}),a.day_signals&&(0,b.jsx)(o,{signals:a.day_signals}),(a.what_went_well||a.what_hit_friction)&&(0,b.jsxs)("section",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:24,marginBottom:28},children:[(0,b.jsx)(m,{glyph:"✓",color:"#48bb78",text:a.what_went_well,emptyLabel:"(smooth)"}),(0,b.jsx)(m,{glyph:"⚠",color:"#ed8936",text:a.what_hit_friction,emptyLabel:"(no friction)"})]}),a.narrative&&(0,b.jsx)("section",{style:{marginBottom:28,padding:"4px 0",fontSize:15,lineHeight:1.6,color:"var(--af-text)",maxWidth:760},children:a.narrative}),(0,b.jsx)("div",{style:{marginBottom:18},children:(0,b.jsxs)("button",{type:"button",onClick:()=>q(a=>!a),style:{display:"inline-flex",alignItems:"center",gap:6,padding:"5px 10px",background:"transparent",border:"1px solid var(--af-border-subtle)",borderRadius:6,fontSize:11,color:"var(--af-text-secondary)",cursor:"pointer"},children:[p?(0,b.jsx)(d.ChevronDown,{size:12}):(0,b.jsx)(e.ChevronRight,{size:12}),p?"Hide details":"Show more details"]})}),p&&(0,b.jsxs)(b.Fragment,{children:[a.suggestion&&(0,b.jsxs)("section",{style:{borderLeft:"3px solid var(--af-accent)",paddingLeft:16,marginBottom:32},children:[(0,b.jsx)("div",{style:{fontSize:11,color:"var(--af-text-tertiary)",textTransform:"uppercase",letterSpacing:"0.06em",fontWeight:600,marginBottom:6},children:"Tomorrow"}),(0,b.jsx)("div",{style:{fontSize:15,fontWeight:600,marginBottom:4,color:"var(--af-text)"},children:a.suggestion.headline}),(0,b.jsx)("div",{style:{fontSize:13,color:"var(--af-text-secondary)",lineHeight:1.5,maxWidth:760},children:a.suggestion.body})]}),a.projects.length>0&&(0,b.jsxs)("section",{style:{marginBottom:32},children:[(0,b.jsx)(l,{children:"Work breakdown"}),(0,b.jsx)("div",{style:{display:"grid",gap:6},children:a.projects.map(c=>{let d=a.shipped.filter(a=>a.project===c.display_name);return(0,b.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"140px 1fr 56px 72px",gap:12,alignItems:"center",padding:"6px 0",borderBottom:"1px solid var(--af-border-subtle)",fontSize:13},children:[(0,b.jsx)("span",{title:c.name,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:c.display_name}),(0,b.jsx)(n,{pct:c.share_pct}),(0,b.jsxs)("span",{style:{fontFamily:"var(--font-mono)",fontSize:11,color:"var(--af-text-tertiary)",textAlign:"right"},children:[c.share_pct.toFixed(0),"%"]}),(0,b.jsx)("span",{style:{fontSize:11,color:"var(--af-text-tertiary)",textAlign:"right"},children:d.length>0?`${d.length} PR${1===d.length?"":"s"}`:"—"})]},c.name)})})]}),a.shipped.length>0&&(0,b.jsxs)("section",{style:{marginBottom:32},children:[(0,b.jsx)(l,{children:"Shipped"}),(0,b.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none"},children:a.shipped.map((a,c)=>(0,b.jsxs)("li",{style:{padding:"6px 0",fontSize:13,borderBottom:"1px solid var(--af-border-subtle)",display:"flex",gap:10,alignItems:"baseline"},children:[(0,b.jsx)("span",{style:{color:"#48bb78",fontSize:12},children:"✓"}),(0,b.jsx)("span",{style:{flex:1},children:a.title}),(0,b.jsx)("span",{style:{fontSize:11,color:"var(--af-text-tertiary)"},children:a.project})]},c))})]}),v.length>0&&(0,b.jsxs)("section",{style:{marginBottom:32},children:[(0,b.jsxs)(l,{children:["Sessions · ",v.length]}),(0,b.jsx)("div",{style:{display:"flex",flexDirection:"column"},children:v.map(a=>(0,b.jsx)(r,{entry:a},a.session_id))})]}),a.top_goal_categories.length>0&&(0,b.jsxs)("section",{style:{marginTop:40,paddingTop:20,borderTop:"1px solid var(--af-border-subtle)"},children:[(0,b.jsx)("div",{style:{fontSize:11,color:"var(--af-text-tertiary)",marginBottom:6},children:"Goal mix"}),(0,b.jsx)(h.GoalBar,{goals:a.top_goal_categories,total:a.agent_min})]})]})]})}function l({children:a}){return(0,b.jsx)("div",{style:{fontSize:10,color:"var(--af-text-tertiary)",textTransform:"uppercase",letterSpacing:"0.08em",fontWeight:600,marginBottom:10},children:a})}function m({glyph:a,color:c,text:d,emptyLabel:e}){return(0,b.jsxs)("div",{style:{fontSize:14,lineHeight:1.55,display:"flex",gap:8,alignItems:"flex-start"},children:[(0,b.jsx)("span",{style:{fontSize:16,color:c,lineHeight:1.4,flexShrink:0},children:a}),d?(0,b.jsx)("span",{style:{color:"var(--af-text)"},children:d}):(0,b.jsx)("span",{style:{color:"var(--af-text-tertiary)",fontStyle:"italic"},children:e})]})}function n({pct:a}){return(0,b.jsx)("div",{style:{height:6,background:"var(--af-border-subtle)",borderRadius:99,overflow:"hidden"},children:(0,b.jsx)("div",{style:{width:`${Math.min(100,Math.max(0,a))}%`,height:"100%",background:"var(--af-accent)",transition:"width 0.2s"}})})}function o({signals:a}){let c=null!==a.dominant_shape,d=Object.keys(a.shape_distribution).length>0,e=a.user_authored_subagents_used.length>0||Object.keys(a.shape_distribution).length>0,f=a.skills_loaded.filter(a=>"stock"===a.origin),g=a.skills_loaded.filter(a=>"user"===a.origin),h=a.prompt_frames.filter(a=>"claude-feature"===a.origin),k=a.prompt_frames.filter(a=>"personal-habit"===a.origin),l=a.comm_style,m=l.verbosity_distribution.short+l.verbosity_distribution.medium+l.verbosity_distribution.long+l.verbosity_distribution.very_long,n=l.steering.interrupts+l.steering.frustrated+l.steering.dissatisfied;return c||d||0!==f.length||0!==g.length||0!==a.user_authored_subagents_used.length||0!==h.length||0!==k.length||0!==m||0!==l.external_refs.length||0!==n||0!==a.brainstorm_warmup_session_count||0!==a.todo_ops_total||a.plan_mode_used?(0,b.jsxs)("section",{style:{marginBottom:28,padding:"14px 16px",borderRadius:8,background:"var(--af-surface)",border:"1px solid var(--af-border-subtle)"},children:[(0,b.jsx)("div",{style:{fontSize:10,color:"var(--af-text-tertiary)",textTransform:"uppercase",letterSpacing:"0.08em",fontWeight:600,marginBottom:10},children:"How today worked"}),c&&(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,flexWrap:"wrap",marginBottom:8},children:[(0,b.jsx)("span",{style:{display:"inline-flex",alignItems:"center",padding:"3px 10px",borderRadius:999,fontSize:12,fontWeight:600,background:"var(--af-accent-subtle)",color:"var(--af-accent)"},children:i[a.dominant_shape]??a.dominant_shape}),d&&(0,b.jsx)("span",{style:{fontSize:12,color:"var(--af-text-secondary)",fontFamily:"var(--font-mono)"},children:Object.entries(a.shape_distribution).sort((a,b)=>b[1]-a[1]).map(([a,b])=>`${b} ${a}`).join(" · ")})]}),e&&a.user_authored_subagents_used.length>0&&(0,b.jsx)(p,{label:"Your subagents",children:a.user_authored_subagents_used.slice(0,4).map(a=>(0,b.jsxs)(q,{title:a.sample_prompt_preview,children:[a.type,a.count>1?` \xd7${a.count}`:""]},a.type))}),(f.length>0||g.length>0)&&(0,b.jsxs)(p,{label:"Skills loaded",children:[g.slice(0,4).map(a=>(0,b.jsxs)(q,{tone:"user",children:[a.skill,a.count>1?` \xd7${a.count}`:""]},a.skill)),f.slice(0,4).map(a=>(0,b.jsxs)(q,{tone:"stock",children:[a.skill,a.count>1?` \xd7${a.count}`:""]},a.skill))]}),(h.length>0||k.length>0)&&(0,b.jsxs)(p,{label:"Prompt frames",children:[k.map(a=>(0,b.jsxs)(q,{tone:"user",children:[j[a.frame]??a.frame,a.count>1?` \xd7${a.count}`:""]},a.frame)),h.map(a=>(0,b.jsxs)(q,{tone:"stock",children:[j[a.frame]??a.frame,a.count>1?` \xd7${a.count}`:""]},a.frame))]}),(m>0||l.external_refs.length>0||n>0)&&(0,b.jsxs)(p,{label:"Comm style",children:[m>0&&(0,b.jsx)("span",{style:{fontSize:12,color:"var(--af-text-secondary)",fontFamily:"var(--font-mono)"},children:[l.verbosity_distribution.short&&`${l.verbosity_distribution.short} short`,l.verbosity_distribution.medium&&`${l.verbosity_distribution.medium} med`,l.verbosity_distribution.long&&`${l.verbosity_distribution.long} long`,l.verbosity_distribution.very_long&&`${l.verbosity_distribution.very_long} v.long`].filter(Boolean).join(" · ")}),l.external_refs.length>0&&(0,b.jsxs)(q,{children:[l.external_refs.length," external ref",1===l.external_refs.length?"":"s"]}),l.steering.interrupts>0&&(0,b.jsxs)(q,{children:[l.steering.interrupts," interrupts"]}),l.steering.sessions_with_mid_run_redirect>0&&(0,b.jsxs)(q,{children:[l.steering.sessions_with_mid_run_redirect," mid-run redirect",1===l.steering.sessions_with_mid_run_redirect?"":"s"]})]}),(a.brainstorm_warmup_session_count>0||a.todo_ops_total>0||a.plan_mode_used)&&(0,b.jsxs)(p,{label:"Discipline",children:[a.brainstorm_warmup_session_count>0&&(0,b.jsxs)(q,{children:["brainstorm warmup ×",a.brainstorm_warmup_session_count]}),a.todo_ops_total>0&&(0,b.jsxs)(q,{children:[a.todo_ops_total," TodoWrite ops"]}),a.plan_mode_used&&(0,b.jsx)(q,{tone:"user",children:"Plan Mode used"})]})]}):null}function p({label:a,children:c}){return(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,flexWrap:"wrap",padding:"4px 0",fontSize:12},children:[(0,b.jsx)("span",{style:{minWidth:100,color:"var(--af-text-tertiary)",fontWeight:500,fontSize:11,textTransform:"uppercase",letterSpacing:"0.04em"},children:a}),(0,b.jsx)("div",{style:{display:"flex",gap:6,flexWrap:"wrap",flex:1},children:c})]})}function q({children:a,tone:c,title:d}){return(0,b.jsx)("span",{title:d,style:{display:"inline-flex",alignItems:"center",padding:"2px 8px",borderRadius:999,fontSize:11,fontFamily:"var(--font-mono)",background:"user"===c?"var(--af-accent-subtle)":"var(--af-border-subtle)",color:"user"===c?"var(--af-accent)":"var(--af-text-secondary)",whiteSpace:"nowrap",maxWidth:280,overflow:"hidden",textOverflow:"ellipsis"},children:a})}function r({entry:a}){let c=new Date(a.start_iso).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1}),d=Math.round(a.numbers.active_min),e=a.project.split("/").filter(Boolean).slice(-1)[0]??a.project,f=a.enrichment.outcome,h=a.enrichment.brief_summary;return(0,b.jsxs)("a",{href:`/sessions/${a.session_id}`,style:{display:"block",padding:"8px 0",borderBottom:"1px solid var(--af-border-subtle)",fontSize:13,color:"var(--af-text)",textDecoration:"none"},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:10},children:[(0,b.jsx)("span",{style:{fontFamily:"var(--font-mono)",fontSize:11,color:"var(--af-text-tertiary)",width:48},children:c}),(0,b.jsx)("span",{style:{fontSize:11,color:"var(--af-text-tertiary)",minWidth:110,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e}),(0,b.jsxs)("span",{style:{fontSize:11,fontFamily:"var(--font-mono)",color:"var(--af-text-tertiary)",width:40,textAlign:"right"},children:[d,"m"]}),f&&(0,b.jsx)(g.OutcomePill,{outcome:f,size:"sm",label:"text"})]}),h&&(0,b.jsx)("div",{style:{marginTop:3,marginLeft:58,fontSize:13,color:"var(--af-text-secondary)",lineHeight:1.45,maxWidth:820},children:h})]})}function s({initial:a,entries:d,date:e,aiEnabled:f}){let[g,h]=(0,c.useState)(a),[i,j]=(0,c.useState)("idle"),[l,m]=(0,c.useState)(""),n=(0,c.useCallback)(async(a=!1)=>{j("streaming"),m("Starting...");let b=`/api/digest/day/${e}${a?"?force=1":""}`,c=await fetch(b,{method:"POST"});if(!c.ok||!c.body){j("error"),m(`Error ${c.status}`);return}let d=c.body.getReader(),f=new TextDecoder,g="";for(;;){let{done:a,value:b}=await d.read();if(a)break;let c=(g+=f.decode(b,{stream:!0})).split("\n\n");for(let a of(g=c.pop()??"",c)){let b=a.split("\n").find(a=>a.startsWith("data: "));if(b)try{let a=JSON.parse(b.slice(6));if("status"===a.type)m(a.text);else if("entry"===a.type)m(`Enriching ${a.index}/${a.total}${a.cost_usd?` \xb7 $${a.cost_usd.toFixed(4)}`:""}...`);else if("progress"===a.type){let b=Math.round(a.elapsed_ms/1e3),c=(a.bytes/1024).toFixed(1);m(`Claude composing… ${a.bytes.toLocaleString()} chars (${c} KB \xb7 ${b}s)`)}else if("digest"===a.type)h(a.digest),m("Rendering...");else if("saved"===a.type)m("Saved.");else if("error"===a.type){j("error"),m(a.message);return}}catch{}}}j("done"),m("")},[e]),o="streaming"===i,p=!!g?.headline,q=(0,c.useMemo)(()=>0!==d.length&&d.every(a=>"skipped_trivial"===a.enrichment.status),[d]),r=0===d.length,t=null;return(r||q||(t=r||q||p?(0,b.jsxs)("span",{style:{fontSize:10,color:"var(--af-text-tertiary)",display:"inline-flex",alignItems:"center",gap:6},children:["✓ Up to date",(0,b.jsx)("button",{onClick:()=>n(!0),disabled:o,title:"Re-roll the narrative without re-enriching capsules",style:{padding:"2px 7px",background:"transparent",border:"1px solid var(--af-border-subtle)",borderRadius:4,fontSize:10,color:"var(--af-text-secondary)",cursor:o?"default":"pointer",opacity:o?.6:1},children:o?"...":"Re-roll"})]}):(0,b.jsx)("button",{onClick:()=>n(!1),disabled:o,style:{padding:"4px 10px",background:"var(--af-accent)",color:"white",border:"none",borderRadius:5,cursor:o?"default":"pointer",fontSize:11,fontWeight:600,opacity:o?.6:1},children:o?"Generating...":g?"Generate (catch up)":"Generate digest"}),l&&(t=(0,b.jsxs)(b.Fragment,{children:[t,(0,b.jsx)("span",{style:{fontSize:10,color:"var(--af-text-tertiary)"},children:l})]}))),g)?(0,b.jsx)(k,{digest:g,entries:d,aiEnabled:f,actions:t}):(0,b.jsxs)(b.Fragment,{children:[t&&(0,b.jsx)("div",{style:{display:"flex",gap:10,padding:"14px 40px 0",alignItems:"center",flexWrap:"wrap"},children:t}),r?(0,b.jsx)("div",{style:{padding:28,textAlign:"center",color:"var(--af-text-tertiary)",fontSize:13},children:"No entries on this day."}):q?(0,b.jsx)("div",{style:{padding:28,textAlign:"center",color:"var(--af-text-tertiary)",fontSize:13},children:"💤 Warm-up only — every session was under a minute. No narrative needed."}):(0,b.jsx)("div",{style:{padding:28,textAlign:"center",color:"var(--af-text-secondary)",fontSize:13},children:"No digest generated yet — click Generate above."})]})}var t=a.i(38246),u=a.i(12544),v=a.i(3444);let w=["rgba(45, 212, 191, 0.75)","rgba(167, 139, 250, 0.75)","rgba(248, 113, 113, 0.75)","rgba(52, 211, 153, 0.75)","rgba(251, 191, 36, 0.75)","rgba(236, 72, 153, 0.75)","rgba(34, 211, 238, 0.75)","rgba(168, 85, 247, 0.75)","rgba(244, 114, 82, 0.75)","rgba(96, 165, 250, 0.75)"];function x(a){let b=0;for(let c=0;c<a.length;c++)b=(b<<5)-b+a.charCodeAt(c)|0;return w[Math.abs(b)%w.length]}function y(a){return x((0,u.canonicalProjectName)(a.projectName))}function z(a){return a.replace(/<[^>]+>/g,"").replace(/\s+/g," ").trim()}function A(a){let b=new Date(a);return`${b.getHours().toString().padStart(2,"0")}:${b.getMinutes().toString().padStart(2,"0")}`}function B({gantt:a,bursts:d=[],sessionEntries:e={}}){let f,[h,i]=(0,c.useState)(null),[j,k]=(0,c.useState)(null),[l,m]=(0,c.useState)(null),[n,o]=(0,c.useState)(!1),[p,q]=(0,c.useState)(null),[r,s]=(0,c.useState)(!1),w=(0,c.useRef)(null),E=l??j,F=(0,c.useMemo)(()=>{if(null===E)return null;let a=d[E];return a?new Set(a.sessionIds):null},[E,d]),G=(0,c.useMemo)(()=>{let b=new Map;for(let c of a.sessions){let a=(0,u.canonicalProjectName)(c.projectName),d=b.get(a);d?d.count++:b.set(a,{name:(0,v.prettyProjectName)(a),color:x(a),count:1})}return Array.from(b.values()).sort((a,b)=>b.count-a.count)},[a.sessions]),{rangeStartMs:H,rangeEndMs:I,hourMarks:J}=(0,c.useMemo)(()=>{if(0===a.sessions.length)return{rangeStartMs:a.dayStartMs,rangeEndMs:a.dayEndMs,hourMarks:[]};let b=1/0,c=-1/0;for(let d of a.sessions)for(let a of d.segments)a.startMs<b&&(b=a.startMs),a.endMs>c&&(c=a.endMs);let d=c+18e5,e=new Date(b-18e5);e.setMinutes(0,0,0);let f=new Date(d);f.setMinutes(0,0,0),f.setHours(f.getHours()+1);let g=Math.max(e.getTime(),a.dayStartMs),h=Math.min(f.getTime(),a.dayEndMs),i=[],j=new Date(g);for(j.setMinutes(0,0,0),j.getTime()<g&&j.setHours(j.getHours()+1);j.getTime()<=h;)i.push(j.getTime()),j.setHours(j.getHours()+1);return{rangeStartMs:g,rangeEndMs:h,hourMarks:i}},[a]),K=I-H,L=Math.max(700,Math.ceil(K/36e5*80)),M=33*a.sessions.length+3+8,N=a=>(a-H)/K*L,O="var(--af-surface)",P=r?d:d.slice(0,3),Q=d.length-P.length;return(0,b.jsxs)(b.Fragment,{children:[d.length>0&&(0,b.jsxs)("div",{className:"af-panel",style:{marginBottom:16},children:[(0,b.jsxs)("div",{className:"af-panel-header",children:[(0,b.jsx)("span",{children:"Concurrency"}),(0,b.jsx)("span",{style:{fontSize:11,color:"var(--af-text-tertiary)",fontWeight:400},children:"periods when ≥2 agents were actively working at once"}),(0,b.jsxs)("button",{type:"button",onClick:()=>o(!0),"aria-label":"How concurrency is detected",style:{marginLeft:"auto",display:"inline-flex",alignItems:"center",gap:5,padding:"3px 9px",background:"transparent",border:"1px solid var(--af-border-subtle)",borderRadius:100,fontSize:10,color:"var(--af-text-tertiary)",cursor:"pointer",fontWeight:500},children:[(0,b.jsx)("span",{style:{fontSize:11,lineHeight:1},children:"ⓘ"}),"How this is measured"]})]}),(0,b.jsxs)("div",{children:[P.map((c,d)=>{let e=l===d,f=j===d,g=c.projectDirs.map(b=>{let c=a.sessions.find(a=>a.projectDir===b);return c?(0,v.prettyProjectName)(c.projectName):b}).map(a=>{let b=a.split("/").filter(Boolean);return b.length>2?"…/"+b.slice(-2).join("/"):a});return(0,b.jsxs)("div",{onMouseEnter:()=>k(d),onMouseLeave:()=>k(null),onClick:()=>q(d),style:{display:"grid",gridTemplateColumns:"auto auto auto 1fr auto",gap:14,padding:"10px 18px",fontSize:12,borderBottom:"1px solid var(--af-border-subtle)",cursor:"pointer",background:e||f?"var(--af-surface-hover)":"transparent",alignItems:"center",transition:"background 0.12s"},title:"Open burst detail",children:[(0,b.jsxs)("span",{style:{fontFamily:"var(--font-mono)",fontSize:11,color:"var(--af-text-secondary)",minWidth:110},children:[A(c.startMs),"–",A(c.endMs)]}),(0,b.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",padding:"2px 8px",borderRadius:10,fontFamily:"var(--font-mono)",fontSize:10,fontWeight:700,color:"white",background:c.crossProject?"rgba(167, 139, 250, 0.9)":"rgba(45, 212, 191, 0.9)",minWidth:28,justifyContent:"center"},children:["×",c.peak]}),c.crossProject?(0,b.jsx)("span",{style:{fontSize:9,color:"rgba(167, 139, 250, 1)",textTransform:"uppercase",letterSpacing:"0.04em",fontWeight:600},children:"cross-project"}):(0,b.jsx)("span",{}),(0,b.jsx)("span",{style:{fontSize:11,color:"var(--af-text-tertiary)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:g.join(", "),children:g.join(" · ")}),(0,b.jsx)("span",{style:{fontFamily:"var(--font-mono)",fontSize:11,color:"var(--af-text-secondary)",minWidth:60,textAlign:"right"},children:(0,v.formatDuration)(c.endMs-c.startMs)})]},`burst-row-${d}`)}),d.length>3&&(0,b.jsx)("button",{type:"button",onClick:()=>s(a=>!a),style:{width:"100%",padding:"10px 18px",background:"transparent",border:"none",borderTop:"1px solid var(--af-border-subtle)",fontSize:11,color:"var(--af-text-secondary)",cursor:"pointer",fontWeight:500,textAlign:"center"},children:r?"Show fewer (first 3) ↑":`Show all ${d.length} bursts (+${Q} more) ↓`})]})]}),(0,b.jsxs)("div",{className:"af-panel",style:{overflow:"hidden"},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:14,padding:"10px 16px",borderBottom:"1px solid var(--af-border-subtle)",fontSize:11,color:"var(--af-text-secondary)",flexWrap:"wrap"},children:[G.map(a=>{let c=a.name.split("/").filter(Boolean),d=c.length>2?"…/"+c.slice(-2).join("/"):a.name;return(0,b.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:5,cursor:"default"},title:`${a.name} — ${a.count} session${1===a.count?"":"s"} on this day`,children:[(0,b.jsx)("span",{style:{width:8,height:8,borderRadius:2,background:a.color,flexShrink:0}}),(0,b.jsx)("span",{style:{maxWidth:160,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:d}),(0,b.jsxs)("span",{style:{color:"var(--af-text-tertiary)",fontSize:10},children:["(",a.count,")"]})]},a.name)}),(0,b.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:5,marginLeft:8,color:"var(--af-text-tertiary)",cursor:"default"},title:"Idle gap — the session was open but the agent was not actively working (gap > 3 minutes between events)",children:[(0,b.jsx)("span",{style:{width:16,height:8,borderRadius:2,background:"repeating-linear-gradient(45deg, var(--af-surface-hover), var(--af-surface-hover) 2px, var(--af-border-subtle) 2px, var(--af-border-subtle) 4px)",flexShrink:0}}),"idle"]})]}),(0,b.jsxs)("div",{ref:w,style:{overflow:"auto",maxHeight:"calc(100vh - 240px)",position:"relative"},onMouseLeave:()=>i(null),children:[(0,b.jsxs)("div",{style:{display:"grid",gridTemplateColumns:`220px ${L}px`,gridTemplateRows:`50px ${M}px`,width:220+L},children:[(0,b.jsxs)("div",{style:{position:"sticky",top:0,left:0,zIndex:3,background:O,borderBottom:"1px solid var(--af-border-subtle)",borderRight:"1px solid var(--af-border-subtle)",display:"flex",flexDirection:"column"},children:[(0,b.jsx)("div",{style:{height:24,display:"flex",alignItems:"center",justifyContent:"flex-end",padding:"0 10px",fontSize:9,color:"var(--af-text-tertiary)",letterSpacing:"0.04em",textTransform:"uppercase",fontWeight:600},children:d.length>0?"Concurrency":""}),(0,b.jsx)("div",{style:{height:26}})]}),(0,b.jsxs)("div",{style:{position:"sticky",top:0,zIndex:2,background:O,borderBottom:"1px solid var(--af-border-subtle)"},children:[(0,b.jsx)("svg",{width:L,height:24,style:{display:"block"},children:d.map((a,c)=>{let d=N(a.startMs),e=N(a.endMs)-d,f=Math.max(e,26),g=e<26?d+e/2-13:d,h=E===c,i=null!==E&&!h,m=a.crossProject?"rgba(167, 139, 250, 0.9)":"rgba(45, 212, 191, 0.9)";return(0,b.jsxs)("g",{children:[(0,b.jsx)("rect",{x:g,y:4,width:f,height:14,fill:m,rx:4,opacity:i?.3:1,stroke:l===c?"var(--af-text)":j===c?"var(--af-text-secondary)":"none",strokeWidth:l===c?1.5:1,style:{cursor:"pointer",transition:"opacity 0.12s"},onMouseEnter:()=>k(c),onMouseLeave:()=>k(null),onClick:()=>q(c),children:(0,b.jsx)("title",{children:`\xd7${a.peak} ${a.crossProject?"cross-project":"same-project"} \xb7 ${A(a.startMs)}–${A(a.endMs)} \xb7 ${(0,v.formatDuration)(a.endMs-a.startMs)} — click for detail`})}),(0,b.jsxs)("text",{x:g+f/2,y:15,textAnchor:"middle",fontSize:9,fontWeight:700,fill:"white",opacity:i?.3:1,style:{pointerEvents:"none"},children:["×",a.peak]})]},`burst-${c}`)})}),(0,b.jsx)("svg",{width:L,height:26,style:{display:"block"},children:J.map(a=>{let c=N(a),d=new Date(a).getHours()%3==0;return(0,b.jsx)("text",{x:c,y:18,textAnchor:"middle",fontSize:10,fill:d?"var(--af-text-secondary)":"var(--af-text-tertiary)",fontWeight:d?600:400,children:A(a)},a)})})]}),(0,b.jsx)("div",{style:{position:"sticky",left:0,zIndex:1,background:O,borderRight:"1px solid var(--af-border-subtle)"},children:(0,b.jsx)("div",{style:{paddingTop:3},children:a.sessions.map((a,c)=>{let d,f=y(a),h=a.firstUserPreview?z(a.firstUserPreview).slice(0,45):(0,v.prettyProjectName)(a.projectName),i=(0,v.prettyProjectName)(a.projectName),j=null!==F&&!F.has(a.id);return(0,b.jsxs)("div",{style:{height:30,marginBottom:3,display:"flex",alignItems:"center",gap:6,padding:"0 8px 0 6px",background:c%2==1?"var(--af-surface-hover)":"transparent",opacity:j?.3:1,transition:"opacity 0.12s"},children:[(0,b.jsx)("span",{style:{width:6,height:6,borderRadius:2,background:f,flexShrink:0}}),(d=e[a.id],d?.outcome?(0,b.jsx)("span",{title:g.OUTCOME_STYLES[d.outcome]?.label??d.outcome,style:{fontSize:11,lineHeight:1,flexShrink:0},"aria-hidden":!0,children:g.OUTCOME_STYLES[d.outcome]?.icon??""}):null),(0,b.jsx)(t.default,{href:`/sessions/${a.id}`,style:{fontSize:10.5,color:"var(--af-text)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",lineHeight:1.2,textDecoration:"none"},title:`${z(a.firstUserPreview??"")} — ${i}`,children:h})]},`label-${a.id}-${c}`)})})}),(0,b.jsx)("div",{children:(0,b.jsxs)("svg",{width:L,height:M,style:{display:"block"},children:[(0,b.jsx)("defs",{children:(0,b.jsxs)("pattern",{id:"gantt-idle-stripes",patternUnits:"userSpaceOnUse",width:"6",height:"6",patternTransform:"rotate(45)",children:[(0,b.jsx)("rect",{width:"6",height:"6",fill:"var(--af-surface-hover)"}),(0,b.jsx)("line",{x1:"0",y1:"0",x2:"0",y2:"6",stroke:"var(--af-border-subtle)",strokeWidth:"1.5"})]})}),J.map(a=>{let c=N(a),d=new Date(a).getHours()%3==0;return(0,b.jsx)("line",{x1:c,y1:0,x2:c,y2:M,stroke:"var(--af-border-subtle)",strokeWidth:d?.8:.4,strokeDasharray:d?void 0:"2 4"},a)}),a.sessions.map((a,c)=>{let d=33*c+3,e=y(a),f=null!==F&&!F.has(a.id);return(0,b.jsxs)("g",{opacity:f?.25:1,style:{transition:"opacity 0.12s"},children:[c%2==1&&(0,b.jsx)("rect",{x:0,y:d,width:L,height:30,fill:"var(--af-surface-hover)",opacity:.25}),a.segments.map((c,f)=>{let g=N(c.startMs),h=Math.max(N(c.endMs)-g,4);return(0,b.jsx)("rect",{x:g,y:d+5,width:h,height:20,fill:e,rx:3,style:{cursor:"pointer"},onMouseEnter:b=>{let c=b.currentTarget.closest("svg").getBoundingClientRect();i({session:a,x:b.clientX-c.left+220,y:d+30+24+26+4})}},f)}),a.segments.length>1&&a.segments.slice(0,-1).map((c,e)=>{let f=a.segments[e+1],g=N(c.endMs),h=N(f.startMs);return h-g<4?null:(0,b.jsx)("rect",{x:g+1,y:d+7,width:h-g-2,height:16,fill:"url(#gantt-idle-stripes)",rx:2,opacity:.7},`idle-${e}`)}),(0,b.jsxs)("text",{x:Math.min(N(a.endMs)+8,L-100),y:d+15+3.5,fontSize:9,fill:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)",children:[(0,v.formatDuration)(a.activeMs)," · ",A(a.startMs),"–",A(a.endMs)]})]},`row-${a.id}-${c}`)})]})})]}),h&&(0,b.jsxs)("div",{style:{position:"absolute",left:Math.max(8,Math.min(h.x,220+L-340)),top:Math.min(h.y,50+M-100),zIndex:50,background:"var(--af-surface-elevated)",border:"1px solid var(--af-border-subtle)",borderRadius:8,padding:"10px 14px",fontSize:11,color:"var(--af-text)",pointerEvents:"none",boxShadow:"0 4px 12px rgba(0,0,0,0.15)",maxWidth:340,lineHeight:1.45},children:[(f=e[h.session.id])?f.outcome?(0,b.jsx)("div",{style:{marginBottom:6},children:(0,b.jsx)(g.OutcomePill,{outcome:f.outcome,size:"sm"})}):"done"!==f.enrichmentStatus&&"skipped_trivial"!==f.enrichmentStatus?(0,b.jsx)("div",{style:{marginBottom:6},children:(0,b.jsx)(g.OutcomePill,{outcome:null,pending:!0,sessionId:h.session.id,localDay:f.localDay,size:"sm"})}):null:null,(0,b.jsx)("div",{style:{fontWeight:600,marginBottom:4},children:e[h.session.id]?.briefSummary||z(h.session.firstUserPreview??"").slice(0,100)||(0,v.prettyProjectName)(h.session.projectName)}),(0,b.jsxs)("div",{style:{fontSize:10,color:"var(--af-text-secondary)",marginBottom:6,fontFamily:"var(--font-mono)"},children:[(0,v.prettyProjectName)(h.session.projectName),h.session.model&&` \xb7 ${h.session.model}`]}),(0,b.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"3px 12px",fontSize:10,color:"var(--af-text-secondary)"},children:[(0,b.jsxs)("span",{children:["Active: ",(0,b.jsx)("strong",{children:(0,v.formatDuration)(h.session.activeMs)})]}),(0,b.jsxs)("span",{children:["Segments: ",h.session.segments.length]}),(0,b.jsxs)("span",{children:["Range: ",A(h.session.startMs),"–",A(h.session.endMs)]}),(0,b.jsxs)("span",{children:["Tokens:"," ",(0,v.formatTokens)(h.session.totalUsage.input+h.session.totalUsage.cacheRead+h.session.totalUsage.cacheWrite),"/",(0,v.formatTokens)(h.session.totalUsage.output)]})]})]})]})]}),n&&(0,b.jsx)(C,{onClose:()=>o(!1)}),null!==p&&d[p]&&(0,b.jsx)(D,{burst:d[p],gantt:a,sessionEntries:e,onClose:()=>q(null),onShowInTimeline:()=>{q(null),null!==p&&(a=>{m(b=>b===a?null:a);let b=d[a],c=w.current;if(!b||!c)return;let e=220+(N(b.startMs)+N(b.endMs))/2-c.clientWidth/2;c.scrollTo({left:Math.max(0,e),behavior:"smooth"})})(p)}})]})}function C({onClose:a}){return(0,c.useEffect)(()=>{let b=b=>{"Escape"===b.key&&a()};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[a]),(0,b.jsx)("div",{role:"dialog","aria-modal":"true","aria-labelledby":"concurrency-modal-title",onClick:a,style:{position:"fixed",inset:0,zIndex:200,background:"rgba(0, 0, 0, 0.5)",backdropFilter:"blur(4px)",WebkitBackdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",padding:20},children:(0,b.jsxs)("div",{onClick:a=>a.stopPropagation(),style:{background:"var(--af-surface-elevated)",border:"1px solid var(--af-border-subtle)",borderRadius:12,maxWidth:560,width:"100%",maxHeight:"85vh",overflow:"auto",boxShadow:"0 16px 48px rgba(0, 0, 0, 0.3)"},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"18px 22px",borderBottom:"1px solid var(--af-border-subtle)"},children:[(0,b.jsx)("h2",{id:"concurrency-modal-title",style:{margin:0,fontSize:16,fontWeight:700,letterSpacing:"-0.01em"},children:"How concurrency is measured"}),(0,b.jsx)("button",{type:"button",onClick:a,"aria-label":"Close",style:{background:"transparent",border:"none",color:"var(--af-text-tertiary)",fontSize:22,lineHeight:1,cursor:"pointer",padding:0,width:28,height:28},children:"×"})]}),(0,b.jsxs)("div",{style:{padding:"18px 22px",fontSize:13,color:"var(--af-text-secondary)",lineHeight:1.55},children:[(0,b.jsxs)("p",{style:{margin:"0 0 14px"},children:["A ",(0,b.jsx)("strong",{style:{color:"var(--af-text)"},children:"concurrency burst"})," ","is a window of time when two or more Claude Code sessions were actively working in parallel. The goal is to surface moments when you were running a multi-agent fleet — not every accidental tab overlap."]}),(0,b.jsx)("h3",{style:{margin:"18px 0 8px",fontSize:12,fontWeight:700,color:"var(--af-text)",textTransform:"uppercase",letterSpacing:"0.04em"},children:'1. What counts as "active"'}),(0,b.jsxs)("p",{style:{margin:"0 0 6px"},children:["Each session's events are split into"," ",(0,b.jsx)("strong",{style:{color:"var(--af-text)"},children:"active segments"})," — stretches of time where no gap between consecutive events exceeds"," ",(0,b.jsx)("strong",{style:{color:"var(--af-text)"},children:"3 minutes"}),". Any longer gap (walked away, laptop closed, thinking) splits the session into separate segments."]}),(0,b.jsx)("p",{style:{margin:"0 0 6px",fontSize:12,color:"var(--af-text-tertiary)"},children:'This is the same definition used for the "active time" metric on the dashboard, so numbers stay consistent.'}),(0,b.jsx)("h3",{style:{margin:"18px 0 8px",fontSize:12,fontWeight:700,color:"var(--af-text)",textTransform:"uppercase",letterSpacing:"0.04em"},children:"2. Detecting overlap"}),(0,b.jsxs)("p",{style:{margin:"0 0 6px"},children:["A sweep-line walks every segment start/end across all sessions. Whenever the active count is ≥2, that stretch becomes a raw overlap. The ",(0,b.jsx)("strong",{style:{color:"var(--af-text)"},children:"peak"})," ","reported on each burst is the maximum active count reached anywhere inside it."]}),(0,b.jsx)("h3",{style:{margin:"18px 0 8px",fontSize:12,fontWeight:700,color:"var(--af-text)",textTransform:"uppercase",letterSpacing:"0.04em"},children:"3. Cleaning up noise"}),(0,b.jsx)("p",{style:{margin:"0 0 6px"},children:"Raw overlaps are noisy — a typical day produces dozens of sub-minute artifacts from switching between sessions. Two rules collapse them into human-readable bursts:"}),(0,b.jsxs)("ul",{style:{margin:"6px 0 0 0",paddingLeft:22},children:[(0,b.jsxs)("li",{style:{marginBottom:4},children:[(0,b.jsx)("strong",{style:{color:"var(--af-text)"},children:"Drop under 1 minute"})," — overlaps shorter than that are almost always tab-switch artifacts, not real parallel work."]}),(0,b.jsxs)("li",{children:[(0,b.jsx)("strong",{style:{color:"var(--af-text)"},children:"Merge within 10 minutes"})," — two overlaps separated by less than 10 minutes of idle time fuse into a single burst. A morning of back-and-forth agent work becomes one burst, not forty."]})]}),(0,b.jsx)("h3",{style:{margin:"18px 0 8px",fontSize:12,fontWeight:700,color:"var(--af-text)",textTransform:"uppercase",letterSpacing:"0.04em"},children:"4. Same-project vs cross-project"}),(0,b.jsxs)("p",{style:{margin:"0 0 6px"},children:["Bursts are colored by whether the involved sessions span more than one project directory."," ",(0,b.jsx)("span",{style:{color:"rgba(167, 139, 250, 1)",fontWeight:600},children:"Purple = cross-project"})," ","— different repos running at once, usually genuine fleet work."," ",(0,b.jsx)("span",{style:{color:"rgba(45, 212, 191, 1)",fontWeight:600},children:"Teal = same-project"})," ","— multiple sessions in one repo, usually context-switching inside a single task."]}),(0,b.jsx)("h3",{style:{margin:"18px 0 8px",fontSize:12,fontWeight:700,color:"var(--af-text)",textTransform:"uppercase",letterSpacing:"0.04em"},children:"Why bursts, not runs"}),(0,b.jsx)("p",{style:{margin:"0 0 6px"},children:'An earlier version reported every raw overlap as a separate "parallel run". On a busy day that produced 40–80 entries, most of them seconds long, most of them meaningless. Bursts are the unit humans actually think in: "this morning I was running 3 agents at once for about 20 minutes."'})]})]})})}function D({burst:a,gantt:d,sessionEntries:e,onClose:f,onShowInTimeline:h}){(0,c.useEffect)(()=>{let a=a=>{"Escape"===a.key&&f()};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[f]);let[i,j]=(0,c.useState)(null),k=(0,c.useRef)(new Map),l=(0,c.useMemo)(()=>{let a=new Map;for(let b of d.sessions)a.set(b.id,b);return a},[d]),m=a.sessionIds.map(a=>l.get(a)).filter(a=>!!a);m.sort((a,b)=>a.startMs-b.startMs);let n=a=>{j(a);let b=k.current.get(a);b&&b.scrollIntoView({behavior:"smooth",block:"center"})},o=Math.min(a.startMs,...m.map(a=>a.startMs)),p=Math.max(a.endMs,...m.map(a=>a.endMs)),q=o-9e5,r=p+9e5,s=r-q,u=22+(25*m.length-3)+6,w=a=>(a-q)/s*510,x=[];{let a=new Date(q);for(a.setMinutes(0,0,0),a.getTime()<q&&a.setHours(a.getHours()+1);a.getTime()<=r;)x.push(a.getTime()),a.setHours(a.getHours()+1)}let B=w(a.startMs),C=w(a.endMs),E=a.endMs-a.startMs;return(0,b.jsx)("div",{role:"dialog","aria-modal":"true","aria-labelledby":"burst-detail-title",onClick:f,style:{position:"fixed",inset:0,zIndex:200,background:"rgba(0, 0, 0, 0.55)",backdropFilter:"blur(4px)",WebkitBackdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",padding:20},children:(0,b.jsxs)("div",{onClick:a=>a.stopPropagation(),style:{background:"var(--af-surface-elevated)",border:"1px solid var(--af-border-subtle)",borderRadius:12,width:"min(720px, 100%)",maxHeight:"90vh",display:"flex",flexDirection:"column",boxShadow:"0 20px 60px rgba(0, 0, 0, 0.4)"},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:14,padding:"16px 22px",borderBottom:"1px solid var(--af-border-subtle)"},children:[(0,b.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:4},children:[(0,b.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",padding:"3px 10px",borderRadius:10,fontFamily:"var(--font-mono)",fontSize:11,fontWeight:700,color:"white",background:a.crossProject?"rgba(167, 139, 250, 0.95)":"rgba(45, 212, 191, 0.95)"},children:["×",a.peak," peak"]}),a.crossProject&&(0,b.jsx)("span",{style:{fontSize:9,color:"rgba(167, 139, 250, 1)",textTransform:"uppercase",letterSpacing:"0.05em",fontWeight:700},children:"cross-project"})]}),(0,b.jsxs)("h2",{id:"burst-detail-title",style:{margin:0,fontSize:16,fontWeight:700,letterSpacing:"-0.01em",display:"flex",alignItems:"center",gap:10,flexWrap:"wrap"},children:[(0,b.jsxs)("span",{style:{fontFamily:"var(--font-mono)"},children:[A(a.startMs),"–",A(a.endMs)]}),(0,b.jsx)("span",{style:{fontSize:12,fontWeight:400,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)"},children:(0,v.formatDuration)(E)}),(0,b.jsxs)("span",{style:{fontSize:12,fontWeight:400,color:"var(--af-text-tertiary)"},children:["· ",m.length," session",1===m.length?"":"s"]})]})]}),(0,b.jsx)("button",{type:"button",onClick:h,style:{padding:"6px 12px",background:"transparent",border:"1px solid var(--af-border-subtle)",borderRadius:6,fontSize:11,color:"var(--af-text-secondary)",cursor:"pointer",fontWeight:500,whiteSpace:"nowrap"},title:"Pin this burst on the main timeline and close",children:"Show in timeline →"}),(0,b.jsx)("button",{type:"button",onClick:f,"aria-label":"Close",style:{background:"transparent",border:"none",color:"var(--af-text-tertiary)",fontSize:24,lineHeight:1,cursor:"pointer",padding:0,width:28,height:28},children:"×"})]}),(0,b.jsxs)("div",{style:{overflow:"auto",padding:"18px 22px"},children:[(0,b.jsx)("div",{style:{fontSize:10,color:"var(--af-text-tertiary)",textTransform:"uppercase",letterSpacing:"0.05em",marginBottom:8,fontWeight:600},children:"Timeline (shaded = burst window)"}),(0,b.jsx)("div",{style:{background:"var(--af-surface)",border:"1px solid var(--af-border-subtle)",borderRadius:8,padding:"8px 10px",overflow:"auto"},children:(0,b.jsxs)("svg",{width:534,height:u,style:{display:"block"},children:[m.map((a,c)=>{let d=22+25*c+11,e=y(a),f=i===a.id;return(0,b.jsxs)("g",{onClick:()=>n(a.id),style:{cursor:"pointer"},children:[(0,b.jsx)("title",{children:`Track ${c+1} — click to focus in list below`}),(0,b.jsx)("circle",{cx:12,cy:d,r:9,fill:f?e:"var(--af-surface-elevated)",stroke:e,strokeWidth:f?2:1.5}),(0,b.jsx)("text",{x:12,y:d+3.5,textAnchor:"middle",fontSize:10,fontWeight:700,fill:f?"#fff":"var(--af-text)",style:{pointerEvents:"none"},children:c+1})]},`num-${a.id}`)}),(0,b.jsxs)("g",{transform:"translate(24, 0)",children:[(0,b.jsx)("rect",{x:B,y:0,width:Math.max(C-B,2),height:u,fill:a.crossProject?"rgba(167, 139, 250, 0.14)":"rgba(45, 212, 191, 0.14)"}),(0,b.jsx)("line",{x1:B,x2:B,y1:0,y2:u,stroke:a.crossProject?"rgba(167, 139, 250, 0.7)":"rgba(45, 212, 191, 0.7)",strokeWidth:1,strokeDasharray:"3 2"}),(0,b.jsx)("line",{x1:C,x2:C,y1:0,y2:u,stroke:a.crossProject?"rgba(167, 139, 250, 0.7)":"rgba(45, 212, 191, 0.7)",strokeWidth:1,strokeDasharray:"3 2"}),x.map(a=>{let c=w(a);return(0,b.jsxs)("g",{children:[(0,b.jsx)("line",{x1:c,x2:c,y1:22,y2:u,stroke:"var(--af-border-subtle)",strokeWidth:.5,strokeDasharray:"2 3"}),(0,b.jsx)("text",{x:c,y:16,textAnchor:"middle",fontSize:9,fill:"var(--af-text-tertiary)",children:A(a)})]},`mini-hm-${a}`)}),m.map((a,c)=>{let d=22+25*c,e=y(a),f=i===a.id;return(0,b.jsxs)("g",{children:[(0,b.jsx)("rect",{x:0,y:d,width:510,height:22,fill:f?"rgba(255,255,255,0.05)":"transparent",onClick:()=>n(a.id),style:{cursor:"pointer"}}),a.segments.map((a,c)=>{let g=w(a.startMs),h=Math.max(w(a.endMs)-g,2);return(0,b.jsx)("rect",{x:g,y:d+3,width:h,height:16,fill:e,rx:2,stroke:f?"var(--af-text)":"none",strokeWidth:+!!f,style:{pointerEvents:"none"}},`mini-seg-${c}`)})]},`mini-row-${a.id}`)})]})]})}),(0,b.jsx)("div",{style:{fontSize:10,color:"var(--af-text-tertiary)",textTransform:"uppercase",letterSpacing:"0.05em",margin:"18px 0 8px",fontWeight:600},children:"Sessions in this burst"}),(0,b.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:m.map((c,d)=>{let f,h,j,l=y(c),m=(b=>{let c=0;for(let d of b.segments){let b=Math.max(d.startMs,a.startMs),e=Math.min(d.endMs,a.endMs);e>b&&(c+=e-b)}return c})(c),n=E>0?Math.round(m/E*100):0,o=i===c.id;return(0,b.jsx)(t.default,{href:`/sessions/${c.id}`,ref:a=>{a?k.current.set(c.id,a):k.current.delete(c.id)},style:{display:"block",padding:"11px 14px",background:o?"var(--af-surface-hover)":"var(--af-surface)",border:o?"1px solid var(--af-text-tertiary)":"1px solid var(--af-border-subtle)",borderLeft:`3px solid ${l}`,borderRadius:8,textDecoration:"none",color:"var(--af-text)",fontSize:12,lineHeight:1.45,transition:"background 0.15s, border-color 0.15s",boxShadow:o?`0 0 0 2px ${l}`:"none"},children:(0,b.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:10},children:[(0,b.jsx)("span",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:20,height:20,borderRadius:"50%",background:o?l:"transparent",border:`1.5px solid ${l}`,color:o?"#fff":"var(--af-text)",fontSize:10,fontWeight:700,flexShrink:0,marginTop:2},"aria-label":`Track ${d+1}`,children:d+1}),(0,b.jsxs)("div",{style:{minWidth:0,flex:1},children:[(0,b.jsx)("div",{style:{fontSize:11,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)",marginBottom:3,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:(0,v.prettyProjectName)(c.projectName),children:(h=(f=(0,v.prettyProjectName)(c.projectName)).split("/").filter(Boolean)).length>2?"…/"+h.slice(-2).join("/"):f}),(0,b.jsx)("div",{style:{fontWeight:500,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:z(c.firstUserPreview??""),children:z(c.firstUserPreview??"")||(0,b.jsx)("em",{style:{color:"var(--af-text-tertiary)"},children:"(no user message)"})}),c.lastAgentPreview&&(0,b.jsxs)("div",{style:{fontSize:11,color:"var(--af-text-secondary)",marginTop:3,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontStyle:"italic"},title:z(c.lastAgentPreview),children:["↳ ",z(c.lastAgentPreview)]})]}),(0,b.jsxs)("div",{style:{fontFamily:"var(--font-mono)",fontSize:10,color:"var(--af-text-tertiary)",textAlign:"right",whiteSpace:"nowrap",flexShrink:0,display:"flex",flexDirection:"column",alignItems:"flex-end",gap:4},children:[(j=e[c.id],j?.outcome?(0,b.jsx)(g.OutcomePill,{outcome:j.outcome,size:"sm",label:"text"}):null),(0,b.jsxs)("div",{style:{color:"var(--af-text-secondary)"},children:[(0,v.formatDuration)(m)," ",(0,b.jsxs)("span",{style:{opacity:.6},children:["(",n,"%)"]})]}),(0,b.jsx)("div",{style:{fontSize:9,marginTop:2},children:"in burst"})]})]})},`burst-session-${c.id}`)})})]})]})})}function E({open:a,onClose:d,rows:e,aiEnabled:f}){let[g,h]=(0,c.useState)(new Set),[i,j]=(0,c.useState)(!1),[k,l]=(0,c.useState)(!1);(0,c.useEffect)(()=>{if(!a)return;let b=a=>{"Escape"===a.key&&d()};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[a,d]);let m=async()=>{if(0===g.size)return;j(!0);let a=Array.from(g).sort().reverse();try{for(let b of a){let a=`/api/digest/day/${b}${k?"?force=1":""}`,c=await fetch(a,{method:"POST"});if(c.body){let a=c.body.getReader();for(;!(await a.read()).done;);}}}finally{j(!1),h(new Set)}};return a?(0,b.jsx)("div",{style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.4)",zIndex:200,display:"flex",justifyContent:"flex-end"},onClick:d,children:(0,b.jsxs)("div",{onClick:a=>a.stopPropagation(),style:{width:"min(440px, 100%)",height:"100%",background:"var(--af-surface-elevated)",borderLeft:"1px solid var(--af-border-subtle)",display:"flex",flexDirection:"column",boxShadow:"-12px 0 32px rgba(0,0,0,0.25)"},children:[(0,b.jsxs)("header",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"14px 18px",borderBottom:"1px solid var(--af-border-subtle)"},children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h2",{style:{fontSize:15,fontWeight:700,margin:0},children:"Backfill digests"}),(0,b.jsx)("p",{style:{fontSize:11,color:"var(--af-text-tertiary)",margin:"2px 0 0"},children:"Each selected day enqueues a job. You can close this drawer."})]}),(0,b.jsx)("button",{type:"button",onClick:d,"aria-label":"Close",style:{background:"transparent",border:"none",color:"var(--af-text-tertiary)",fontSize:22,cursor:"pointer"},children:"×"})]}),!f&&(0,b.jsx)("div",{style:{padding:12,margin:18,background:"rgba(237,137,54,0.1)",borderRadius:6,fontSize:12,color:"var(--af-text)"},children:"AI features are off — only deterministic digests will be written. Enable AI in Settings to generate narratives."}),(0,b.jsxs)("div",{style:{display:"flex",gap:6,padding:"10px 18px",borderBottom:"1px solid var(--af-border-subtle)",flexWrap:"wrap",fontSize:11},children:[(0,b.jsx)(F,{onClick:()=>h(new Set(e.filter(a=>"pending"===a.status).map(a=>a.date))),children:"Select pending"}),(0,b.jsx)(F,{onClick:()=>h(new Set(e.filter(a=>"empty"!==a.status).map(a=>a.date))),children:"Select all with entries"}),(0,b.jsx)(F,{onClick:()=>h(new Set),children:"Clear"}),(0,b.jsxs)("label",{style:{marginLeft:"auto",display:"inline-flex",alignItems:"center",gap:4,fontSize:11,color:"var(--af-text-secondary)",cursor:"pointer"},children:[(0,b.jsx)("input",{type:"checkbox",checked:k,onChange:a=>l(a.target.checked)}),"force regen"]})]}),(0,b.jsx)("div",{style:{flex:1,overflowY:"auto"},children:e.map(a=>(0,b.jsxs)("label",{style:{display:"grid",gridTemplateColumns:"auto 110px 80px 1fr",gap:10,alignItems:"center",padding:"8px 18px",borderBottom:"1px solid var(--af-border-subtle)",fontSize:12,cursor:"empty"===a.status?"default":"pointer",opacity:"empty"===a.status?.5:1},children:[(0,b.jsx)("input",{type:"checkbox",disabled:"empty"===a.status,checked:g.has(a.date),onChange:()=>{var b;return b=a.date,void h(a=>{let c=new Set(a);return c.has(b)?c.delete(b):c.add(b),c})}}),(0,b.jsx)("span",{children:a.day_label}),(0,b.jsx)("span",{style:{fontSize:10,color:"generated"===a.status?"#48bb78":"pending"===a.status?"#ed8936":"var(--af-text-tertiary)"},children:"generated"===a.status?"✓ ready":"pending"===a.status?"• pending":"—"}),(0,b.jsxs)("span",{style:{fontFamily:"var(--font-mono)",fontSize:10,color:"var(--af-text-tertiary)",textAlign:"right"},children:[a.entry_count>0?`${a.entry_count} sess`:"",a.pr_count>0?` \xb7 ${a.pr_count} PR`:""]})]},a.date))}),(0,b.jsxs)("footer",{style:{padding:"12px 18px",borderTop:"1px solid var(--af-border-subtle)",display:"flex",gap:10,alignItems:"center"},children:[(0,b.jsxs)("span",{style:{fontSize:12,color:"var(--af-text-secondary)",flex:1},children:[g.size," day",1===g.size?"":"s"," selected"]}),(0,b.jsx)("button",{type:"button",onClick:d,style:{padding:"6px 12px",background:"transparent",border:"1px solid var(--af-border-subtle)",borderRadius:6,fontSize:12,cursor:"pointer"},children:"Cancel"}),(0,b.jsx)("button",{type:"button",onClick:m,disabled:i||0===g.size,style:{padding:"6px 14px",background:"var(--af-accent)",color:"white",border:"none",borderRadius:6,fontSize:12,fontWeight:600,cursor:i||0===g.size?"default":"pointer",opacity:i||0===g.size?.6:1},children:i?`Enqueueing… (${g.size})`:`Generate ${g.size}`})]})]})}):null}function F({onClick:a,children:c}){return(0,b.jsx)("button",{type:"button",onClick:a,style:{padding:"3px 10px",background:"transparent",border:"1px solid var(--af-border-subtle)",borderRadius:5,fontSize:11,color:"var(--af-text-secondary)",cursor:"pointer"},children:c})}var G=a.i(50944);function H(a){if(a<6e4)return`${Math.round(a/1e3)}s`;let b=Math.round(a/6e4);if(b<60)return`${b}m`;let c=Math.floor(b/60),d=b%60;return d?`${c}h ${d}m`:`${c}h`}function I({date:a,today:d,prevDay:e,nextDay:f,dayStats:g,hrefForDate:h=a=>`/day/${a}`}){let i,j,k,l,m,n,o=(0,G.useRouter)(),[p,q]=(0,c.useState)(!1),[r,s]=(0,c.useMemo)(()=>{let[b,c]=a.split("-").map(Number);return[b,c]},[a]),[u,v]=(0,c.useState)(r),[w,x]=(0,c.useState)(s),[y,z]=(0,c.useState)(null),[A,B]=(0,c.useState)(null),C=(0,c.useMemo)(()=>{let a=new Map;for(let b of g)a.set(b.date,b);return a},[g]),D=(0,c.useMemo)(()=>{let a=new Date(u,w-1,1).getDay(),b=new Date(u,w,0).getDate(),c=[];for(let b=0;b<a;b++)c.push(null);for(let a=1;a<=b;a++){let b=String(w).padStart(2,"0"),d=String(a).padStart(2,"0");c.push(`${u}-${b}-${d}`)}return c},[u,w]),E=(0,c.useMemo)(()=>{let a=0;for(let b of g)b.airTimeMs>a&&(a=b.airTimeMs);return a},[g]),F=new Date(u,w-1).toLocaleString(void 0,{month:"long",year:"numeric"}),K=a=>{let b=w+a,c=u;b<1&&(b=12,c--),b>12&&(b=1,c++),x(b),v(c)};return(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,flexWrap:"wrap",position:"relative"},children:[e?(0,b.jsx)(t.default,{href:h(e),style:{padding:"5px 10px",border:"1px solid var(--af-border-subtle)",borderRadius:6,fontSize:11,color:"var(--af-text-secondary)"},children:"←"}):(0,b.jsx)("span",{style:{padding:"5px 10px",opacity:.3,fontSize:11,color:"var(--af-text-tertiary)"},children:"←"}),(0,b.jsx)("button",{type:"button",onClick:()=>{v(r),x(s),q(a=>!a)},style:{padding:"5px 12px",fontSize:12,fontFamily:"var(--font-mono)",border:"1px solid var(--af-border-subtle)",borderRadius:6,background:p?"var(--af-accent-subtle)":"transparent",color:p?"var(--af-accent)":"var(--af-text)",cursor:"pointer",fontWeight:500,minWidth:120,textAlign:"center"},children:a}),f?(0,b.jsx)(t.default,{href:h(f),style:{padding:"5px 10px",border:"1px solid var(--af-border-subtle)",borderRadius:6,fontSize:11,color:"var(--af-text-secondary)"},children:"→"}):(0,b.jsx)("span",{style:{padding:"5px 10px",opacity:.3,fontSize:11,color:"var(--af-text-tertiary)"},children:"→"}),(0,b.jsx)(t.default,{href:h(d),style:{padding:"5px 12px",border:"1px solid var(--af-border-subtle)",borderRadius:6,fontSize:11,color:a===d?"var(--af-accent)":"var(--af-text-secondary)",background:a===d?"var(--af-accent-subtle)":"transparent",fontWeight:500},children:"Today"}),p&&(0,b.jsxs)("div",{style:{position:"absolute",top:"calc(100% + 8px)",left:0,zIndex:60,background:"var(--af-surface)",border:"1px solid var(--af-border-subtle)",borderRadius:10,padding:"12px 14px",boxShadow:"0 8px 28px rgba(0,0,0,0.18)",minWidth:300},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:10},children:[(0,b.jsx)("button",{type:"button",onClick:()=>K(-1),style:{background:"transparent",border:"none",cursor:"pointer",color:"var(--af-text-secondary)",fontSize:14,padding:"2px 8px",borderRadius:4},children:"‹"}),(0,b.jsx)("span",{style:{fontSize:13,fontWeight:600,color:"var(--af-text)"},children:F}),(0,b.jsx)("button",{type:"button",onClick:()=>K(1),style:{background:"transparent",border:"none",cursor:"pointer",color:"var(--af-text-secondary)",fontSize:14,padding:"2px 8px",borderRadius:4},children:"›"})]}),(0,b.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:2,marginBottom:4},children:["Su","Mo","Tu","We","Th","Fr","Sa"].map(a=>(0,b.jsx)("div",{style:{textAlign:"center",fontSize:9,color:"var(--af-text-tertiary)",fontWeight:600,padding:"2px 0"},children:a},a))}),(0,b.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:2},children:D.map((c,e)=>{if(!c)return(0,b.jsx)("div",{},`blank-${e}`);let f=C.get(c),g=f?.airTimeMs??0,i=f?.burstCount??0,j=c===a,k=c===d,l=c>d,m=g>0&&E>0?Math.min(1,g/E):0,n=parseInt(c.split("-")[2],10);return(0,b.jsxs)("button",{type:"button",onClick:()=>{q(!1),o.push(h(c))},disabled:l,onMouseEnter:a=>{if(l)return;let b=a.currentTarget.getBoundingClientRect(),d=a.currentTarget.offsetParent?.getBoundingClientRect()??b;z(c),B({x:b.left-d.left+b.width/2,y:b.bottom-d.top+6})},onMouseLeave:()=>{z(null),B(null)},style:{position:"relative",width:40,height:40,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:1,border:j?"2px solid var(--af-accent)":k?"1px solid var(--af-text-tertiary)":"1px solid transparent",borderRadius:6,background:m>0?`rgba(45, 212, 191, ${.08+.35*m})`:"transparent",color:l?"var(--af-text-tertiary)":j?"var(--af-accent)":"var(--af-text)",cursor:l?"not-allowed":"pointer",fontSize:11,fontWeight:j?700:400,fontFamily:"var(--font-mono)",padding:0,opacity:l?.4:1},children:[(0,b.jsx)("span",{style:{lineHeight:1},children:n}),g>0&&(0,b.jsx)("span",{style:{fontSize:8,color:j?"var(--af-accent)":"var(--af-text-tertiary)",lineHeight:1,fontWeight:600,marginTop:2},children:H(g)}),i>0&&(0,b.jsx)("span",{style:{position:"absolute",top:3,right:3,width:5,height:5,borderRadius:"50%",background:"rgba(167, 139, 250, 0.95)",boxShadow:"0 0 0 1px var(--af-surface)"}})]},c)})}),(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:10,marginTop:10,paddingTop:8,borderTop:"1px solid var(--af-border-subtle)",fontSize:9,color:"var(--af-text-tertiary)"},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:5},children:[(0,b.jsx)("span",{children:"less"}),(0,b.jsx)("div",{style:{display:"flex",gap:2},children:[0,.15,.3,.5,.8].map((a,c)=>(0,b.jsx)("span",{style:{width:10,height:10,borderRadius:2,background:0===a?"var(--af-border-subtle)":`rgba(45, 212, 191, ${.08+.35*a})`}},c))}),(0,b.jsx)("span",{children:"more active"})]}),(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:5},title:"Days with at least one concurrency burst",children:[(0,b.jsx)("span",{style:{width:5,height:5,borderRadius:"50%",background:"rgba(167, 139, 250, 0.95)"}}),"parallel"]})]}),y&&A&&(i=C.get(y),j=i?.sessions??0,k=i?.airTimeMs??0,l=i?.parallelMs??0,m=i?.burstCount??0,n=i?.peakConcurrency??0,(0,b.jsxs)("div",{style:{position:"absolute",left:Math.max(10,Math.min(A.x-110,290)),top:A.y,width:220,pointerEvents:"none",background:"var(--af-surface-elevated)",border:"1px solid var(--af-border-subtle)",borderRadius:8,padding:"9px 12px",boxShadow:"0 6px 22px rgba(0,0,0,0.22)",fontSize:11,color:"var(--af-text)",zIndex:65,lineHeight:1.5},children:[(0,b.jsx)("div",{style:{fontFamily:"var(--font-mono)",fontWeight:700,fontSize:11,marginBottom:4},children:y}),0===j&&0===k&&0===l?(0,b.jsx)("div",{style:{color:"var(--af-text-tertiary)",fontSize:10},children:"no activity"}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(J,{label:"sessions",value:String(j)}),(0,b.jsx)(J,{label:"active time",value:k>0?H(k):"—"}),l>0&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{style:{marginTop:4,paddingTop:4,borderTop:"1px dashed var(--af-border-subtle)"}}),(0,b.jsx)(J,{label:"parallel time",value:H(l)}),(0,b.jsx)(J,{label:"peak concurrency",value:`\xd7${n}`,accent:!0}),(0,b.jsx)(J,{label:"bursts",value:String(m)})]})]})]}))]})]})}function J({label:a,value:c,accent:d}){return(0,b.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",color:"var(--af-text-secondary)",fontSize:10},children:[(0,b.jsx)("span",{children:a}),(0,b.jsx)("strong",{style:{color:d?"rgba(167, 139, 250, 1)":"var(--af-text)"},children:c})]})}function K({label:a,defaultOpen:f=!0,children:g}){let[h,i]=(0,c.useState)(f);return(0,b.jsxs)("div",{style:{borderBottom:"1px solid var(--af-border-subtle)"},children:[(0,b.jsxs)("button",{type:"button",onClick:()=>i(a=>!a),style:{width:"100%",padding:"12px 40px",background:"transparent",border:"none",textAlign:"left",display:"flex",alignItems:"center",gap:8,cursor:"pointer",fontSize:11,fontWeight:700,color:"var(--af-text-tertiary)",textTransform:"uppercase",letterSpacing:"0.08em"},children:[h?(0,b.jsx)(d.ChevronDown,{size:13}):(0,b.jsx)(e.ChevronRight,{size:13}),a]}),h&&(0,b.jsx)("div",{children:g})]})}a.s(["DayView",0,function({date:a,today:d,prev:e,next:g,initial:h,entries:i,aiEnabled:j,gantt:k,bursts:l,sessionEntries:m,backfillRows:n,dayStats:o}){let[p,q]=(0,c.useState)(!1),r=i.length>0&&i.every(a=>"skipped_trivial"===a.enrichment.status),t=i.length>0&&!r,u=k.sessions.length>0,v=new Date(`${a}T12:00:00`).toLocaleDateString("en-US",{weekday:"long",month:"long",day:"numeric",year:"numeric"}),w=n.filter(a=>"pending"===a.status).length;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("nav",{style:{padding:"14px 40px",display:"flex",gap:12,fontSize:12,borderBottom:"1px solid var(--af-border-subtle)",alignItems:"center",flexWrap:"wrap"},children:[(0,b.jsx)(I,{date:a,today:d,prevDay:e,nextDay:g??void 0,dayStats:o}),(0,b.jsxs)("button",{type:"button",onClick:()=>q(!0),style:{marginLeft:"auto",display:"inline-flex",alignItems:"center",gap:5,padding:"5px 10px",background:"transparent",border:"1px solid var(--af-border-subtle)",borderRadius:6,fontSize:11,color:"var(--af-text-secondary)",cursor:"pointer"},title:"Open the backfill multi-select drawer",children:[(0,b.jsx)(f,{size:12}),"Backfill digests",w>0&&(0,b.jsx)("span",{style:{fontSize:10,color:"#ed8936",fontWeight:700},children:w})]})]}),t||u?(0,b.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:0},children:[t&&(0,b.jsx)(K,{label:"Narrative",defaultOpen:!0,children:(0,b.jsx)(s,{initial:h,entries:i,date:a,aiEnabled:j})}),u&&(0,b.jsx)(K,{label:"Timeline & concurrency",defaultOpen:!0,children:(0,b.jsx)("div",{style:{padding:"8px 40px 40px"},children:(0,b.jsx)(B,{gantt:k,bursts:l,sessionEntries:m})})})]}):(0,b.jsxs)("div",{style:{padding:"60px 40px",textAlign:"center",color:"var(--af-text-secondary)"},children:[(0,b.jsx)("div",{style:{fontSize:14,marginBottom:6},children:v}),(0,b.jsx)("div",{style:{fontSize:13,color:"var(--af-text-tertiary)"},children:"No Claude Code activity on this day."})]}),(0,b.jsx)(E,{open:p,onClose:()=>q(!1),rows:n,aiEnabled:j})]})}],94561)}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=apps_web_app_day_%5Bdate%5D_day-view_tsx_0wjoe1u._.js.map
|
package/app/apps/web/.next/server/chunks/ssr/apps_web_app_settings_ai-features-form_tsx_01p699p._.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[46522,a=>{"use strict";var b=a.i(87924),c=a.i(72131);a.s(["AiFeaturesForm",0,function({initial:a}){let[d,e]=(0,c.useState)(a.enabled),[f,g]=(0,c.useState)(!1),[h,i]=(0,c.useState)(null);async function j(a){a.preventDefault(),g(!0),i(null);let b=await fetch("/api/settings",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({ai_features:{enabled:d}})});g(!1),i(b.ok?"Saved.":`Error: ${b.status}`)}return(0,b.jsxs)("form",{onSubmit:j,className:"space-y-4",children:[(0,b.jsxs)("label",{className:"flex items-center gap-2",children:[(0,b.jsx)("input",{type:"checkbox",checked:d,onChange:a=>e(a.target.checked)}),(0,b.jsx)("span",{children:"Enable AI digests and enrichment"})]}),(0,b.jsx)("button",{type:"submit",disabled:f,className:"px-3 py-1 border rounded bg-black text-white disabled:opacity-60",children:f?"Saving…":"Save"}),h&&(0,b.jsx)("p",{className:"text-sm",children:h})]})}])}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=apps_web_app_settings_ai-features-form_tsx_01p699p._.js.map
|
|
@@ -3,6 +3,6 @@ module.exports=[20555,a=>{"use strict";var b=a.i(87924),c=a.i(72131);a.s(["LiveB
|
|
|
3
3
|
0%, 100% { opacity: 1; transform: scale(1); }
|
|
4
4
|
50% { opacity: 0.4; transform: scale(0.85); }
|
|
5
5
|
}
|
|
6
|
-
`})]})}])},89691,a=>{"use strict";var b=a.i(87924),c=a.i(72131);function
|
|
6
|
+
`})]})}])},89691,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(50944),e=a.i(44220);function f(a,b){if(a<=0||b<=0)return"var(--af-heatmap-0)";let c=Math.min(1,a/b),d=0;return c>.75?d=4:c>.5?d=3:c>.25?d=2:c>0&&(d=1),`var(--af-heatmap-${d})`}function g(a){let[b,c,d]=a.split("-").map(Number);return new Date(b,c-1,d)}function h(a){let b=a.getFullYear(),c=String(a.getMonth()+1).padStart(2,"0"),d=String(a.getDate()).padStart(2,"0");return`${b}-${c}-${d}`}function i(a){return{date:a,sessions:0,toolCalls:0,turns:0,airTimeMs:0,tokens:{input:0,output:0,cacheRead:0,cacheWrite:0},durationMs:0,peakParallelism:0}}a.s(["Heatmap",0,function({buckets:a,valueKey:j="sessions",cellSize:k=13,cellGap:l=3,daySummaries:m}){let n,o,p=(0,d.useRouter)(),[q,r]=(0,c.useState)(null),{weeks:s,max:t}=(0,c.useMemo)(()=>{if(0===a.length)return{weeks:[],max:0};let b=new Date(g(a[0].date));b.setDate(b.getDate()-b.getDay());let c=new Map(a.map(a=>[a.date,a])),d=[],e=[],f=new Date,k=g(a[a.length-1].date),l=k>f?k:f,m=0;for(let a=new Date(b);a<=l;a.setDate(a.getDate()+1)){let b=h(a),f=c.get(b)??i(b),g=f[j];g>m&&(m=g),e.push(f),7===e.length&&(d.push(e),e=[])}if(e.length>0){for(;e.length<7;)e.push(i(h(new Date)));d.push(e)}return{weeks:d,max:m}},[a,j]);if(0===a.length)return(0,b.jsx)("div",{style:{padding:"32px 12px",color:"var(--af-text-tertiary)",fontSize:12,textAlign:"center"},children:"No activity yet."});let u=s.length*(k+l)+24,v=7*(k+l)+18;return(0,b.jsxs)("div",{style:{position:"relative",overflowX:"auto"},children:[(0,b.jsxs)("svg",{width:u,height:v,style:{display:"block"},children:[(0,b.jsx)("g",{fontSize:9,fill:"var(--af-text-tertiary)",children:["Mon","Wed","Fri"].map((a,c)=>(0,b.jsx)("text",{x:0,y:18+(1+2*c)*(k+l)+k-3,children:a},a))}),(0,b.jsx)("g",{transform:"translate(24, 18)",children:s.map((a,c)=>a.map((a,d)=>{let e=a[j],g=f(e,t);return(0,b.jsx)("rect",{x:c*(k+l),y:d*(k+l),width:k,height:k,rx:2.5,ry:2.5,stroke:e>0?"rgba(255,255,255,0.04)":"transparent",onMouseEnter:b=>{let c=b.currentTarget.getBoundingClientRect();r({bucket:a,x:c.left+c.width/2,y:c.top-6})},onMouseLeave:()=>r(null),onClick:()=>{e>0&&p.push(`/digest/${a.date}`)},style:{cursor:e>0?"pointer":"default",fill:g}},`${c}-${d}`)}))})]}),(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,marginTop:6,fontSize:10,color:"var(--af-text-tertiary)",justifyContent:"flex-end"},children:[(0,b.jsx)("span",{children:"Less"}),[0,.25,.5,.75,1].map((a,c)=>(0,b.jsx)("span",{style:{width:11,height:11,borderRadius:2.5,background:f(Math.max(1,a*t),t),display:"inline-block"}},c)),(0,b.jsx)("span",{children:"More"})]}),q&&(0,b.jsxs)("div",{style:{position:"fixed",left:q.x,top:q.y,transform:"translate(-50%, -100%)",background:"var(--af-surface-elevated)",border:"1px solid var(--af-border-subtle)",borderRadius:6,padding:"6px 10px",fontSize:11,color:"var(--af-text)",whiteSpace:"nowrap",pointerEvents:"none",zIndex:100,boxShadow:"0 4px 12px rgba(0,0,0,0.3)"},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:2},children:[(0,b.jsx)("span",{style:{fontWeight:600},children:q.bucket.date}),(()=>{let a=m?.get(q.bucket.date);if(!a?.outcome)return null;let c=e.OUTCOME_STYLES[a.outcome];return(0,b.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:3,padding:"1px 6px",borderRadius:99,fontSize:9,fontWeight:600,background:c.bg,color:c.fg},children:[c.icon," ",c.label]})})()]}),(n=m?.get(q.bucket.date),n?.headline?(0,b.jsxs)("div",{style:{color:"var(--af-text)",fontSize:11,fontWeight:500,marginBottom:2,maxWidth:280,whiteSpace:"normal",lineHeight:1.35},children:["“",n.headline,"”"]}):null),(0,b.jsxs)("div",{style:{color:"var(--af-text-secondary)"},children:[q.bucket.sessions," session",1===q.bucket.sessions?"":"s",q.bucket.toolCalls>0&&` \xb7 ${q.bucket.toolCalls} tool calls`,q.bucket.peakParallelism>1&&` \xb7 peak \xd7${q.bucket.peakParallelism}`]}),(o=m?.get(q.bucket.date),o?.helpfulness?(0,b.jsxs)("div",{style:{color:"var(--af-text-tertiary)",fontSize:10,marginTop:2},children:["Claude: ",o.helpfulness]}):null)]})]})}])},52429,a=>{"use strict";var b=a.i(87924),c=a.i(72131);function d(a){if(a<1e3)return`${Math.round(a)}ms`;let b=Math.round(a/1e3);if(b<60)return`${b}s`;let c=Math.floor(b/60),d=b%60;if(c<60)return d?`${c}m ${d}s`:`${c}m`;let e=Math.floor(c/60),f=c%60;return f?`${e}h ${f}m`:`${e}h`}let e={airTime:{label:"Agent time",pluck:a=>a.airTimeMs,color:"rgba(45, 212, 191, 0.85)",unit:"ms"},sessions:{label:"Sessions",pluck:a=>a.sessions,color:"rgba(94, 234, 212, 0.85)"},toolCalls:{label:"Tool calls",pluck:a=>a.toolCalls,color:"rgba(167, 139, 250, 0.85)"},turns:{label:"Turns",pluck:a=>a.turns,color:"rgba(251, 191, 36, 0.85)"},input:{label:"Input tokens",pluck:a=>a.tokens.input,color:"rgba(52, 211, 153, 0.85)"},output:{label:"Output tokens",pluck:a=>a.tokens.output,color:"rgba(248, 113, 113, 0.85)"},cacheRead:{label:"Cache read",pluck:a=>a.tokens.cacheRead,color:"rgba(129, 104, 224, 0.85)"}};a.s(["ActivityChart",0,function({buckets:a,defaultMetric:f="sessions",height:g=160}){let[h,i]=(0,c.useState)(f),[j,k]=(0,c.useState)(null),l=e[h],{bars:m,maxVal:n}=(0,c.useMemo)(()=>{let b=0;return{bars:a.map(a=>{let c=l.pluck(a);return c>b&&(b=c),{bucket:a,value:c}}),maxVal:b}},[a,l]);if(0===a.length)return(0,b.jsx)("div",{style:{padding:"32px 12px",color:"var(--af-text-tertiary)",fontSize:12,textAlign:"center"},children:"No activity yet."});let o=Math.max(3,Math.floor((600-2*m.length)/Math.max(1,m.length))),p=48+Math.max(m.length*(o+2),600)+8,q=g-10-22;return(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{style:{display:"flex",gap:4,background:"var(--background)",borderRadius:7,padding:3,marginBottom:10},children:Object.keys(e).map(a=>(0,b.jsx)("button",{type:"button",onClick:()=>i(a),style:{fontSize:11,padding:"5px 10px",border:"none",borderRadius:5,background:h===a?"var(--af-surface-elevated)":"transparent",color:h===a?"var(--af-text)":"var(--af-text-tertiary)",fontWeight:500},children:e[a].label},a))}),(0,b.jsxs)("div",{style:{position:"relative",overflowX:"auto"},children:[j&&(0,b.jsxs)("div",{style:{position:"absolute",left:j.x,top:0,transform:"translateX(-50%)",background:"var(--af-surface-elevated)",border:"1px solid var(--af-border-subtle)",borderRadius:6,padding:"4px 8px",fontSize:11,color:"var(--af-text-secondary)",fontFamily:"var(--font-mono)",whiteSpace:"nowrap",pointerEvents:"none",zIndex:10,boxShadow:"0 2px 8px rgba(0,0,0,0.08)"},children:[j.bucket.date," ·"," ","ms"===l.unit?d(j.value):j.value.toLocaleString()]}),(0,b.jsxs)("svg",{width:p,height:g,style:{display:"block"},children:[(0,b.jsx)("g",{fontSize:10,fill:"var(--af-text-tertiary)",children:[0,.25,.5,.75,1].map(a=>{let c=10+(1-a)*q,e=n*a,f="ms"===l.unit?d(e):e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:Math.round(e).toString();return(0,b.jsxs)("g",{children:[(0,b.jsx)("line",{x1:48,x2:p-8,y1:c,y2:c,stroke:"var(--af-border-subtle)",strokeDasharray:0===a?void 0:"2 3"}),(0,b.jsx)("text",{x:42,y:c+3,textAnchor:"end",children:f})]},a)})}),m.map((a,c)=>{let d=n>0?a.value/n*q:0,e=48+c*(o+2),f=j?.bucket.date===a.bucket.date;return(0,b.jsxs)("g",{children:[(0,b.jsx)("rect",{x:e,y:10,width:o,height:q,fill:"transparent",onMouseEnter:()=>k({bucket:a.bucket,value:a.value,x:e+o/2}),onMouseLeave:()=>k(null)}),(0,b.jsx)("rect",{x:e,y:10+q-d,width:o,height:Math.max(.5,d),fill:f?"var(--af-accent)":l.color,rx:1.5*(o>=6),ry:1.5*(o>=6),style:{pointerEvents:"none"}})]},a.bucket.date)}),(0,b.jsx)("g",{fontSize:10,fill:"var(--af-text-tertiary)",children:m.map((a,c)=>{let d=a.bucket.date,e=0===c,f=c===m.length-1,h="01"===d.slice(-2),i=m.length>3&&m.length<=31&&c===Math.floor(m.length/2)&&!m.some(a=>"01"===a.bucket.date.slice(-2));if(!e&&!f&&!h&&!i)return null;let j=48+c*(o+2)+o/2,k=new Date(`${d}T00:00:00`).toLocaleDateString(void 0,{month:"short",day:"numeric"});return(0,b.jsx)("text",{x:e?48:f?p-8:j,y:g-6,textAnchor:e?"start":f?"end":"middle",children:k},d)})})]})]})]})}])},78338,a=>{"use strict";var b=a.i(87924),c=a.i(72131);let d=(0,a.i(70106).default)("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);a.s(["MetricCard",0,function({label:a,value:e,sub:f,icon:g,tooltip:h}){let[i,j]=(0,c.useState)(!1);return(0,b.jsxs)("div",{className:"af-card",style:{padding:"16px 18px",position:"relative"},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,fontSize:11,color:"var(--af-text-tertiary)",textTransform:"uppercase",letterSpacing:"0.05em",fontWeight:600},children:[g,(0,b.jsx)("span",{children:a}),h&&(0,b.jsx)("span",{style:{marginLeft:"auto",cursor:"help",display:"inline-flex",color:"var(--af-text-tertiary)",opacity:.5,transition:"opacity 0.12s"},onMouseEnter:()=>j(!0),onMouseLeave:()=>j(!1),onClick:()=>j(a=>!a),children:(0,b.jsx)(d,{size:12})})]}),(0,b.jsx)("div",{style:{fontSize:22,fontWeight:700,marginTop:8,letterSpacing:"-0.02em",lineHeight:1.1},children:e}),f&&(0,b.jsx)("div",{style:{fontSize:11,color:"var(--af-text-secondary)",marginTop:4},children:f}),i&&h&&(0,b.jsx)("div",{style:{position:"absolute",top:"calc(100% + 6px)",left:0,right:0,zIndex:50,background:"#0F172A",color:"#F1F5F9",borderRadius:8,padding:"10px 12px",fontSize:11,lineHeight:1.5,boxShadow:"0 6px 24px rgba(15,23,42,0.22)",pointerEvents:"none"},children:h.split("\n").map((a,c)=>(0,b.jsx)("div",{children:a},c))})]})}],78338)}];
|
|
7
7
|
|
|
8
8
|
//# sourceMappingURL=apps_web_components_0b-4-4j._.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
module.exports=[85041,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(38246),e=a.i(33441),f=a.i(5151);let g={loop_suspected:{token:"loop_suspected",label:"consecutive-tool run",description:"The same tool was called 8 or more times in a row without interleaving — heuristic for a possible tool loop, but legitimate Read/Grep marathons also trigger it.",tone:"warn"},long_autonomous:{token:"long_autonomous",label:"long autonomous turn",description:"A single turn ran 20 minutes or longer without any user interruption.",tone:"info"},orchestrated:{token:"orchestrated",label:"subagent-orchestrated",description:"3 or more turns dispatched a subagent via the Task tool.",tone:"info"},fast_ship:{token:"fast_ship",label:"fast ship",description:"A PR shipped in under 5 minutes of agent time.",tone:"ok"},plan_used:{token:"plan_used",label:"plan mode",description:"Plan mode was entered at least once during this slice.",tone:"info"},interrupt_heavy:{token:"interrupt_heavy",label:"frequent interrupts",description:"You hit Esc or cancelled 3 or more times.",tone:"warn"},high_errors:{token:"high_errors",label:"high tool-error rate",description:"20 or more tool calls returned errors.",tone:"warn"}},h={warn:"#ed8936",info:"#4299e1",ok:"#48bb78"};function i({token:a,count:c}){let d=g[a]??{token:a,label:a.replace(/_/g," "),description:`Internal flag: ${a}.`,tone:"info"},e=h[d.tone];return(0,b.jsxs)("span",{title:`${d.token} — ${d.description}`,style:{display:"inline-flex",alignItems:"center",gap:4,padding:"2px 8px",borderRadius:999,background:`color-mix(in srgb, ${e} 12%, transparent)`,border:`1px solid color-mix(in srgb, ${e} 28%, transparent)`,fontSize:10,fontWeight:600,color:e,fontFamily:"var(--font-mono)",whiteSpace:"nowrap"},children:[d.label,"number"==typeof c&&(0,b.jsxs)("span",{style:{opacity:.7,fontWeight:500},children:["×",c]})]})}function j(a){let c,d=Object.keys(g),e=RegExp(`\\b(${d.join("|")})\\b`,"g"),f=[],h=0;for(;null!==(c=e.exec(a));)c.index>h&&f.push(a.slice(h,c.index)),f.push((0,b.jsx)(i,{token:c[1]},`${c.index}-${c[1]}`)),h=e.lastIndex;return h<a.length&&f.push(a.slice(h)),f.length>0?f:[a]}var k=a.i(68381);let l={essential:"#48bb78",helpful:"#4299e1",neutral:"#a0aec0",unhelpful:"#f56565"},m=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],n={"spec-review-loop":"Spec-review loop","chunk-implementation":"Chunk implementation","research-then-build":"Research-then-build","reviewer-triad":"Reviewer triad","background-coordinated":"Background-coordinated","solo-continuation":"Solo continuation","solo-design":"Solo design","solo-build":"Solo build",mixed:"Mixed"},o={"spec-review-loop":"#9f7aea","chunk-implementation":"#4299e1","research-then-build":"#38b2ac","reviewer-triad":"#ed64a6","background-coordinated":"#ecc94b","solo-continuation":"#a0aec0","solo-design":"#48bb78","solo-build":"#ed8936",mixed:"#a0aec0"},p={outlier:"Outlier","novel-use":"Novel use","user-built-tool":"User-built tool","cross-week-contrast":"Cross-week contrast"},q={"claude-md":"CLAUDE.md addition",skill:"Skill to build",hook:"Hook to wire",harness:"Harness extension",decision:"Decision to make"};function r({digest:a,aiEnabled:c,actions:e,priorDigest:f}){var g,h;let i,l,m,n,o,p=a.shipped.length,q=Object.values(a.outcome_mix).reduce((a,b)=>a+(b??0),0),u=a.agent_min_total/60,v=u>=1?`${u.toFixed(1)}h`:`${Math.round(a.agent_min_total)}m`,w=f?(g=a,h=f,i=g.shipped.length-h.shipped.length,m=(l=g.agent_min_total-h.agent_min_total)/60,n=`${i>0?"+":""}${i} PR${1===Math.abs(i)?"":"s"}`,o=Math.abs(m)>=1?`${m>0?"+":""}${m.toFixed(1)}h`:`${l>0?"+":""}${Math.round(l)}m`,`${n} \xb7 ${o}`):null;return(0,b.jsxs)("div",{style:{maxWidth:980,margin:"0 auto",padding:"24px 40px"},children:[(0,b.jsxs)("header",{style:{marginBottom:24},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:8,fontSize:12,color:"var(--af-text-tertiary)",fontWeight:500,flexWrap:"wrap"},children:[(0,b.jsxs)("span",{style:{fontFamily:"var(--font-mono)",color:"var(--af-text-secondary)"},children:[v," agent time · ",q," active day",1===q?"":"s"," · ",p," PR",1===p?"":"s"]}),w&&(0,b.jsxs)("span",{style:{fontFamily:"var(--font-mono)",fontSize:11,color:"var(--af-text-tertiary)",padding:"1px 7px",borderRadius:999,border:"1px solid var(--af-border-subtle)"},title:"vs the prior calendar week",children:["vs last week: ",w]}),e&&(0,b.jsx)("div",{style:{marginLeft:"auto",display:"inline-flex",alignItems:"center",gap:8},children:e})]}),a.headline?(0,b.jsx)("h1",{style:{fontSize:26,fontWeight:700,lineHeight:1.3,letterSpacing:"-0.02em",margin:"0 0 6px",maxWidth:820,color:"var(--af-text)"},children:j(a.headline)}):(0,b.jsx)("h1",{style:{fontSize:20,color:"var(--af-text-secondary)",margin:"0 0 14px"},children:c?"No narrative yet.":`Worked ${v} across ${a.projects.length} project${1===a.projects.length?"":"s"}.`}),a.key_pattern&&(0,b.jsx)("p",{style:{fontSize:13,fontStyle:"italic",margin:0,lineHeight:1.5,color:"var(--af-text-secondary)",maxWidth:820},children:j(a.key_pattern)})]}),!c&&(0,b.jsxs)("div",{style:{padding:14,marginBottom:24,background:"var(--af-accent-subtle)",borderRadius:8,fontSize:13,color:"var(--af-text)"},children:["Enable AI features in ",(0,b.jsx)(d.default,{href:"/settings",style:{color:"var(--af-accent)"},children:"Settings"})," to see weekly narratives."]}),(0,b.jsx)(t,{digest:a}),(0,b.jsx)(x,{digest:a}),a.top_goal_categories.length>0&&(0,b.jsx)(K,{title:"Goal mix",anchor:"goals",children:(0,b.jsx)(k.GoalBar,{goals:a.top_goal_categories,total:a.agent_min_total})}),(0,b.jsx)(B,{digest:a}),a.top_sessions&&a.top_sessions.length>0&&(0,b.jsx)(O,{sessions:a.top_sessions}),(0,b.jsx)(F,{title:"What worked",anchor:"what-worked",items:a.what_worked??[],tone:"#48bb78",sectionFallbackProse:null}),(0,b.jsx)(F,{title:"What stalled",anchor:"what-stalled",items:a.what_stalled??[],tone:"#ed8936",sectionFallbackProse:"No stalls stuck this week."}),(0,b.jsx)(I,{items:a.what_surprised??[]}),(0,b.jsx)(J,{items:a.where_to_lean??[]}),(0,b.jsx)(E,{shipped:a.shipped}),!a.working_shapes&&(0,b.jsx)(s,{digest:a})]})}function s({digest:a}){let c=a.recurring_themes??[],d=a.outcome_correlations??[],e=a.friction_categories??[],f=a.suggestions,g=a.on_the_horizon,h=a.fun_ending;return c.length>0||d.length>0||e.length>0||(f?.claude_md_additions?.length??0)>0||g||h?(0,b.jsxs)("div",{style:{padding:"14px 16px",marginTop:18,borderRadius:8,background:"color-mix(in srgb, var(--af-text-tertiary) 5%, var(--af-surface))",border:"1px dashed var(--af-border-subtle)",fontSize:12,color:"var(--af-text-secondary)",lineHeight:1.55},children:[(0,b.jsx)("strong",{style:{color:"var(--af-text)"},children:"Legacy digest:"})," this week was generated under a previous prompt. Re-roll the digest to refresh it under the new working-shapes narrative."]}):null}function t({digest:a}){let c=a.agent_min_total/60,e=c>=1?`${c.toFixed(1)}h`:`${Math.round(a.agent_min_total)}m`,f=function(a){let b=a.reduce((a,b)=>a+b,0);if(0===b)return null;for(let c=1;c<=24;c++){let d=0,e=0;for(let b=0;b<=24-c;b++){let f=0;for(let d=0;d<c;d++)f+=a[b+d]??0;f>d&&(d=f,e=b)}if(d/b>=.6)return{start:e,end:e+c,share_pct:d/b*100}}return null}(a.hours_distribution),g=new Map(a.days_active.map(a=>[a.date,a])),h=A(a.window.start),i=h.map(a=>g.get(a)?.agent_min??0),j=Math.max(...i,1),k=a.busiest_day?h.indexOf(a.busiest_day.date):-1,l=a.longest_run&&a.busiest_day?Math.min(1,a.longest_run.active_min/Math.max(1,a.busiest_day.agent_min)):0,m=[];return(m.push({label:"Agent time",primary:e,detail:`across ${a.days_active.length} day${1===a.days_active.length?"":"s"}`,visual:(0,b.jsx)(u,{values:i,max:j,highlight:-1})}),a.busiest_day&&m.push({label:"Busiest day",href:`/digest/${a.busiest_day.date}`,primary:`${L(a.busiest_day.date)} ${a.busiest_day.date.slice(5)}`,detail:`${Math.round(a.busiest_day.agent_min)}m \xb7 ${a.busiest_day.shipped_count} PR${1===a.busiest_day.shipped_count?"":"s"}`,visual:(0,b.jsx)(u,{values:i,max:j,highlight:k})}),a.longest_run&&m.push({label:"Longest single run",href:`/sessions/${a.longest_run.session_id}`,title:`Session ${a.longest_run.session_id.slice(0,8)}`,primary:`${Math.round(a.longest_run.active_min)}m`,detail:`${a.longest_run.project_display} \xb7 ${L(a.longest_run.date)} ${a.longest_run.date.slice(5)}`,visual:(0,b.jsx)(v,{ratio:l,caption:"vs busiest day"})}),f&&m.push({label:"Peak hours",title:`${z(f.start,f.end)} carried ${f.share_pct.toFixed(0)}% of the week's agent time`,primary:z(f.start,f.end),detail:`${f.share_pct.toFixed(0)}% of agent time`,visual:(0,b.jsx)(w,{hours:a.hours_distribution,peakStart:f.start,peakEnd:f.end})}),0===m.length)?null:(0,b.jsx)("section",{style:{display:"grid",gridTemplateColumns:`repeat(${Math.min(m.length,4)}, minmax(0, 1fr))`,gap:10,marginBottom:20},children:m.map((a,c)=>{let e=(0,b.jsxs)("div",{style:{padding:"12px 14px",borderRadius:10,background:"var(--af-surface)",border:"1px solid var(--af-border-subtle)",height:"100%",display:"flex",flexDirection:"column",justifyContent:"space-between",minHeight:90},title:a.title,children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{style:{fontSize:9,fontWeight:700,letterSpacing:"0.08em",textTransform:"uppercase",color:"var(--af-text-tertiary)",marginBottom:6},children:a.label}),(0,b.jsx)("div",{style:{fontSize:17,fontWeight:600,color:"var(--af-text)",letterSpacing:"-0.01em",lineHeight:1.2},children:a.primary}),(0,b.jsx)("div",{style:{fontSize:10.5,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)",marginTop:3},children:a.detail})]}),a.visual&&(0,b.jsx)("div",{style:{marginTop:10},children:a.visual})]});return a.href?(0,b.jsx)(d.default,{href:a.href,style:{textDecoration:"none"},children:e},c):(0,b.jsx)("div",{children:e},c)})})}function u({values:a,max:c,highlight:d}){return(0,b.jsx)("div",{style:{display:"flex",gap:2,alignItems:"flex-end",height:18},children:a.map((a,e)=>{let f=c>0?Math.max(1,a/c*18):1,g=e===d;return(0,b.jsx)("div",{style:{flex:1,height:f,borderRadius:1,background:g?"var(--af-accent)":a>0?"color-mix(in srgb, var(--af-accent) 30%, transparent)":"var(--af-border-subtle)"}},e)})})}function v({ratio:a,caption:c}){let d=100*Math.max(0,Math.min(1,a));return(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{style:{height:6,borderRadius:99,overflow:"hidden",background:"var(--af-border-subtle)"},children:(0,b.jsx)("div",{style:{width:`${d}%`,height:"100%",background:"var(--af-accent)"}})}),(0,b.jsxs)("div",{style:{fontSize:9,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)",marginTop:3},children:[Math.round(d),"% ",c]})]})}function w({hours:a,peakStart:c,peakEnd:d}){let e=Math.max(...a,1);return(0,b.jsx)("div",{style:{display:"flex",gap:1,alignItems:"flex-end",height:18},children:a.map((a,f)=>{let g=f>=c&&f<=d,h=e>0?Math.max(1,a/e*18):1;return(0,b.jsx)("div",{style:{flex:1,height:h,borderRadius:1,background:g?"var(--af-accent)":a>0?"color-mix(in srgb, var(--af-accent) 22%, transparent)":"var(--af-border-subtle)"}},f)})})}function x({digest:a}){if(0===a.days_active.length)return null;let c=Math.max(...a.days_active.map(a=>a.agent_min)),e=new Map(a.days_active.map(a=>[a.date,a])),f=A(a.window.start);return(0,b.jsx)("section",{style:{display:"flex",gap:6,alignItems:"stretch",padding:"12px 0",marginBottom:24},children:f.map((a,f)=>{let g=e.get(a),h=g?.agent_min??0,i=c>0&&h>0?Math.max(8,h/c*100):0,j=g?y[g.outcome_day]:"var(--af-text-tertiary)",k=g?.helpfulness_day?l[g.helpfulness_day]:null;return(0,b.jsxs)(d.default,{href:g?`/digest/${a}`:"#",style:{flex:1,display:"flex",flexDirection:"column",alignItems:"stretch",gap:2,textDecoration:"none",pointerEvents:g?"auto":"none"},title:g?`${a} \xb7 ${Math.round(h)}m \xb7 ${g.outcome_day}${g.shipped_count>0?` \xb7 ${g.shipped_count} PR`:""}${g.helpfulness_day?` \xb7 helpfulness ${g.helpfulness_day}`:""}`:"no activity",children:[(0,b.jsxs)("div",{style:{height:56,borderRadius:4,position:"relative",background:"var(--af-surface)",border:`1px solid ${g?`color-mix(in srgb, ${j} 28%, var(--af-border-subtle))`:"var(--af-border-subtle)"}`,overflow:"hidden"},children:[g&&(0,b.jsx)("div",{style:{position:"absolute",bottom:0,left:0,right:0,height:`${i}%`,background:`color-mix(in srgb, ${j} 28%, transparent)`}}),g?.dominant_shape&&o[g.dominant_shape]&&(0,b.jsx)("div",{title:`${n[g.dominant_shape]??g.dominant_shape}`,style:{position:"absolute",top:0,left:0,right:0,height:3,background:o[g.dominant_shape]}}),k&&(0,b.jsx)("div",{style:{position:"absolute",top:4,right:4,width:6,height:6,borderRadius:999,background:k},title:g?.helpfulness_day??""})]}),(0,b.jsx)("div",{style:{fontSize:9,fontWeight:700,letterSpacing:"0.06em",color:"var(--af-text-tertiary)",textAlign:"center"},children:m[f]}),(0,b.jsx)("div",{style:{fontSize:9,fontFamily:"var(--font-mono)",color:g?"var(--af-text-secondary)":"var(--af-text-tertiary)",textAlign:"center"},children:g?`${Math.round(h)}m`:"—"})]},f)})})}let y={shipped:"#48bb78",partial:"#4299e1",blocked:"#f56565",exploratory:"#a0aec0",trivial:"#cbd5e0",idle:"#cbd5e0"};function z(a,b){let c=a=>`${a%12||12}${a<12||24===a?"am":"pm"}`;return`${c(a)}–${c(b)}`}function A(a){let b=[],c=new Date(a);for(let a=0;a<7;a++){let d=new Date(c);d.setDate(c.getDate()+a);let e=d.getFullYear(),f=String(d.getMonth()+1).padStart(2,"0"),g=String(d.getDate()).padStart(2,"0");b.push(`${e}-${f}-${g}`)}return b}function B({digest:a}){let c=a.trajectory&&a.trajectory.length>0,e=a.standout_days&&a.standout_days.length>0,f=a.projects.filter(a=>a.share_pct>=5||a.shipped_count>0),g=f.length>0;return c||e||g?(0,b.jsxs)(K,{title:"Through the week",anchor:"through-the-week",children:[(c||e)&&(0,b.jsxs)("div",{style:{display:"grid",gridTemplateColumns:c&&e?"minmax(0, 1.4fr) minmax(0, 1fr)":"1fr",gap:28,marginBottom:22*!!g},children:[c&&(0,b.jsxs)("div",{children:[(0,b.jsx)(C,{children:"Trajectory"}),(0,b.jsx)("ol",{style:{listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:6},children:a.trajectory.map(a=>(0,b.jsxs)("li",{style:{display:"flex",gap:12,alignItems:"flex-start"},children:[(0,b.jsxs)(d.default,{href:`/digest/${a.date}`,style:{fontSize:10,fontWeight:600,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)",flexShrink:0,width:64,paddingTop:3,textDecoration:"none"},children:[L(a.date)," ",a.date.slice(5)]}),(0,b.jsx)("span",{style:{fontSize:12.5,lineHeight:1.55,color:"var(--af-text-secondary)"},children:j(a.line)})]},a.date))})]}),e&&(0,b.jsxs)("div",{children:[(0,b.jsx)(C,{children:"Standout days"}),(0,b.jsx)("ul",{style:{listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:8},children:a.standout_days.map(a=>(0,b.jsxs)("li",{style:{padding:"10px 12px",borderRadius:8,background:"var(--af-surface)",border:"1px solid var(--af-border-subtle)"},children:[(0,b.jsxs)(d.default,{href:`/digest/${a.date}`,style:{fontSize:11,fontWeight:600,color:"var(--af-accent)",textDecoration:"none",fontFamily:"var(--font-mono)",marginRight:8},children:[L(a.date)," ",a.date.slice(5)]}),(0,b.jsx)("span",{style:{fontSize:12.5,lineHeight:1.55,color:"var(--af-text)"},children:j(a.why)})]},a.date))})]})]}),g&&(0,b.jsxs)("div",{children:[(0,b.jsx)(C,{children:"Project areas"}),(0,b.jsx)("ul",{style:{listStyle:"none",padding:0,margin:0,display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(280px, 1fr))",gap:10},children:f.map(a=>(0,b.jsxs)("li",{style:{padding:"11px 13px",borderRadius:8,background:"var(--af-surface)",border:"1px solid var(--af-border-subtle)",display:"flex",flexDirection:"column"},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:10,marginBottom:6*!!a.description},children:[(0,b.jsx)(d.default,{href:`/projects/${encodeURIComponent(a.name)}`,style:{fontSize:13,fontWeight:600,color:"var(--af-text)",textDecoration:"none",flex:1,minWidth:0,letterSpacing:"-0.01em"},children:a.display_name}),(0,b.jsxs)("span",{style:{fontFamily:"var(--font-mono)",fontSize:10,color:"var(--af-text-tertiary)"},children:[Math.round(a.agent_min),"m · ",a.share_pct.toFixed(0),"% · ",a.shipped_count," PR"]})]}),a.description&&(0,b.jsx)("p",{style:{fontSize:12,lineHeight:1.5,margin:0,color:"var(--af-text-secondary)"},children:a.description})]},a.name))})]})]}):null}function C({children:a}){return(0,b.jsx)("div",{style:{fontSize:10,color:"var(--af-text-tertiary)",textTransform:"uppercase",letterSpacing:"0.08em",fontWeight:700,marginBottom:10},children:a})}function D({label:a,payload:d}){let[g,h]=(0,c.useState)(!1);return(0,b.jsxs)("div",{style:{position:"relative"},children:[(0,b.jsx)("pre",{style:{margin:0,padding:"10px 12px",paddingRight:96,borderRadius:6,background:"var(--af-surface-raised)",border:"1px solid var(--af-border-subtle)",fontSize:11,fontFamily:"var(--font-mono)",color:"var(--af-text)",whiteSpace:"pre-wrap",wordBreak:"break-word",lineHeight:1.55,overflowX:"auto",maxHeight:280,overflowY:"auto"},children:d}),(0,b.jsx)("button",{type:"button",onClick:async()=>{try{await navigator.clipboard.writeText(d),h(!0),setTimeout(()=>h(!1),1500)}catch{}},style:{position:"absolute",top:8,right:8,display:"inline-flex",alignItems:"center",gap:4,padding:"4px 8px",borderRadius:5,background:g?"color-mix(in srgb, #48bb78 18%, var(--af-surface))":"var(--af-surface)",border:`1px solid ${g?"#48bb78":"var(--af-border-subtle)"}`,color:g?"#48bb78":"var(--af-text-secondary)",fontSize:10,fontWeight:600,cursor:"pointer"},children:g?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(e.Check,{size:10})," Copied"]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(f.Copy,{size:10})," ",a]})})]})}function E({shipped:a}){let[e,f]=(0,c.useState)(!1);if(0===a.length)return null;let g=a.length>=10,h=g&&!e?a.slice(0,5):a,i=a.length-h.length;return(0,b.jsxs)(K,{title:`Shipped (${a.length})`,anchor:"shipped",children:[(0,b.jsx)("ul",{style:{listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:4},children:h.map((a,c)=>(0,b.jsxs)("li",{style:{display:"flex",gap:10,alignItems:"baseline",padding:"6px 10px",borderRadius:6,fontSize:12,color:"var(--af-text)"},children:[(0,b.jsxs)(d.default,{href:`/digest/${a.date}`,style:{fontFamily:"var(--font-mono)",fontSize:10,color:"var(--af-text-tertiary)",flexShrink:0,width:56,textDecoration:"none"},children:[L(a.date)," ",a.date.slice(5)]}),(0,b.jsx)("span",{style:{flex:1,minWidth:0},children:a.title}),(0,b.jsx)("span",{style:{fontSize:10,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)"},children:a.project})]},c))}),g&&i>0&&(0,b.jsxs)("button",{type:"button",onClick:()=>f(!0),style:{marginTop:6,padding:"4px 10px",borderRadius:5,background:"transparent",border:"1px solid var(--af-border-subtle)",fontSize:10,color:"var(--af-text-secondary)",cursor:"pointer",fontFamily:"var(--font-mono)"},children:["+",i," more"]}),g&&e&&(0,b.jsx)("button",{type:"button",onClick:()=>f(!1),style:{marginTop:6,padding:"4px 10px",borderRadius:5,background:"transparent",border:"1px solid var(--af-border-subtle)",fontSize:10,color:"var(--af-text-secondary)",cursor:"pointer",fontFamily:"var(--font-mono)"},children:"show less"})]})}function F({title:a,anchor:c,items:d,tone:e,sectionFallbackProse:f}){return d&&0!==d.length?(0,b.jsx)(K,{title:a,anchor:c,children:(0,b.jsx)("ul",{style:{listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:10},children:d.map((a,c)=>(0,b.jsx)(G,{item:a,tone:e},c))})}):null===f?null:(0,b.jsx)(K,{title:a,anchor:c,children:(0,b.jsx)("p",{style:{fontSize:12,fontStyle:"italic",color:"var(--af-text-tertiary)",margin:0,padding:"8px 0"},children:f})})}function G({item:a,tone:c}){let e=H(a.anchor);return(0,b.jsxs)("li",{style:{padding:"12px 14px",borderRadius:10,background:`color-mix(in srgb, ${c} 6%, var(--af-surface))`,border:`1px solid color-mix(in srgb, ${c} 22%, var(--af-border))`},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:8,marginBottom:4,flexWrap:"wrap"},children:[(0,b.jsx)("span",{style:{fontSize:13,fontWeight:600,color:"var(--af-text)",letterSpacing:"-0.01em",flex:1,minWidth:0},children:a.title}),(0,b.jsx)("span",{style:{fontSize:9,fontWeight:700,letterSpacing:"0.04em",textTransform:"uppercase",color:c,padding:"1px 7px",borderRadius:999,background:`color-mix(in srgb, ${c} 14%, transparent)`,border:`1px solid color-mix(in srgb, ${c} 28%, transparent)`,fontFamily:"var(--font-mono)"},title:`Anchor: ${a.anchor}`,children:e})]}),(0,b.jsx)("p",{style:{fontSize:12,lineHeight:1.6,margin:"0 0 8px",color:"var(--af-text)"},children:a.detail}),(0,b.jsxs)("div",{style:{padding:"6px 10px",borderRadius:6,background:"var(--af-surface-raised)",borderLeft:`2px solid color-mix(in srgb, ${c} 50%, transparent)`,display:"flex",gap:8,alignItems:"flex-start"},children:[(0,b.jsxs)(d.default,{href:`/digest/${a.evidence.date}`,style:{fontSize:10,fontWeight:600,color:c,fontFamily:"var(--font-mono)",flexShrink:0,textDecoration:"none",paddingTop:2},children:[L(a.evidence.date)," ",a.evidence.date.slice(5)]}),(0,b.jsxs)("span",{style:{fontSize:11,lineHeight:1.5,color:"var(--af-text)",fontStyle:"italic"},children:[(0,b.jsx)("span",{style:{color:"var(--af-text-tertiary)"},children:"“"}),a.evidence.quote,(0,b.jsx)("span",{style:{color:"var(--af-text-tertiary)"},children:"”"})]})]})]})}function H(a){return"plan-mode-gap"===a?"Plan-mode gap":a.startsWith("interaction_grammar.")?a.slice(20).replace(/_/g," "):n[a]??a}function I({items:a}){return a&&0!==a.length?(0,b.jsx)(K,{title:"What surprised",anchor:"what-surprised",children:(0,b.jsx)("ul",{style:{listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:10},children:a.map((a,c)=>{let e="#b794f4";return(0,b.jsxs)("li",{style:{padding:"12px 14px",borderRadius:10,background:`color-mix(in srgb, ${e} 6%, var(--af-surface))`,border:`1px solid color-mix(in srgb, ${e} 22%, var(--af-border))`},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:8,marginBottom:4,flexWrap:"wrap"},children:[(0,b.jsx)("span",{style:{fontSize:13,fontWeight:600,color:"var(--af-text)",letterSpacing:"-0.01em",flex:1,minWidth:0},children:a.title}),(0,b.jsx)("span",{style:{fontSize:9,fontWeight:700,letterSpacing:"0.04em",textTransform:"uppercase",color:e,padding:"1px 7px",borderRadius:999,background:`color-mix(in srgb, ${e} 14%, transparent)`,border:`1px solid color-mix(in srgb, ${e} 28%, transparent)`,fontFamily:"var(--font-mono)"},children:p[a.surprise_kind]??a.surprise_kind})]}),(0,b.jsx)("p",{style:{fontSize:12,lineHeight:1.6,margin:"0 0 8px",color:"var(--af-text)"},children:a.detail}),(0,b.jsxs)("div",{style:{padding:"6px 10px",borderRadius:6,background:"var(--af-surface-raised)",borderLeft:`2px solid color-mix(in srgb, ${e} 50%, transparent)`,display:"flex",gap:8,alignItems:"flex-start"},children:[(0,b.jsxs)(d.default,{href:`/digest/${a.evidence.date}`,style:{fontSize:10,fontWeight:600,color:e,fontFamily:"var(--font-mono)",flexShrink:0,textDecoration:"none",paddingTop:2},children:[L(a.evidence.date)," ",a.evidence.date.slice(5)]}),(0,b.jsxs)("span",{style:{fontSize:11,lineHeight:1.5,color:"var(--af-text)",fontStyle:"italic"},children:[(0,b.jsx)("span",{style:{color:"var(--af-text-tertiary)"},children:"“"}),a.evidence.quote,(0,b.jsx)("span",{style:{color:"var(--af-text-tertiary)"},children:"”"})]})]})]},c)})})}):null}function J({items:a}){return a&&0!==a.length?(0,b.jsx)(K,{title:"Where to lean",anchor:"where-to-lean",children:(0,b.jsx)("ul",{style:{listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:12},children:a.map((a,c)=>{let e="var(--af-accent)",f=H(a.anchor);return(0,b.jsxs)("li",{style:{padding:"14px 16px",borderRadius:10,background:"var(--af-surface)",border:"1px solid var(--af-border-subtle)"},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:8,marginBottom:6,flexWrap:"wrap"},children:[(0,b.jsx)("span",{style:{fontSize:9,fontWeight:700,letterSpacing:"0.06em",textTransform:"uppercase",color:e,padding:"1px 7px",borderRadius:999,background:`color-mix(in srgb, ${e} 14%, transparent)`,border:`1px solid color-mix(in srgb, ${e} 28%, transparent)`,fontFamily:"var(--font-mono)"},children:q[a.lean_kind]??a.lean_kind}),(0,b.jsx)("span",{style:{fontSize:13,fontWeight:600,color:"var(--af-text)",flex:1,minWidth:0},children:a.title}),(0,b.jsxs)("span",{style:{fontSize:9,fontWeight:700,letterSpacing:"0.04em",textTransform:"uppercase",color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)"},title:`Anchor: ${a.anchor}`,children:["↳ ",f]})]}),(0,b.jsx)("p",{style:{fontSize:12,lineHeight:1.6,margin:"0 0 10px",color:"var(--af-text)"},children:a.detail}),a.copyable&&(0,b.jsx)(D,{label:`Copy ${"claude-md"===a.lean_kind?"block":"snippet"}`,payload:a.copyable}),(0,b.jsxs)("div",{style:{marginTop:8,fontSize:10,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)"},children:["Evidence · ",(0,b.jsxs)(d.default,{href:`/digest/${a.evidence.date}`,style:{color:"var(--af-text-tertiary)",textDecoration:"underline"},children:[L(a.evidence.date)," ",a.evidence.date.slice(5)]})," · “",a.evidence.quote.slice(0,100),a.evidence.quote.length>100?"…":"","”"]})]},c)})})}):null}function K({title:a,anchor:c,children:d}){return(0,b.jsxs)("section",{id:c,style:{marginBottom:28,scrollMarginTop:24},children:[(0,b.jsx)("h2",{style:{fontSize:11,fontWeight:700,letterSpacing:"0.08em",textTransform:"uppercase",color:"var(--af-text-tertiary)",margin:"0 0 12px"},children:a}),d]})}function L(a){return new Date(`${a}T12:00:00`).toLocaleDateString("en-US",{weekday:"short"})}let M={"user-steering":"#ed8936","subagent-burst":"#9f7aea","long-autonomous":"#4299e1","plan-mode":"#38b2ac","pr-ship":"#48bb78","harness-chain":"#ed64a6",interrupt:"#f56565","brainstorm-loop":"#9f7aea","agent-loop":"#f56565"},N={"user-steering":"Steering","subagent-burst":"Subagents","long-autonomous":"Autonomous","plan-mode":"Plan","pr-ship":"Shipped","harness-chain":"Harness",interrupt:"Interrupt","brainstorm-loop":"Brainstorm","agent-loop":"Loop"};function O({sessions:a}){return(0,b.jsxs)(K,{title:`Top ${a.length} session${1===a.length?"":"s"} this week`,anchor:"top-sessions",children:[(0,b.jsx)("p",{style:{fontSize:12,color:"var(--af-text-tertiary)",marginTop:-4,marginBottom:14,fontStyle:"italic",lineHeight:1.5,maxWidth:720},children:"Picked by significance — active time × subagents × ships, capped to one per project. Each card walks the timeline with annotated moments to surface the texture of how you drove the agent."}),(0,b.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:16},children:a.map(a=>(0,b.jsx)(P,{session:a},a.session_id))})]})}function P({session:a}){let c=a.working_shape?n[a.working_shape]??a.working_shape:null,e=a.working_shape?o[a.working_shape]??"var(--af-text-tertiary)":"var(--af-text-tertiary)",f=a.wall_min/60,g=a.active_min/60,h=f>=1?`${f.toFixed(1)}h wall`:`${Math.round(a.wall_min)}m wall`,i=g>=1?`${g.toFixed(1)}h active`:`${Math.round(a.active_min)}m active`;return(0,b.jsx)("div",{style:{borderRadius:10,background:"var(--af-surface)",border:"1px solid var(--af-border-subtle)",borderTop:`3px solid ${e}`,overflow:"hidden"},children:(0,b.jsxs)("div",{style:{padding:"16px 18px"},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:12,flexWrap:"wrap",marginBottom:6},children:[(0,b.jsx)(d.default,{href:`/sessions/${a.session_id}`,style:{fontSize:14,fontWeight:600,color:"var(--af-text)",letterSpacing:"-0.01em",textDecoration:"none"},children:a.project_display}),(0,b.jsxs)(d.default,{href:`/digest/${a.date}`,style:{fontSize:11,fontFamily:"var(--font-mono)",color:"var(--af-accent)",textDecoration:"none"},children:[L(a.date)," ",a.date.slice(5)]}),(0,b.jsxs)("span",{style:{fontSize:11,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)"},children:[i," · ",h," · ",a.turn_count," turns"]}),c&&(0,b.jsx)("span",{style:{padding:"2px 9px",borderRadius:999,fontSize:11,fontWeight:600,background:`color-mix(in srgb, ${e} 14%, transparent)`,color:e},children:c}),"shipped"===a.outcome&&a.shipped_prs.length>0&&(0,b.jsxs)("span",{style:{padding:"2px 9px",borderRadius:999,fontSize:11,fontWeight:600,background:"color-mix(in srgb, #48bb78 14%, transparent)",color:"#48bb78"},children:["✓ ",a.shipped_prs.length," PR",1===a.shipped_prs.length?"":"s"]})]}),a.day_signature&&(0,b.jsxs)("p",{style:{fontSize:12,fontStyle:"italic",color:"var(--af-text-secondary)",margin:"0 0 14px",lineHeight:1.5,maxWidth:760},children:["“",a.day_signature,"”"]}),(0,b.jsx)(Q,{session:a}),a.steering_summary&&(0,b.jsxs)("p",{style:{fontSize:12,lineHeight:1.55,margin:"10px 0 12px",color:"var(--af-text-secondary)",maxWidth:780,paddingLeft:10,borderLeft:"2px solid var(--af-border-subtle)"},children:[(0,b.jsx)("span",{style:{fontSize:9,fontWeight:700,letterSpacing:"0.06em",textTransform:"uppercase",color:"var(--af-text-tertiary)",marginRight:6},children:"steering"}),a.steering_summary]}),(0,b.jsx)(S,{session:a}),(0,b.jsx)(V,{session:a}),a.pins.length>0&&(0,b.jsx)("ol",{style:{listStyle:"none",padding:0,margin:"12px 0 0",display:"flex",flexDirection:"column",gap:6},children:a.pins.map((a,c)=>(0,b.jsx)(W,{pin:a},c))})]})})}function Q({session:a}){return a.why_picked||a.what_worked||a.what_hit_friction?(0,b.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:10,margin:"0 0 6px"},children:[a.why_picked&&(0,b.jsx)(R,{label:"Why this session",tone:"var(--af-text-tertiary)",accent:"var(--af-text-tertiary)",text:a.why_picked}),a.session_summary&&(0,b.jsx)(R,{label:"What happened",tone:"var(--af-text)",accent:"var(--af-text-secondary)",text:a.session_summary,weight:500}),a.what_worked&&(0,b.jsx)(R,{label:"What worked",tone:"var(--af-text)",accent:"#48bb78",text:a.what_worked}),a.what_hit_friction&&(0,b.jsx)(R,{label:"What hit friction",tone:"var(--af-text)",accent:"#ed8936",text:a.what_hit_friction})]}):a.session_summary?(0,b.jsx)("p",{style:{fontSize:13,lineHeight:1.55,margin:"0 0 8px",color:"var(--af-text)",maxWidth:780},children:a.session_summary}):null}function R({label:a,tone:c,accent:d,text:e,weight:f=400}){return(0,b.jsxs)("div",{style:{display:"flex",gap:12,alignItems:"flex-start",maxWidth:800},children:[(0,b.jsx)("span",{style:{flexShrink:0,width:132,paddingTop:2,fontSize:9.5,fontWeight:700,letterSpacing:"0.06em",textTransform:"uppercase",color:d},children:a}),(0,b.jsx)("span",{style:{fontSize:13,lineHeight:1.55,color:c,fontWeight:f},children:e})]})}function S({session:a}){let{user_authored_skills:c,user_authored_subagents:d,stock_skills:e,top_tools:f}=a;return c.length>0||d.length>0||e.length>0||f.length>0?(0,b.jsxs)("div",{style:{marginBottom:4},children:[d.length>0&&(0,b.jsx)(T,{label:"Your subagents",children:d.map(a=>(0,b.jsxs)(U,{tone:"user",children:[a.type,a.count>1?` \xd7${a.count}`:""]},a.type))}),(c.length>0||e.length>0)&&(0,b.jsxs)(T,{label:"Skills loaded",children:[c.map(a=>(0,b.jsx)(U,{tone:"user",children:a},a)),e.slice(0,6).map(a=>(0,b.jsx)(U,{tone:"stock",children:a},a))]}),f.length>0&&(0,b.jsx)(T,{label:"Top tools",children:f.slice(0,4).map((a,c)=>(0,b.jsx)(U,{children:a},c))})]}):null}function T({label:a,children:c}){return(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,flexWrap:"wrap",padding:"3px 0",fontSize:11},children:[(0,b.jsx)("span",{style:{minWidth:96,color:"var(--af-text-tertiary)",fontWeight:500,fontSize:10,textTransform:"uppercase",letterSpacing:"0.04em"},children:a}),(0,b.jsx)("div",{style:{display:"flex",gap:5,flexWrap:"wrap",flex:1},children:c})]})}function U({children:a,tone:c,title:d}){return(0,b.jsx)("span",{title:d,style:{display:"inline-flex",alignItems:"center",padding:"2px 8px",borderRadius:999,fontSize:10,fontFamily:"var(--font-mono)",background:"user"===c?"var(--af-accent-subtle)":"var(--af-border-subtle)",color:"user"===c?"var(--af-accent)":"var(--af-text-secondary)",whiteSpace:"nowrap",maxWidth:280,overflow:"hidden",textOverflow:"ellipsis"},children:a})}function V({session:a}){let c=a.timeline.active_intervals,d=c.length>0?Math.max(...c.map(a=>a.end_min)):0,e=Math.max(1,a.timeline.duration_min,d);return(0,b.jsxs)("div",{style:{marginTop:10,marginBottom:4},children:[(0,b.jsxs)("div",{style:{position:"relative",width:"100%",height:28,background:"var(--af-border-subtle)",borderRadius:4},children:[c.map((a,c)=>{let d=a.start_min/e*100,f=Math.max(.6,(a.end_min-a.start_min)/e*100);return(0,b.jsx)("div",{style:{position:"absolute",top:6,bottom:6,left:`${d}%`,width:`${f}%`,background:"color-mix(in srgb, var(--af-accent) 30%, transparent)",borderRadius:2}},c)}),a.pins.map((a,c)=>{let d=Math.max(0,Math.min(100,a.start_min/e*100)),f=void 0!==a.end_min?Math.max(d+.5,Math.min(100,a.end_min/e*100)):d,g=void 0!==a.end_min&&f>d+.5,h=M[a.kind]??"var(--af-accent)";return(0,b.jsxs)("div",{children:[g&&(0,b.jsx)("div",{style:{position:"absolute",top:4,bottom:4,left:`${d}%`,width:`${f-d}%`,background:`color-mix(in srgb, ${h} 35%, transparent)`,border:`1px solid ${h}`,borderRadius:3},title:`${N[a.kind]}: ${a.label}`}),(0,b.jsx)("div",{style:{position:"absolute",top:-3,bottom:-3,left:`${d}%`,width:3,background:h,borderRadius:1,transform:"translateX(-1.5px)"},title:`${N[a.kind]}: ${a.label}`})]},c)})]}),(0,b.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",fontSize:9,fontFamily:"var(--font-mono)",color:"var(--af-text-tertiary)",marginTop:3},children:[(0,b.jsx)("span",{children:"0m"}),(0,b.jsx)("span",{children:X(e/2)}),(0,b.jsxs)("span",{children:[X(e)," wall"]})]})]})}function W({pin:a}){let c=M[a.kind]??"var(--af-accent)",d=void 0!==a.end_min&&a.end_min>a.start_min+.5?`${X(a.start_min)}–${X(a.end_min)}`:X(a.start_min);return(0,b.jsxs)("li",{style:{display:"flex",gap:10,alignItems:"flex-start",fontSize:12,lineHeight:1.5},children:[(0,b.jsx)("span",{style:{flexShrink:0,width:3,height:3,marginTop:7,borderRadius:999,background:c}}),(0,b.jsx)("span",{style:{flexShrink:0,fontFamily:"var(--font-mono)",fontSize:10,color:"var(--af-text-tertiary)",paddingTop:1,minWidth:60},children:d}),(0,b.jsx)("span",{style:{flexShrink:0,padding:"1px 7px",borderRadius:999,fontSize:9,fontWeight:700,letterSpacing:"0.04em",textTransform:"uppercase",background:`color-mix(in srgb, ${c} 15%, transparent)`,color:c,marginTop:1},children:N[a.kind]??a.kind}),(0,b.jsx)("span",{style:{color:"var(--af-text)",maxWidth:640},children:a.label})]})}function X(a){if(a>=60){let b=Math.round(a),c=Math.floor(b/60),d=b%60;return`${c}h${d>0?` ${d}m`:""}`}return`${Math.round(10*a)/10}m`}function Y({monday:a,isStreaming:c,aiEnabled:d,progress:e,onGenerate:f}){let g=new Date(`${a}T12:00:00`),h=new Date(g);h.setDate(g.getDate()+6);let i=a=>a.toLocaleDateString("en-US",{month:"short",day:"numeric"}),j=`${i(g)} — ${i(h)}`;return(0,b.jsx)("div",{style:{maxWidth:980,margin:"0 auto",padding:"60px 40px"},children:(0,b.jsxs)("div",{style:{margin:"0 auto",maxWidth:480,padding:"32px 28px",borderRadius:14,background:"var(--af-surface)",border:"1px dashed var(--af-border-subtle)",textAlign:"center"},children:[(0,b.jsx)("div",{style:{width:44,height:44,borderRadius:12,margin:"0 auto 16px",background:"var(--af-accent-subtle)",display:"flex",alignItems:"center",justifyContent:"center",color:"var(--af-accent)",fontSize:20},children:"✦"}),(0,b.jsx)("h2",{style:{fontSize:16,fontWeight:600,margin:"0 0 6px",color:"var(--af-text)",letterSpacing:"-0.01em"},children:c?"Generating digest…":"No digest yet for this week"}),(0,b.jsx)("p",{style:{fontSize:12.5,lineHeight:1.55,margin:"0 0 18px",color:"var(--af-text-secondary)"},children:c?`Synthesizing ${j} from this week's day digests. This usually takes 5–10 minutes.`:d?`Once generated, this view shows top sessions, trajectory, findings, and project areas for ${j}.`:`Enable AI features in Settings to synthesize a weekly narrative for ${j}. Deterministic stats are still available below in the live digest as soon as data lands.`}),d&&(0,b.jsx)("button",{onClick:f,disabled:c,style:{padding:"9px 18px",borderRadius:8,background:c?"var(--af-border-subtle)":"var(--af-accent)",color:c?"var(--af-text-tertiary)":"white",border:"none",cursor:c?"default":"pointer",fontSize:13,fontWeight:600,letterSpacing:"-0.005em"},children:c?"Generating…":"Generate digest"}),e&&(0,b.jsx)("div",{style:{marginTop:12,fontSize:10.5,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)"},children:e})]})})}a.s(["WeekDigestView",0,function({initial:a,monday:d,aiEnabled:e,autoFire:f=!1,prior:g}){var h,i;let[j,k]=(0,c.useState)(a),[l,m]=(0,c.useState)("idle"),[n,o]=(0,c.useState)(""),p=(0,c.useRef)(!1),q=(0,c.useCallback)(async(a=!1)=>{m("streaming"),o("Starting...");let b=`/api/digest/week/${d}${a?"?force=1":""}`,c=await fetch(b,{method:"POST"});if(!c.ok||!c.body){m("error"),o(`Error ${c.status}`);return}let e=c.body.getReader(),f=new TextDecoder,g="";for(;;){let{done:a,value:b}=await e.read();if(a)break;let c=(g+=f.decode(b,{stream:!0})).split("\n\n");for(let a of(g=c.pop()??"",c)){let b=a.split("\n").find(a=>a.startsWith("data: "));if(b)try{let a=JSON.parse(b.slice(6));if("status"===a.type)o(a.text);else if("dependency"===a.type)o(`${"day"===a.kind?"Day":"Week"} ${a.key} ${a.status}`);else if("entry"===a.type)o(`Enriching ${a.index}/${a.total}...`);else if("progress"===a.type){let b=Math.round(a.elapsed_ms/1e3);o(`Claude composing… ${a.bytes.toLocaleString()} chars (${b}s)`)}else if("digest"===a.type)a.digest&&"week"===a.digest.scope&&k(a.digest),o("Rendering...");else if("saved"===a.type)o("Saved.");else if("error"===a.type){m("error"),o(a.message);return}}catch{}}}m("done"),o("")},[d]);(0,c.useEffect)(()=>{f&&!p.current&&"idle"===l&&(p.current=!0,q(!1))},[f,l,q]);let s="streaming"===l,t=!!j?.headline,u=null;return(!t&&e?u=(0,b.jsx)("button",{onClick:()=>q(!1),disabled:s,style:{padding:"4px 10px",background:"var(--af-accent)",color:"white",border:"none",borderRadius:5,cursor:(h=s)?"default":"pointer",fontSize:11,fontWeight:600,opacity:h?.6:1},children:s?"Generating...":j?"Generate":"Generate digest"}):e&&(u=(0,b.jsxs)("span",{style:{fontSize:10,color:"var(--af-text-tertiary)",display:"inline-flex",gap:6,alignItems:"center"},children:["✓ Up to date",(0,b.jsx)("button",{onClick:()=>q(!0),disabled:s,title:"Re-roll the narrative for this week",style:{padding:"2px 7px",background:"transparent",border:"1px solid var(--af-border-subtle)",borderRadius:4,fontSize:10,color:"var(--af-text-secondary)",cursor:(i=s)?"default":"pointer",opacity:i?.6:1},children:s?"...":"Re-roll"})]})),n&&(u=(0,b.jsxs)(b.Fragment,{children:[u,(0,b.jsx)("span",{style:{fontSize:10,color:"var(--af-text-tertiary)"},children:n})]})),j)?(0,b.jsx)(r,{digest:j,aiEnabled:e,actions:u,priorDigest:g??null}):(0,b.jsx)(Y,{monday:d,isStreaming:s,aiEnabled:e,progress:n,onGenerate:()=>q(!1)})}],85041)},76435,a=>{"use strict";var b=a.i(87924),c=a.i(38246),d=a.i(72131),e=a.i(13749),f=a.i(50522);let g=(0,a.i(70106).default)("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);var h=a.i(33508);function i({inDrawer:a=!1}={}){let[c,e]=(0,d.useState)("weeks"),[f,g]=(0,d.useState)(null),[h,p]=(0,d.useState)(null);return(0,d.useEffect)(()=>{fetch("/api/digest/week-index?count=12").then(a=>a.json()).then(a=>g(a.weeks)).catch(()=>g([])),fetch("/api/digest/month-index?count=6").then(a=>a.json()).then(a=>p(a.months)).catch(()=>p([]))},[]),(0,b.jsxs)("div",{style:a?{padding:"0 18px"}:{maxWidth:980,margin:"0 auto",padding:"28px 40px 0"},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:a?14:18},children:[!a&&(0,b.jsx)("h2",{style:{fontSize:11,fontWeight:700,letterSpacing:"0.08em",textTransform:"uppercase",color:"var(--af-text-tertiary)",margin:0,marginRight:4},children:"History"}),(0,b.jsx)("div",{style:m,children:["weeks","months"].map(a=>(0,b.jsx)("button",{type:"button",onClick:()=>e(a),style:{...n,background:c===a?"var(--af-accent)":"transparent",color:c===a?"white":"var(--af-text-secondary)"},children:"weeks"===a?"Weeks":"Months"},a))})]}),"weeks"===c?null===f?(0,b.jsx)(l,{children:"Loading weeks…"}):0===f.length?(0,b.jsx)(l,{children:"No history yet."}):(0,b.jsx)("ul",{style:o,children:f.map(a=>(0,b.jsx)(j,{w:a},a.start))}):null===h?(0,b.jsx)(l,{children:"Loading months…"}):0===h.length?(0,b.jsx)(l,{children:"No history yet."}):(0,b.jsx)("ul",{style:o,children:h.map(a=>(0,b.jsx)(k,{m:a},a.start))})]})}function j({w:a}){let d=0===a.active_days&&!a.in_progress&&!a.saved_key,e=a.saved_key?`/insights/${a.saved_key}`:`/insights/week-${a.start}`,f=a.saved_key&&a.headline?a.headline:d?"no data":a.in_progress?"in progress · click to view":`${a.active_days} active day${1===a.active_days?"":"s"} \xb7 click to generate`;return(0,b.jsx)("li",{style:p(!!a.saved_key),children:(0,b.jsxs)(c.default,{href:e,style:{display:"flex",flexDirection:"column",gap:4,textDecoration:"none",flex:1,minWidth:0},children:[(0,b.jsxs)("div",{style:q,children:[(0,b.jsxs)("span",{style:{fontSize:13,fontWeight:600,color:"var(--af-text)",letterSpacing:"-0.01em"},children:["W",String(a.iso_week).padStart(2,"0")," · ",a.label]}),a.in_progress&&(0,b.jsx)("span",{style:s,children:"in progress"}),a.saved_key&&(0,b.jsxs)("span",{style:{fontSize:10,fontWeight:600,color:"var(--af-accent)",marginLeft:"auto"},children:[a.shipped_count," PR · ",a.agent_min,"m"]})]}),(0,b.jsx)("span",{style:r,children:f})]})})}function k({m:a}){let d=0===a.active_days&&!a.in_progress&&!a.saved_key,e=a.saved_key?`/insights/${a.saved_key}`:`/insights/month-${a.start.slice(0,7)}`,f=a.saved_key&&a.headline?a.headline:d?"no data":a.in_progress?"in progress · click to view":`${a.active_days} active day${1===a.active_days?"":"s"} \xb7 click to generate`;return(0,b.jsx)("li",{style:p(!!a.saved_key),children:(0,b.jsxs)(c.default,{href:e,style:{display:"flex",flexDirection:"column",gap:4,textDecoration:"none",flex:1,minWidth:0},children:[(0,b.jsxs)("div",{style:q,children:[(0,b.jsx)("span",{style:{fontSize:13,fontWeight:600,color:"var(--af-text)",letterSpacing:"-0.01em"},children:a.label}),a.in_progress&&(0,b.jsx)("span",{style:s,children:"in progress"}),a.saved_key&&(0,b.jsxs)("span",{style:{fontSize:10,fontWeight:600,color:"var(--af-accent)",marginLeft:"auto"},children:[a.shipped_count," PR · ",a.agent_min,"m"]})]}),(0,b.jsx)("span",{style:r,children:f})]})})}function l({children:a}){return(0,b.jsx)("div",{style:{padding:"20px 18px",borderRadius:10,border:"1px dashed var(--af-border)",background:"var(--af-surface)",fontSize:13,color:"var(--af-text-tertiary)",lineHeight:1.55},children:a})}let m={display:"inline-flex",gap:3,border:"1px solid var(--af-border)",borderRadius:8,padding:2},n={padding:"5px 14px",fontSize:12,fontWeight:600,border:"none",borderRadius:6,cursor:"pointer"},o={listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:4};function p(a){return{display:"flex",alignItems:"stretch",gap:14,padding:"10px 14px",borderRadius:10,border:`1px solid ${a?"color-mix(in srgb, var(--af-accent) 24%, var(--af-border))":"var(--af-border-subtle)"}`,background:a?"color-mix(in srgb, var(--af-accent) 6%, var(--af-surface))":"var(--af-surface)",transition:"border-color 0.15s"}}let q={display:"flex",alignItems:"center",gap:8,minWidth:0},r={fontSize:11,color:"var(--af-text-tertiary)",lineHeight:1.5,fontFamily:"var(--font-mono)"},s={fontSize:10,fontWeight:500,padding:"2px 6px",borderRadius:4,background:"color-mix(in srgb, #f5b445 18%, transparent)",color:"#c08a1f",letterSpacing:"0.02em"};function t({target:a,dir:d}){var g;let h="prev"===d?e.ChevronLeft:f.ChevronRight;return a?(0,b.jsxs)(c.default,{href:`/insights/${a.key}`,style:(g=a.cached,{display:"inline-flex",alignItems:"center",gap:4,padding:"5px 9px",borderRadius:6,border:`1px solid ${g?"color-mix(in srgb, var(--af-accent) 28%, var(--af-border))":"var(--af-border-subtle)"}`,background:g?"color-mix(in srgb, var(--af-accent) 6%, var(--af-surface))":"var(--af-surface)",color:g?"var(--af-accent)":"var(--af-text-secondary)",fontSize:11,fontWeight:500,fontFamily:"var(--font-mono)",textDecoration:"none"}),title:a.cached?`Saved digest \xb7 ${a.label}`:`${a.label} (no saved digest yet — will prompt to Generate)`,children:[(0,b.jsx)(h,{size:14}),(0,b.jsx)("span",{children:a.label})]}):(0,b.jsx)("span",{style:w,title:`No ${"prev"===d?"earlier":"later"} period`,children:(0,b.jsx)(h,{size:14})})}function u({onClose:a}){return(0,b.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":"Insights history",style:{position:"fixed",inset:0,zIndex:200,display:"flex",justifyContent:"flex-end"},children:[(0,b.jsx)("div",{onClick:a,style:{position:"absolute",inset:0,background:"rgba(0,0,0,0.32)",animation:"fade-in 120ms ease-out"}}),(0,b.jsxs)("aside",{style:{position:"relative",width:"min(440px, 92vw)",height:"100vh",background:"var(--background)",borderLeft:"1px solid var(--af-border-subtle)",boxShadow:"-12px 0 40px rgba(0,0,0,0.32)",display:"flex",flexDirection:"column",animation:"slide-in 160ms cubic-bezier(0.2, 0.9, 0.3, 1)"},children:[(0,b.jsxs)("header",{style:{display:"flex",alignItems:"center",gap:10,padding:"14px 18px",borderBottom:"1px solid var(--af-border-subtle)"},children:[(0,b.jsx)("h2",{style:{fontSize:13,fontWeight:600,margin:0,color:"var(--af-text)"},children:"Browse insights history"}),(0,b.jsx)("button",{type:"button",onClick:a,"aria-label":"Close history",style:{marginLeft:"auto",width:26,height:26,display:"inline-flex",alignItems:"center",justifyContent:"center",border:"1px solid var(--af-border-subtle)",borderRadius:6,background:"transparent",color:"var(--af-text-secondary)",cursor:"pointer"},children:(0,b.jsx)(h.X,{size:14})})]}),(0,b.jsx)("div",{style:{flex:1,overflowY:"auto",padding:"18px 0"},children:(0,b.jsx)(i,{inDrawer:!0})})]}),(0,b.jsx)("style",{children:`
|
|
2
|
+
@keyframes slide-in { from { transform: translateX(20px); opacity: 0 } to { transform: translateX(0); opacity: 1 } }
|
|
3
|
+
@keyframes fade-in { from { opacity: 0 } to { opacity: 1 } }
|
|
4
|
+
`})]})}let v={display:"inline-flex",alignItems:"center",gap:6,padding:"5px 11px",borderRadius:6,border:"1px solid var(--af-border-subtle)",background:"var(--af-surface)",color:"var(--af-text)",fontSize:11,fontWeight:500,cursor:"pointer",fontFamily:"inherit"},w={display:"inline-flex",alignItems:"center",gap:4,padding:"5px 9px",borderRadius:6,border:"1px solid var(--af-border-subtle)",background:"var(--af-surface)",color:"var(--af-text-tertiary)",fontSize:11,fontWeight:500,fontFamily:"var(--font-mono)",opacity:.45,cursor:"default"};a.s(["InsightsTopBar",0,function({scope:a,currentLabel:e,rangeLabel:f,prev:h,next:i}){let[j,k]=(0,d.useState)(!1);return(0,d.useEffect)(()=>{if(!j)return;let a=a=>{"Escape"===a.key&&k(!1)};return window.addEventListener("keydown",a),document.body.style.overflow="hidden",()=>{window.removeEventListener("keydown",a),document.body.style.overflow=""}},[j]),(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("header",{style:{position:"sticky",top:0,zIndex:50,background:"color-mix(in srgb, var(--background) 90%, transparent)",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)",borderBottom:"1px solid var(--af-border-subtle)"},className:"no-print",children:(0,b.jsxs)("div",{style:{maxWidth:980,margin:"0 auto",padding:"12px 40px",display:"flex",alignItems:"center",gap:14,minHeight:44},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:10,minWidth:0},children:[(0,b.jsx)(c.default,{href:"/insights",style:{fontSize:10,fontWeight:700,color:"var(--af-text-tertiary)",textDecoration:"none",textTransform:"uppercase",letterSpacing:"0.08em",flexShrink:0},title:"Latest week digest",children:"Insights"}),(0,b.jsx)("span",{style:{color:"var(--af-text-tertiary)",fontSize:11,flexShrink:0},children:"›"}),(0,b.jsx)("span",{style:{fontSize:14,fontWeight:600,color:"var(--af-text)",letterSpacing:"-0.01em",minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e}),f&&(0,b.jsx)("span",{style:{fontSize:11,fontFamily:"var(--font-mono)",color:"var(--af-text-tertiary)",flexShrink:0},children:f})]}),(0,b.jsxs)("div",{style:{marginLeft:"auto",display:"inline-flex",alignItems:"center",gap:6},children:[(0,b.jsx)(t,{target:h,dir:"prev"}),(0,b.jsx)(t,{target:i,dir:"next"}),(0,b.jsxs)("button",{type:"button",onClick:()=>k(!0),style:v,title:`Browse ${"week"===a?"weekly":"monthly"} history`,children:[(0,b.jsx)(g,{size:13}),(0,b.jsx)("span",{children:"Browse"})]})]})]})}),j&&(0,b.jsx)(u,{onClose:()=>k(!1)})]})}],76435)}];
|
|
5
|
+
|
|
6
|
+
//# sourceMappingURL=apps_web_components_0ly1xes._.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
module.exports=[44422,a=>{"use strict";var b=a.i(87924),c=a.i(38246),d=a.i(50944),e=a.i(72131),f=a.i(70106);let g=(0,f.default)("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]),h=(0,f.default)("ListTree",[["path",{d:"M21 12h-8",key:"1bmf0i"}],["path",{d:"M21 6H8",key:"1pqkrb"}],["path",{d:"M21 18h-8",key:"1tm79t"}],["path",{d:"M3 6v4c0 1.1.9 2 2 2h3",key:"1ywdgy"}],["path",{d:"M3 10v6c0 1.1.9 2 2 2h3",key:"2wc746"}]]),i=(0,f.default)("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]),j=(0,f.default)("Pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]),k=(0,f.default)("PinOff",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89",key:"znwnzq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",key:"c9qhm2"}]]);var l=a.i(87532);let m=(0,f.default)("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]),n=(0,f.default)("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);var o=a.i(69439),p=a.i(71727);let q=(0,f.default)("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),r=(0,f.default)("CalendarDays",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]]);var s=a.i(3444);let t=(0,f.default)("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]),u=(0,f.default)("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);function v(a){if("u">typeof document){document.documentElement.setAttribute("data-theme",a);try{document.cookie=`claude-lens-theme=${a};path=/;max-age=31536000;samesite=lax`}catch{}}}function w(){let[a,c]=(0,e.useState)("dark"),[d,f]=(0,e.useState)(!1);return(0,e.useEffect)(()=>{let a=document.documentElement.getAttribute("data-theme");if("light"===a||"dark"===a)c(a);else{let a="dark";c(a),v(a)}f(!0)},[]),(0,b.jsx)("button",{type:"button",onClick:()=>{let b="dark"===a?"light":"dark";c(b),v(b);try{window.localStorage.setItem("claude-lens:theme",b)}catch{}},"aria-label":"dark"===a?"Switch to light mode":"Switch to dark mode",title:"dark"===a?"Switch to light mode":"Switch to dark mode",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:28,height:28,borderRadius:6,background:"transparent",border:"1px solid var(--af-border-subtle)",color:"var(--af-text-secondary)",cursor:"pointer",transition:"all 0.12s"},onMouseEnter:a=>{a.currentTarget.style.background="var(--af-surface-hover)",a.currentTarget.style.color="var(--af-text)"},onMouseLeave:a=>{a.currentTarget.style.background="transparent",a.currentTarget.style.color="var(--af-text-secondary)"},children:d?"dark"===a?(0,b.jsx)(u,{size:14}):(0,b.jsx)(t,{size:14}):null})}var x=a.i(2591);function y({snapshot:a}){let d,e,[f,,g]=(0,x.usePersistentBoolean)("cclens:usage:show-sonnet",!1);if(!a)return(0,b.jsxs)("div",{style:{padding:"10px 16px 12px",borderTop:"1px solid var(--af-border-subtle)",fontSize:10,color:"var(--af-text-tertiary)",lineHeight:1.4},children:[(0,b.jsx)("div",{style:{textTransform:"uppercase",letterSpacing:"0.06em",fontWeight:600,marginBottom:4},children:"Usage"}),(0,b.jsxs)("div",{children:["Run ",(0,b.jsx)("code",{style:{fontFamily:"var(--font-mono)"},children:"cclens daemon start"})," to collect metrics."]})]});let h=[{label:"5h",window:a.five_hour},{label:"7d",window:a.seven_day}];return g&&f&&h.push({label:"Sonnet 7d",window:a.seven_day_sonnet}),(0,b.jsxs)(c.default,{href:"/usage",style:{display:"block",padding:"10px 16px 12px",borderTop:"1px solid var(--af-border-subtle)",textDecoration:"none",color:"inherit"},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",fontSize:10,fontWeight:600,color:"var(--af-text-tertiary)",textTransform:"uppercase",letterSpacing:"0.06em",marginBottom:8},children:[(0,b.jsx)("span",{children:"Current usage"}),(0,b.jsx)("span",{suppressHydrationWarning:!0,style:{fontWeight:500,textTransform:"none",letterSpacing:0},children:(d=new Date(a.captured_at).getTime(),(e=Math.round((Date.now()-d)/1e3))<60?`${e}s ago`:e<3600?`${Math.floor(e/60)}m ago`:e<86400?`${Math.floor(e/3600)}h ago`:`${Math.floor(e/86400)}d ago`)})]}),(0,b.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:6},children:h.map(a=>(0,b.jsx)(z,{...a},a.label))})]})}function z({label:a,window:c}){let d=c?.utilization??null,e=null!==d,f=e?Math.max(0,Math.min(100,d)):0,g=f>=90?"var(--af-danger)":f>=70?"var(--af-warning)":"var(--af-success)";return(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:6,fontSize:10,color:"var(--af-text-secondary)",marginBottom:2,fontVariantNumeric:"tabular-nums"},children:[(0,b.jsx)("span",{children:a}),c?.resets_at&&(0,b.jsxs)("span",{suppressHydrationWarning:!0,style:{fontSize:9,color:"var(--af-text-tertiary)",flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:["resets ",function(a){let b,c=Math.round((new Date(a).getTime()-Date.now())/1e3),d=Math.abs(c);if(d<60)b=`${d}s`;else if(d<3600)b=`${Math.floor(d/60)}m`;else if(d<86400){let a=Math.floor(d/3600),c=Math.floor(d%3600/60);b=c>0?`${a}h${c}m`:`${a}h`}else{let a=Math.floor(d/86400),c=Math.floor(d%86400/3600);b=c>0?`${a}d${c}h`:`${a}d`}return c<0?`${b} ago`:`in ${b}`}(c.resets_at)]}),(0,b.jsx)("span",{style:{fontWeight:600,color:"var(--af-text)",marginLeft:"auto"},children:e?`${f.toFixed(0)}%`:"—"})]}),(0,b.jsx)("div",{style:{height:4,background:"var(--af-border-subtle)",borderRadius:999,overflow:"hidden"},children:(0,b.jsx)("div",{style:{height:"100%",width:e?`${f}%`:"0%",background:g,borderRadius:999,transition:"width 0.24s ease"}})})]})}function A({href:a,active:d,icon:e,trailing:f,children:g}){return(0,b.jsxs)(c.default,{href:a,style:{display:"flex",alignItems:"center",gap:10,padding:"8px 12px",borderRadius:7,fontSize:13,fontWeight:500,color:d?"var(--af-accent)":"var(--af-text-secondary)",background:d?"var(--af-accent-subtle)":"transparent",transition:"all 0.12s"},children:[e,(0,b.jsx)("span",{style:{flex:1},children:g}),f&&(0,b.jsx)("span",{style:{fontSize:10,color:d?"var(--af-accent)":"var(--af-text-tertiary)",fontFamily:"var(--font-mono)"},children:f})]})}function B({label:a,items:d,pathname:e,isPinned:f,onTogglePin:g}){return 0===d.length?null:(0,b.jsxs)("div",{style:{marginTop:10},children:[(0,b.jsx)("div",{style:{fontSize:10,color:"var(--af-text-tertiary)",textTransform:"uppercase",letterSpacing:"0.06em",padding:"0 10px 6px",fontWeight:600},children:a}),(0,b.jsx)("div",{style:{display:"flex",flexDirection:"column"},children:d.map(a=>{let d=`/projects/${encodeURIComponent(a.projectDir)}`,h=e===d,i=(0,s.prettyProjectName)(a.projectName);return(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4,padding:"5px 6px 5px 10px",borderRadius:6,background:h?"var(--af-accent-subtle)":"transparent",color:h?"var(--af-accent)":"var(--af-text-secondary)"},children:[(0,b.jsxs)(c.default,{href:d,style:{flex:1,minWidth:0,fontSize:12,color:"inherit",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"flex",alignItems:"center",gap:5},title:(a.worktreeCount??0)>0?`${a.projectName} — ${a.worktreeCount} worktree${1===a.worktreeCount?"":"s"}`:a.projectName,children:[(0,b.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:i}),(a.worktreeCount??0)>0&&(0,b.jsxs)("span",{style:{fontSize:9,fontWeight:600,padding:"1px 5px",borderRadius:100,background:"rgba(167, 139, 250, 0.15)",color:"rgba(167, 139, 250, 1)",flexShrink:0},children:["+",a.worktreeCount," wt"]})]}),(0,b.jsx)("span",{style:{fontSize:10,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)",marginLeft:4},children:a.sessionCount}),(0,b.jsx)("button",{type:"button",onClick:b=>{b.preventDefault(),b.stopPropagation(),g(a.projectDir)},"aria-label":f(a.projectDir)?"Unpin project":"Pin project",title:f(a.projectDir)?"Unpin":"Pin",style:{background:"transparent",border:"none",padding:3,borderRadius:4,color:f(a.projectDir)?"var(--af-accent)":"var(--af-text-tertiary)",display:"flex",alignItems:"center"},children:f(a.projectDir)?(0,b.jsx)(k,{size:12}):(0,b.jsx)(j,{size:12})}),a.lastActiveMs&&(0,b.jsx)("span",{style:{fontSize:9,color:"var(--af-text-tertiary)",marginLeft:2,minWidth:32,textAlign:"right"},title:new Date(a.lastActiveMs).toISOString(),suppressHydrationWarning:!0,children:(0,s.formatRelative)(new Date(a.lastActiveMs).toISOString())})]},a.projectDir)})})]})}a.s(["Sidebar",0,function({projects:a,totalSessions:f,currentUsage:j,version:k}){let s=(0,d.usePathname)(),[t,u]=(0,e.useState)(new Set),[v,x]=(0,e.useState)(!1),[z,C]=(0,e.useState)("");(0,e.useEffect)(()=>{u(new Set),x(!0)},[]);let D=a=>{u(b=>{let c=new Set(b);c.has(a)?c.delete(a):c.add(a);try{window.localStorage.setItem("claude-lens:pinned-projects:v1",JSON.stringify(Array.from(c)))}catch{}return c})},E=(0,e.useMemo)(()=>{if(!z.trim())return a;let b=z.toLowerCase();return a.filter(a=>a.projectName.toLowerCase().includes(b))},[a,z]),F=E.filter(a=>t.has(a.projectDir)),G=E.filter(a=>!t.has(a.projectDir));return(0,b.jsxs)("aside",{style:{width:260,flexShrink:0,borderRight:"1px solid var(--af-border-subtle)",background:"var(--af-surface)",display:"flex",flexDirection:"column",position:"sticky",top:0,height:"100vh"},children:[(0,b.jsx)("div",{style:{padding:"18px 20px 12px",borderBottom:"1px solid var(--af-border-subtle)"},children:(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10},children:[(0,b.jsx)("div",{style:{width:28,height:28,borderRadius:7,background:"var(--af-accent-subtle)",display:"flex",alignItems:"center",justifyContent:"center",color:"var(--af-accent)"},children:(0,b.jsx)(m,{size:16,strokeWidth:2.25})}),(0,b.jsxs)("div",{style:{minWidth:0,flex:1},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:6},children:[(0,b.jsx)("span",{style:{fontSize:14,fontWeight:700,letterSpacing:"-0.01em"},children:"Fleetlens"}),(0,b.jsxs)("span",{style:{fontSize:10,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)",fontWeight:500},title:`fleetlens ${k}`,children:["v",k]})]}),(0,b.jsx)("div",{style:{fontSize:11,color:"var(--af-text-tertiary)"},children:"Claude Code fleet analytics"})]})]})}),(0,b.jsxs)("nav",{style:{padding:"10px 10px 6px",display:"flex",flexDirection:"column",gap:2},children:[(0,b.jsx)(A,{href:"/",active:"/"===s,icon:(0,b.jsx)(g,{size:15}),children:"Overview"}),(0,b.jsx)(A,{href:"/sessions",active:"/sessions"===s||s.startsWith("/sessions/"),icon:(0,b.jsx)(h,{size:15}),trailing:f>0?String(f):void 0,children:"All sessions"}),(0,b.jsx)(A,{href:"/projects",active:"/projects"===s,icon:(0,b.jsx)(i,{size:15}),trailing:a.length>0?String(a.length):void 0,children:"Projects"}),(0,b.jsx)(A,{href:"/day",active:"/day"===s||s.startsWith("/day/")||"/digest"===s||s.startsWith("/digest/")||"/parallelism"===s,icon:(0,b.jsx)(r,{size:15}),children:"Day"}),(0,b.jsx)(A,{href:"/usage",active:"/usage"===s,icon:(0,b.jsx)(n,{size:15}),children:"Usage"}),(0,b.jsx)(A,{href:"/insights",active:"/insights"===s,icon:(0,b.jsx)(o.Lightbulb,{size:15}),children:"Insights"}),(0,b.jsx)(A,{href:"/runs",active:"/runs"===s||s.startsWith("/runs/"),icon:(0,b.jsx)(p.Radio,{size:15}),children:"Runs"})]}),(0,b.jsxs)("div",{style:{margin:"0 14px",padding:"8px 0",borderTop:"1px solid var(--af-border-subtle)",borderBottom:"1px solid var(--af-border-subtle)",display:"flex",alignItems:"center",gap:6},children:[(0,b.jsx)(l.Search,{size:13,color:"var(--af-text-tertiary)"}),(0,b.jsx)("input",{type:"text",placeholder:"Search projects",value:z,onChange:a=>C(a.target.value),style:{flex:1,background:"transparent",border:"none",padding:"4px 0",fontSize:12,color:"var(--af-text)"}})]}),(0,b.jsxs)("div",{style:{flex:1,overflow:"auto",padding:"4px 8px 20px"},children:[v&&F.length>0&&(0,b.jsx)(B,{label:"Pinned",items:F,pathname:s,isPinned:a=>t.has(a),onTogglePin:D}),(0,b.jsx)(B,{label:"Projects",items:G,pathname:s,isPinned:a=>t.has(a),onTogglePin:D})]}),(0,b.jsx)(y,{snapshot:j}),(0,b.jsxs)("div",{style:{padding:"10px 16px 10px 20px",fontSize:10,color:"var(--af-text-tertiary)",borderTop:"1px solid var(--af-border-subtle)",display:"flex",alignItems:"center",gap:8},children:[(0,b.jsxs)("span",{style:{flex:1,minWidth:0},children:[f," sessions · ",a.length," projects"]}),(0,b.jsx)(c.default,{href:"/settings","aria-label":"Settings",title:"Settings",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:24,height:24,borderRadius:6,color:"/settings"===s?"var(--af-text)":"var(--af-text-tertiary)",background:"/settings"===s?"var(--af-surface-hover)":"transparent",textDecoration:"none"},children:(0,b.jsx)(q,{size:14})}),(0,b.jsx)(w,{})]})]})}],44422)},46069,a=>{"use strict";var b=a.i(50944),c=a.i(72131);a.s(["LiveRefresher",0,function(){let a,d=(0,b.useRouter)(),e=(a=(0,b.usePathname)(),a?.includes("/insights/print/")??!1),f=(0,c.useRef)(null),g=(0,c.useRef)({session:0,usage:0});return!function(a,b={}){let{enabled:d=!0}=b,e=(0,c.useRef)(a);(0,c.useEffect)(()=>{e.current=a},[a]),(0,c.useEffect)(()=>{if(!d)return;let a=new EventSource("/api/events");return a.onmessage=a=>{try{let b=JSON.parse(a.data);("session-updated"===b.type||"usage-updated"===b.type)&&e.current(b)}catch{}},a.onerror=()=>{},()=>{a.close()}},[d])}((0,c.useCallback)(a=>{let b="usage-updated"===a.type?"usage":"session";a.mtimeMs<=(g.current[b]??0)||(g.current[b]=a.mtimeMs,f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{d.refresh()},400))},[d]),{enabled:!e}),(0,c.useEffect)(()=>()=>{f.current&&clearTimeout(f.current)},[]),null}],46069)},1568,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(50944),e=a.i(38246),f=a.i(3444),g=a.i(76285),h=a.i(44220);let i="cclens-live-widget-expanded";a.s(["LiveSessionsWidget",0,function({sessions:a,entrySummaries:j={}}){let k=(0,d.usePathname)(),[l,m]=(0,c.useState)(()=>Date.now()),[n,o]=(0,c.useState)(!1);if((0,c.useEffect)(()=>{try{let a=localStorage.getItem(i);null!==a&&o("true"===a)}catch{}},[]),(0,c.useEffect)(()=>{let a=setInterval(()=>m(Date.now()),1e4);return()=>clearInterval(a)},[]),k&&/^\/sessions\/[^/]+$/.test(k))return null;let p=a.filter(a=>{if(!a.lastTimestamp)return!1;let b=Date.parse(a.lastTimestamp);return!Number.isNaN(b)&&l-b<=45e3}).slice().sort((a,b)=>{let c=a.firstTimestamp?Date.parse(a.firstTimestamp):0;return(b.firstTimestamp?Date.parse(b.firstTimestamp):0)-c});if(0===p.length)return null;let q=n?p.slice(0,5):[],r=n?p.length-q.length:0;return(0,b.jsxs)("div",{style:{position:"fixed",right:20,bottom:20,zIndex:100,display:"flex",flexDirection:"column-reverse",gap:6,maxWidth:320,pointerEvents:"auto"},children:[(0,b.jsxs)("button",{type:"button",onClick:()=>{var a;return a=a=>!a,void o(b=>{let c=a(b);try{localStorage.setItem(i,String(c))}catch{}return c})},style:{display:"inline-flex",alignItems:"center",gap:6,padding:"5px 11px 5px 9px",background:"rgba(239, 68, 68, 0.14)",border:"1px solid rgba(239, 68, 68, 0.4)",borderRadius:100,fontSize:10,fontWeight:700,color:"#ef4444",letterSpacing:"0.06em",textTransform:"uppercase",alignSelf:"flex-end",cursor:"pointer",userSelect:"none",backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)",boxShadow:"0 2px 10px rgba(239, 68, 68, 0.15)"},title:n?"Collapse":`Show ${p.length} live session${1===p.length?"":"s"}`,children:[(0,b.jsx)("span",{style:{display:"inline-block",width:6,height:6,borderRadius:"50%",background:"#ef4444",animation:"cs-live-pulse 1.6s ease-in-out infinite"}}),"Live · ",p.length]}),n&&r>0&&(0,b.jsxs)("div",{style:{fontSize:10,color:"var(--af-text-tertiary)",padding:"0 4px",textAlign:"right"},children:["+",r," more live"]}),q.map(a=>{let c=j[a.id];return(0,b.jsxs)(e.default,{href:`/sessions/${a.id}`,style:{display:"block",padding:"10px 12px",background:"var(--af-surface-elevated)",border:"1px solid var(--af-border-subtle)",borderLeft:"2px solid #ef4444",borderRadius:8,boxShadow:"0 4px 16px rgba(0, 0, 0, 0.12)",textDecoration:"none",color:"var(--af-text)",fontSize:11,lineHeight:1.35,backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)"},title:(a.lastUserPreview||a.firstUserPreview||a.lastAgentPreview)??(0,f.prettyProjectName)(a.projectName),children:[c&&(0,b.jsx)("div",{onClick:a=>a.stopPropagation(),style:{marginBottom:4},children:c.outcome?(0,b.jsx)(h.OutcomePill,{outcome:c.outcome,size:"sm",label:"text"}):"skipped_trivial"!==c.enrichmentStatus?(0,b.jsx)(h.OutcomePill,{outcome:null,pending:!0,sessionId:a.id,localDay:c.localDay,size:"sm"}):null}),(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,fontWeight:500,color:"var(--af-text)",minWidth:0},children:[(0,b.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:a.lastUserPreview||a.firstUserPreview||(0,b.jsx)("em",{style:{color:"var(--af-text-tertiary)"},children:"(no user message)"})}),(0,b.jsx)(g.TeamBadge,{session:a,linkable:!1})]}),(0,b.jsx)("div",{style:{fontSize:10,color:"var(--af-text-secondary)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",marginTop:3,fontStyle:"italic"},children:a.lastAgentPreview?(0,b.jsxs)(b.Fragment,{children:["↳ ",a.lastAgentPreview]}):(0,b.jsx)("em",{style:{color:"var(--af-text-tertiary)"},children:"waiting…"})}),(0,b.jsx)("div",{style:{fontSize:9,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)",marginTop:4,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:(0,f.prettyProjectName)(a.projectName)})]},a.id)}),(0,b.jsx)("style",{children:`
|
|
2
|
+
@keyframes cs-live-pulse {
|
|
3
|
+
0%, 100% { opacity: 1; transform: scale(1); }
|
|
4
|
+
50% { opacity: 0.4; transform: scale(0.85); }
|
|
5
|
+
}
|
|
6
|
+
`})]})}])},22309,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(33441);let e=(0,a.i(70106).default)("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);var f=a.i(96221),g=a.i(41710),h=a.i(38246);let i="cclens-jobs-widget-expanded";function j({children:a}){return(0,b.jsx)("div",{style:{padding:"6px 14px",fontSize:9,color:"var(--af-text-tertiary)",textTransform:"uppercase",letterSpacing:"0.08em",fontWeight:700,background:"var(--af-surface)"},children:a})}function k({job:a}){let c="running"===a.status?f.Loader2:"queued"===a.status?g.Clock:"error"===a.status?e:d.Check,i="running"===a.status?"#4299e1":"queued"===a.status?"var(--af-text-tertiary)":"error"===a.status?"#f56565":"#48bb78",j=a.resultUrl&&("done"===a.status||"running"===a.status),l=j?h.default:"div",m=j?{href:a.resultUrl}:{};return(0,b.jsxs)(l,{...m,style:{display:"flex",alignItems:"flex-start",gap:10,padding:"10px 14px",borderBottom:"1px solid var(--af-border-subtle)",textDecoration:"none",color:"var(--af-text)",fontSize:11.5,cursor:j?"pointer":"default"},children:[(0,b.jsx)(c,{size:13,className:"running"===a.status?"cs-job-spin":"",style:{color:i,marginTop:2,flexShrink:0}}),(0,b.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,b.jsx)("div",{style:{fontWeight:500,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.label}),a.progress&&(0,b.jsx)("div",{style:{fontSize:10,color:"var(--af-text-tertiary)",marginTop:2,fontFamily:"var(--font-mono)"},children:function(a){if(void 0!==a.index&&void 0!==a.total)return`${a.phase} ${a.index}/${a.total}`;if(void 0!==a.bytes){let b=(a.bytes/1024).toFixed(1);return`${a.phase} \xb7 ${b}k`}return a.text?`${a.phase} \xb7 ${a.text}`:a.phase}(a.progress)}),"error"===a.status&&a.error&&(0,b.jsx)("div",{style:{fontSize:10,color:"#f56565",marginTop:2},children:a.error.length>60?a.error.slice(0,60)+"…":a.error}),"done"===a.status&&a.resultUrl&&(0,b.jsx)("div",{style:{fontSize:10,color:"var(--af-accent)",marginTop:2},children:"View →"})]})]})}a.s(["JobQueueWidget",0,function(){let[a,d]=(0,c.useState)([]),[e,g]=(0,c.useState)(!1);(0,c.useEffect)(()=>{try{let a=localStorage.getItem(i);null!==a&&g("true"===a)}catch{}},[]),(0,c.useEffect)(()=>{let b=!0,c=null,e=async()=>{try{let a=await fetch("/api/jobs",{cache:"no-store"});if(!a.ok)return;let c=await a.json();b&&d(c.jobs)}catch{}},f=()=>{b&&(c=setTimeout(async()=>{await e(),f()},a.some(a=>"running"===a.status||"queued"===a.status)?1500:6e3))};return e(),f(),()=>{b=!1,c&&clearTimeout(c)}},[a]);let h=a.filter(a=>"running"===a.status||"queued"===a.status),l=a.filter(a=>"done"===a.status||"error"===a.status||"cancelled"===a.status).slice(0,8);return 0===h.length?null:(0,b.jsxs)("div",{style:{position:"fixed",right:140,bottom:20,zIndex:99,display:"flex",flexDirection:"column-reverse",gap:6,maxWidth:320,alignItems:"flex-end"},children:[(0,b.jsxs)("button",{type:"button",onClick:()=>{var a;return a=a=>!a,void g(b=>{let c=a(b);try{localStorage.setItem(i,String(c))}catch{}return c})},title:`${h.length} job${1===h.length?"":"s"} running — click to ${e?"collapse":"expand"}`,style:{display:"inline-flex",alignItems:"center",gap:6,padding:"5px 11px 5px 9px",background:"rgba(66, 153, 225, 0.14)",border:"1px solid rgba(66, 153, 225, 0.4)",borderRadius:100,fontSize:10,fontWeight:700,color:"#4299e1",letterSpacing:"0.06em",textTransform:"uppercase",cursor:"pointer",userSelect:"none",backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)",boxShadow:"0 2px 10px rgba(66, 153, 225, 0.15)",alignSelf:"flex-end"},children:[(0,b.jsx)(f.Loader2,{size:11,className:"cs-job-spin",style:{flexShrink:0}}),"Jobs · ",h.length]}),e&&(0,b.jsxs)("div",{style:{width:320,maxHeight:360,overflowY:"auto",background:"var(--af-surface-elevated)",border:"1px solid var(--af-border-subtle)",borderRadius:10,boxShadow:"0 8px 24px rgba(0,0,0,0.18)",backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)"},children:[h.length>0&&(0,b.jsxs)("div",{children:[(0,b.jsx)(j,{children:"Running"}),h.map(a=>(0,b.jsx)(k,{job:a},a.id))]}),l.length>0&&(0,b.jsxs)("div",{children:[(0,b.jsx)(j,{children:"Recent"}),l.map(a=>(0,b.jsx)(k,{job:a},a.id))]})]}),(0,b.jsx)("style",{children:`
|
|
7
|
+
@keyframes cs-job-spin {
|
|
8
|
+
from { transform: rotate(0deg); }
|
|
9
|
+
to { transform: rotate(360deg); }
|
|
10
|
+
}
|
|
11
|
+
.cs-job-spin {
|
|
12
|
+
animation: cs-job-spin 1s linear infinite;
|
|
13
|
+
}
|
|
14
|
+
`})]})}],22309)}];
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=apps_web_components_0txtsv5._.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
module.exports=[20555,a=>{"use strict";var b=a.i(87924),c=a.i(72131);a.s(["LiveBadge",0,function({mtimeIso:a,size:d="sm"}){let[e,f]=(0,c.useState)(()=>Date.now());if((0,c.useEffect)(()=>{let a=setInterval(()=>f(Date.now()),1e4);return()=>clearInterval(a)},[]),!a)return null;let g=Date.parse(a);if(Number.isNaN(g)||e-g>45e3)return null;let h="md"===d?8:6;return(0,b.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:5,fontSize:"md"===d?10:9,fontWeight:700,letterSpacing:"0.04em",padding:"md"===d?"3px 9px":"2px 7px",borderRadius:100,background:"rgba(239, 68, 68, 0.12)",color:"#ef4444",textTransform:"uppercase"},title:`Last updated ${new Date(g).toLocaleTimeString()}`,children:[(0,b.jsx)("span",{style:{display:"inline-block",width:h,height:h,borderRadius:"50%",background:"#ef4444",animation:"cs-live-pulse 1.6s ease-in-out infinite"}}),"LIVE",(0,b.jsx)("style",{children:`
|
|
2
|
+
@keyframes cs-live-pulse {
|
|
3
|
+
0%, 100% { opacity: 1; transform: scale(1); }
|
|
4
|
+
50% { opacity: 0.4; transform: scale(0.85); }
|
|
5
|
+
}
|
|
6
|
+
`})]})}])},89691,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(50944),e=a.i(44220);function f(a,b){if(a<=0||b<=0)return"var(--af-heatmap-0)";let c=Math.min(1,a/b),d=0;return c>.75?d=4:c>.5?d=3:c>.25?d=2:c>0&&(d=1),`var(--af-heatmap-${d})`}function g(a){let[b,c,d]=a.split("-").map(Number);return new Date(b,c-1,d)}function h(a){let b=a.getFullYear(),c=String(a.getMonth()+1).padStart(2,"0"),d=String(a.getDate()).padStart(2,"0");return`${b}-${c}-${d}`}function i(a){return{date:a,sessions:0,toolCalls:0,turns:0,airTimeMs:0,tokens:{input:0,output:0,cacheRead:0,cacheWrite:0},durationMs:0,peakParallelism:0}}a.s(["Heatmap",0,function({buckets:a,valueKey:j="sessions",cellSize:k=13,cellGap:l=3,daySummaries:m}){let n,o,p=(0,d.useRouter)(),[q,r]=(0,c.useState)(null),{weeks:s,max:t}=(0,c.useMemo)(()=>{if(0===a.length)return{weeks:[],max:0};let b=new Date(g(a[0].date));b.setDate(b.getDate()-b.getDay());let c=new Map(a.map(a=>[a.date,a])),d=[],e=[],f=new Date,k=g(a[a.length-1].date),l=k>f?k:f,m=0;for(let a=new Date(b);a<=l;a.setDate(a.getDate()+1)){let b=h(a),f=c.get(b)??i(b),g=f[j];g>m&&(m=g),e.push(f),7===e.length&&(d.push(e),e=[])}if(e.length>0){for(;e.length<7;)e.push(i(h(new Date)));d.push(e)}return{weeks:d,max:m}},[a,j]);if(0===a.length)return(0,b.jsx)("div",{style:{padding:"32px 12px",color:"var(--af-text-tertiary)",fontSize:12,textAlign:"center"},children:"No activity yet."});let u=s.length*(k+l)+24,v=7*(k+l)+18;return(0,b.jsxs)("div",{style:{position:"relative",overflowX:"auto"},children:[(0,b.jsxs)("svg",{width:u,height:v,style:{display:"block"},children:[(0,b.jsx)("g",{fontSize:9,fill:"var(--af-text-tertiary)",children:["Mon","Wed","Fri"].map((a,c)=>(0,b.jsx)("text",{x:0,y:18+(1+2*c)*(k+l)+k-3,children:a},a))}),(0,b.jsx)("g",{transform:"translate(24, 18)",children:s.map((a,c)=>a.map((a,d)=>{let e=a[j],g=f(e,t);return(0,b.jsx)("rect",{x:c*(k+l),y:d*(k+l),width:k,height:k,rx:2.5,ry:2.5,stroke:e>0?"rgba(255,255,255,0.04)":"transparent",onMouseEnter:b=>{let c=b.currentTarget.getBoundingClientRect();r({bucket:a,x:c.left+c.width/2,y:c.top-6})},onMouseLeave:()=>r(null),onClick:()=>{e>0&&p.push(`/digest/${a.date}`)},style:{cursor:e>0?"pointer":"default",fill:g}},`${c}-${d}`)}))})]}),(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,marginTop:6,fontSize:10,color:"var(--af-text-tertiary)",justifyContent:"flex-end"},children:[(0,b.jsx)("span",{children:"Less"}),[0,.25,.5,.75,1].map((a,c)=>(0,b.jsx)("span",{style:{width:11,height:11,borderRadius:2.5,background:f(Math.max(1,a*t),t),display:"inline-block"}},c)),(0,b.jsx)("span",{children:"More"})]}),q&&(0,b.jsxs)("div",{style:{position:"fixed",left:q.x,top:q.y,transform:"translate(-50%, -100%)",background:"var(--af-surface-elevated)",border:"1px solid var(--af-border-subtle)",borderRadius:6,padding:"6px 10px",fontSize:11,color:"var(--af-text)",whiteSpace:"nowrap",pointerEvents:"none",zIndex:100,boxShadow:"0 4px 12px rgba(0,0,0,0.3)"},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:2},children:[(0,b.jsx)("span",{style:{fontWeight:600},children:q.bucket.date}),(()=>{let a=m?.get(q.bucket.date);if(!a?.outcome)return null;let c=e.OUTCOME_STYLES[a.outcome];return(0,b.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:3,padding:"1px 6px",borderRadius:99,fontSize:9,fontWeight:600,background:c.bg,color:c.fg},children:[c.icon," ",c.label]})})()]}),(n=m?.get(q.bucket.date),n?.headline?(0,b.jsxs)("div",{style:{color:"var(--af-text)",fontSize:11,fontWeight:500,marginBottom:2,maxWidth:280,whiteSpace:"normal",lineHeight:1.35},children:["“",n.headline,"”"]}):null),(0,b.jsxs)("div",{style:{color:"var(--af-text-secondary)"},children:[q.bucket.sessions," session",1===q.bucket.sessions?"":"s",q.bucket.toolCalls>0&&` \xb7 ${q.bucket.toolCalls} tool calls`,q.bucket.peakParallelism>1&&` \xb7 peak \xd7${q.bucket.peakParallelism}`]}),(o=m?.get(q.bucket.date),o?.helpfulness?(0,b.jsxs)("div",{style:{color:"var(--af-text-tertiary)",fontSize:10,marginTop:2},children:["Claude: ",o.helpfulness]}):null)]})]})}])},52429,a=>{"use strict";var b=a.i(87924),c=a.i(72131);function d(a){if(a<1e3)return`${Math.round(a)}ms`;let b=Math.round(a/1e3);if(b<60)return`${b}s`;let c=Math.floor(b/60),d=b%60;if(c<60)return d?`${c}m ${d}s`:`${c}m`;let e=Math.floor(c/60),f=c%60;return f?`${e}h ${f}m`:`${e}h`}let e={airTime:{label:"Agent time",pluck:a=>a.airTimeMs,color:"rgba(45, 212, 191, 0.85)",unit:"ms"},sessions:{label:"Sessions",pluck:a=>a.sessions,color:"rgba(94, 234, 212, 0.85)"},toolCalls:{label:"Tool calls",pluck:a=>a.toolCalls,color:"rgba(167, 139, 250, 0.85)"},turns:{label:"Turns",pluck:a=>a.turns,color:"rgba(251, 191, 36, 0.85)"},input:{label:"Input tokens",pluck:a=>a.tokens.input,color:"rgba(52, 211, 153, 0.85)"},output:{label:"Output tokens",pluck:a=>a.tokens.output,color:"rgba(248, 113, 113, 0.85)"},cacheRead:{label:"Cache read",pluck:a=>a.tokens.cacheRead,color:"rgba(129, 104, 224, 0.85)"}};a.s(["ActivityChart",0,function({buckets:a,defaultMetric:f="sessions",height:g=160}){let[h,i]=(0,c.useState)(f),[j,k]=(0,c.useState)(null),l=e[h],{bars:m,maxVal:n}=(0,c.useMemo)(()=>{let b=0;return{bars:a.map(a=>{let c=l.pluck(a);return c>b&&(b=c),{bucket:a,value:c}}),maxVal:b}},[a,l]);if(0===a.length)return(0,b.jsx)("div",{style:{padding:"32px 12px",color:"var(--af-text-tertiary)",fontSize:12,textAlign:"center"},children:"No activity yet."});let o=Math.max(3,Math.floor((600-2*m.length)/Math.max(1,m.length))),p=48+Math.max(m.length*(o+2),600)+8,q=g-10-22;return(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{style:{display:"flex",gap:4,background:"var(--background)",borderRadius:7,padding:3,marginBottom:10},children:Object.keys(e).map(a=>(0,b.jsx)("button",{type:"button",onClick:()=>i(a),style:{fontSize:11,padding:"5px 10px",border:"none",borderRadius:5,background:h===a?"var(--af-surface-elevated)":"transparent",color:h===a?"var(--af-text)":"var(--af-text-tertiary)",fontWeight:500},children:e[a].label},a))}),(0,b.jsxs)("div",{style:{position:"relative",overflowX:"auto"},children:[j&&(0,b.jsxs)("div",{style:{position:"absolute",left:j.x,top:0,transform:"translateX(-50%)",background:"var(--af-surface-elevated)",border:"1px solid var(--af-border-subtle)",borderRadius:6,padding:"4px 8px",fontSize:11,color:"var(--af-text-secondary)",fontFamily:"var(--font-mono)",whiteSpace:"nowrap",pointerEvents:"none",zIndex:10,boxShadow:"0 2px 8px rgba(0,0,0,0.08)"},children:[j.bucket.date," ·"," ","ms"===l.unit?d(j.value):j.value.toLocaleString()]}),(0,b.jsxs)("svg",{width:p,height:g,style:{display:"block"},children:[(0,b.jsx)("g",{fontSize:10,fill:"var(--af-text-tertiary)",children:[0,.25,.5,.75,1].map(a=>{let c=10+(1-a)*q,e=n*a,f="ms"===l.unit?d(e):e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:Math.round(e).toString();return(0,b.jsxs)("g",{children:[(0,b.jsx)("line",{x1:48,x2:p-8,y1:c,y2:c,stroke:"var(--af-border-subtle)",strokeDasharray:0===a?void 0:"2 3"}),(0,b.jsx)("text",{x:42,y:c+3,textAnchor:"end",children:f})]},a)})}),m.map((a,c)=>{let d=n>0?a.value/n*q:0,e=48+c*(o+2),f=j?.bucket.date===a.bucket.date;return(0,b.jsxs)("g",{children:[(0,b.jsx)("rect",{x:e,y:10,width:o,height:q,fill:"transparent",onMouseEnter:()=>k({bucket:a.bucket,value:a.value,x:e+o/2}),onMouseLeave:()=>k(null)}),(0,b.jsx)("rect",{x:e,y:10+q-d,width:o,height:Math.max(.5,d),fill:f?"var(--af-accent)":l.color,rx:1.5*(o>=6),ry:1.5*(o>=6),style:{pointerEvents:"none"}})]},a.bucket.date)}),(0,b.jsx)("g",{fontSize:10,fill:"var(--af-text-tertiary)",children:m.map((a,c)=>{let d=a.bucket.date,e=0===c,f=c===m.length-1,h="01"===d.slice(-2),i=m.length>3&&m.length<=31&&c===Math.floor(m.length/2)&&!m.some(a=>"01"===a.bucket.date.slice(-2));if(!e&&!f&&!h&&!i)return null;let j=48+c*(o+2)+o/2,k=new Date(`${d}T00:00:00`).toLocaleDateString(void 0,{month:"short",day:"numeric"});return(0,b.jsx)("text",{x:e?48:f?p-8:j,y:g-6,textAnchor:e?"start":f?"end":"middle",children:k},d)})})]})]})]})}])},78338,a=>{"use strict";var b=a.i(87924),c=a.i(72131);let d=(0,a.i(70106).default)("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);a.s(["MetricCard",0,function({label:a,value:e,sub:f,icon:g,tooltip:h}){let[i,j]=(0,c.useState)(!1);return(0,b.jsxs)("div",{className:"af-card",style:{padding:"16px 18px",position:"relative"},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,fontSize:11,color:"var(--af-text-tertiary)",textTransform:"uppercase",letterSpacing:"0.05em",fontWeight:600},children:[g,(0,b.jsx)("span",{children:a}),h&&(0,b.jsx)("span",{style:{marginLeft:"auto",cursor:"help",display:"inline-flex",color:"var(--af-text-tertiary)",opacity:.5,transition:"opacity 0.12s"},onMouseEnter:()=>j(!0),onMouseLeave:()=>j(!1),onClick:()=>j(a=>!a),children:(0,b.jsx)(d,{size:12})})]}),(0,b.jsx)("div",{style:{fontSize:22,fontWeight:700,marginTop:8,letterSpacing:"-0.02em",lineHeight:1.1},children:e}),f&&(0,b.jsx)("div",{style:{fontSize:11,color:"var(--af-text-secondary)",marginTop:4},children:f}),i&&h&&(0,b.jsx)("div",{style:{position:"absolute",top:"calc(100% + 6px)",left:0,right:0,zIndex:50,background:"#0F172A",color:"#F1F5F9",borderRadius:8,padding:"10px 12px",fontSize:11,lineHeight:1.5,boxShadow:"0 6px 24px rgba(15,23,42,0.22)",pointerEvents:"none"},children:h.split("\n").map((a,c)=>(0,b.jsx)("div",{children:a},c))})]})}],78338)},72589,a=>{"use strict";var b=a.i(87924),c=a.i(50944);let d=[{key:"7d",label:"7D"},{key:"30d",label:"30D"},{key:"90d",label:"90D"},{key:"all",label:"All"}];a.s(["DateRangeFilter",0,function({current:a}){let e=(0,c.useRouter)(),f=(0,c.usePathname)(),g=(0,c.useSearchParams)();return(0,b.jsx)("div",{style:{display:"inline-flex",gap:2,background:"var(--background)",borderRadius:7,padding:3,border:"1px solid var(--af-border-subtle)"},children:d.map(c=>(0,b.jsx)("button",{type:"button",onClick:()=>{var a;let b,d;return a=c.key,b=new URLSearchParams(g?.toString()??""),"all"===a?b.delete("range"):b.set("range",a),d=b.toString(),void e.replace(`${f}${d?`?${d}`:""}`,{scroll:!1})},style:{fontSize:11,padding:"4px 10px",border:"none",borderRadius:5,background:a===c.key?"var(--af-surface-elevated)":"transparent",color:a===c.key?"var(--af-text)":"var(--af-text-tertiary)",fontWeight:500,cursor:"pointer"},children:c.label},c.key))})}])},60608,a=>{"use strict";var b=a.i(87924),c=a.i(72131);a.s(["AutoGenerateYesterday",0,function({yesterdayDate:a,missing:d,onDone:e}){let[f,g]=(0,c.useState)("idle"),[h,i]=(0,c.useState)("");if((0,c.useEffect)(()=>{},[d,a,e]),!d||"idle"===f)return null;let j="error"===f?"#f56565":"done"===f?"#48bb78":"var(--af-accent)";return(0,b.jsxs)("div",{style:{display:"inline-flex",alignItems:"center",gap:8,padding:"4px 10px",borderRadius:99,fontSize:11,fontWeight:500,background:"var(--af-accent-subtle)",color:j},children:[(0,b.jsx)("span",{style:{display:"inline-block",width:6,height:6,borderRadius:"50%",background:j,animation:"running"===f?"cclensPulse 1.2s ease-in-out infinite":void 0}}),(0,b.jsx)("span",{children:"running"===f?"Generating yesterday's digest":"done"===f?"Done":"Error"}),h&&(0,b.jsxs)("span",{style:{color:"var(--af-text-tertiary)",fontSize:10},children:["· ",h]}),(0,b.jsx)("style",{children:`
|
|
7
|
+
@keyframes cclensPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
|
|
8
|
+
`})]})}])}];
|
|
9
|
+
|
|
10
|
+
//# sourceMappingURL=apps_web_components_0xs658s._.js.map
|
package/app/apps/web/.next/server/chunks/ssr/apps_web_components_runs-live-board_tsx_0r6dkdq._.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[68011,a=>{"use strict";var b=a.i(87924),c=a.i(72131);function d(a){if(null==a)return"—";let b=Math.round(a/100)/10;if(b<60)return`${b.toFixed(1)}s`;let c=Math.floor(b/60),d=(b-60*c).toFixed(0);return`${c}m${d.padStart(2,"0")}s`}let e={running:{bg:"rgba(59, 130, 246, 0.15)",fg:"#3b82f6",label:"running"},ok:{bg:"rgba(34, 197, 94, 0.15)",fg:"#16a34a",label:"ok"},error:{bg:"rgba(239, 68, 68, 0.15)",fg:"#dc2626",label:"error"},unknown:{bg:"rgba(148, 163, 184, 0.15)",fg:"#64748b",label:"?"}},f={week_digest:"#a855f7",month_digest:"#ec4899",day_digest:"#06b6d4",top_session:"#f59e0b",entry_enrich:"#10b981",unknown:"#94a3b8"};function g({children:a,padding:c=14}){return(0,b.jsx)("div",{style:{background:"var(--af-card)",border:"1px solid var(--af-border)",borderRadius:10,padding:c},children:a})}function h({text:a}){return(0,b.jsx)(g,{children:(0,b.jsx)("div",{style:{color:"var(--af-text-tertiary)",fontSize:13,textAlign:"center",padding:"60px 0"},children:a})})}function i({data:a,error:c}){if(c)return(0,b.jsx)(g,{children:(0,b.jsxs)("div",{style:{color:"#dc2626",fontSize:12},children:["error: ",c]})});if(!a)return(0,b.jsx)(g,{children:(0,b.jsx)("div",{style:{color:"var(--af-text-tertiary)",fontSize:12},children:"loading…"})});let{active:d,totals:e,by_kind:f}=a;return(0,b.jsxs)(g,{children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",marginBottom:8},children:[(0,b.jsx)("strong",{style:{fontSize:13},children:0===d.length?"no active runs":`${d.length} running`}),(0,b.jsxs)("span",{style:{fontSize:11,color:"var(--af-text-tertiary)"},children:[e.ops," completed · last 24h"]})]}),d.length>0&&(0,b.jsx)("ul",{style:{listStyle:"none",padding:0,margin:"0 0 10px 0",display:"flex",flexDirection:"column",gap:4},children:d.map(a=>(0,b.jsxs)("li",{style:{fontSize:12,fontFamily:"var(--font-mono, ui-monospace)"},children:[(0,b.jsx)(j,{kind:a.kind})," pid ",a.pid," · ",a.kind," · ",a.model," · ",a.elapsed_s,"s"]},a.pid))}),(0,b.jsx)("div",{style:{display:"flex",gap:6,flexWrap:"wrap"},children:Object.entries(f).map(([a,c])=>(0,b.jsxs)("span",{style:{fontSize:11,padding:"2px 8px",background:"var(--af-bg-soft, rgba(0,0,0,0.04))",borderRadius:6,color:"var(--af-text-secondary)"},children:[(0,b.jsx)(j,{kind:a})," ",a,": ",c.ops]},a))})]})}function j({kind:a}){return(0,b.jsx)("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:f[a]??f.unknown,marginRight:6,verticalAlign:"middle"}})}function k({traces:a,active:f,selected:h,onSelect:i}){let l=(0,c.useMemo)(()=>new Set(f.map(a=>a.pid)),[f]);return(0,b.jsxs)(g,{padding:0,children:[(0,b.jsxs)("div",{style:{padding:"10px 14px",borderBottom:"1px solid var(--af-border)"},children:[(0,b.jsx)("strong",{style:{fontSize:13},children:"Recent runs"}),(0,b.jsx)("span",{style:{fontSize:11,color:"var(--af-text-tertiary)",marginLeft:8},children:a.length})]}),(0,b.jsx)("ul",{style:{listStyle:"none",padding:0,margin:0,maxHeight:600,overflow:"auto"},children:a.map(a=>{let c=e[null!=a.pid&&l.has(a.pid)?"running":a.status],f=h===a.run_id;return(0,b.jsxs)("li",{onClick:()=>i(a.run_id),style:{padding:"10px 14px",cursor:"pointer",borderBottom:"1px solid var(--af-border)",background:f?"var(--af-bg-soft, rgba(59,130,246,0.08))":"transparent"},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:8},children:[(0,b.jsxs)("div",{style:{minWidth:0,flex:1},children:[(0,b.jsxs)("div",{style:{fontSize:12,fontWeight:500,display:"flex",alignItems:"center",gap:6},children:[(0,b.jsx)(j,{kind:a.kind}),(0,b.jsxs)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[a.kind," · ",a.model]})]}),(0,b.jsxs)("div",{style:{fontSize:10,color:"var(--af-text-tertiary)",marginTop:2,fontFamily:"var(--font-mono, ui-monospace)"},children:[a.run_id.slice(0,19),"…",a.run_id.slice(-8)]})]}),(0,b.jsx)("span",{style:{fontSize:10,padding:"2px 7px",borderRadius:5,background:c.bg,color:c.fg,fontWeight:600},children:c.label})]}),(0,b.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",marginTop:4,fontSize:10,color:"var(--af-text-tertiary)"},children:[(0,b.jsx)("span",{children:a.started_at?function(a){if(!a)return"—";let b=Date.now()-new Date(a).getTime();if(b<0)return"now";let c=Math.floor(b/1e3);if(c<60)return`${c}s ago`;let d=Math.floor(c/60);if(d<60)return`${d}m ago`;let e=Math.floor(d/60);return e<24?`${e}h ago`:`${Math.floor(e/24)}d ago`}(a.started_at):"—"}),(0,b.jsxs)("span",{children:[null!=a.elapsed_ms?d(a.elapsed_ms):"…",null!=a.output_tokens?` \xb7 ${a.output_tokens.toLocaleString()} out`:""]})]})]},a.run_id)})})]})}function l({runId:a}){let[e,f]=(0,c.useState)([]),[h,i]=(0,c.useState)(!1),[k,o]=(0,c.useState)(null),p=(0,c.useRef)(null),[q,r]=(0,c.useState)(!1);(0,c.useEffect)(()=>{f([]),i(!1),o(null),r(!1);let b=new EventSource(`/api/runs/${a}/stream`);b.onopen=()=>i(!0);let c=a=>{if("string"!=typeof a||""===a)return null;try{return JSON.parse(a)}catch{return null}};return b.addEventListener("connected",a=>{let b=c(a.data);b&&f(a=>[...a,{sseType:"connected",data:b}])}),b.addEventListener("meta",a=>{let b=c(a.data);b&&f(a=>[...a,{sseType:"meta",data:b}])}),b.addEventListener("event",a=>{let b=c(a.data);b&&f(a=>[...a,{sseType:"event",data:b}])}),b.addEventListener("done",a=>{let d=c(a.data);d&&(f(a=>[...a,{sseType:"done",data:d}]),o(d.reason)),b.close()}),b.addEventListener("stream_error",a=>{let b=c(a.data);b&&f(a=>[...a,{sseType:"stream_error",data:b}])}),b.onerror=()=>{i(a=>(a||o("connect-error"),a))},()=>{b.close()}},[a]),(0,c.useEffect)(()=>{p.current&&(p.current.scrollTop=p.current.scrollHeight)},[e.length]);let s=e.find(a=>"meta"===a.sseType&&"payload"===a.data._meta.type),t=e.find(a=>"meta"===a.sseType&&"start"===a.data._meta.type),u=e.find(a=>"meta"===a.sseType&&"end"===a.data._meta.type),v=s?s.data._meta:null,w=t?t.data._meta:null,x=u?u.data._meta:null,y=(0,c.useMemo)(()=>{let a=0,b=0,c=0,d=0,f=0;for(let g of e){if("event"!==g.sseType)continue;let e=g.data;if("assistant"===e.type&&e.message){let g=e.message.usage;g&&(a=g.input_tokens??a,b=g.output_tokens??b,c=g.cache_creation_input_tokens??c,d=g.cache_read_input_tokens??d);let h=e.message.content;if(Array.isArray(h))for(let a of h)"text"===a.type&&"string"==typeof a.text&&(f+=a.text.length)}}return{inT:a,outT:b,cacheCreate:c,cacheRead:d,contentChars:f}},[e]);return(0,b.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[(0,b.jsxs)(g,{children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:8,flexWrap:"wrap"},children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{style:{fontSize:13,fontWeight:600},children:w?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(j,{kind:w.kind})," ",w.kind," · ",(0,b.jsx)("span",{style:{color:"var(--af-text-secondary)"},children:w.model})]}):"loading…"}),(0,b.jsx)("div",{style:{fontSize:10,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono, ui-monospace)",marginTop:3},children:a})]}),(0,b.jsxs)("div",{style:{fontSize:11,color:"var(--af-text-tertiary)",textAlign:"right"},children:[h&&!k&&(0,b.jsx)("span",{style:{color:"#3b82f6"},children:"● live"}),k&&(0,b.jsxs)("span",{style:{color:"end"===k?"#16a34a":"#dc2626"},children:["● ",k]})]})]}),(0,b.jsxs)("div",{style:{marginTop:8,fontSize:11,display:"flex",gap:14,flexWrap:"wrap",color:"var(--af-text-secondary)"},children:[(0,b.jsxs)("span",{children:["in: ",(0,b.jsx)("strong",{children:y.inT.toLocaleString()})]}),(0,b.jsxs)("span",{children:["out: ",(0,b.jsx)("strong",{children:y.outT.toLocaleString()})]}),(0,b.jsxs)("span",{children:["cache_create: ",(0,b.jsx)("strong",{children:y.cacheCreate.toLocaleString()})]}),(0,b.jsxs)("span",{children:["cache_read: ",(0,b.jsx)("strong",{children:y.cacheRead.toLocaleString()})]}),(0,b.jsxs)("span",{children:["chars: ",(0,b.jsx)("strong",{children:y.contentChars.toLocaleString()})]}),x&&(0,b.jsxs)("span",{children:["elapsed: ",(0,b.jsx)("strong",{children:d(x.elapsed_ms)})]}),x&&0!==x.exit_code&&(0,b.jsxs)("span",{style:{color:"#dc2626"},children:["exit: ",x.exit_code]})]}),x&&x.stderr_tail&&(0,b.jsx)("pre",{style:{marginTop:8,padding:8,background:"rgba(239, 68, 68, 0.08)",border:"1px solid rgba(239,68,68,0.2)",borderRadius:6,fontSize:11,whiteSpace:"pre-wrap",color:"#dc2626",maxHeight:120,overflow:"auto"},children:x.stderr_tail})]}),(0,b.jsxs)(g,{children:[(0,b.jsxs)("button",{onClick:()=>r(a=>!a),style:{background:"transparent",border:"none",padding:0,cursor:"pointer",color:"var(--af-text-secondary)",fontSize:12,display:"flex",alignItems:"center",gap:6},children:[q?"▾":"▸"," Prompts (",v?`${v.system_prompt.length+v.user_prompt.length+(v.reminder?.length??0)} chars`:"—",")"]}),q&&v&&(0,b.jsxs)("div",{style:{marginTop:10,display:"flex",flexDirection:"column",gap:10},children:[(0,b.jsx)(m,{label:"System prompt",content:v.system_prompt}),(0,b.jsx)(m,{label:"User prompt",content:v.user_prompt}),v.reminder&&(0,b.jsx)(m,{label:"Reminder (retry)",content:v.reminder})]})]}),(0,b.jsxs)(g,{children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",marginBottom:8},children:[(0,b.jsx)("strong",{style:{fontSize:13},children:"Stream events"}),(0,b.jsxs)("span",{style:{fontSize:11,color:"var(--af-text-tertiary)"},children:[e.length," msgs"]})]}),(0,b.jsx)("div",{ref:p,style:{maxHeight:480,overflow:"auto",background:"var(--af-bg-soft, rgba(0,0,0,0.04))",borderRadius:6,padding:8,fontSize:11,fontFamily:"var(--font-mono, ui-monospace)",display:"flex",flexDirection:"column",gap:6},children:e.map((a,c)=>(0,b.jsx)(n,{ev:a},c))})]})]})}function m({label:a,content:c}){return(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{style:{fontSize:11,color:"var(--af-text-tertiary)",marginBottom:4},children:[a," · ",c.length.toLocaleString()," chars"]}),(0,b.jsx)("pre",{style:{margin:0,padding:8,background:"var(--af-bg-soft, rgba(0,0,0,0.04))",borderRadius:6,fontSize:11,lineHeight:1.5,whiteSpace:"pre-wrap",maxHeight:280,overflow:"auto"},children:c})]})}function n({ev:a}){var c;let d,e,f,g;if("connected"===a.sseType){let c=a.data;return(0,b.jsxs)(o,{tone:"info",children:[(0,b.jsx)("b",{children:"connected"})," ",c.run_id," (",c.path,")"]})}if("done"===a.sseType)return(0,b.jsxs)(o,{tone:"info",children:[(0,b.jsx)("b",{children:"done"})," reason=",a.data.reason]});if("raw"===a.sseType)return(0,b.jsxs)(o,{tone:"warn",children:[(0,b.jsx)("b",{children:"raw"})," ",a.data.line.slice(0,200)]});if("stream_error"===a.sseType)return(0,b.jsxs)(o,{tone:"error",children:[(0,b.jsx)("b",{children:"stream_error"})," ",a.data.message]});if("meta"===a.sseType){let c=a.data._meta;return(0,b.jsxs)(o,{tone:"meta",children:[(0,b.jsx)("b",{children:c.type})," ",function(a){let{type:b,...c}=a;return"payload"===b?`system=${c.system_prompt?.length??0}c user=${c.user_prompt?.length??0}c reminder=${c.reminder?.length??0}c`:"spawned"===b?`pid=${c.pid}`:"start"===b?`${c.kind} ${c.model} user=${c.user_prompt_chars}c`:"end"===b?`elapsed=${c.elapsed_ms}ms exit=${c.exit_code} out=${c.output_tokens}t chars=${c.content_chars}`:JSON.stringify(c).slice(0,200)}(c)]})}let h=a.data;if("system"===h.type)return(0,b.jsxs)(o,{tone:"info",children:[(0,b.jsx)("b",{children:"system.init"})," tools=",h.tools?.length??0," mcp=",h.mcp_servers?.length??0]});if("assistant"===h.type&&h.message?.content){let a=h.message.content.map(a=>"text"===a.type?`text(${(a.text??"").length})`:"thinking"===a.type?`thinking(${(a.thinking??"").length})`:a.type??"?").join("+");return(0,b.jsxs)(o,{tone:"ok",children:[(0,b.jsx)("b",{children:"assistant"})," ",a]})}if("rate_limit_event"===h.type){let a=h.rate_limit_info;return(0,b.jsxs)(o,{tone:"warn",children:[(0,b.jsx)("b",{children:"rate_limit"})," status=",a?.status," type=",a?.rateLimitType," ",a?.resetsAt?`resets=${new Date(1e3*a.resetsAt).toLocaleTimeString()}`:""]})}return"result"===h.type?(0,b.jsxs)(o,{tone:"ok",children:[(0,b.jsx)("b",{children:"result"})," ",(d=(c=h).usage,e=c.total_cost_usd,f=c.duration_ms,g=[],null!=f&&g.push(`${f}ms`),d?.input_tokens!=null&&g.push(`in=${d.input_tokens}`),d?.output_tokens!=null&&g.push(`out=${d.output_tokens}`),d?.cache_creation_input_tokens&&g.push(`cache_create=${d.cache_creation_input_tokens.toLocaleString()}`),d?.cache_read_input_tokens&&g.push(`cache_read=${d.cache_read_input_tokens.toLocaleString()}`),null!=e&&g.push(`cost=$${e.toFixed(4)}`),g.join(" "))]}):(0,b.jsxs)(o,{tone:"default",children:[(0,b.jsx)("b",{children:h.type??"?"})," ",JSON.stringify(h).slice(0,160)]})}function o({children:a,tone:c}){return(0,b.jsx)("div",{style:{color:{info:"var(--af-text-secondary)",ok:"#16a34a",warn:"#d97706",error:"#dc2626",meta:"#a855f7",default:"var(--af-text-secondary)"}[c],lineHeight:1.5},children:a})}a.s(["RunsLiveBoard",0,function(){let[a,d]=(0,c.useState)(null),[e,f]=(0,c.useState)(null),[g,j]=(0,c.useState)(null);return(0,c.useEffect)(()=>{let a=!1;async function b(){try{let b=await fetch("/api/runs?since=24h&trace_limit=40",{cache:"no-store"});if(!b.ok)throw Error(`/api/runs ${b.status}`);let c=await b.json();!a&&(d(c),j(null),a||e||!(c.traces.length>0)||f(c.traces[0].run_id))}catch(b){a||j(b.message)}}b();let c=setInterval(b,3e3);return()=>{a=!0,clearInterval(c)}},[e]),(0,b.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"minmax(380px, 1fr) minmax(0, 2.4fr)",gap:16},children:[(0,b.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[(0,b.jsx)(i,{data:a,error:g}),(0,b.jsx)(k,{traces:a?.traces??[],active:a?.active??[],selected:e,onSelect:f})]}),(0,b.jsx)("div",{children:e?(0,b.jsx)(l,{runId:e}):(0,b.jsx)(h,{text:"Select a run to see its prompt + live events."})})]})}])}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=apps_web_components_runs-live-board_tsx_0r6dkdq._.js.map
|