fleetlens 0.11.2 → 0.12.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.
Files changed (179) hide show
  1. package/app/apps/web/.next/BUILD_ID +1 -1
  2. package/app/apps/web/.next/app-path-routes-manifest.json +3 -0
  3. package/app/apps/web/.next/build-manifest.json +3 -3
  4. package/app/apps/web/.next/prerender-manifest.json +3 -3
  5. package/app/apps/web/.next/routes-manifest.json +22 -0
  6. package/app/apps/web/.next/server/app/_global-error.html +1 -1
  7. package/app/apps/web/.next/server/app/_global-error.rsc +1 -1
  8. package/app/apps/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  9. package/app/apps/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  10. package/app/apps/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  11. package/app/apps/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  12. package/app/apps/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  13. package/app/apps/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  14. package/app/apps/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  15. package/app/apps/web/.next/server/app/api/ask/route.js.nft.json +1 -1
  16. package/app/apps/web/.next/server/app/api/digest/day/[date]/route.js +1 -1
  17. package/app/apps/web/.next/server/app/api/digest/day/[date]/route.js.nft.json +1 -1
  18. package/app/apps/web/.next/server/app/api/digest/month/[yearMonth]/route.js +1 -1
  19. package/app/apps/web/.next/server/app/api/digest/month/[yearMonth]/route.js.nft.json +1 -1
  20. package/app/apps/web/.next/server/app/api/digest/month-index/route.js.nft.json +1 -1
  21. package/app/apps/web/.next/server/app/api/digest/week/[startDate]/route.js +1 -1
  22. package/app/apps/web/.next/server/app/api/digest/week/[startDate]/route.js.nft.json +1 -1
  23. package/app/apps/web/.next/server/app/api/digest/week-index/route.js.nft.json +1 -1
  24. package/app/apps/web/.next/server/app/api/events/route.js.nft.json +1 -1
  25. package/app/apps/web/.next/server/app/api/jobs/route.js.nft.json +1 -1
  26. package/app/apps/web/.next/server/app/api/pdf/[key]/route/app-paths-manifest.json +3 -0
  27. package/app/apps/web/.next/server/app/api/pdf/[key]/route/build-manifest.json +9 -0
  28. package/app/apps/web/.next/server/app/api/pdf/[key]/route/server-reference-manifest.json +4 -0
  29. package/app/apps/web/.next/server/app/api/pdf/[key]/route.js +10 -0
  30. package/app/apps/web/.next/server/app/api/pdf/[key]/route.js.map +5 -0
  31. package/app/apps/web/.next/server/app/api/pdf/[key]/route.js.nft.json +1 -0
  32. package/app/apps/web/.next/server/app/api/pdf/[key]/route_client-reference-manifest.js +3 -0
  33. package/app/apps/web/.next/server/app/api/runs/[runId]/route.js.nft.json +1 -1
  34. package/app/apps/web/.next/server/app/api/runs/[runId]/stream/route.js.nft.json +1 -1
  35. package/app/apps/web/.next/server/app/api/runs/route.js.nft.json +1 -1
  36. package/app/apps/web/.next/server/app/api/settings/route.js.nft.json +1 -1
  37. package/app/apps/web/.next/server/app/api/team-config/route.js.nft.json +1 -1
  38. package/app/apps/web/.next/server/app/api/workflow-agent/route/app-paths-manifest.json +3 -0
  39. package/app/apps/web/.next/server/app/api/workflow-agent/route/build-manifest.json +9 -0
  40. package/app/apps/web/.next/server/app/api/workflow-agent/route/server-reference-manifest.json +4 -0
  41. package/app/apps/web/.next/server/app/api/workflow-agent/route.js +7 -0
  42. package/app/apps/web/.next/server/app/api/workflow-agent/route.js.map +5 -0
  43. package/app/apps/web/.next/server/app/api/workflow-agent/route.js.nft.json +1 -0
  44. package/app/apps/web/.next/server/app/api/workflow-agent/route_client-reference-manifest.js +3 -0
  45. package/app/apps/web/.next/server/app/changelog/page.js.nft.json +1 -1
  46. package/app/apps/web/.next/server/app/changelog/page_client-reference-manifest.js +1 -1
  47. package/app/apps/web/.next/server/app/day/[date]/page.js.nft.json +1 -1
  48. package/app/apps/web/.next/server/app/day/[date]/page_client-reference-manifest.js +1 -1
  49. package/app/apps/web/.next/server/app/day/page.js.nft.json +1 -1
  50. package/app/apps/web/.next/server/app/day/page_client-reference-manifest.js +1 -1
  51. package/app/apps/web/.next/server/app/digest/[date]/page.js.nft.json +1 -1
  52. package/app/apps/web/.next/server/app/digest/[date]/page_client-reference-manifest.js +1 -1
  53. package/app/apps/web/.next/server/app/digest/page.js.nft.json +1 -1
  54. package/app/apps/web/.next/server/app/digest/page_client-reference-manifest.js +1 -1
  55. package/app/apps/web/.next/server/app/insights/[key]/page.js.nft.json +1 -1
  56. package/app/apps/web/.next/server/app/insights/[key]/page_client-reference-manifest.js +1 -1
  57. package/app/apps/web/.next/server/app/insights/page.js.nft.json +1 -1
  58. package/app/apps/web/.next/server/app/insights/page_client-reference-manifest.js +1 -1
  59. package/app/apps/web/.next/server/app/page.js.nft.json +1 -1
  60. package/app/apps/web/.next/server/app/page_client-reference-manifest.js +1 -1
  61. package/app/apps/web/.next/server/app/parallelism/page.js.nft.json +1 -1
  62. package/app/apps/web/.next/server/app/parallelism/page_client-reference-manifest.js +1 -1
  63. package/app/apps/web/.next/server/app/print/[key]/page/app-paths-manifest.json +3 -0
  64. package/app/apps/web/.next/server/app/print/[key]/page/build-manifest.json +17 -0
  65. package/app/apps/web/.next/server/app/print/[key]/page/next-font-manifest.json +6 -0
  66. package/app/apps/web/.next/server/app/print/[key]/page/react-loadable-manifest.json +1 -0
  67. package/app/apps/web/.next/server/app/print/[key]/page/server-reference-manifest.json +4 -0
  68. package/app/apps/web/.next/server/app/print/[key]/page.js +18 -0
  69. package/app/apps/web/.next/server/app/print/[key]/page.js.map +5 -0
  70. package/app/apps/web/.next/server/app/print/[key]/page.js.nft.json +1 -0
  71. package/app/apps/web/.next/server/app/print/[key]/page_client-reference-manifest.js +3 -0
  72. package/app/apps/web/.next/server/app/projects/[slug]/page.js.nft.json +1 -1
  73. package/app/apps/web/.next/server/app/projects/[slug]/page_client-reference-manifest.js +1 -1
  74. package/app/apps/web/.next/server/app/projects/page.js.nft.json +1 -1
  75. package/app/apps/web/.next/server/app/projects/page_client-reference-manifest.js +1 -1
  76. package/app/apps/web/.next/server/app/runs/page.js.nft.json +1 -1
  77. package/app/apps/web/.next/server/app/runs/page_client-reference-manifest.js +1 -1
  78. package/app/apps/web/.next/server/app/sessions/[id]/page.js.nft.json +1 -1
  79. package/app/apps/web/.next/server/app/sessions/[id]/page_client-reference-manifest.js +1 -1
  80. package/app/apps/web/.next/server/app/sessions/page.js.nft.json +1 -1
  81. package/app/apps/web/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  82. package/app/apps/web/.next/server/app/settings/page.js.nft.json +1 -1
  83. package/app/apps/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  84. package/app/apps/web/.next/server/app/team/page.js.nft.json +1 -1
  85. package/app/apps/web/.next/server/app/team/page_client-reference-manifest.js +1 -1
  86. package/app/apps/web/.next/server/app/usage/page.js.nft.json +1 -1
  87. package/app/apps/web/.next/server/app/usage/page_client-reference-manifest.js +1 -1
  88. package/app/apps/web/.next/server/app-paths-manifest.json +3 -0
  89. package/app/apps/web/.next/server/chunks/[root-of-the-server]__0455vu3._.js +2 -2
  90. package/app/apps/web/.next/server/chunks/{[root-of-the-server]__0_8zh-i._.js → [root-of-the-server]__04j3tng._.js} +2 -2
  91. package/app/apps/web/.next/server/chunks/{[root-of-the-server]__0jprdks._.js → [root-of-the-server]__0cnh3k4._.js} +2 -2
  92. package/app/apps/web/.next/server/chunks/[root-of-the-server]__0e.f-t.._.js +3 -0
  93. package/app/apps/web/.next/server/chunks/[root-of-the-server]__0kc9e1n._.js +3 -0
  94. package/app/apps/web/.next/server/chunks/[root-of-the-server]__0y5p73y._.js +3 -0
  95. package/app/apps/web/.next/server/chunks/{[root-of-the-server]__0ej_p3s._.js → [root-of-the-server]__132eosx._.js} +2 -2
  96. package/app/apps/web/.next/server/chunks/apps_web__next-internal_server_app_api_pdf_[key]_route_actions_0intcw9.js +3 -0
  97. package/app/apps/web/.next/server/chunks/apps_web__next-internal_server_app_api_workflow-agent_route_actions_0gxw9tv.js +3 -0
  98. package/app/apps/web/.next/server/chunks/packages_entries_dist_node_0bckr7-.js +1 -1
  99. package/app/apps/web/.next/server/chunks/packages_parser_dist_04rh1zd._.js +1 -1
  100. package/app/apps/web/.next/server/chunks/packages_parser_dist_0ndsxe6._.js +1 -1
  101. package/app/apps/web/.next/server/chunks/ssr/{[root-of-the-server]__0_xpuh7._.js → [root-of-the-server]__03y~03u._.js} +2 -2
  102. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__04eq6z2._.js +1 -1
  103. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__04il6m2._.js +11 -0
  104. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0exckd4._.js +1 -1
  105. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0o03ymy._.js +2 -2
  106. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0rvzdnx._.js +1 -1
  107. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0z7mg0b._.js +1 -1
  108. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0~.f_3z._.js +12 -0
  109. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__136-0me._.js +8 -0
  110. package/app/apps/web/.next/server/chunks/ssr/_0cgg5zi._.js +3 -0
  111. package/app/apps/web/.next/server/chunks/ssr/_0jw2sm7._.js +1 -1
  112. package/app/apps/web/.next/server/chunks/ssr/_0kajk31._.js +3 -0
  113. package/app/apps/web/.next/server/chunks/ssr/_0w.cv64._.js +8 -0
  114. package/app/apps/web/.next/server/chunks/ssr/_0xu2pvc._.js +1 -1
  115. package/app/apps/web/.next/server/chunks/ssr/apps_web_0.mu7c7._.js +1 -1
  116. package/app/apps/web/.next/server/chunks/ssr/apps_web__next-internal_server_app_print_[key]_page_actions_0_ygul-.js +3 -0
  117. package/app/apps/web/.next/server/chunks/ssr/apps_web_components_01d-iwx._.js +6 -0
  118. package/app/apps/web/.next/server/chunks/ssr/apps_web_components_week-digest_tsx_0c9ha31._.js +3 -0
  119. package/app/apps/web/.next/server/chunks/ssr/apps_web_lib_0af94gl._.js +1 -1
  120. package/app/apps/web/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_07orc4m.js +4 -0
  121. package/app/apps/web/.next/server/chunks/ssr/packages_parser_dist_12.endt._.js +1 -1
  122. package/app/apps/web/.next/server/edge/chunks/[root-of-the-server]__0.sx~id._.js +11 -0
  123. package/app/apps/web/.next/server/edge/chunks/node_modules_next_dist_esm_build_templates_edge-wrapper_0p1t1z8.js +3 -0
  124. package/app/apps/web/.next/server/edge/chunks/turbopack-node_modules_next_dist_esm_build_templates_edge-wrapper_0mw-sqe.js +3 -0
  125. package/app/apps/web/.next/server/functions-config-manifest.json +4 -1
  126. package/app/apps/web/.next/server/middleware-build-manifest.js +3 -3
  127. package/app/apps/web/.next/server/middleware-manifest.json +30 -2
  128. package/app/apps/web/.next/server/pages/500.html +1 -1
  129. package/app/apps/web/.next/server/server-reference-manifest.js +1 -1
  130. package/app/apps/web/.next/server/server-reference-manifest.json +1 -1
  131. package/app/apps/web/.next/static/WH20Ct_NdpZTKsqI_yquG/_clientMiddlewareManifest.js +6 -0
  132. package/app/apps/web/.next/static/chunks/00xkqnvk4-d1-.js +10 -0
  133. package/app/apps/web/.next/static/chunks/0716x58e1_2c5.js +1 -0
  134. package/app/apps/web/.next/static/chunks/{0s4eyofh28l~u.js → 0ck03i0l4zeun.js} +1 -1
  135. package/app/apps/web/.next/static/chunks/0nnjldasalwdu.js +4 -0
  136. package/app/apps/web/.next/static/chunks/0okg13phslr1..js +4 -0
  137. package/app/apps/web/.next/static/chunks/0vf-3rauafbek.js +6 -0
  138. package/app/apps/web/.next/static/chunks/0vl27-vjob2_9.js +6 -0
  139. package/app/apps/web/.next/static/chunks/0yo458-7577lr.js +1 -0
  140. package/app/apps/web/.next/static/chunks/14bjditmmrn7l.js +1 -0
  141. package/app/apps/web/app/api/events/route.ts +50 -2
  142. package/app/apps/web/app/api/pdf/[key]/route.ts +199 -0
  143. package/app/apps/web/app/api/workflow-agent/route.ts +27 -0
  144. package/app/apps/web/app/insights/[key]/page.tsx +4 -1
  145. package/app/apps/web/app/layout.tsx +23 -1
  146. package/app/apps/web/app/page.tsx +24 -1
  147. package/app/apps/web/app/print/[key]/page.tsx +91 -0
  148. package/app/apps/web/app/projects/[slug]/page.tsx +6 -7
  149. package/app/apps/web/app/projects/page.tsx +2 -3
  150. package/app/apps/web/app/sessions/[id]/session-view.tsx +1297 -19
  151. package/app/apps/web/app/sessions/sessions-grid.tsx +10 -1
  152. package/app/apps/web/components/dashboard-view.tsx +2 -1
  153. package/app/apps/web/components/export-pdf-button.tsx +76 -0
  154. package/app/apps/web/components/month-digest-view.tsx +10 -0
  155. package/app/apps/web/components/week-digest-view.tsx +10 -0
  156. package/app/apps/web/lib/changelog-data.generated.ts +1 -1
  157. package/app/apps/web/lib/entries-index.ts +5 -4
  158. package/app/apps/web/lib/find-chrome.ts +71 -0
  159. package/app/apps/web/middleware.ts +22 -0
  160. package/app/apps/web/package.json +1 -1
  161. package/app/apps/web/tsconfig.tsbuildinfo +1 -1
  162. package/dist/daemon-worker.js +1592 -252
  163. package/dist/index.js +1495 -168
  164. package/package.json +1 -1
  165. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0d~2~le._.js +0 -8
  166. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0w52fbc._.js +0 -12
  167. package/app/apps/web/.next/server/chunks/ssr/_02s1n-x._.js +0 -8
  168. package/app/apps/web/.next/server/chunks/ssr/_0fjbf--._.js +0 -3
  169. package/app/apps/web/.next/server/chunks/ssr/apps_web_components_0ly1xes._.js +0 -6
  170. package/app/apps/web/.next/static/chunks/0.3mqbj24kwtc.js +0 -6
  171. package/app/apps/web/.next/static/chunks/0byz8fqw.exef.js +0 -1
  172. package/app/apps/web/.next/static/chunks/0l3ck.awv~4t7.js +0 -1
  173. package/app/apps/web/.next/static/chunks/0lxuac2v0_gdl.js +0 -6
  174. package/app/apps/web/.next/static/chunks/0m62vx92~0_0d.js +0 -1
  175. package/app/apps/web/.next/static/chunks/0rtba0saz74e1.js +0 -10
  176. package/app/apps/web/.next/static/chunks/0uev~g~qvbjv9.js +0 -4
  177. package/app/apps/web/.next/static/m6ibRSdAu8jD10VBA2OFH/_clientMiddlewareManifest.js +0 -1
  178. /package/app/apps/web/.next/static/{m6ibRSdAu8jD10VBA2OFH → WH20Ct_NdpZTKsqI_yquG}/_buildManifest.js +0 -0
  179. /package/app/apps/web/.next/static/{m6ibRSdAu8jD10VBA2OFH → WH20Ct_NdpZTKsqI_yquG}/_ssgManifest.js +0 -0
@@ -0,0 +1,8 @@
1
+ module.exports=[50227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},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
+ `})]})}])},50522,a=>{"use strict";let b=(0,a.i(70106).default)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);a.s(["ChevronRight",0,b],50522)},33508,a=>{"use strict";let b=(0,a.i(70106).default)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);a.s(["X",0,b],33508)},5151,a=>{"use strict";let b=(0,a.i(70106).default)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);a.s(["Copy",0,b],5151)},13749,a=>{"use strict";let b=(0,a.i(70106).default)("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);a.s(["ChevronLeft",0,b],13749)},59639,(a,b,c)=>{b.exports=a.x("node:process",()=>require("node:process"))},85668,a=>{"use strict";let b=(0,a.i(70106).default)("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);a.s(["ArrowDown",0,b],85668)},6807,a=>{"use strict";let b=(0,a.i(70106).default)("Workflow",[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]]);a.s(["Workflow",0,b],6807)},79808,a=>{"use strict";let b=(0,a.i(70106).default)("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);a.s(["Wrench",0,b],79808)},5784,a=>{"use strict";let b=(0,a.i(70106).default)("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);a.s(["ChevronDown",0,b],5784)},12544,a=>{"use strict";let b=["/.claude/worktrees/","/.worktrees/","/claude/worktrees/"],c=/\/conductor\/workspaces\/[^/]+\/([^/]+)(?:\/|$)/,d="/.superset/worktrees/",e=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/,f=/gh\s+pr\s+create\b/i,g=/#(\d+)/,h=/--title\s+["']([^"']+)["']/;a.s(["canonicalProjectName",0,function(a){let f=a.replace(/\/{2,}/g,"/"),g=function(a){for(let c of b){let b=a.lastIndexOf(c);if(b>=0)return{idx:b,marker:c}}return null}(f);if(g)return f.slice(0,g.idx);let h=function(a){let b=c.exec(a);if(!b)return null;let d=b[1],e=+!!b[0].endsWith("/");return{canonicalEndIdx:b.index+b[0].length-d.length-1-e,workspaceName:d}}(f);if(h)return f.slice(0,h.canonicalEndIdx);let i=function(a){let b=a.indexOf(d);if(b<0)return null;let c=a.slice(b+d.length).split("/").filter(Boolean);if(0===c.length)return null;let f=e.test(c[0])?c[1]??c[0]:c[0];return{canonical:a.slice(0,b)+d+f,workspaceName:f}}(f);return i?i.canonical:f},"detectPrMarkers",0,function(a){let b=[],c=a.durationMs??0;for(let d of a.events){if("tool-call"!==d.role||"Bash"!==d.toolName)continue;let e=d.blocks.find(a=>a&&"type"in a&&"tool_use"===a.type);if(!e||"tool_use"!==e.type)continue;let i=e.input,j="string"==typeof i?.command?i.command:"";if(!f.test(j))continue;let k=j.match(h),l=j.match(g);b.push({sessionId:a.id,timestamp:d.timestamp??a.firstTimestamp??"",tOffsetMs:d.tOffsetMs,positionInSession:c>0&&void 0!==d.tOffsetMs?Math.min(1,Math.max(0,d.tOffsetMs/c)):void 0,command:j.slice(0,300),prNumber:l?Number(l[1]):void 0,title:k?.[1]})}return b}])}];
7
+
8
+ //# sourceMappingURL=%5Broot-of-the-server%5D__136-0me._.js.map
@@ -0,0 +1,3 @@
1
+ module.exports=[5151,a=>{"use strict";let b=(0,a.i(70106).default)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);a.s(["Copy",0,b],5151)},68381,a=>{"use strict";var b=a.i(87924);let c={build:"var(--af-accent)",plan:"#9f7aea",debug:"#ed8936",review:"#4299e1",refactor:"#38b2ac",test:"#48bb78",release:"#ed64a6",research:"#a0aec0",steer:"#f6ad55",meta:"#718096",warmup_minimal:"#cbd5e0"};a.s(["GoalBar",0,function({goals:a,total:d,height:e=12}){return 0===d||0===a.length?(0,b.jsx)("p",{style:{fontSize:12,color:"var(--af-text-tertiary)",margin:0},children:"No goal data."}):(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{style:{display:"flex",gap:2,height:e,borderRadius:3,overflow:"hidden"},children:a.map(a=>{let e=a.minutes/d*100;return(0,b.jsx)("div",{style:{width:`${e}%`,background:c[a.category]??"#888"},title:`${a.category}: ${Math.round(a.minutes)}m (${e.toFixed(0)}%)`},a.category)})}),(0,b.jsx)("div",{style:{display:"flex",gap:14,marginTop:8,flexWrap:"wrap",fontSize:11,color:"var(--af-text-tertiary)"},children:a.map(a=>(0,b.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:5},children:[(0,b.jsx)("span",{style:{width:8,height:8,borderRadius:2,background:c[a.category]??"#888"}}),a.category," ",Math.round(a.minutes),"m"]},a.category))})]})}])},53339,a=>{"use strict";var b=a.i(87924),c=a.i(38246);let d={essential:"#48bb78",helpful:"#4299e1",neutral:"#a0aec0",unhelpful:"#f56565"};function e({helpfulness_by_week:a}){return a.some(a=>null!==a.helpfulness)?(0,b.jsx)("div",{style:{display:"flex",gap:6,alignItems:"stretch",padding:"12px 0",marginBottom:24},children:a.map((a,c)=>(0,b.jsxs)("div",{style:{flex:1,padding:"10px 4px",borderRadius:6,textAlign:"center",background:a.helpfulness?`color-mix(in srgb, ${d[a.helpfulness]} 14%, transparent)`:"var(--af-surface)",border:`1px solid ${a.helpfulness?`color-mix(in srgb, ${d[a.helpfulness]} 28%, transparent)`:"var(--af-border-subtle)"}`},children:[(0,b.jsx)("div",{style:{fontSize:9,fontWeight:700,letterSpacing:"0.04em",color:"var(--af-text-tertiary)",marginBottom:4,fontFamily:"var(--font-mono)"},children:a.week_start.slice(5)}),(0,b.jsx)("div",{style:{fontSize:10,fontWeight:600,color:a.helpfulness?d[a.helpfulness]:"var(--af-text-tertiary)"},children:a.helpfulness??"—"})]},c))}):null}function f({title:a,children:c}){return(0,b.jsxs)("section",{style:{marginBottom:28},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}),c]})}a.s(["MonthDigest",0,function({digest:a,aiEnabled:d,actions:g}){let h=Object.values(a.outcome_mix).reduce((a,b)=>a+(b??0),0),i=a.shipped.length,j=a.agent_min_total/60,k=j>=1?`${j.toFixed(1)}h`:`${Math.round(a.agent_min_total)}m`,l=function(a){let[b,c]=a.split("-");return new Date(Number(b),Number(c)-1,1).toLocaleDateString("en-US",{month:"long",year:"numeric"})}(a.key);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",{style:{textTransform:"uppercase",letterSpacing:"0.06em"},children:l}),(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:[k," agent time · ",h," active day",1===h?"":"s"," · ",i," PR",1===i?"":"s"]}),g&&(0,b.jsx)("div",{style:{marginLeft:"auto",display:"inline-flex",alignItems:"center",gap:8},children:g})]}),a.headline?(0,b.jsx)("h1",{style:{fontSize:26,fontWeight:700,lineHeight:1.3,letterSpacing:"-0.02em",margin:"0 0 14px",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:d?"No narrative yet.":`Worked ${k} across ${a.projects.length} project${1===a.projects.length?"":"s"}.`})]}),!d&&(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)(c.default,{href:"/settings",style:{color:"var(--af-accent)"},children:"Settings"})," to see monthly narratives."]}),(0,b.jsx)(e,{helpfulness_by_week:a.helpfulness_by_week}),a.standout_weeks&&a.standout_weeks.length>0&&(0,b.jsx)(f,{title:"Standout weeks",children:(0,b.jsx)("ul",{style:{listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:10},children:a.standout_weeks.map(a=>(0,b.jsxs)("li",{style:{padding:"12px 14px",borderRadius:8,background:"var(--af-surface)",border:"1px solid var(--af-border-subtle)",display:"flex",gap:12,alignItems:"flex-start"},children:[(0,b.jsxs)(c.default,{href:`/insights/week-${a.week_start}`,style:{fontSize:11,fontWeight:600,color:"var(--af-accent)",textDecoration:"none",flexShrink:0,paddingTop:2,fontFamily:"var(--font-mono)"},children:["Week ",a.week_start.slice(5)]}),(0,b.jsx)("span",{style:{fontSize:13,lineHeight:1.55,color:"var(--af-text)"},children:a.why})]},a.week_start))})}),a.trajectory&&a.trajectory.length>0&&(0,b.jsx)(f,{title:"Trajectory",children:(0,b.jsx)("ol",{style:{listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:8},children:a.trajectory.map(a=>(0,b.jsxs)("li",{style:{display:"flex",gap:12,alignItems:"flex-start"},children:[(0,b.jsxs)(c.default,{href:`/insights/week-${a.week_start}`,style:{fontSize:10,fontWeight:600,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)",flexShrink:0,width:92,paddingTop:3,textDecoration:"none"},children:["Week ",a.week_start.slice(5)]}),(0,b.jsx)("span",{style:{fontSize:13,lineHeight:1.55,color:"var(--af-text-secondary)"},children:a.line})]},a.week_start))})}),a.friction_themes&&a.friction_themes.trim().length>0&&(0,b.jsx)(f,{title:"Friction patterns",children:(0,b.jsx)("p",{style:{fontSize:13,lineHeight:1.6,margin:0,color:"var(--af-text)"},children:a.friction_themes})}),a.suggestion&&(0,b.jsx)(f,{title:"Suggestion",children:(0,b.jsxs)("div",{style:{padding:"14px 16px",borderRadius:8,background:"var(--af-accent-subtle)",border:"1px solid color-mix(in srgb, var(--af-accent) 18%, var(--af-border))"},children:[(0,b.jsx)("div",{style:{fontSize:14,fontWeight:600,color:"var(--af-text)",marginBottom:6},children:a.suggestion.headline}),(0,b.jsx)("div",{style:{fontSize:13,lineHeight:1.55,color:"var(--af-text-secondary)"},children:a.suggestion.body})]})}),a.projects.length>0&&(0,b.jsx)(f,{title:"Projects",children:(0,b.jsx)("ul",{style:{listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:4},children:a.projects.map(a=>(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.jsx)("span",{style:{flex:1,minWidth:0,fontWeight:500},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.name))})})]})}])}];
2
+
3
+ //# sourceMappingURL=_0cgg5zi._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[68381,a=>{"use strict";var b=a.i(87924);let c={build:"var(--af-accent)",plan:"#9f7aea",debug:"#ed8936",review:"#4299e1",refactor:"#38b2ac",test:"#48bb78",release:"#ed64a6",research:"#a0aec0",steer:"#f6ad55",meta:"#718096",warmup_minimal:"#cbd5e0"};a.s(["GoalBar",0,function({goals:a,total:d,height:e=12}){return 0===d||0===a.length?(0,b.jsx)("p",{style:{fontSize:12,color:"var(--af-text-tertiary)",margin:0},children:"No goal data."}):(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{style:{display:"flex",gap:2,height:e,borderRadius:3,overflow:"hidden"},children:a.map(a=>{let e=a.minutes/d*100;return(0,b.jsx)("div",{style:{width:`${e}%`,background:c[a.category]??"#888"},title:`${a.category}: ${Math.round(a.minutes)}m (${e.toFixed(0)}%)`},a.category)})}),(0,b.jsx)("div",{style:{display:"flex",gap:14,marginTop:8,flexWrap:"wrap",fontSize:11,color:"var(--af-text-tertiary)"},children:a.map(a=>(0,b.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:5},children:[(0,b.jsx)("span",{style:{width:8,height:8,borderRadius:2,background:c[a.category]??"#888"}}),a.category," ",Math.round(a.minutes),"m"]},a.category))})]})}])},50522,a=>{"use strict";let b=(0,a.i(70106).default)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);a.s(["ChevronRight",0,b],50522)},5784,a=>{"use strict";let b=(0,a.i(70106).default)("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);a.s(["ChevronDown",0,b],5784)},12544,a=>{"use strict";let b=["/.claude/worktrees/","/.worktrees/","/claude/worktrees/"],c=/\/conductor\/workspaces\/[^/]+\/([^/]+)(?:\/|$)/,d=/gh\s+pr\s+create\b/i,e=/#(\d+)/,f=/--title\s+["']([^"']+)["']/;a.s(["canonicalProjectName",0,function(a){let d=a.replace(/\/{2,}/g,"/"),e=function(a){for(let c of b){let b=a.lastIndexOf(c);if(b>=0)return{idx:b,marker:c}}return null}(d);if(e)return d.slice(0,e.idx);let f=function(a){let b=c.exec(a);if(!b)return null;let d=b[1],e=+!!b[0].endsWith("/");return{canonicalEndIdx:b.index+b[0].length-d.length-1-e,workspaceName:d}}(d);return f?d.slice(0,f.canonicalEndIdx):d},"detectPrMarkers",0,function(a){let b=[],c=a.durationMs??0;for(let g of a.events){if("tool-call"!==g.role||"Bash"!==g.toolName)continue;let h=g.blocks.find(a=>a&&"type"in a&&"tool_use"===a.type);if(!h||"tool_use"!==h.type)continue;let i=h.input,j="string"==typeof i?.command?i.command:"";if(!d.test(j))continue;let k=j.match(f),l=j.match(e);b.push({sessionId:a.id,timestamp:g.timestamp??a.firstTimestamp??"",tOffsetMs:g.tOffsetMs,positionInSession:c>0&&void 0!==g.tOffsetMs?Math.min(1,Math.max(0,g.tOffsetMs/c)):void 0,command:j.slice(0,300),prNumber:l?Number(l[1]):void 0,title:k?.[1]})}return b}])}];
1
+ module.exports=[68381,a=>{"use strict";var b=a.i(87924);let c={build:"var(--af-accent)",plan:"#9f7aea",debug:"#ed8936",review:"#4299e1",refactor:"#38b2ac",test:"#48bb78",release:"#ed64a6",research:"#a0aec0",steer:"#f6ad55",meta:"#718096",warmup_minimal:"#cbd5e0"};a.s(["GoalBar",0,function({goals:a,total:d,height:e=12}){return 0===d||0===a.length?(0,b.jsx)("p",{style:{fontSize:12,color:"var(--af-text-tertiary)",margin:0},children:"No goal data."}):(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{style:{display:"flex",gap:2,height:e,borderRadius:3,overflow:"hidden"},children:a.map(a=>{let e=a.minutes/d*100;return(0,b.jsx)("div",{style:{width:`${e}%`,background:c[a.category]??"#888"},title:`${a.category}: ${Math.round(a.minutes)}m (${e.toFixed(0)}%)`},a.category)})}),(0,b.jsx)("div",{style:{display:"flex",gap:14,marginTop:8,flexWrap:"wrap",fontSize:11,color:"var(--af-text-tertiary)"},children:a.map(a=>(0,b.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:5},children:[(0,b.jsx)("span",{style:{width:8,height:8,borderRadius:2,background:c[a.category]??"#888"}}),a.category," ",Math.round(a.minutes),"m"]},a.category))})]})}])},50522,a=>{"use strict";let b=(0,a.i(70106).default)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);a.s(["ChevronRight",0,b],50522)},5784,a=>{"use strict";let b=(0,a.i(70106).default)("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);a.s(["ChevronDown",0,b],5784)},12544,a=>{"use strict";let b=["/.claude/worktrees/","/.worktrees/","/claude/worktrees/"],c=/\/conductor\/workspaces\/[^/]+\/([^/]+)(?:\/|$)/,d="/.superset/worktrees/",e=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/,f=/gh\s+pr\s+create\b/i,g=/#(\d+)/,h=/--title\s+["']([^"']+)["']/;a.s(["canonicalProjectName",0,function(a){let f=a.replace(/\/{2,}/g,"/"),g=function(a){for(let c of b){let b=a.lastIndexOf(c);if(b>=0)return{idx:b,marker:c}}return null}(f);if(g)return f.slice(0,g.idx);let h=function(a){let b=c.exec(a);if(!b)return null;let d=b[1],e=+!!b[0].endsWith("/");return{canonicalEndIdx:b.index+b[0].length-d.length-1-e,workspaceName:d}}(f);if(h)return f.slice(0,h.canonicalEndIdx);let i=function(a){let b=a.indexOf(d);if(b<0)return null;let c=a.slice(b+d.length).split("/").filter(Boolean);if(0===c.length)return null;let f=e.test(c[0])?c[1]??c[0]:c[0];return{canonical:a.slice(0,b)+d+f,workspaceName:f}}(f);return i?i.canonical:f},"detectPrMarkers",0,function(a){let b=[],c=a.durationMs??0;for(let d of a.events){if("tool-call"!==d.role||"Bash"!==d.toolName)continue;let e=d.blocks.find(a=>a&&"type"in a&&"tool_use"===a.type);if(!e||"tool_use"!==e.type)continue;let i=e.input,j="string"==typeof i?.command?i.command:"";if(!f.test(j))continue;let k=j.match(h),l=j.match(g);b.push({sessionId:a.id,timestamp:d.timestamp??a.firstTimestamp??"",tOffsetMs:d.tOffsetMs,positionInSession:c>0&&void 0!==d.tOffsetMs?Math.min(1,Math.max(0,d.tOffsetMs/c)):void 0,command:j.slice(0,300),prNumber:l?Number(l[1]):void 0,title:k?.[1]})}return b}])}];
2
2
 
3
3
  //# sourceMappingURL=_0jw2sm7._.js.map
@@ -0,0 +1,3 @@
1
+ module.exports=[68381,a=>{"use strict";var b=a.i(87924);let c={build:"var(--af-accent)",plan:"#9f7aea",debug:"#ed8936",review:"#4299e1",refactor:"#38b2ac",test:"#48bb78",release:"#ed64a6",research:"#a0aec0",steer:"#f6ad55",meta:"#718096",warmup_minimal:"#cbd5e0"};a.s(["GoalBar",0,function({goals:a,total:d,height:e=12}){return 0===d||0===a.length?(0,b.jsx)("p",{style:{fontSize:12,color:"var(--af-text-tertiary)",margin:0},children:"No goal data."}):(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{style:{display:"flex",gap:2,height:e,borderRadius:3,overflow:"hidden"},children:a.map(a=>{let e=a.minutes/d*100;return(0,b.jsx)("div",{style:{width:`${e}%`,background:c[a.category]??"#888"},title:`${a.category}: ${Math.round(a.minutes)}m (${e.toFixed(0)}%)`},a.category)})}),(0,b.jsx)("div",{style:{display:"flex",gap:14,marginTop:8,flexWrap:"wrap",fontSize:11,color:"var(--af-text-tertiary)"},children:a.map(a=>(0,b.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:5},children:[(0,b.jsx)("span",{style:{width:8,height:8,borderRadius:2,background:c[a.category]??"#888"}}),a.category," ",Math.round(a.minutes),"m"]},a.category))})]})}])},50522,a=>{"use strict";let b=(0,a.i(70106).default)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);a.s(["ChevronRight",0,b],50522)},33508,a=>{"use strict";let b=(0,a.i(70106).default)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);a.s(["X",0,b],33508)},5151,a=>{"use strict";let b=(0,a.i(70106).default)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);a.s(["Copy",0,b],5151)},13749,a=>{"use strict";let b=(0,a.i(70106).default)("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);a.s(["ChevronLeft",0,b],13749)},53339,a=>{"use strict";var b=a.i(87924),c=a.i(38246);let d={essential:"#48bb78",helpful:"#4299e1",neutral:"#a0aec0",unhelpful:"#f56565"};function e({helpfulness_by_week:a}){return a.some(a=>null!==a.helpfulness)?(0,b.jsx)("div",{style:{display:"flex",gap:6,alignItems:"stretch",padding:"12px 0",marginBottom:24},children:a.map((a,c)=>(0,b.jsxs)("div",{style:{flex:1,padding:"10px 4px",borderRadius:6,textAlign:"center",background:a.helpfulness?`color-mix(in srgb, ${d[a.helpfulness]} 14%, transparent)`:"var(--af-surface)",border:`1px solid ${a.helpfulness?`color-mix(in srgb, ${d[a.helpfulness]} 28%, transparent)`:"var(--af-border-subtle)"}`},children:[(0,b.jsx)("div",{style:{fontSize:9,fontWeight:700,letterSpacing:"0.04em",color:"var(--af-text-tertiary)",marginBottom:4,fontFamily:"var(--font-mono)"},children:a.week_start.slice(5)}),(0,b.jsx)("div",{style:{fontSize:10,fontWeight:600,color:a.helpfulness?d[a.helpfulness]:"var(--af-text-tertiary)"},children:a.helpfulness??"—"})]},c))}):null}function f({title:a,children:c}){return(0,b.jsxs)("section",{style:{marginBottom:28},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}),c]})}a.s(["MonthDigest",0,function({digest:a,aiEnabled:d,actions:g}){let h=Object.values(a.outcome_mix).reduce((a,b)=>a+(b??0),0),i=a.shipped.length,j=a.agent_min_total/60,k=j>=1?`${j.toFixed(1)}h`:`${Math.round(a.agent_min_total)}m`,l=function(a){let[b,c]=a.split("-");return new Date(Number(b),Number(c)-1,1).toLocaleDateString("en-US",{month:"long",year:"numeric"})}(a.key);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",{style:{textTransform:"uppercase",letterSpacing:"0.06em"},children:l}),(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:[k," agent time · ",h," active day",1===h?"":"s"," · ",i," PR",1===i?"":"s"]}),g&&(0,b.jsx)("div",{style:{marginLeft:"auto",display:"inline-flex",alignItems:"center",gap:8},children:g})]}),a.headline?(0,b.jsx)("h1",{style:{fontSize:26,fontWeight:700,lineHeight:1.3,letterSpacing:"-0.02em",margin:"0 0 14px",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:d?"No narrative yet.":`Worked ${k} across ${a.projects.length} project${1===a.projects.length?"":"s"}.`})]}),!d&&(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)(c.default,{href:"/settings",style:{color:"var(--af-accent)"},children:"Settings"})," to see monthly narratives."]}),(0,b.jsx)(e,{helpfulness_by_week:a.helpfulness_by_week}),a.standout_weeks&&a.standout_weeks.length>0&&(0,b.jsx)(f,{title:"Standout weeks",children:(0,b.jsx)("ul",{style:{listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:10},children:a.standout_weeks.map(a=>(0,b.jsxs)("li",{style:{padding:"12px 14px",borderRadius:8,background:"var(--af-surface)",border:"1px solid var(--af-border-subtle)",display:"flex",gap:12,alignItems:"flex-start"},children:[(0,b.jsxs)(c.default,{href:`/insights/week-${a.week_start}`,style:{fontSize:11,fontWeight:600,color:"var(--af-accent)",textDecoration:"none",flexShrink:0,paddingTop:2,fontFamily:"var(--font-mono)"},children:["Week ",a.week_start.slice(5)]}),(0,b.jsx)("span",{style:{fontSize:13,lineHeight:1.55,color:"var(--af-text)"},children:a.why})]},a.week_start))})}),a.trajectory&&a.trajectory.length>0&&(0,b.jsx)(f,{title:"Trajectory",children:(0,b.jsx)("ol",{style:{listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:8},children:a.trajectory.map(a=>(0,b.jsxs)("li",{style:{display:"flex",gap:12,alignItems:"flex-start"},children:[(0,b.jsxs)(c.default,{href:`/insights/week-${a.week_start}`,style:{fontSize:10,fontWeight:600,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)",flexShrink:0,width:92,paddingTop:3,textDecoration:"none"},children:["Week ",a.week_start.slice(5)]}),(0,b.jsx)("span",{style:{fontSize:13,lineHeight:1.55,color:"var(--af-text-secondary)"},children:a.line})]},a.week_start))})}),a.friction_themes&&a.friction_themes.trim().length>0&&(0,b.jsx)(f,{title:"Friction patterns",children:(0,b.jsx)("p",{style:{fontSize:13,lineHeight:1.6,margin:0,color:"var(--af-text)"},children:a.friction_themes})}),a.suggestion&&(0,b.jsx)(f,{title:"Suggestion",children:(0,b.jsxs)("div",{style:{padding:"14px 16px",borderRadius:8,background:"var(--af-accent-subtle)",border:"1px solid color-mix(in srgb, var(--af-accent) 18%, var(--af-border))"},children:[(0,b.jsx)("div",{style:{fontSize:14,fontWeight:600,color:"var(--af-text)",marginBottom:6},children:a.suggestion.headline}),(0,b.jsx)("div",{style:{fontSize:13,lineHeight:1.55,color:"var(--af-text-secondary)"},children:a.suggestion.body})]})}),a.projects.length>0&&(0,b.jsx)(f,{title:"Projects",children:(0,b.jsx)("ul",{style:{listStyle:"none",padding:0,margin:0,display:"flex",flexDirection:"column",gap:4},children:a.projects.map(a=>(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.jsx)("span",{style:{flex:1,minWidth:0,fontWeight:500},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.name))})})]})}])},66594,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(53339),e=a.i(893);a.s(["MonthDigestView",0,function({initial:a,yearMonth:f,aiEnabled:g}){let[h,i]=(0,c.useState)(a),[j,k]=(0,c.useState)("idle"),[l,m]=(0,c.useState)(""),n=(0,c.useCallback)(async(a=!1)=>{k("streaming"),m("Starting...");let b=`/api/digest/month/${f}${a?"?force=1":""}`,c=await fetch(b,{method:"POST"});if(!c.ok||!c.body){k("error"),m(`Error ${c.status}`);return}let d=c.body.getReader(),e=new TextDecoder,g="";for(;;){let{done:a,value:b}=await d.read();if(a)break;let c=(g+=e.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("dependency"===a.type)m(`${"day"===a.kind?"Day":"Week"} ${a.key} ${a.status}`);else if("entry"===a.type)m(`Enriching ${a.index}/${a.total}...`);else if("progress"===a.type){let b=Math.round(a.elapsed_ms/1e3);m(`Claude composing… ${a.bytes.toLocaleString()} chars (${b}s)`)}else if("digest"===a.type)a.digest&&"month"===a.digest.scope&&i(a.digest),m("Rendering...");else if("saved"===a.type)m("Saved.");else if("error"===a.type){k("error"),m(a.message);return}}catch{}}}k("done"),m("")},[f]),o="streaming"===j,p=!!h?.headline,q=h?(0,b.jsx)(e.ExportPdfButton,{digestKey:`month-${f}`}):null,r=null;return(!p&&g?r=(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...":h?"Generate":"Generate digest"}):g&&(r=(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:()=>n(!0),disabled:o,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"})]})),l&&(r=(0,b.jsxs)(b.Fragment,{children:[r,(0,b.jsx)("span",{style:{fontSize:10,color:"var(--af-text-tertiary)"},children:l})]})),q&&(r=(0,b.jsxs)(b.Fragment,{children:[r,q]})),h)?(0,b.jsx)(d.MonthDigest,{digest:h,aiEnabled:g,actions:r}):(0,b.jsxs)(b.Fragment,{children:[r&&(0,b.jsx)("div",{style:{display:"flex",gap:10,padding:"14px 40px 0",alignItems:"center",flexWrap:"wrap"},children:r}),(0,b.jsx)("div",{style:{padding:28,textAlign:"center",color:"var(--af-text-secondary)",fontSize:13},children:o?"Loading month digest…":"No digest yet — click Generate above."})]})}])}];
2
+
3
+ //# sourceMappingURL=_0kajk31._.js.map
@@ -0,0 +1,8 @@
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
+ `})]})}])},85668,a=>{"use strict";let b=(0,a.i(70106).default)("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);a.s(["ArrowDown",0,b],85668)},79808,a=>{"use strict";let b=(0,a.i(70106).default)("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);a.s(["Wrench",0,b],79808)},6807,a=>{"use strict";let b=(0,a.i(70106).default)("Workflow",[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]]);a.s(["Workflow",0,b],6807)},75235,12958,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(70106);let e=(0,d.default)("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);var f=a.i(85668);let g=(0,d.default)("ArrowUpDown",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);a.s(["DataTable",0,function({rows:a,columns:d,getRowKey:h,onRowClick:i,defaultSortKey:j,defaultSortDir:k="desc"}){let[l,m]=(0,c.useState)(j??null),[n,o]=(0,c.useState)(k),p=(0,c.useMemo)(()=>{if(!l)return a;let b=d.find(a=>a.key===l);if(!b||!b.sortValue)return a;let c="asc"===n?1:-1;return[...a].sort((a,d)=>{let e=b.sortValue(a),f=b.sortValue(d);return"number"==typeof e&&"number"==typeof f?(e-f)*c:String(e).localeCompare(String(f))*c})},[a,d,l,n]);return(0,b.jsx)("div",{style:{overflowX:"auto",border:"1px solid var(--af-border-subtle)",borderRadius:8,background:"var(--af-surface)"},children:(0,b.jsxs)("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:12,color:"var(--af-text)"},children:[(0,b.jsx)("thead",{children:(0,b.jsx)("tr",{children:d.map(a=>{let c=l===a.key,d=!1!==a.sortable&&!!a.sortValue;return(0,b.jsx)("th",{onClick:()=>{!1!==a.sortable&&a.sortValue&&(l===a.key?o(a=>"asc"===a?"desc":"asc"):(m(a.key),o("desc")))},style:{textAlign:a.align??"left",fontSize:10,fontWeight:600,color:c?"var(--af-accent)":"var(--af-text-tertiary)",textTransform:"uppercase",letterSpacing:"0.05em",padding:"10px 12px",borderBottom:"1px solid var(--af-border-subtle)",cursor:d?"pointer":"default",userSelect:"none",whiteSpace:"nowrap",width:a.width,background:"var(--af-surface)",position:"sticky",top:0},children:(0,b.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:4,verticalAlign:"middle"},children:[a.header,d&&(0,b.jsx)("span",{style:{display:"inline-flex",opacity:c?1:.35},children:c?"asc"===n?(0,b.jsx)(e,{size:10}):(0,b.jsx)(f.ArrowDown,{size:10}):(0,b.jsx)(g,{size:10})})]})},a.key)})})}),(0,b.jsxs)("tbody",{children:[p.map(a=>(0,b.jsx)("tr",{onClick:()=>i?.(a),style:{cursor:i?"pointer":"default",borderBottom:"1px solid var(--af-border-subtle)",transition:"background 0.1s"},onMouseEnter:a=>{a.currentTarget.style.background="var(--af-surface-hover)"},onMouseLeave:a=>{a.currentTarget.style.background=""},children:d.map(c=>(0,b.jsx)("td",{style:{padding:"10px 12px",textAlign:c.align??"left",whiteSpace:"right"===c.align?"nowrap":void 0,verticalAlign:"top"},children:c.render(a)},c.key))},h(a))),0===p.length&&(0,b.jsx)("tr",{children:(0,b.jsx)("td",{colSpan:d.length,style:{padding:"32px 16px",textAlign:"center",fontSize:12,color:"var(--af-text-tertiary)"},children:"No rows to display."})})]})]})})}],75235);let h=(0,d.default)("LayoutGrid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]),i=(0,d.default)("Table",[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]]);var j=a.i(2591);function k({active:a,onClick:c,label:d,icon:e,rightEdge:f}){return(0,b.jsxs)("button",{type:"button",onClick:c,style:{display:"inline-flex",alignItems:"center",gap:5,padding:"6px 12px",fontSize:11,fontWeight:500,background:a?"var(--af-accent-subtle)":"transparent",color:a?"var(--af-accent)":"var(--af-text-secondary)",border:"none",borderRight:f?"none":"1px solid var(--af-border-subtle)",cursor:"pointer",letterSpacing:"0.02em"},children:[e,d]})}a.s(["useViewToggle",0,function(a,c="cards"){let[d,e,f]=(0,j.usePersistentBoolean)(a,"table"===c);return{mode:d?"table":"cards",toggle:(0,b.jsxs)("div",{style:{display:"inline-flex",border:"1px solid var(--af-border-subtle)",borderRadius:6,overflow:"hidden"},children:[(0,b.jsx)(k,{active:!d,onClick:()=>e(!1),label:"Cards",icon:(0,b.jsx)(h,{size:12})}),(0,b.jsx)(k,{active:d,onClick:()=>e(!0),label:"Table",icon:(0,b.jsx)(i,{size:12}),rightEdge:!0})]}),hydrated:f}}],12958)},23426,a=>{"use strict";var b=a.i(87924),c=a.i(38246),d=a.i(72131),e=a.i(50944);a.i(99417);var f=a.i(69176),g=a.i(3444),h=a.i(87532),i=a.i(79808);let j=(0,a.i(70106).default)("MessagesSquare",[["path",{d:"M14 9a2 2 0 0 1-2 2H6l-4 4V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2z",key:"p1xzt8"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v11l-4-4h-6a2 2 0 0 1-2-2v-1",key:"1cx29u"}]]);var k=a.i(41710),l=a.i(6807),m=a.i(20555),n=a.i(76285),o=a.i(99309),p=a.i(75235),q=a.i(12958),r=a.i(44220);let s=["newest","longest","most-tokens","outcome"],t=[{key:"outcome",header:"Outcome",sortValue:a=>(0,r.outcomePriority)(a.outcome),render:a=>(0,b.jsx)(u,{row:a})},{key:"project",header:"Project",sortValue:a=>a.session.projectName,render:a=>(0,b.jsxs)("div",{style:{maxWidth:180,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:a.session.projectName,children:[(0,b.jsxs)("div",{style:{fontWeight:500,display:"flex",alignItems:"center",gap:6},children:[(0,b.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:(0,g.prettyProjectName)(a.session.projectName)}),(0,b.jsx)(n.TeamBadge,{session:a.session}),(0,b.jsx)(o.AgentBadge,{agent:a.session.agent})]}),(0,b.jsx)("div",{style:{fontSize:10,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)"},children:(0,g.shortId)(a.session.id)})]})},{key:"preview",header:"Summary",sortable:!1,render:a=>{let c=a.briefSummary??a.session.firstUserPreview??"",d=!a.briefSummary;return(0,b.jsx)("div",{style:{maxWidth:360,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:d?"var(--af-text-tertiary)":"var(--af-text-secondary)",fontStyle:d?"italic":"normal"},title:d?`(raw user message) ${c}`:c,children:c||"—"})}},{key:"created",header:"Created",sortValue:a=>a.session.firstTimestamp?Date.parse(a.session.firstTimestamp):0,align:"right",render:a=>(0,b.jsx)("span",{suppressHydrationWarning:!0,style:{fontFamily:"var(--font-mono)",fontSize:11},children:a.session.firstTimestamp?(0,g.formatRelative)(a.session.firstTimestamp):"—"})},{key:"lastActive",header:"Last active",sortValue:a=>a.session.lastTimestamp?Date.parse(a.session.lastTimestamp):0,align:"right",render:a=>(0,b.jsx)("span",{suppressHydrationWarning:!0,style:{fontFamily:"var(--font-mono)",fontSize:11},children:a.session.lastTimestamp?(0,g.formatRelative)(a.session.lastTimestamp):"—"})},{key:"airtime",header:"Agent time",sortValue:a=>a.session.airTimeMs??a.session.durationMs??0,align:"right",render:a=>(0,b.jsx)("span",{style:{fontFamily:"var(--font-mono)",fontSize:11},children:(0,g.formatDuration)(a.session.airTimeMs??a.session.durationMs??0)})},{key:"turns",header:"Turns",sortValue:a=>a.session.turnCount??0,align:"right",render:a=>(0,b.jsx)("span",{style:{fontFamily:"var(--font-mono)",fontSize:11},children:(a.session.turnCount??0).toLocaleString()})},{key:"tools",header:"Tool calls",sortValue:a=>a.session.toolCallCount??0,align:"right",render:a=>(0,b.jsx)("span",{style:{fontFamily:"var(--font-mono)",fontSize:11},children:(a.session.toolCallCount??0).toLocaleString()})},{key:"tokens",header:"Tokens",sortValue:a=>a.session.totalUsage.input+a.session.totalUsage.output+a.session.totalUsage.cacheRead+a.session.totalUsage.cacheWrite,align:"right",render:a=>(0,b.jsx)("span",{style:{fontFamily:"var(--font-mono)",fontSize:11},children:(0,g.formatTokens)(a.session.totalUsage.input+a.session.totalUsage.output+a.session.totalUsage.cacheRead+a.session.totalUsage.cacheWrite)})},{key:"status",header:"Status",sortValue:a=>+("running"===a.session.status),align:"center",render:a=>"running"===a.session.status?(0,b.jsx)(m.LiveBadge,{}):(0,b.jsx)("span",{style:{opacity:.4},children:"—"})}];function u({row:a}){return a.outcome?(0,b.jsx)(r.OutcomePill,{outcome:a.outcome,size:"sm",label:"text",agent:a.session.agent}):a.enrichmentStatus&&a.latestLocalDay&&"skipped_trivial"!==a.enrichmentStatus?(0,b.jsx)(r.OutcomePill,{outcome:null,pending:!0,sessionId:a.session.id,localDay:a.latestLocalDay,size:"sm",agent:a.session.agent}):(0,b.jsx)("span",{style:{color:"var(--af-text-tertiary)",fontSize:10},children:"—"})}function v({row:a}){let{session:d,briefSummary:e,outcome:f,latestLocalDay:h,enrichmentStatus:p}=a,q=d.totalUsage.input+d.totalUsage.output+d.totalUsage.cacheRead+d.totalUsage.cacheWrite,s=!f&&p&&"skipped_trivial"!==p&&h,t=e??d.firstUserPreview??"",u=!e;return(0,b.jsxs)(c.default,{href:`/sessions/${d.id}`,className:"af-card",style:{display:"flex",flexDirection:"column",gap:10,padding:"14px 16px"},children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:8},children:[(0,b.jsxs)("div",{style:{fontSize:11,color:"var(--af-text-tertiary)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"flex",alignItems:"center",gap:6,minWidth:0},title:d.projectName,children:[(0,b.jsx)(m.LiveBadge,{mtimeIso:d.lastTimestamp}),(0,b.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:(0,g.prettyProjectName)(d.projectName)}),(0,b.jsx)(n.TeamBadge,{session:d,linkable:!1}),(0,b.jsx)(o.AgentBadge,{agent:d.agent})]}),(0,b.jsx)("div",{style:{fontSize:10,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)",flexShrink:0},suppressHydrationWarning:!0,children:d.firstTimestamp?(0,g.formatRelative)(d.firstTimestamp):"—"})]}),(f||s)&&(0,b.jsx)("div",{onClick:a=>a.stopPropagation(),children:f?(0,b.jsx)(r.OutcomePill,{outcome:f,size:"md",agent:d.agent}):s?(0,b.jsx)(r.OutcomePill,{outcome:null,pending:!0,sessionId:d.id,localDay:h,size:"md",agent:d.agent}):null}),(0,b.jsx)("div",{style:{fontSize:13,color:u?"var(--af-text-secondary)":"var(--af-text)",fontStyle:u?"italic":"normal",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:2,overflow:"hidden",minHeight:36,lineHeight:1.4},title:u?`(raw user message) ${t}`:t,children:t||(0,b.jsx)("em",{style:{color:"var(--af-text-tertiary)"},children:"(no user message)"})}),u&&(0,b.jsx)("div",{style:{fontSize:11.5,color:"var(--af-text-secondary)",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:2,overflow:"hidden",lineHeight:1.4,paddingLeft:10,borderLeft:"2px solid var(--af-accent-subtle)"},title:d.lastAgentPreview,children:d.lastAgentPreview||(0,b.jsx)("em",{style:{color:"var(--af-text-tertiary)"},children:"—"})}),(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:14,fontSize:10.5,color:"var(--af-text-tertiary)",paddingTop:8,borderTop:"1px solid var(--af-border-subtle)",fontFamily:"var(--font-mono)"},children:[(0,b.jsx)(w,{icon:(0,b.jsx)(j,{size:11}),label:`${d.turnCount??0} turn${1===d.turnCount?"":"s"}`}),(0,b.jsx)(w,{icon:(0,b.jsx)(i.Wrench,{size:11}),label:`${d.toolCallCount??0} tools`}),(d.spawnedAgentCount??0)>0&&(0,b.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:4,color:"#EA580C",fontWeight:600},title:`${d.workflowCount} workflow${1===d.workflowCount?"":"s"} spawned ${d.spawnedAgentCount} agents`,children:[(0,b.jsx)(l.Workflow,{size:11}),d.spawnedAgentCount," agents"]}),(0,b.jsx)(w,{icon:(0,b.jsx)(k.Clock,{size:11}),label:(0,g.formatDuration)(d.airTimeMs??d.durationMs)}),(0,b.jsx)("span",{style:{marginLeft:"auto"},children:(0,g.formatTokens)(q)})]})]})}function w({icon:a,label:c}){return(0,b.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:4},children:[a,c]})}a.s(["SessionsGrid",0,function({rows:a}){var c;let i=(0,e.useRouter)(),j=(0,e.usePathname)(),k=(0,e.useSearchParams)(),l=k.get("q")??"",m=k.get("project")??"all",n=k.get("agent"),o=(0,f.isAgentKind)(n)?n:"all",u=null!=(c=k.get("sort"))&&s.includes(c)?k.get("sort"):"newest",{mode:w,toggle:x}=(0,q.useViewToggle)("cclens:sessions:view"),y=(0,d.useCallback)((a,b,c)=>{let d=new URLSearchParams(k.toString());b&&b!==c?d.set(a,b):d.delete(a);let e=d.toString();i.replace(e?`${j}?${e}`:j,{scroll:!1})},[j,i,k]),z=(0,d.useMemo)(()=>["all",...Array.from(new Set(a.map(a=>a.session.projectName))).sort()],[a]),A=(0,d.useMemo)(()=>{let b=new Map;for(let c of a){let a=c.session.agent??"claude-code";b.set(a,(b.get(a)??0)+1)}return Array.from(b.entries()).sort((a,b)=>b[1]-a[1])},[a]),B=(0,d.useMemo)(()=>{let b=a.slice();if("all"!==m&&(b=b.filter(a=>a.session.projectName===m)),"all"!==o&&(b=b.filter(a=>(a.session.agent??"claude-code")===o)),l){let a=l.toLowerCase();b=b.filter(({session:b,briefSummary:c})=>b.id.toLowerCase().includes(a)||(c??"").toLowerCase().includes(a)||(b.firstUserPreview??"").toLowerCase().includes(a)||(b.lastAgentPreview??"").toLowerCase().includes(a)||b.projectName.toLowerCase().includes(a))}return"newest"===u?b.sort((a,b)=>(b.session.firstTimestamp?Date.parse(b.session.firstTimestamp):0)-(a.session.firstTimestamp?Date.parse(a.session.firstTimestamp):0)):"longest"===u?b.sort((a,b)=>(b.session.airTimeMs??b.session.durationMs??0)-(a.session.airTimeMs??a.session.durationMs??0)):"most-tokens"===u?b.sort((a,b)=>b.session.totalUsage.input+b.session.totalUsage.output+b.session.totalUsage.cacheRead-(a.session.totalUsage.input+a.session.totalUsage.output+a.session.totalUsage.cacheRead)):"outcome"===u&&b.sort((a,b)=>(0,r.outcomePriority)(b.outcome)-(0,r.outcomePriority)(a.outcome)),b},[a,m,o,l,u]);return(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{style:{display:"flex",gap:10,marginBottom:16,flexWrap:"wrap",alignItems:"center"},children:[(0,b.jsxs)("div",{style:{position:"relative",flex:1,minWidth:260,maxWidth:480},children:[(0,b.jsx)(h.Search,{size:13,color:"var(--af-text-tertiary)",style:{position:"absolute",left:12,top:"50%",transform:"translateY(-50%)"}}),(0,b.jsx)("input",{type:"text",placeholder:"Search by message, project, or ID",value:l,onChange:a=>y("q",a.target.value,""),style:{width:"100%",paddingLeft:32}})]}),(0,b.jsx)("select",{value:m,onChange:a=>y("project",a.target.value,"all"),style:{maxWidth:260},children:z.map(a=>(0,b.jsx)("option",{value:a,children:"all"===a?"All projects":(0,g.prettyProjectName)(a)},a))}),A.length>1&&(0,b.jsxs)("select",{value:o,onChange:a=>y("agent",a.target.value,"all"),title:"Filter by source agent",children:[(0,b.jsx)("option",{value:"all",children:"All agents"}),A.map(([a,c])=>{var d;return(0,b.jsxs)("option",{value:a,children:[(d=a,(0,f.getAgentMetadata)(d)?.displayName??d)," (",c,")"]},a)})]}),(0,b.jsxs)("select",{value:u,onChange:a=>y("sort",a.target.value,"newest"),children:[(0,b.jsx)("option",{value:"newest",children:"Newest"}),(0,b.jsx)("option",{value:"longest",children:"Longest"}),(0,b.jsx)("option",{value:"most-tokens",children:"Most tokens"}),(0,b.jsx)("option",{value:"outcome",children:"Outcome"})]}),(0,b.jsx)("span",{style:{marginLeft:"auto",fontSize:11,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)"},children:B.length}),x]}),0===B.length?(0,b.jsx)("div",{className:"af-empty",children:"No sessions found."}):"table"===w?(0,b.jsx)(p.DataTable,{rows:B,getRowKey:a=>`${a.session.projectDir}/${a.session.id}`,onRowClick:a=>i.push(`/sessions/${a.session.id}`),defaultSortKey:"lastActive",defaultSortDir:"desc",columns:t}):(0,b.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(360px, 1fr))",gap:14},children:B.map(a=>(0,b.jsx)(v,{row:a},`${a.session.projectDir}/${a.session.id}`))})]})}],23426)}];
7
+
8
+ //# sourceMappingURL=_0w.cv64._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[63681,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={RequestCookies:function(){return f.RequestCookies},ResponseCookies:function(){return f.ResponseCookies},stringifyCookie:function(){return f.stringifyCookie}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(36226)},51409,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"ReflectAdapter",{enumerable:!0,get:function(){return d}});class d{static get(a,b,c){let d=Reflect.get(a,b,c);return"function"==typeof d?d.bind(a):d}static set(a,b,c,d){return Reflect.set(a,b,c,d)}static has(a,b){return Reflect.has(a,b)}static deleteProperty(a,b){return Reflect.deleteProperty(a,b)}}},4712,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={ActionDidNotRevalidate:function(){return f},ActionDidRevalidateDynamicOnly:function(){return h},ActionDidRevalidateStaticAndDynamic:function(){return g}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=0,g=1,h=2},14896,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={MutableRequestCookiesAdapter:function(){return o},ReadonlyRequestCookiesError:function(){return j},RequestCookiesAdapter:function(){return k},appendMutableCookies:function(){return n},areCookiesMutableInCurrentPhase:function(){return q},createCookiesWithMutableAccessCheck:function(){return p},getModifiedCookieValues:function(){return m},responseCookiesToRequestCookies:function(){return s}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(63681),g=a.r(51409),h=a.r(56704),i=a.r(4712);class j extends Error{constructor(){super("Cookies can only be modified in a Server Action or Route Handler. Read more: https://nextjs.org/docs/app/api-reference/functions/cookies#options")}static callable(){throw new j}}class k{static seal(a){return new Proxy(a,{get(a,b,c){switch(b){case"clear":case"delete":case"set":return j.callable;default:return g.ReflectAdapter.get(a,b,c)}}})}}let l=Symbol.for("next.mutated.cookies");function m(a){let b=a[l];return b&&Array.isArray(b)&&0!==b.length?b:[]}function n(a,b){let c=m(b);if(0===c.length)return!1;let d=new f.ResponseCookies(a),e=d.getAll();for(let a of c)d.set(a);for(let a of e)d.set(a);return!0}class o{static wrap(a,b){let c=new f.ResponseCookies(new Headers);for(let b of a.getAll())c.set(b);let d=[],e=new Set,j=()=>{let a=h.workAsyncStorage.getStore();if(a&&(a.pathWasRevalidated=i.ActionDidRevalidateStaticAndDynamic),d=c.getAll().filter(a=>e.has(a.name)),b){let a=[];for(let b of d){let c=new f.ResponseCookies(new Headers);c.set(b),a.push(c.toString())}b(a)}},k=new Proxy(c,{get(a,b,c){switch(b){case l:return d;case"delete":return function(...b){e.add("string"==typeof b[0]?b[0]:b[0].name);try{return a.delete(...b),k}finally{j()}};case"set":return function(...b){e.add("string"==typeof b[0]?b[0]:b[0].name);try{return a.set(...b),k}finally{j()}};default:return g.ReflectAdapter.get(a,b,c)}}});return k}}function p(a){let b=new Proxy(a.mutableCookies,{get(c,d,e){switch(d){case"delete":return function(...d){return r(a,"cookies().delete"),c.delete(...d),b};case"set":return function(...d){return r(a,"cookies().set"),c.set(...d),b};default:return g.ReflectAdapter.get(c,d,e)}}});return b}function q(a){return"action"===a.phase}function r(a,b){if(!q(a))throw new j}function s(a){let b=new f.RequestCookies(new Headers);for(let c of a.getAll())b.set(c);return b}},8018,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"createDedupedByCallsiteServerErrorLoggerDev",{enumerable:!0,get:function(){return i}});let d=function(a){if(a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var b=e(void 0);if(b&&b.has(a))return b.get(a);var c={__proto__:null},d=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in a)if("default"!==f&&Object.prototype.hasOwnProperty.call(a,f)){var g=d?Object.getOwnPropertyDescriptor(a,f):null;g&&(g.get||g.set)?Object.defineProperty(c,f,g):c[f]=a[f]}return c.default=a,b&&b.set(a,c),c}(a.r(717));function e(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(e=function(a){return a?c:b})(a)}let f={current:null},g="function"==typeof d.cache?d.cache:a=>a,h=console.warn;function i(a){return function(...b){h(a(...b))}}g(a=>{try{h(f.current)}finally{f.current=null}})},86309,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={isRequestAPICallableInsideAfter:function(){return j},throwForSearchParamsAccessInUseCache:function(){return i},throwWithStaticGenerationBailoutErrorWithDynamicError:function(){return h}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(60312),g=a.r(24725);function h(a,b){throw Object.defineProperty(new f.StaticGenBailoutError(`Route ${a} with \`dynamic = "error"\` couldn't be rendered statically because it used ${b}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E543",enumerable:!1,configurable:!0})}function i(a,b){let c=Object.defineProperty(Error(`Route ${a.route} used \`searchParams\` inside "use cache". Accessing dynamic request data inside a cache scope is not supported. If you need some search params inside a cached function await \`searchParams\` outside of the cached function and pass only the required search params as arguments to the cached function. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E842",enumerable:!1,configurable:!0});throw Error.captureStackTrace(c,b),a.invalidDynamicUsageError??=c,c}function j(){let a=g.afterTaskAsyncStorage.getStore();return(null==a?void 0:a.rootTaskSpawnPhase)==="action"}},81740,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"cookies",{enumerable:!0,get:function(){return n}});let d=a.r(14896),e=a.r(63681),f=a.r(56704),g=a.r(32319),h=a.r(60384),i=a.r(60312),j=a.r(13091),k=a.r(8018),l=a.r(86309),m=a.r(50640);function n(){let a="cookies",b=f.workAsyncStorage.getStore(),c=g.workUnitAsyncStorage.getStore();if(b){if(c&&"after"===c.phase&&!(0,l.isRequestAPICallableInsideAfter)())throw Object.defineProperty(Error(`Route ${b.route} used \`cookies()\` inside \`after()\`. This is not supported. If you need this data inside an \`after()\` callback, use \`cookies()\` outside of the callback. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`),"__NEXT_ERROR_CODE",{value:"E843",enumerable:!1,configurable:!0});if(b.forceStatic)return p(d.RequestCookiesAdapter.seal(new e.RequestCookies(new Headers({}))));if(b.dynamicShouldError)throw Object.defineProperty(new i.StaticGenBailoutError(`Route ${b.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`cookies()\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E849",enumerable:!1,configurable:!0});if(c)switch(c.type){case"cache":let f=Object.defineProperty(Error(`Route ${b.route} used \`cookies()\` inside "use cache". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use \`cookies()\` outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E831",enumerable:!1,configurable:!0});throw Error.captureStackTrace(f,n),b.invalidDynamicUsageError??=f,f;case"unstable-cache":throw Object.defineProperty(Error(`Route ${b.route} used \`cookies()\` inside a function cached with \`unstable_cache()\`. Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use \`cookies()\` outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`),"__NEXT_ERROR_CODE",{value:"E846",enumerable:!1,configurable:!0});case"generate-static-params":throw Object.defineProperty(Error(`Route ${b.route} used \`cookies()\` inside \`generateStaticParams\`. This is not supported because \`generateStaticParams\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`),"__NEXT_ERROR_CODE",{value:"E1123",enumerable:!1,configurable:!0});case"prerender":var k=b,q=c;let r=o.get(q);if(r)return r;let s=(0,j.makeHangingPromise)(q.renderSignal,k.route,"`cookies()`");return o.set(q,s),s;case"prerender-client":case"validation-client":let t="`cookies`";throw Object.defineProperty(new m.InvariantError(`${t} must not be used within a Client Component. Next.js should be preventing ${t} from being included in Client Components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E1037",enumerable:!1,configurable:!0});case"prerender-ppr":return(0,h.postponeWithTracking)(b.route,a,c.dynamicTracking);case"prerender-legacy":return(0,h.throwToInterruptStaticGeneration)(a,b,c);case"prerender-runtime":return(0,j.delayUntilRuntimeStage)(c,p(c.cookies));case"private-cache":return p(c.cookies);case"request":let u;if((0,h.trackDynamicDataInDynamicRender)(c),u=(0,d.areCookiesMutableInCurrentPhase)(c)?c.userspaceMutableCookies:c.cookies,!c.asyncApiPromises)return p(u);{let a=(0,g.isInEarlyRenderStage)(c);if(u===c.mutableCookies)return a?c.asyncApiPromises.earlyMutableCookies:c.asyncApiPromises.mutableCookies;return a?c.asyncApiPromises.earlyCookies:c.asyncApiPromises.cookies}}}(0,g.throwForMissingRequestStore)(a)}a.r(31382);let o=new WeakMap;function p(a){let b=o.get(a);if(b)return b;let c=Promise.resolve(a);return o.set(a,c),c}(0,k.createDedupedByCallsiteServerErrorLoggerDev)(function(a,b){let c=a?`Route "${a}" `:"This route ";return Object.defineProperty(Error(`${c}used ${b}. \`cookies()\` returns a Promise and must be unwrapped with \`await\` or \`React.use()\` before accessing its properties. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`),"__NEXT_ERROR_CODE",{value:"E830",enumerable:!1,configurable:!0})})},29927,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={HeadersAdapter:function(){return h},ReadonlyHeadersError:function(){return g}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(51409);class g extends Error{constructor(){super("Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers")}static callable(){throw new g}}class h extends Headers{constructor(a){super(),this.headers=new Proxy(a,{get(b,c,d){if("symbol"==typeof c)return f.ReflectAdapter.get(b,c,d);let e=c.toLowerCase(),g=Object.keys(a).find(a=>a.toLowerCase()===e);if(void 0!==g)return f.ReflectAdapter.get(b,g,d)},set(b,c,d,e){if("symbol"==typeof c)return f.ReflectAdapter.set(b,c,d,e);let g=c.toLowerCase(),h=Object.keys(a).find(a=>a.toLowerCase()===g);return f.ReflectAdapter.set(b,h??c,d,e)},has(b,c){if("symbol"==typeof c)return f.ReflectAdapter.has(b,c);let d=c.toLowerCase(),e=Object.keys(a).find(a=>a.toLowerCase()===d);return void 0!==e&&f.ReflectAdapter.has(b,e)},deleteProperty(b,c){if("symbol"==typeof c)return f.ReflectAdapter.deleteProperty(b,c);let d=c.toLowerCase(),e=Object.keys(a).find(a=>a.toLowerCase()===d);return void 0===e||f.ReflectAdapter.deleteProperty(b,e)}})}static seal(a){return new Proxy(a,{get(a,b,c){switch(b){case"append":case"delete":case"set":return g.callable;default:return f.ReflectAdapter.get(a,b,c)}}})}merge(a){return Array.isArray(a)?a.join(", "):a}static from(a){return a instanceof Headers?a:new h(a)}append(a,b){let c=this.headers[a];"string"==typeof c?this.headers[a]=[c,b]:Array.isArray(c)?c.push(b):this.headers[a]=b}delete(a){delete this.headers[a]}get(a){let b=this.headers[a];return void 0!==b?this.merge(b):null}has(a){return void 0!==this.headers[a]}set(a,b){this.headers[a]=b}forEach(a,b){for(let[c,d]of this.entries())a.call(b,d,c,this)}*entries(){for(let a of Object.keys(this.headers)){let b=a.toLowerCase(),c=this.get(b);yield[b,c]}}*keys(){for(let a of Object.keys(this.headers)){let b=a.toLowerCase();yield b}}*values(){for(let a of Object.keys(this.headers)){let b=this.get(a);yield b}}[Symbol.iterator](){return this.entries()}}},35754,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"headers",{enumerable:!0,get:function(){return m}});let d=a.r(29927),e=a.r(56704),f=a.r(32319),g=a.r(60384),h=a.r(60312),i=a.r(13091),j=a.r(8018),k=a.r(86309),l=a.r(50640);function m(){let a="headers",b=e.workAsyncStorage.getStore(),c=f.workUnitAsyncStorage.getStore();if(b){if(c&&"after"===c.phase&&!(0,k.isRequestAPICallableInsideAfter)())throw Object.defineProperty(Error(`Route ${b.route} used \`headers()\` inside \`after()\`. This is not supported. If you need this data inside an \`after()\` callback, use \`headers()\` outside of the callback. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`),"__NEXT_ERROR_CODE",{value:"E839",enumerable:!1,configurable:!0});if(b.forceStatic)return o(d.HeadersAdapter.seal(new Headers({})));if(c)switch(c.type){case"cache":{let a=Object.defineProperty(Error(`Route ${b.route} used \`headers()\` inside "use cache". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use \`headers()\` outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E833",enumerable:!1,configurable:!0});throw Error.captureStackTrace(a,m),b.invalidDynamicUsageError??=a,a}case"unstable-cache":throw Object.defineProperty(Error(`Route ${b.route} used \`headers()\` inside a function cached with \`unstable_cache()\`. Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use \`headers()\` outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`),"__NEXT_ERROR_CODE",{value:"E838",enumerable:!1,configurable:!0});case"generate-static-params":throw Object.defineProperty(Error(`Route ${b.route} used \`headers()\` inside \`generateStaticParams\`. This is not supported because \`generateStaticParams\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`),"__NEXT_ERROR_CODE",{value:"E1134",enumerable:!1,configurable:!0})}if(b.dynamicShouldError)throw Object.defineProperty(new h.StaticGenBailoutError(`Route ${b.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`headers()\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E828",enumerable:!1,configurable:!0});if(c)switch(c.type){case"prerender":var j=b,p=c;let e=n.get(p);if(e)return e;let q=(0,i.makeHangingPromise)(p.renderSignal,j.route,"`headers()`");return n.set(p,q),q;case"prerender-client":case"validation-client":let r="`headers`";throw Object.defineProperty(new l.InvariantError(`${r} must not be used within a client component. Next.js should be preventing ${r} from being included in client components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E1017",enumerable:!1,configurable:!0});case"prerender-ppr":return(0,g.postponeWithTracking)(b.route,a,c.dynamicTracking);case"prerender-legacy":return(0,g.throwToInterruptStaticGeneration)(a,b,c);case"prerender-runtime":return(0,i.delayUntilRuntimeStage)(c,o(c.headers));case"private-cache":return o(c.headers);case"request":if((0,g.trackDynamicDataInDynamicRender)(c),c.asyncApiPromises)return(0,f.isInEarlyRenderStage)(c)?c.asyncApiPromises.earlyHeaders:c.asyncApiPromises.headers;return o(c.headers)}}(0,f.throwForMissingRequestStore)(a)}a.r(31382);let n=new WeakMap;function o(a){let b=n.get(a);if(b)return b;let c=Promise.resolve(a);return n.set(a,c),c}(0,j.createDedupedByCallsiteServerErrorLoggerDev)(function(a,b){let c=a?`Route "${a}" `:"This route ";return Object.defineProperty(Error(`${c}used ${b}. \`headers()\` returns a Promise and must be unwrapped with \`await\` or \`React.use()\` before accessing its properties. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`),"__NEXT_ERROR_CODE",{value:"E836",enumerable:!1,configurable:!0})})},51125,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"draftMode",{enumerable:!0,get:function(){return l}});let d=a.r(32319),e=a.r(56704),f=a.r(60384),g=a.r(8018),h=a.r(60312),i=a.r(96556),j=a.r(50640),k=a.r(13091);function l(){let a="draftMode",b=e.workAsyncStorage.getStore(),c=d.workUnitAsyncStorage.getStore();switch((!b||!c)&&(0,d.throwForMissingRequestStore)(a),c.type){case"prerender-runtime":return(0,k.delayUntilRuntimeStage)(c,m(c.draftMode,b));case"request":return m(c.draftMode,b);case"cache":case"private-cache":case"unstable-cache":let f=(0,d.getDraftModeProviderForCacheScope)(b,c);if(f)return m(f,b);case"prerender":case"prerender-ppr":case"prerender-legacy":return m(null,b);case"prerender-client":case"validation-client":{let a="`draftMode`";throw Object.defineProperty(new j.InvariantError(`${a} must not be used within a Client Component. Next.js should be preventing ${a} from being included in Client Components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E1046",enumerable:!1,configurable:!0})}case"generate-static-params":throw Object.defineProperty(Error(`Route ${b.route} used \`${a}()\` inside \`generateStaticParams\`. This is not supported because \`generateStaticParams\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`),"__NEXT_ERROR_CODE",{value:"E1132",enumerable:!1,configurable:!0});default:return c}}function m(a,b){let c=o.get(a??n);return c||Promise.resolve(new p(a))}a.r(51409);let n={},o=new WeakMap;class p{constructor(a){this._provider=a}get isEnabled(){return null!==this._provider&&this._provider.isEnabled}enable(){q("draftMode().enable()",this.enable),null!==this._provider&&this._provider.enable()}disable(){q("draftMode().disable()",this.disable),null!==this._provider&&this._provider.disable()}}function q(a,b){let c=e.workAsyncStorage.getStore(),g=d.workUnitAsyncStorage.getStore();if(c){if((null==g?void 0:g.phase)==="after")throw Object.defineProperty(Error(`Route ${c.route} used "${a}" inside \`after()\`. The enabled status of \`draftMode()\` can be read inside \`after()\` but you cannot enable or disable \`draftMode()\`. See more info here: https://nextjs.org/docs/app/api-reference/functions/after`),"__NEXT_ERROR_CODE",{value:"E845",enumerable:!1,configurable:!0});if(c.dynamicShouldError)throw Object.defineProperty(new h.StaticGenBailoutError(`Route ${c.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${a}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E553",enumerable:!1,configurable:!0});if(g)switch(g.type){case"cache":case"private-cache":{let d=Object.defineProperty(Error(`Route ${c.route} used "${a}" inside "use cache". The enabled status of \`draftMode()\` can be read in caches but you must not enable or disable \`draftMode()\` inside a cache. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E829",enumerable:!1,configurable:!0});throw Error.captureStackTrace(d,b),c.invalidDynamicUsageError??=d,d}case"unstable-cache":throw Object.defineProperty(Error(`Route ${c.route} used "${a}" inside a function cached with \`unstable_cache()\`. The enabled status of \`draftMode()\` can be read in caches but you must not enable or disable \`draftMode()\` inside a cache. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`),"__NEXT_ERROR_CODE",{value:"E844",enumerable:!1,configurable:!0});case"prerender":case"prerender-runtime":{let b=Object.defineProperty(Error(`Route ${c.route} used ${a} without first calling \`await connection()\`. See more info here: https://nextjs.org/docs/messages/next-prerender-sync-headers`),"__NEXT_ERROR_CODE",{value:"E126",enumerable:!1,configurable:!0});return(0,f.abortAndThrowOnSynchronousRequestDataAccess)(c.route,a,b,g)}case"prerender-client":case"validation-client":let d="`draftMode`";throw Object.defineProperty(new j.InvariantError(`${d} must not be used within a Client Component. Next.js should be preventing ${d} from being included in Client Components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E1046",enumerable:!1,configurable:!0});case"prerender-ppr":return(0,f.postponeWithTracking)(c.route,a,g.dynamicTracking);case"prerender-legacy":g.revalidate=0;let e=Object.defineProperty(new i.DynamicServerError(`Route ${c.route} couldn't be rendered statically because it used \`${a}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`),"__NEXT_ERROR_CODE",{value:"E558",enumerable:!1,configurable:!0});throw c.dynamicUsageDescription=a,c.dynamicUsageStack=e.stack,e;case"request":(0,f.trackDynamicDataInDynamicRender)(g);break;case"generate-static-params":throw Object.defineProperty(Error(`Route ${c.route} used \`${a}\` inside \`generateStaticParams\`. This is not supported because \`generateStaticParams\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`),"__NEXT_ERROR_CODE",{value:"E1121",enumerable:!1,configurable:!0})}}}(0,g.createDedupedByCallsiteServerErrorLoggerDev)(function(a,b){let c=a?`Route "${a}" `:"This route ";return Object.defineProperty(Error(`${c}used ${b}. \`draftMode()\` returns a Promise and must be unwrapped with \`await\` or \`React.use()\` before accessing its properties. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`),"__NEXT_ERROR_CODE",{value:"E835",enumerable:!1,configurable:!0})})},5246,(a,b,c)=>{b.exports.cookies=a.r(81740).cookies,b.exports.headers=a.r(35754).headers,b.exports.draftMode=a.r(51125).draftMode},45017,a=>{"use strict";a.s(["Sidebar",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call Sidebar() from the server but Sidebar is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/sidebar.tsx <module evaluation>","Sidebar")},10398,a=>{"use strict";a.s(["Sidebar",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call Sidebar() from the server but Sidebar is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/sidebar.tsx","Sidebar")},23604,a=>{"use strict";a.i(45017);var b=a.i(10398);a.n(b)},59969,a=>{"use strict";a.s(["LiveRefresher",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call LiveRefresher() from the server but LiveRefresher is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/live-refresher.tsx <module evaluation>","LiveRefresher")},11272,a=>{"use strict";a.s(["LiveRefresher",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call LiveRefresher() from the server but LiveRefresher is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/live-refresher.tsx","LiveRefresher")},30642,a=>{"use strict";a.i(59969);var b=a.i(11272);a.n(b)},99153,a=>{"use strict";a.s(["LiveSessionsWidget",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call LiveSessionsWidget() from the server but LiveSessionsWidget is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/live-sessions-widget.tsx <module evaluation>","LiveSessionsWidget")},62615,a=>{"use strict";a.s(["LiveSessionsWidget",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call LiveSessionsWidget() from the server but LiveSessionsWidget is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/live-sessions-widget.tsx","LiveSessionsWidget")},9647,a=>{"use strict";a.i(99153);var b=a.i(62615);a.n(b)},14022,a=>{"use strict";a.s(["JobQueueWidget",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call JobQueueWidget() from the server but JobQueueWidget is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/job-queue-widget.tsx <module evaluation>","JobQueueWidget")},5900,a=>{"use strict";a.s(["JobQueueWidget",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call JobQueueWidget() from the server but JobQueueWidget is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/job-queue-widget.tsx","JobQueueWidget")},84829,a=>{"use strict";a.i(14022);var b=a.i(5900);a.n(b)},28992,a=>{"use strict";var b=a.i(7997),c=a.i(5246),d=a.i(23604),e=a.i(30642),f=a.i(9647),g=a.i(84829);a.i(23895);var h=a.i(88522),i=a.i(67116),j=a.i(70709),k=a.i(60511),l=a.i(76597),m=a.i(40095);async function n({children:a}){let[o,p,q,r]=await Promise.all([(0,h.listProjects)(),(0,h.walkJsonlFiles)(),(0,i.listSessions)(),(0,l.buildEntriesIndex)()]),s=q.slice(0,20),t=q.length,u=(0,j.latestUsageSnapshot)(),v=(0,k.readTeamConnection)(),w=s.map(a=>({id:a.id,projectName:a.projectName,firstUserPreview:a.firstUserPreview,lastUserPreview:a.lastUserPreview,lastAgentPreview:a.lastAgentPreview,firstTimestamp:a.firstTimestamp,lastTimestamp:a.lastTimestamp,teamName:a.teamName,agentName:a.agentName,agent:a.agent})),x={};for(let a of s){let b=r.bySession.get(a.id)??[];if(0===b.length)continue;let c=b[b.length-1];x[a.id]={outcome:c.enrichment.outcome??null,enrichmentStatus:c.enrichment.status,localDay:c.local_day}}let y=await (0,c.cookies)(),z=y.get("claude-lens-theme")?.value;return(0,b.jsx)("html",{lang:"en","data-theme":"light"===z||"dark"===z?z:"dark",suppressHydrationWarning:!0,children:(0,b.jsxs)("body",{children:[(0,b.jsx)(e.LiveRefresher,{}),(0,b.jsxs)("div",{style:{display:"flex",height:"100vh"},children:[(0,b.jsx)(d.Sidebar,{projects:o,totalSessions:t,currentUsage:u,version:"0.11.2",latestChangelogVersion:m.LATEST_VERSION,teamConnection:v}),(0,b.jsx)("main",{style:{flex:1,minWidth:0,minHeight:0,padding:0,overflow:"auto"},children:a})]}),(0,b.jsx)(f.LiveSessionsWidget,{sessions:w,entrySummaries:x}),(0,b.jsx)(g.JobQueueWidget,{})]})})}a.s(["default",0,n,"dynamic",0,"force-dynamic","metadata",0,{title:"Fleetlens",description:"Multi-agent fleet analytics — local-only dashboard for Claude Code, Codex, and other coding-agent sessions."}],28992)},44665,a=>{a.n(a.i(28992))}];
1
+ module.exports=[63681,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={RequestCookies:function(){return f.RequestCookies},ResponseCookies:function(){return f.ResponseCookies},stringifyCookie:function(){return f.stringifyCookie}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(36226)},51409,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"ReflectAdapter",{enumerable:!0,get:function(){return d}});class d{static get(a,b,c){let d=Reflect.get(a,b,c);return"function"==typeof d?d.bind(a):d}static set(a,b,c,d){return Reflect.set(a,b,c,d)}static has(a,b){return Reflect.has(a,b)}static deleteProperty(a,b){return Reflect.deleteProperty(a,b)}}},4712,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={ActionDidNotRevalidate:function(){return f},ActionDidRevalidateDynamicOnly:function(){return h},ActionDidRevalidateStaticAndDynamic:function(){return g}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=0,g=1,h=2},14896,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={MutableRequestCookiesAdapter:function(){return o},ReadonlyRequestCookiesError:function(){return j},RequestCookiesAdapter:function(){return k},appendMutableCookies:function(){return n},areCookiesMutableInCurrentPhase:function(){return q},createCookiesWithMutableAccessCheck:function(){return p},getModifiedCookieValues:function(){return m},responseCookiesToRequestCookies:function(){return s}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(63681),g=a.r(51409),h=a.r(56704),i=a.r(4712);class j extends Error{constructor(){super("Cookies can only be modified in a Server Action or Route Handler. Read more: https://nextjs.org/docs/app/api-reference/functions/cookies#options")}static callable(){throw new j}}class k{static seal(a){return new Proxy(a,{get(a,b,c){switch(b){case"clear":case"delete":case"set":return j.callable;default:return g.ReflectAdapter.get(a,b,c)}}})}}let l=Symbol.for("next.mutated.cookies");function m(a){let b=a[l];return b&&Array.isArray(b)&&0!==b.length?b:[]}function n(a,b){let c=m(b);if(0===c.length)return!1;let d=new f.ResponseCookies(a),e=d.getAll();for(let a of c)d.set(a);for(let a of e)d.set(a);return!0}class o{static wrap(a,b){let c=new f.ResponseCookies(new Headers);for(let b of a.getAll())c.set(b);let d=[],e=new Set,j=()=>{let a=h.workAsyncStorage.getStore();if(a&&(a.pathWasRevalidated=i.ActionDidRevalidateStaticAndDynamic),d=c.getAll().filter(a=>e.has(a.name)),b){let a=[];for(let b of d){let c=new f.ResponseCookies(new Headers);c.set(b),a.push(c.toString())}b(a)}},k=new Proxy(c,{get(a,b,c){switch(b){case l:return d;case"delete":return function(...b){e.add("string"==typeof b[0]?b[0]:b[0].name);try{return a.delete(...b),k}finally{j()}};case"set":return function(...b){e.add("string"==typeof b[0]?b[0]:b[0].name);try{return a.set(...b),k}finally{j()}};default:return g.ReflectAdapter.get(a,b,c)}}});return k}}function p(a){let b=new Proxy(a.mutableCookies,{get(c,d,e){switch(d){case"delete":return function(...d){return r(a,"cookies().delete"),c.delete(...d),b};case"set":return function(...d){return r(a,"cookies().set"),c.set(...d),b};default:return g.ReflectAdapter.get(c,d,e)}}});return b}function q(a){return"action"===a.phase}function r(a,b){if(!q(a))throw new j}function s(a){let b=new f.RequestCookies(new Headers);for(let c of a.getAll())b.set(c);return b}},8018,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"createDedupedByCallsiteServerErrorLoggerDev",{enumerable:!0,get:function(){return i}});let d=function(a){if(a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var b=e(void 0);if(b&&b.has(a))return b.get(a);var c={__proto__:null},d=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in a)if("default"!==f&&Object.prototype.hasOwnProperty.call(a,f)){var g=d?Object.getOwnPropertyDescriptor(a,f):null;g&&(g.get||g.set)?Object.defineProperty(c,f,g):c[f]=a[f]}return c.default=a,b&&b.set(a,c),c}(a.r(717));function e(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(e=function(a){return a?c:b})(a)}let f={current:null},g="function"==typeof d.cache?d.cache:a=>a,h=console.warn;function i(a){return function(...b){h(a(...b))}}g(a=>{try{h(f.current)}finally{f.current=null}})},86309,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={isRequestAPICallableInsideAfter:function(){return j},throwForSearchParamsAccessInUseCache:function(){return i},throwWithStaticGenerationBailoutErrorWithDynamicError:function(){return h}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(60312),g=a.r(24725);function h(a,b){throw Object.defineProperty(new f.StaticGenBailoutError(`Route ${a} with \`dynamic = "error"\` couldn't be rendered statically because it used ${b}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E543",enumerable:!1,configurable:!0})}function i(a,b){let c=Object.defineProperty(Error(`Route ${a.route} used \`searchParams\` inside "use cache". Accessing dynamic request data inside a cache scope is not supported. If you need some search params inside a cached function await \`searchParams\` outside of the cached function and pass only the required search params as arguments to the cached function. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E842",enumerable:!1,configurable:!0});throw Error.captureStackTrace(c,b),a.invalidDynamicUsageError??=c,c}function j(){let a=g.afterTaskAsyncStorage.getStore();return(null==a?void 0:a.rootTaskSpawnPhase)==="action"}},81740,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"cookies",{enumerable:!0,get:function(){return n}});let d=a.r(14896),e=a.r(63681),f=a.r(56704),g=a.r(32319),h=a.r(60384),i=a.r(60312),j=a.r(13091),k=a.r(8018),l=a.r(86309),m=a.r(50640);function n(){let a="cookies",b=f.workAsyncStorage.getStore(),c=g.workUnitAsyncStorage.getStore();if(b){if(c&&"after"===c.phase&&!(0,l.isRequestAPICallableInsideAfter)())throw Object.defineProperty(Error(`Route ${b.route} used \`cookies()\` inside \`after()\`. This is not supported. If you need this data inside an \`after()\` callback, use \`cookies()\` outside of the callback. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`),"__NEXT_ERROR_CODE",{value:"E843",enumerable:!1,configurable:!0});if(b.forceStatic)return p(d.RequestCookiesAdapter.seal(new e.RequestCookies(new Headers({}))));if(b.dynamicShouldError)throw Object.defineProperty(new i.StaticGenBailoutError(`Route ${b.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`cookies()\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E849",enumerable:!1,configurable:!0});if(c)switch(c.type){case"cache":let f=Object.defineProperty(Error(`Route ${b.route} used \`cookies()\` inside "use cache". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use \`cookies()\` outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E831",enumerable:!1,configurable:!0});throw Error.captureStackTrace(f,n),b.invalidDynamicUsageError??=f,f;case"unstable-cache":throw Object.defineProperty(Error(`Route ${b.route} used \`cookies()\` inside a function cached with \`unstable_cache()\`. Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use \`cookies()\` outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`),"__NEXT_ERROR_CODE",{value:"E846",enumerable:!1,configurable:!0});case"generate-static-params":throw Object.defineProperty(Error(`Route ${b.route} used \`cookies()\` inside \`generateStaticParams\`. This is not supported because \`generateStaticParams\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`),"__NEXT_ERROR_CODE",{value:"E1123",enumerable:!1,configurable:!0});case"prerender":var k=b,q=c;let r=o.get(q);if(r)return r;let s=(0,j.makeHangingPromise)(q.renderSignal,k.route,"`cookies()`");return o.set(q,s),s;case"prerender-client":case"validation-client":let t="`cookies`";throw Object.defineProperty(new m.InvariantError(`${t} must not be used within a Client Component. Next.js should be preventing ${t} from being included in Client Components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E1037",enumerable:!1,configurable:!0});case"prerender-ppr":return(0,h.postponeWithTracking)(b.route,a,c.dynamicTracking);case"prerender-legacy":return(0,h.throwToInterruptStaticGeneration)(a,b,c);case"prerender-runtime":return(0,j.delayUntilRuntimeStage)(c,p(c.cookies));case"private-cache":return p(c.cookies);case"request":let u;if((0,h.trackDynamicDataInDynamicRender)(c),u=(0,d.areCookiesMutableInCurrentPhase)(c)?c.userspaceMutableCookies:c.cookies,!c.asyncApiPromises)return p(u);{let a=(0,g.isInEarlyRenderStage)(c);if(u===c.mutableCookies)return a?c.asyncApiPromises.earlyMutableCookies:c.asyncApiPromises.mutableCookies;return a?c.asyncApiPromises.earlyCookies:c.asyncApiPromises.cookies}}}(0,g.throwForMissingRequestStore)(a)}a.r(31382);let o=new WeakMap;function p(a){let b=o.get(a);if(b)return b;let c=Promise.resolve(a);return o.set(a,c),c}(0,k.createDedupedByCallsiteServerErrorLoggerDev)(function(a,b){let c=a?`Route "${a}" `:"This route ";return Object.defineProperty(Error(`${c}used ${b}. \`cookies()\` returns a Promise and must be unwrapped with \`await\` or \`React.use()\` before accessing its properties. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`),"__NEXT_ERROR_CODE",{value:"E830",enumerable:!1,configurable:!0})})},29927,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={HeadersAdapter:function(){return h},ReadonlyHeadersError:function(){return g}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(51409);class g extends Error{constructor(){super("Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers")}static callable(){throw new g}}class h extends Headers{constructor(a){super(),this.headers=new Proxy(a,{get(b,c,d){if("symbol"==typeof c)return f.ReflectAdapter.get(b,c,d);let e=c.toLowerCase(),g=Object.keys(a).find(a=>a.toLowerCase()===e);if(void 0!==g)return f.ReflectAdapter.get(b,g,d)},set(b,c,d,e){if("symbol"==typeof c)return f.ReflectAdapter.set(b,c,d,e);let g=c.toLowerCase(),h=Object.keys(a).find(a=>a.toLowerCase()===g);return f.ReflectAdapter.set(b,h??c,d,e)},has(b,c){if("symbol"==typeof c)return f.ReflectAdapter.has(b,c);let d=c.toLowerCase(),e=Object.keys(a).find(a=>a.toLowerCase()===d);return void 0!==e&&f.ReflectAdapter.has(b,e)},deleteProperty(b,c){if("symbol"==typeof c)return f.ReflectAdapter.deleteProperty(b,c);let d=c.toLowerCase(),e=Object.keys(a).find(a=>a.toLowerCase()===d);return void 0===e||f.ReflectAdapter.deleteProperty(b,e)}})}static seal(a){return new Proxy(a,{get(a,b,c){switch(b){case"append":case"delete":case"set":return g.callable;default:return f.ReflectAdapter.get(a,b,c)}}})}merge(a){return Array.isArray(a)?a.join(", "):a}static from(a){return a instanceof Headers?a:new h(a)}append(a,b){let c=this.headers[a];"string"==typeof c?this.headers[a]=[c,b]:Array.isArray(c)?c.push(b):this.headers[a]=b}delete(a){delete this.headers[a]}get(a){let b=this.headers[a];return void 0!==b?this.merge(b):null}has(a){return void 0!==this.headers[a]}set(a,b){this.headers[a]=b}forEach(a,b){for(let[c,d]of this.entries())a.call(b,d,c,this)}*entries(){for(let a of Object.keys(this.headers)){let b=a.toLowerCase(),c=this.get(b);yield[b,c]}}*keys(){for(let a of Object.keys(this.headers)){let b=a.toLowerCase();yield b}}*values(){for(let a of Object.keys(this.headers)){let b=this.get(a);yield b}}[Symbol.iterator](){return this.entries()}}},35754,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"headers",{enumerable:!0,get:function(){return m}});let d=a.r(29927),e=a.r(56704),f=a.r(32319),g=a.r(60384),h=a.r(60312),i=a.r(13091),j=a.r(8018),k=a.r(86309),l=a.r(50640);function m(){let a="headers",b=e.workAsyncStorage.getStore(),c=f.workUnitAsyncStorage.getStore();if(b){if(c&&"after"===c.phase&&!(0,k.isRequestAPICallableInsideAfter)())throw Object.defineProperty(Error(`Route ${b.route} used \`headers()\` inside \`after()\`. This is not supported. If you need this data inside an \`after()\` callback, use \`headers()\` outside of the callback. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`),"__NEXT_ERROR_CODE",{value:"E839",enumerable:!1,configurable:!0});if(b.forceStatic)return o(d.HeadersAdapter.seal(new Headers({})));if(c)switch(c.type){case"cache":{let a=Object.defineProperty(Error(`Route ${b.route} used \`headers()\` inside "use cache". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use \`headers()\` outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E833",enumerable:!1,configurable:!0});throw Error.captureStackTrace(a,m),b.invalidDynamicUsageError??=a,a}case"unstable-cache":throw Object.defineProperty(Error(`Route ${b.route} used \`headers()\` inside a function cached with \`unstable_cache()\`. Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use \`headers()\` outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`),"__NEXT_ERROR_CODE",{value:"E838",enumerable:!1,configurable:!0});case"generate-static-params":throw Object.defineProperty(Error(`Route ${b.route} used \`headers()\` inside \`generateStaticParams\`. This is not supported because \`generateStaticParams\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`),"__NEXT_ERROR_CODE",{value:"E1134",enumerable:!1,configurable:!0})}if(b.dynamicShouldError)throw Object.defineProperty(new h.StaticGenBailoutError(`Route ${b.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`headers()\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E828",enumerable:!1,configurable:!0});if(c)switch(c.type){case"prerender":var j=b,p=c;let e=n.get(p);if(e)return e;let q=(0,i.makeHangingPromise)(p.renderSignal,j.route,"`headers()`");return n.set(p,q),q;case"prerender-client":case"validation-client":let r="`headers`";throw Object.defineProperty(new l.InvariantError(`${r} must not be used within a client component. Next.js should be preventing ${r} from being included in client components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E1017",enumerable:!1,configurable:!0});case"prerender-ppr":return(0,g.postponeWithTracking)(b.route,a,c.dynamicTracking);case"prerender-legacy":return(0,g.throwToInterruptStaticGeneration)(a,b,c);case"prerender-runtime":return(0,i.delayUntilRuntimeStage)(c,o(c.headers));case"private-cache":return o(c.headers);case"request":if((0,g.trackDynamicDataInDynamicRender)(c),c.asyncApiPromises)return(0,f.isInEarlyRenderStage)(c)?c.asyncApiPromises.earlyHeaders:c.asyncApiPromises.headers;return o(c.headers)}}(0,f.throwForMissingRequestStore)(a)}a.r(31382);let n=new WeakMap;function o(a){let b=n.get(a);if(b)return b;let c=Promise.resolve(a);return n.set(a,c),c}(0,j.createDedupedByCallsiteServerErrorLoggerDev)(function(a,b){let c=a?`Route "${a}" `:"This route ";return Object.defineProperty(Error(`${c}used ${b}. \`headers()\` returns a Promise and must be unwrapped with \`await\` or \`React.use()\` before accessing its properties. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`),"__NEXT_ERROR_CODE",{value:"E836",enumerable:!1,configurable:!0})})},51125,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"draftMode",{enumerable:!0,get:function(){return l}});let d=a.r(32319),e=a.r(56704),f=a.r(60384),g=a.r(8018),h=a.r(60312),i=a.r(96556),j=a.r(50640),k=a.r(13091);function l(){let a="draftMode",b=e.workAsyncStorage.getStore(),c=d.workUnitAsyncStorage.getStore();switch((!b||!c)&&(0,d.throwForMissingRequestStore)(a),c.type){case"prerender-runtime":return(0,k.delayUntilRuntimeStage)(c,m(c.draftMode,b));case"request":return m(c.draftMode,b);case"cache":case"private-cache":case"unstable-cache":let f=(0,d.getDraftModeProviderForCacheScope)(b,c);if(f)return m(f,b);case"prerender":case"prerender-ppr":case"prerender-legacy":return m(null,b);case"prerender-client":case"validation-client":{let a="`draftMode`";throw Object.defineProperty(new j.InvariantError(`${a} must not be used within a Client Component. Next.js should be preventing ${a} from being included in Client Components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E1046",enumerable:!1,configurable:!0})}case"generate-static-params":throw Object.defineProperty(Error(`Route ${b.route} used \`${a}()\` inside \`generateStaticParams\`. This is not supported because \`generateStaticParams\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`),"__NEXT_ERROR_CODE",{value:"E1132",enumerable:!1,configurable:!0});default:return c}}function m(a,b){let c=o.get(a??n);return c||Promise.resolve(new p(a))}a.r(51409);let n={},o=new WeakMap;class p{constructor(a){this._provider=a}get isEnabled(){return null!==this._provider&&this._provider.isEnabled}enable(){q("draftMode().enable()",this.enable),null!==this._provider&&this._provider.enable()}disable(){q("draftMode().disable()",this.disable),null!==this._provider&&this._provider.disable()}}function q(a,b){let c=e.workAsyncStorage.getStore(),g=d.workUnitAsyncStorage.getStore();if(c){if((null==g?void 0:g.phase)==="after")throw Object.defineProperty(Error(`Route ${c.route} used "${a}" inside \`after()\`. The enabled status of \`draftMode()\` can be read inside \`after()\` but you cannot enable or disable \`draftMode()\`. See more info here: https://nextjs.org/docs/app/api-reference/functions/after`),"__NEXT_ERROR_CODE",{value:"E845",enumerable:!1,configurable:!0});if(c.dynamicShouldError)throw Object.defineProperty(new h.StaticGenBailoutError(`Route ${c.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${a}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`),"__NEXT_ERROR_CODE",{value:"E553",enumerable:!1,configurable:!0});if(g)switch(g.type){case"cache":case"private-cache":{let d=Object.defineProperty(Error(`Route ${c.route} used "${a}" inside "use cache". The enabled status of \`draftMode()\` can be read in caches but you must not enable or disable \`draftMode()\` inside a cache. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`),"__NEXT_ERROR_CODE",{value:"E829",enumerable:!1,configurable:!0});throw Error.captureStackTrace(d,b),c.invalidDynamicUsageError??=d,d}case"unstable-cache":throw Object.defineProperty(Error(`Route ${c.route} used "${a}" inside a function cached with \`unstable_cache()\`. The enabled status of \`draftMode()\` can be read in caches but you must not enable or disable \`draftMode()\` inside a cache. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`),"__NEXT_ERROR_CODE",{value:"E844",enumerable:!1,configurable:!0});case"prerender":case"prerender-runtime":{let b=Object.defineProperty(Error(`Route ${c.route} used ${a} without first calling \`await connection()\`. See more info here: https://nextjs.org/docs/messages/next-prerender-sync-headers`),"__NEXT_ERROR_CODE",{value:"E126",enumerable:!1,configurable:!0});return(0,f.abortAndThrowOnSynchronousRequestDataAccess)(c.route,a,b,g)}case"prerender-client":case"validation-client":let d="`draftMode`";throw Object.defineProperty(new j.InvariantError(`${d} must not be used within a Client Component. Next.js should be preventing ${d} from being included in Client Components statically, but did not in this case.`),"__NEXT_ERROR_CODE",{value:"E1046",enumerable:!1,configurable:!0});case"prerender-ppr":return(0,f.postponeWithTracking)(c.route,a,g.dynamicTracking);case"prerender-legacy":g.revalidate=0;let e=Object.defineProperty(new i.DynamicServerError(`Route ${c.route} couldn't be rendered statically because it used \`${a}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`),"__NEXT_ERROR_CODE",{value:"E558",enumerable:!1,configurable:!0});throw c.dynamicUsageDescription=a,c.dynamicUsageStack=e.stack,e;case"request":(0,f.trackDynamicDataInDynamicRender)(g);break;case"generate-static-params":throw Object.defineProperty(Error(`Route ${c.route} used \`${a}\` inside \`generateStaticParams\`. This is not supported because \`generateStaticParams\` runs at build time without an HTTP request. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context`),"__NEXT_ERROR_CODE",{value:"E1121",enumerable:!1,configurable:!0})}}}(0,g.createDedupedByCallsiteServerErrorLoggerDev)(function(a,b){let c=a?`Route "${a}" `:"This route ";return Object.defineProperty(Error(`${c}used ${b}. \`draftMode()\` returns a Promise and must be unwrapped with \`await\` or \`React.use()\` before accessing its properties. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`),"__NEXT_ERROR_CODE",{value:"E835",enumerable:!1,configurable:!0})})},5246,(a,b,c)=>{b.exports.cookies=a.r(81740).cookies,b.exports.headers=a.r(35754).headers,b.exports.draftMode=a.r(51125).draftMode},45017,a=>{"use strict";a.s(["Sidebar",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call Sidebar() from the server but Sidebar is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/sidebar.tsx <module evaluation>","Sidebar")},10398,a=>{"use strict";a.s(["Sidebar",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call Sidebar() from the server but Sidebar is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/sidebar.tsx","Sidebar")},23604,a=>{"use strict";a.i(45017);var b=a.i(10398);a.n(b)},59969,a=>{"use strict";a.s(["LiveRefresher",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call LiveRefresher() from the server but LiveRefresher is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/live-refresher.tsx <module evaluation>","LiveRefresher")},11272,a=>{"use strict";a.s(["LiveRefresher",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call LiveRefresher() from the server but LiveRefresher is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/live-refresher.tsx","LiveRefresher")},30642,a=>{"use strict";a.i(59969);var b=a.i(11272);a.n(b)},99153,a=>{"use strict";a.s(["LiveSessionsWidget",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call LiveSessionsWidget() from the server but LiveSessionsWidget is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/live-sessions-widget.tsx <module evaluation>","LiveSessionsWidget")},62615,a=>{"use strict";a.s(["LiveSessionsWidget",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call LiveSessionsWidget() from the server but LiveSessionsWidget is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/live-sessions-widget.tsx","LiveSessionsWidget")},9647,a=>{"use strict";a.i(99153);var b=a.i(62615);a.n(b)},14022,a=>{"use strict";a.s(["JobQueueWidget",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call JobQueueWidget() from the server but JobQueueWidget is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/job-queue-widget.tsx <module evaluation>","JobQueueWidget")},5900,a=>{"use strict";a.s(["JobQueueWidget",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call JobQueueWidget() from the server but JobQueueWidget is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/job-queue-widget.tsx","JobQueueWidget")},84829,a=>{"use strict";a.i(14022);var b=a.i(5900);a.n(b)},28992,a=>{"use strict";var b=a.i(7997),c=a.i(5246),d=a.i(23604),e=a.i(30642),f=a.i(9647),g=a.i(84829);a.i(23895);var h=a.i(88522),i=a.i(67116),j=a.i(70709),k=a.i(60511),l=a.i(76597),m=a.i(40095);async function n({children:a}){let o=await (0,c.headers)();if((o.get("x-fleetlens-pathname")??"").startsWith("/print/")){let d=o.get("x-fleetlens-theme"),e=await (0,c.cookies)(),f=e.get("claude-lens-theme")?.value;return(0,b.jsx)("html",{lang:"en","data-theme":"light"===d||"dark"===d?d:"light"===f||"dark"===f?f:"dark",suppressHydrationWarning:!0,children:(0,b.jsx)("body",{children:a})})}let[p,q,r,s]=await Promise.all([(0,h.listProjects)(),(0,h.walkJsonlFiles)(),(0,i.listSessions)(),(0,l.buildEntriesIndex)()]),t=r.slice(0,20),u=r.length,v=(0,j.latestUsageSnapshot)(),w=(0,k.readTeamConnection)(),x=t.map(a=>({id:a.id,projectName:a.projectName,firstUserPreview:a.firstUserPreview,lastUserPreview:a.lastUserPreview,lastAgentPreview:a.lastAgentPreview,firstTimestamp:a.firstTimestamp,lastTimestamp:a.lastTimestamp,teamName:a.teamName,agentName:a.agentName,agent:a.agent})),y={};for(let a of t){let b=s.bySession.get(a.id)??[];if(0===b.length)continue;let c=b[b.length-1];y[a.id]={outcome:c.enrichment.outcome??null,enrichmentStatus:c.enrichment.status,localDay:c.local_day}}let z=await (0,c.cookies)(),A=z.get("claude-lens-theme")?.value;return(0,b.jsx)("html",{lang:"en","data-theme":"light"===A||"dark"===A?A:"dark",suppressHydrationWarning:!0,children:(0,b.jsxs)("body",{children:[(0,b.jsx)(e.LiveRefresher,{}),(0,b.jsxs)("div",{style:{display:"flex",height:"100vh"},children:[(0,b.jsx)(d.Sidebar,{projects:p,totalSessions:u,currentUsage:v,version:"0.12.0",latestChangelogVersion:m.LATEST_VERSION,teamConnection:w}),(0,b.jsx)("main",{style:{flex:1,minWidth:0,minHeight:0,padding:0,overflow:"auto"},children:a})]}),(0,b.jsx)(f.LiveSessionsWidget,{sessions:x,entrySummaries:y}),(0,b.jsx)(g.JobQueueWidget,{})]})})}a.s(["default",0,n,"dynamic",0,"force-dynamic","metadata",0,{title:"Fleetlens",description:"Multi-agent fleet analytics — local-only dashboard for Claude Code, Codex, and other coding-agent sessions."}],28992)},44665,a=>{a.n(a.i(28992))}];
2
2
 
3
3
  //# sourceMappingURL=_0xu2pvc._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[34476,a=>{"use strict";a.s(["DateRangeFilter",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call DateRangeFilter() from the server but DateRangeFilter is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/date-range-filter.tsx <module evaluation>","DateRangeFilter")},96491,a=>{"use strict";a.s(["DateRangeFilter",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call DateRangeFilter() from the server but DateRangeFilter is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/date-range-filter.tsx","DateRangeFilter")},67598,a=>{"use strict";a.i(34476);var b=a.i(96491);a.n(b)},31289,a=>{"use strict";a.s(["AutoGenerateYesterday",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call AutoGenerateYesterday() from the server but AutoGenerateYesterday is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/auto-generate-yesterday.tsx <module evaluation>","AutoGenerateYesterday")},98643,a=>{"use strict";a.s(["AutoGenerateYesterday",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call AutoGenerateYesterday() from the server but AutoGenerateYesterday is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/auto-generate-yesterday.tsx","AutoGenerateYesterday")},29893,a=>{"use strict";a.i(31289);var b=a.i(98643);a.n(b)},17668,a=>{"use strict";a.s(["TeamWelcomeBanner",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call TeamWelcomeBanner() from the server but TeamWelcomeBanner is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/team-welcome-banner.tsx <module evaluation>","TeamWelcomeBanner")},11746,a=>{"use strict";a.s(["TeamWelcomeBanner",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call TeamWelcomeBanner() from the server but TeamWelcomeBanner is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/team-welcome-banner.tsx","TeamWelcomeBanner")},71047,a=>{"use strict";a.i(17668);var b=a.i(11746);a.n(b)},77739,a=>{"use strict";var b=a.i(7997);a.i(9117);var c=a.i(48024),d=a.i(30375),e=a.i(4636),f=a.i(67598),g=a.i(77708),h=a.i(95936),i=a.i(44104),j=a.i(47058);a.i(37075);var k=a.i(26111),l=a.i(68787),m=a.i(85160),n=a.i(29893);function o(a){if(!a)return null;let b=/^[^.!?]+[.!?]/.exec(a);return b?b[0]:a}function p(a,b){return a.length>b?a.slice(0,b-1)+"…":a}function q(){var a;let c=(0,l.readSettings)().ai_features.enabled,d=(0,m.yesterdayLocal)(),e=d,f=(0,i.listEntriesForDay)(d),g=!1;if(0===f.length){let a=function(){for(let a=1;a<=30;a++){let b=(0,m.toLocalDay)(Date.now()-864e5*a);if((0,i.listEntriesForDay)(b).length>0)return b}return null}();a&&(e=a,f=(0,i.listEntriesForDay)(a),g=!0)}if(0===f.length)return(0,b.jsx)("div",{className:"af-panel",style:{padding:24,textAlign:"center"},children:(0,b.jsx)("p",{style:{color:"var(--af-text-secondary)"},children:"No recent activity yet. Once you run some Claude Code sessions, your daily digest will appear here."})});let q=(0,j.readDayDigest)(e)??(0,k.buildDeterministicDigest)(e,f),r=c&&!g&&null===q.headline,s=q.headline??`Worked ${Math.round(q.agent_min)}m across ${q.projects.length} project${1===q.projects.length?"":"s"}${q.shipped.length>0?`; shipped ${q.shipped.length} PR${1===q.shipped.length?"":"s"}`:""}.`,t=o(q.what_went_well),u=o(q.what_hit_friction);return(0,b.jsxs)("div",{className:"af-panel",style:{padding:20,display:"flex",flexDirection:"column",gap:12},children:[(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,flexWrap:"wrap",fontSize:11,color:"var(--af-text-tertiary)",textTransform:"uppercase",letterSpacing:"0.08em",fontWeight:600},children:[(0,b.jsxs)("span",{children:[g?"Last active":"Yesterday"," · ",(a=e,new Date(`${a}T12:00:00`).toLocaleDateString("en-US",{weekday:"long",month:"short",day:"numeric"}))]}),(0,b.jsx)(n.AutoGenerateYesterday,{yesterdayDate:e,missing:r})]}),(0,b.jsx)("h2",{style:{fontSize:17,fontWeight:600,margin:"8px 0 0",lineHeight:1.35},children:p(s,180)})]}),(0,b.jsxs)("div",{style:{fontSize:12,color:"var(--af-text-secondary)",fontFamily:"var(--font-mono)"},children:[Math.round(q.agent_min),"m agent time · ",q.projects.length," project",1===q.projects.length?"":"s"," · ",q.shipped.length," PR",1===q.shipped.length?"":"s"," shipped"]}),(t||u)&&(0,b.jsxs)("div",{style:{fontSize:13,display:"flex",flexDirection:"column",gap:4},children:[t&&(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{style:{color:"#48bb78"},children:"✓"})," ",p(t,160)]}),u&&(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{style:{color:"#ed8936"},children:"⚠"})," ",p(u,160)]})]}),!c&&(0,b.jsxs)("div",{style:{fontSize:11,color:"var(--af-text-tertiary)"},children:[(0,b.jsx)(h.default,{href:"/settings",style:{color:"var(--af-accent)"},children:"Enable AI features"})," to see daily narratives."]}),(0,b.jsxs)("div",{style:{display:"flex",gap:12,marginTop:4},children:[(0,b.jsx)(h.default,{href:`/digest/${e}`,style:{fontSize:12,color:"var(--af-accent)"},children:"Open full digest →"}),(0,b.jsx)(h.default,{href:"/insights",style:{fontSize:12,color:"var(--af-accent)"},children:"Weekly insight report →"})]})]})}function r(){let a=Date.now(),c=[];for(let b=0;b<5;b++){let d=(0,m.toLocalDay)(a-864e5*b),e=(0,i.listEntriesForDay)(d),f=e.reduce((a,b)=>a+b.numbers.active_min,0),g=e.reduce((a,b)=>a+b.pr_titles.length,0),h=(0,j.readDayDigest)(d),k=0===e.length?"empty":h&&h.headline?"generated":"pending",l=0===b?"Today":1===b?"Yesterday":new Date(`${d}T12:00:00`).toLocaleDateString("en-US",{weekday:"short",month:"short",day:"numeric"});c.push({date:d,label:l,agentMin:f,prs:g,status:k})}return(0,b.jsxs)("div",{className:"af-panel",children:[(0,b.jsxs)("div",{className:"af-panel-header",children:[(0,b.jsx)("span",{children:"Recent days"}),(0,b.jsx)(h.default,{href:"/digest",style:{fontSize:11,color:"var(--af-accent)",marginLeft:"auto"},children:"Backfill →"})]}),(0,b.jsx)("div",{children:c.map(a=>(0,b.jsxs)(h.default,{href:`/digest/${a.date}`,style:{display:"grid",gridTemplateColumns:"1fr auto auto auto",gap:10,padding:"10px 18px",fontSize:12,borderBottom:"1px solid var(--af-border-subtle)",alignItems:"center"},children:[(0,b.jsx)("span",{children:a.label}),(0,b.jsx)(s,{status:a.status}),(0,b.jsx)("span",{style:{fontFamily:"var(--font-mono)",color:"var(--af-text-tertiary)",fontSize:11,minWidth:36,textAlign:"right"},children:a.agentMin>0?`${Math.round(a.agentMin)}m`:"—"}),(0,b.jsx)("span",{style:{fontFamily:"var(--font-mono)",color:"var(--af-text-tertiary)",fontSize:11,minWidth:42,textAlign:"right"},children:a.prs>0?`${a.prs} PR${1===a.prs?"":"s"}`:""})]},a.date))})]})}function s({status:a}){let c={generated:{bg:"rgba(72,187,120,0.12)",fg:"#48bb78",text:"✓"},pending:{bg:"rgba(237,137,54,0.12)",fg:"#ed8936",text:"•"},empty:{bg:"transparent",fg:"var(--af-text-tertiary)",text:"—"}}[a];return(0,b.jsx)("span",{style:{fontSize:10,fontWeight:600,padding:"1px 7px",borderRadius:99,background:c.bg,color:c.fg,minWidth:22,textAlign:"center"},children:c.text})}var t=a.i(67116),u=a.i(60511),v=a.i(76597),w=a.i(87067),x=a.i(71047);async function y({searchParams:a}){let i,{range:j}=await a,k="7d"===(i=Array.isArray(j)?j[0]:j)||"30d"===i||"90d"===i||"all"===i?i:"90d",l=function(a,b=Date.now()){if("all"===a)return;let c=new Date(b);return c.setHours(0,0,0,0),c.setDate(c.getDate()-(("7d"===a?7:"30d"===a?30:90)-1)),c.getTime()}(k),[m,n,o]=await Promise.all([(0,t.listSessions)(),(0,v.buildEntriesIndex)(),(0,v.listCachedDayDigests)()]),p=void 0===l?m:m.filter(a=>{if(!a.firstTimestamp)return!1;let b=Date.parse(a.firstTimestamp);return!Number.isNaN(b)&&b>=l}),s=(0,u.readTeamConnection)(),z=new Map;for(let[a,b]of n.dayOutcome)z.set(a,{outcome:b,headline:null,helpfulness:null});for(let[a,b]of o){let c=z.get(a)??{outcome:b.outcome_day,headline:null,helpfulness:null};z.set(a,{outcome:c.outcome??b.outcome_day,headline:b.headline,helpfulness:b.helpfulness_day})}let A=(0,c.groupByProject)(p).sort((a,b)=>{let c=a.metrics.totalTokens.input+a.metrics.totalTokens.output+a.metrics.totalTokens.cacheRead+a.metrics.totalTokens.cacheWrite,d=b.metrics.totalTokens.input+b.metrics.totalTokens.output+b.metrics.totalTokens.cacheRead+b.metrics.totalTokens.cacheWrite;return d!==c?d-c:b.metrics.sessionCount-a.metrics.sessionCount}).slice(0,8),B=p.slice(0,6);return(0,b.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:28,maxWidth:1280,padding:"32px 40px"},children:[s.paired&&(0,b.jsx)(x.TeamWelcomeBanner,{teamName:s.team.name,pairedAt:s.member.pairedAt}),(0,b.jsxs)("header",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:18,flexWrap:"wrap"},children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{style:{fontSize:26,fontWeight:700,letterSpacing:"-0.02em",margin:0},children:"Overview"}),(0,b.jsxs)("p",{style:{fontSize:13,color:"var(--af-text-secondary)",marginTop:4},children:[p.length," of ",m.length," session",1===m.length?"":"s"," across"," ",(()=>{let a=new Map;for(let b of m){let c=b.agent??"claude-code";a.set(c,(a.get(c)??0)+1)}let b=d.agentMetadata.map(b=>{let c=a.get(b.kind)??0;return c>0?`${c} ${b.displayName}`:null}).filter(a=>null!==a);return b.length?b.join(" + "):"no observed agents yet"})(),"."]})]}),(0,b.jsx)(f.DateRangeFilter,{current:k})]}),(0,b.jsx)(q,{}),(0,b.jsx)(e.DashboardView,{sessions:p,daySummaries:z}),(0,b.jsxs)("section",{style:{display:"grid",gridTemplateColumns:"minmax(260px, 1fr) minmax(260px, 1.4fr) minmax(260px, 1fr)",gap:16},children:[(0,b.jsxs)("div",{className:"af-panel",children:[(0,b.jsxs)("div",{className:"af-panel-header",children:[(0,b.jsx)("span",{children:"Top projects"}),(0,b.jsx)("span",{style:{fontSize:11,color:"var(--af-text-tertiary)",fontWeight:400},children:"by total tokens"}),(0,b.jsx)(h.default,{href:"/projects",style:{fontSize:11,color:"var(--af-accent)",marginLeft:"auto"},children:"View all →"})]}),(0,b.jsx)("div",{children:0===A.length?(0,b.jsx)("div",{className:"af-empty",children:"No projects yet."}):A.map(a=>{let c=a.metrics.totalTokens.input+a.metrics.totalTokens.output+a.metrics.totalTokens.cacheRead+a.metrics.totalTokens.cacheWrite;return(0,b.jsxs)(h.default,{href:`/projects/${encodeURIComponent(a.projectDir)}`,style:{display:"grid",gridTemplateColumns:"1fr auto auto auto",gap:14,padding:"10px 18px",fontSize:12,borderBottom:"1px solid var(--af-border-subtle)",alignItems:"center"},children:[(0,b.jsx)("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:"var(--af-text)"},title:a.projectName,children:(0,w.prettyProjectName)(a.projectName)}),(0,b.jsxs)("div",{style:{fontSize:10,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)",minWidth:64,textAlign:"right"},children:[a.sessions.length," sess"]}),(0,b.jsx)("div",{style:{fontSize:10,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)",minWidth:52,textAlign:"right"},title:`${c.toLocaleString()} tokens`,children:(0,w.formatTokens)(c)}),(0,b.jsx)("div",{style:{fontSize:10,color:"var(--af-text-tertiary)",minWidth:56,textAlign:"right"},suppressHydrationWarning:!0,children:a.lastActiveMs?(0,w.formatRelative)(new Date(a.lastActiveMs).toISOString()):"—"})]},a.projectDir)})})]}),(0,b.jsxs)("div",{className:"af-panel",children:[(0,b.jsxs)("div",{className:"af-panel-header",children:[(0,b.jsx)("span",{children:"Recent sessions"}),(0,b.jsx)(h.default,{href:"/sessions",style:{fontSize:11,color:"var(--af-accent)",marginLeft:"auto"},children:"View all →"})]}),(0,b.jsx)("div",{children:0===B.length?(0,b.jsx)("div",{className:"af-empty",children:"No sessions found from any registered agent source."}):B.map(a=>(0,b.jsxs)(h.default,{href:`/sessions/${a.id}`,style:{display:"grid",gridTemplateColumns:"1fr auto auto",gap:12,padding:"10px 18px",fontSize:12,borderBottom:"1px solid var(--af-border-subtle)",alignItems:"center"},children:[(0,b.jsxs)("div",{style:{minWidth:0},children:[(0,b.jsxs)("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:"var(--af-text)",display:"flex",alignItems:"center",gap:6},children:[(0,b.jsx)(g.LiveBadge,{mtimeIso:a.lastTimestamp}),(0,b.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.firstUserPreview||(0,b.jsx)("em",{style:{color:"var(--af-text-tertiary)"},children:"(no user message)"})})]}),(0,b.jsx)("div",{style:{fontSize:10,color:"var(--af-text-tertiary)",marginTop:2,fontFamily:"var(--font-mono)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:(0,w.prettyProjectName)(a.projectName)})]}),(0,b.jsx)("div",{style:{fontSize:10,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)",textAlign:"right",minWidth:54},title:"Agent time (filters out idle gaps)",children:(0,w.formatDuration)(a.airTimeMs??a.durationMs)}),(0,b.jsx)("div",{style:{fontSize:10,color:"var(--af-text-tertiary)",textAlign:"right",minWidth:54},children:a.firstTimestamp?(0,w.formatRelative)(a.firstTimestamp):"—"})]},`${a.projectDir}/${a.id}`))})]}),(0,b.jsx)(r,{})]})]})}a.s(["default",0,y,"dynamic",0,"force-dynamic"],77739)},67303,a=>{a.n(a.i(77739))}];
1
+ module.exports=[34476,a=>{"use strict";a.s(["DateRangeFilter",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call DateRangeFilter() from the server but DateRangeFilter is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/date-range-filter.tsx <module evaluation>","DateRangeFilter")},96491,a=>{"use strict";a.s(["DateRangeFilter",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call DateRangeFilter() from the server but DateRangeFilter is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/date-range-filter.tsx","DateRangeFilter")},67598,a=>{"use strict";a.i(34476);var b=a.i(96491);a.n(b)},31289,a=>{"use strict";a.s(["AutoGenerateYesterday",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call AutoGenerateYesterday() from the server but AutoGenerateYesterday is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/auto-generate-yesterday.tsx <module evaluation>","AutoGenerateYesterday")},98643,a=>{"use strict";a.s(["AutoGenerateYesterday",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call AutoGenerateYesterday() from the server but AutoGenerateYesterday is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/auto-generate-yesterday.tsx","AutoGenerateYesterday")},29893,a=>{"use strict";a.i(31289);var b=a.i(98643);a.n(b)},17668,a=>{"use strict";a.s(["TeamWelcomeBanner",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call TeamWelcomeBanner() from the server but TeamWelcomeBanner is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/team-welcome-banner.tsx <module evaluation>","TeamWelcomeBanner")},11746,a=>{"use strict";a.s(["TeamWelcomeBanner",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call TeamWelcomeBanner() from the server but TeamWelcomeBanner is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/apps/web/components/team-welcome-banner.tsx","TeamWelcomeBanner")},71047,a=>{"use strict";a.i(17668);var b=a.i(11746);a.n(b)},77739,a=>{"use strict";var b=a.i(7997);a.i(9117);var c=a.i(48024),d=a.i(30375),e=a.i(4636),f=a.i(67598),g=a.i(77708),h=a.i(95936),i=a.i(44104),j=a.i(47058);a.i(37075);var k=a.i(26111),l=a.i(68787),m=a.i(85160),n=a.i(29893);function o(a){if(!a)return null;let b=/^[^.!?]+[.!?]/.exec(a);return b?b[0]:a}function p(a,b){return a.length>b?a.slice(0,b-1)+"…":a}function q(){var a;let c=(0,l.readSettings)().ai_features.enabled,d=(0,m.yesterdayLocal)(),e=d,f=(0,i.listEntriesForDay)(d),g=!1;if(0===f.length){let a=function(){for(let a=1;a<=30;a++){let b=(0,m.toLocalDay)(Date.now()-864e5*a);if((0,i.listEntriesForDay)(b).length>0)return b}return null}();a&&(e=a,f=(0,i.listEntriesForDay)(a),g=!0)}if(0===f.length)return(0,b.jsx)("div",{className:"af-panel",style:{padding:24,textAlign:"center"},children:(0,b.jsx)("p",{style:{color:"var(--af-text-secondary)"},children:"No recent activity yet. Once you run some Claude Code sessions, your daily digest will appear here."})});let q=(0,j.readDayDigest)(e)??(0,k.buildDeterministicDigest)(e,f),r=c&&!g&&null===q.headline,s=q.headline??`Worked ${Math.round(q.agent_min)}m across ${q.projects.length} project${1===q.projects.length?"":"s"}${q.shipped.length>0?`; shipped ${q.shipped.length} PR${1===q.shipped.length?"":"s"}`:""}.`,t=o(q.what_went_well),u=o(q.what_hit_friction);return(0,b.jsxs)("div",{className:"af-panel",style:{padding:20,display:"flex",flexDirection:"column",gap:12},children:[(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,flexWrap:"wrap",fontSize:11,color:"var(--af-text-tertiary)",textTransform:"uppercase",letterSpacing:"0.08em",fontWeight:600},children:[(0,b.jsxs)("span",{children:[g?"Last active":"Yesterday"," · ",(a=e,new Date(`${a}T12:00:00`).toLocaleDateString("en-US",{weekday:"long",month:"short",day:"numeric"}))]}),(0,b.jsx)(n.AutoGenerateYesterday,{yesterdayDate:e,missing:r})]}),(0,b.jsx)("h2",{style:{fontSize:17,fontWeight:600,margin:"8px 0 0",lineHeight:1.35},children:p(s,180)})]}),(0,b.jsxs)("div",{style:{fontSize:12,color:"var(--af-text-secondary)",fontFamily:"var(--font-mono)"},children:[Math.round(q.agent_min),"m agent time · ",q.projects.length," project",1===q.projects.length?"":"s"," · ",q.shipped.length," PR",1===q.shipped.length?"":"s"," shipped"]}),(t||u)&&(0,b.jsxs)("div",{style:{fontSize:13,display:"flex",flexDirection:"column",gap:4},children:[t&&(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{style:{color:"#48bb78"},children:"✓"})," ",p(t,160)]}),u&&(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{style:{color:"#ed8936"},children:"⚠"})," ",p(u,160)]})]}),!c&&(0,b.jsxs)("div",{style:{fontSize:11,color:"var(--af-text-tertiary)"},children:[(0,b.jsx)(h.default,{href:"/settings",style:{color:"var(--af-accent)"},children:"Enable AI features"})," to see daily narratives."]}),(0,b.jsxs)("div",{style:{display:"flex",gap:12,marginTop:4},children:[(0,b.jsx)(h.default,{href:`/digest/${e}`,style:{fontSize:12,color:"var(--af-accent)"},children:"Open full digest →"}),(0,b.jsx)(h.default,{href:"/insights",style:{fontSize:12,color:"var(--af-accent)"},children:"Weekly insight report →"})]})]})}function r(){let a=Date.now(),c=[];for(let b=0;b<5;b++){let d=(0,m.toLocalDay)(a-864e5*b),e=(0,i.listEntriesForDay)(d),f=e.reduce((a,b)=>a+b.numbers.active_min,0),g=e.reduce((a,b)=>a+b.pr_titles.length,0),h=(0,j.readDayDigest)(d),k=0===e.length?"empty":h&&h.headline?"generated":"pending",l=0===b?"Today":1===b?"Yesterday":new Date(`${d}T12:00:00`).toLocaleDateString("en-US",{weekday:"short",month:"short",day:"numeric"});c.push({date:d,label:l,agentMin:f,prs:g,status:k})}return(0,b.jsxs)("div",{className:"af-panel",children:[(0,b.jsxs)("div",{className:"af-panel-header",children:[(0,b.jsx)("span",{children:"Recent days"}),(0,b.jsx)(h.default,{href:"/digest",style:{fontSize:11,color:"var(--af-accent)",marginLeft:"auto"},children:"Backfill →"})]}),(0,b.jsx)("div",{children:c.map(a=>(0,b.jsxs)(h.default,{href:`/digest/${a.date}`,style:{display:"grid",gridTemplateColumns:"1fr auto auto auto",gap:10,padding:"10px 18px",fontSize:12,borderBottom:"1px solid var(--af-border-subtle)",alignItems:"center"},children:[(0,b.jsx)("span",{children:a.label}),(0,b.jsx)(s,{status:a.status}),(0,b.jsx)("span",{style:{fontFamily:"var(--font-mono)",color:"var(--af-text-tertiary)",fontSize:11,minWidth:36,textAlign:"right"},children:a.agentMin>0?`${Math.round(a.agentMin)}m`:"—"}),(0,b.jsx)("span",{style:{fontFamily:"var(--font-mono)",color:"var(--af-text-tertiary)",fontSize:11,minWidth:42,textAlign:"right"},children:a.prs>0?`${a.prs} PR${1===a.prs?"":"s"}`:""})]},a.date))})]})}function s({status:a}){let c={generated:{bg:"rgba(72,187,120,0.12)",fg:"#48bb78",text:"✓"},pending:{bg:"rgba(237,137,54,0.12)",fg:"#ed8936",text:"•"},empty:{bg:"transparent",fg:"var(--af-text-tertiary)",text:"—"}}[a];return(0,b.jsx)("span",{style:{fontSize:10,fontWeight:600,padding:"1px 7px",borderRadius:99,background:c.bg,color:c.fg,minWidth:22,textAlign:"center"},children:c.text})}var t=a.i(67116),u=a.i(60511),v=a.i(76597),w=a.i(87067),x=a.i(71047);async function y({searchParams:a}){let i,{range:j}=await a,k="7d"===(i=Array.isArray(j)?j[0]:j)||"30d"===i||"90d"===i||"all"===i?i:"90d",l=function(a,b=Date.now()){if("all"===a)return;let c=new Date(b);return c.setHours(0,0,0,0),c.setDate(c.getDate()-(("7d"===a?7:"30d"===a?30:90)-1)),c.getTime()}(k),[m,n,o]=await Promise.all([(0,t.listSessions)(),(0,v.buildEntriesIndex)(),(0,v.listCachedDayDigests)()]),p=void 0===l?m:m.filter(a=>{if(!a.firstTimestamp)return!1;let b=Date.parse(a.firstTimestamp);return!Number.isNaN(b)&&b>=l}),s=(0,u.readTeamConnection)(),z=(()=>{let a=(0,c.dailyActivity)(m);if(void 0===l)return a;let b=(0,c.toLocalDay)(l);return a.filter(a=>a.date>=b)})(),A=z.reduce((a,b)=>a+b.airTimeMs,0),B=z.filter(a=>a.airTimeMs>0).length,C=new Map;for(let[a,b]of n.dayOutcome)C.set(a,{outcome:b,headline:null,helpfulness:null});for(let[a,b]of o){let c=C.get(a)??{outcome:b.outcome_day,headline:null,helpfulness:null};C.set(a,{outcome:c.outcome??b.outcome_day,headline:b.headline,helpfulness:b.helpfulness_day})}let D=(0,c.groupByProject)(p).sort((a,b)=>{let c=a.metrics.totalTokens.input+a.metrics.totalTokens.output+a.metrics.totalTokens.cacheRead+a.metrics.totalTokens.cacheWrite,d=b.metrics.totalTokens.input+b.metrics.totalTokens.output+b.metrics.totalTokens.cacheRead+b.metrics.totalTokens.cacheWrite;return d!==c?d-c:b.metrics.sessionCount-a.metrics.sessionCount}).slice(0,8),E=p.slice(0,6);return(0,b.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:28,maxWidth:1280,padding:"32px 40px"},children:[s.paired&&(0,b.jsx)(x.TeamWelcomeBanner,{teamName:s.team.name,pairedAt:s.member.pairedAt}),(0,b.jsxs)("header",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:18,flexWrap:"wrap"},children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{style:{fontSize:26,fontWeight:700,letterSpacing:"-0.02em",margin:0},children:"Overview"}),(0,b.jsxs)("p",{style:{fontSize:13,color:"var(--af-text-secondary)",marginTop:4},children:[p.length," of ",m.length," session",1===m.length?"":"s"," across"," ",(()=>{let a=new Map;for(let b of m){let c=b.agent??"claude-code";a.set(c,(a.get(c)??0)+1)}let b=d.agentMetadata.map(b=>{let c=a.get(b.kind)??0;return c>0?`${c} ${b.displayName}`:null}).filter(a=>null!==a);return b.length?b.join(" + "):"no observed agents yet"})(),"."]})]}),(0,b.jsx)(f.DateRangeFilter,{current:k})]}),(0,b.jsx)(q,{}),(0,b.jsx)(e.DashboardView,{sessions:p,daySummaries:C,override:{activeTimeMs:A,activeDayCount:B}}),(0,b.jsxs)("section",{style:{display:"grid",gridTemplateColumns:"minmax(260px, 1fr) minmax(260px, 1.4fr) minmax(260px, 1fr)",gap:16},children:[(0,b.jsxs)("div",{className:"af-panel",children:[(0,b.jsxs)("div",{className:"af-panel-header",children:[(0,b.jsx)("span",{children:"Top projects"}),(0,b.jsx)("span",{style:{fontSize:11,color:"var(--af-text-tertiary)",fontWeight:400},children:"by total tokens"}),(0,b.jsx)(h.default,{href:"/projects",style:{fontSize:11,color:"var(--af-accent)",marginLeft:"auto"},children:"View all →"})]}),(0,b.jsx)("div",{children:0===D.length?(0,b.jsx)("div",{className:"af-empty",children:"No projects yet."}):D.map(a=>{let c=a.metrics.totalTokens.input+a.metrics.totalTokens.output+a.metrics.totalTokens.cacheRead+a.metrics.totalTokens.cacheWrite;return(0,b.jsxs)(h.default,{href:`/projects/${encodeURIComponent(a.projectDir)}`,style:{display:"grid",gridTemplateColumns:"1fr auto auto auto",gap:14,padding:"10px 18px",fontSize:12,borderBottom:"1px solid var(--af-border-subtle)",alignItems:"center"},children:[(0,b.jsx)("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:"var(--af-text)"},title:a.projectName,children:(0,w.prettyProjectName)(a.projectName)}),(0,b.jsxs)("div",{style:{fontSize:10,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)",minWidth:64,textAlign:"right"},children:[a.sessions.length," sess"]}),(0,b.jsx)("div",{style:{fontSize:10,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)",minWidth:52,textAlign:"right"},title:`${c.toLocaleString()} tokens`,children:(0,w.formatTokens)(c)}),(0,b.jsx)("div",{style:{fontSize:10,color:"var(--af-text-tertiary)",minWidth:56,textAlign:"right"},suppressHydrationWarning:!0,children:a.lastActiveMs?(0,w.formatRelative)(new Date(a.lastActiveMs).toISOString()):"—"})]},a.projectDir)})})]}),(0,b.jsxs)("div",{className:"af-panel",children:[(0,b.jsxs)("div",{className:"af-panel-header",children:[(0,b.jsx)("span",{children:"Recent sessions"}),(0,b.jsx)(h.default,{href:"/sessions",style:{fontSize:11,color:"var(--af-accent)",marginLeft:"auto"},children:"View all →"})]}),(0,b.jsx)("div",{children:0===E.length?(0,b.jsx)("div",{className:"af-empty",children:"No sessions found from any registered agent source."}):E.map(a=>(0,b.jsxs)(h.default,{href:`/sessions/${a.id}`,style:{display:"grid",gridTemplateColumns:"1fr auto auto",gap:12,padding:"10px 18px",fontSize:12,borderBottom:"1px solid var(--af-border-subtle)",alignItems:"center"},children:[(0,b.jsxs)("div",{style:{minWidth:0},children:[(0,b.jsxs)("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:"var(--af-text)",display:"flex",alignItems:"center",gap:6},children:[(0,b.jsx)(g.LiveBadge,{mtimeIso:a.lastTimestamp}),(0,b.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.firstUserPreview||(0,b.jsx)("em",{style:{color:"var(--af-text-tertiary)"},children:"(no user message)"})})]}),(0,b.jsx)("div",{style:{fontSize:10,color:"var(--af-text-tertiary)",marginTop:2,fontFamily:"var(--font-mono)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:(0,w.prettyProjectName)(a.projectName)})]}),(0,b.jsx)("div",{style:{fontSize:10,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)",textAlign:"right",minWidth:54},title:"Agent time (filters out idle gaps)",children:(0,w.formatDuration)(a.airTimeMs??a.durationMs)}),(0,b.jsx)("div",{style:{fontSize:10,color:"var(--af-text-tertiary)",textAlign:"right",minWidth:54},children:a.firstTimestamp?(0,w.formatRelative)(a.firstTimestamp):"—"})]},`${a.projectDir}/${a.id}`))})]}),(0,b.jsx)(r,{})]})]})}a.s(["default",0,y,"dynamic",0,"force-dynamic"],77739)},67303,a=>{a.n(a.i(77739))}];
2
2
 
3
3
  //# sourceMappingURL=apps_web_0.mu7c7._.js.map
@@ -0,0 +1,3 @@
1
+ module.exports=[99850,(a,b,c)=>{}];
2
+
3
+ //# sourceMappingURL=apps_web__next-internal_server_app_print_%5Bkey%5D_page_actions_0_ygul-.js.map
@@ -0,0 +1,6 @@
1
+ module.exports=[893,a=>{"use strict";var b=a.i(87924),c=a.i(72131);let d=(0,a.i(70106).default)("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);a.s(["ExportPdfButton",0,function({digestKey:a}){let[e,f]=(0,c.useState)("idle"),[g,h]=(0,c.useState)(null);async function i(){f("loading"),h(null);try{var b,c;let d,e,g=await fetch(`/api/pdf/${a}`,{method:"POST"});if(!g.ok){let a=await g.json().catch(()=>({error:`HTTP ${g.status}`}));throw Error(a.error??`HTTP ${g.status}`)}let h=await g.blob(),i=function(a){if(!a)return null;let b=/filename="([^"]+)"/.exec(a)??/filename=([^;]+)/.exec(a);return b?b[1].trim():null}(g.headers.get("content-disposition"))??`fleetlens-${a}.pdf`;b=h,c=i,d=URL.createObjectURL(b),(e=document.createElement("a")).href=d,e.download=c,document.body.appendChild(e),e.click(),e.remove(),setTimeout(()=>URL.revokeObjectURL(d),1e3),f("idle")}catch(a){h(a instanceof Error?a.message:String(a)),f("error")}}let j="loading"===e;return(0,b.jsx)("span",{style:{display:"inline-flex",alignItems:"center",gap:6},children:(0,b.jsxs)("button",{onClick:i,disabled:j,title:g??"Download as PDF",style:{padding:"2px 8px",background:"transparent",border:"1px solid var(--af-border-subtle)",borderRadius:4,fontSize:10,color:"error"===e?"#f56565":"var(--af-text-secondary)",cursor:j?"default":"pointer",opacity:j?.6:1,display:"inline-flex",alignItems:"center",gap:4},children:[(0,b.jsx)(d,{size:11}),"loading"===e?"Exporting…":"error"===e?"Retry PDF":"PDF"]})})}],893)},85041,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(62684),e=a.i(893);function f({monday:a,isStreaming:c,aiEnabled:d,progress:e,onGenerate:g}){let h=new Date(`${a}T12:00:00`),i=new Date(h);i.setDate(h.getDate()+6);let j=a=>a.toLocaleDateString("en-US",{month:"short",day:"numeric"}),k=`${j(h)} — ${j(i)}`;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 ${k} 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 ${k}.`:`Enable AI features in Settings to synthesize a weekly narrative for ${k}. Deterministic stats are still available below in the live digest as soon as data lands.`}),d&&(0,b.jsx)("button",{onClick:g,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:g,aiEnabled:h,autoFire:i=!1,prior:j}){var k,l;let[m,n]=(0,c.useState)(a),[o,p]=(0,c.useState)("idle"),[q,r]=(0,c.useState)(""),s=(0,c.useRef)(!1),t=(0,c.useCallback)(async(a=!1)=>{p("streaming"),r("Starting...");let b=`/api/digest/week/${g}${a?"?force=1":""}`,c=await fetch(b,{method:"POST"});if(!c.ok||!c.body){p("error"),r(`Error ${c.status}`);return}let d=c.body.getReader(),e=new TextDecoder,f="";for(;;){let{done:a,value:b}=await d.read();if(a)break;let c=(f+=e.decode(b,{stream:!0})).split("\n\n");for(let a of(f=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)r(a.text);else if("dependency"===a.type)r(`${"day"===a.kind?"Day":"Week"} ${a.key} ${a.status}`);else if("entry"===a.type)r(`Enriching ${a.index}/${a.total}...`);else if("progress"===a.type){let b=Math.round(a.elapsed_ms/1e3);r(`Claude composing… ${a.bytes.toLocaleString()} chars (${b}s)`)}else if("digest"===a.type)a.digest&&"week"===a.digest.scope&&n(a.digest),r("Rendering...");else if("saved"===a.type)r("Saved.");else if("error"===a.type){p("error"),r(a.message);return}}catch{}}}p("done"),r("")},[g]);(0,c.useEffect)(()=>{i&&!s.current&&"idle"===o&&(s.current=!0,t(!1))},[i,o,t]);let u="streaming"===o,v=!!m?.headline,w=m?(0,b.jsx)(e.ExportPdfButton,{digestKey:`week-${g}`}):null,x=null;return(!v&&h?x=(0,b.jsx)("button",{onClick:()=>t(!1),disabled:u,style:{padding:"4px 10px",background:"var(--af-accent)",color:"white",border:"none",borderRadius:5,cursor:(k=u)?"default":"pointer",fontSize:11,fontWeight:600,opacity:k?.6:1},children:u?"Generating...":m?"Generate":"Generate digest"}):h&&(x=(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:()=>t(!0),disabled:u,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:(l=u)?"default":"pointer",opacity:l?.6:1},children:u?"...":"Re-roll"})]})),q&&(x=(0,b.jsxs)(b.Fragment,{children:[x,(0,b.jsx)("span",{style:{fontSize:10,color:"var(--af-text-tertiary)"},children:q})]})),w&&(x=(0,b.jsxs)(b.Fragment,{children:[x,w]})),m)?(0,b.jsx)(d.WeekDigest,{digest:m,aiEnabled:h,actions:x,priorDigest:j??null}):(0,b.jsx)(f,{monday:g,isStreaming:u,aiEnabled:h,progress:q,onGenerate:()=>t(!1)})}])},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_01d-iwx._.js.map
@@ -0,0 +1,3 @@
1
+ module.exports=[62684,a=>{"use strict";var b=a.i(87924),c=a.i(38246),d=a.i(72131),e=a.i(33441),f=a.i(5151);a.i(99417);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),l=a.i(99309);let m={essential:"#48bb78",helpful:"#4299e1",neutral:"#a0aec0",unhelpful:"#f56565"},n=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],o={"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"},p={"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"},q={outlier:"Outlier","novel-use":"Novel use","user-built-tool":"User-built tool","cross-week-contrast":"Cross-week contrast"},r={"claude-md":"CLAUDE.md addition",skill:"Skill to build",hook:"Hook to wire",harness:"Harness extension",decision:"Decision to make"};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 d=a.agent_min_total/60,e=d>=1?`${d.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,d)=>{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)(c.default,{href:a.href,style:{textDecoration:"none"},children:e},d):(0,b.jsx)("div",{children:e},d)})})}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 d=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=d>0&&h>0?Math.max(8,h/d*100):0,j=g?y[g.outcome_day]:"var(--af-text-tertiary)",k=g?.helpfulness_day?m[g.helpfulness_day]:null;return(0,b.jsxs)(c.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&&p[g.dominant_shape]&&(0,b.jsx)("div",{title:`${o[g.dominant_shape]??g.dominant_shape}`,style:{position:"absolute",top:0,left:0,right:0,height:3,background:p[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:n[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 d=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 d||e||g?(0,b.jsxs)(K,{title:"Through the week",anchor:"through-the-week",children:[(d||e)&&(0,b.jsxs)("div",{style:{display:"grid",gridTemplateColumns:d&&e?"minmax(0, 1.4fr) minmax(0, 1fr)":"1fr",gap:28,marginBottom:22*!!g},children:[d&&(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)(c.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)(c.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)(c.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:c}){let[g,h]=(0,d.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:c}),(0,b.jsx)("button",{type:"button",onClick:async()=>{try{await navigator.clipboard.writeText(c),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,d.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,d)=>(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)(c.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})]},d))}),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:d}){let e=H(a.anchor);return(0,b.jsxs)("li",{style:{padding:"12px 14px",borderRadius:10,background:`color-mix(in srgb, ${d} 6%, var(--af-surface))`,border:`1px solid color-mix(in srgb, ${d} 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:d,padding:"1px 7px",borderRadius:999,background:`color-mix(in srgb, ${d} 14%, transparent)`,border:`1px solid color-mix(in srgb, ${d} 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, ${d} 50%, transparent)`,display:"flex",gap:8,alignItems:"flex-start"},children:[(0,b.jsxs)(c.default,{href:`/digest/${a.evidence.date}`,style:{fontSize:10,fontWeight:600,color:d,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," "):o[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,d)=>{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:q[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)(c.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:"”"})]})]})]},d)})})}):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,d)=>{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:r[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)(c.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?"…":"","”"]})]},d)})})}):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 d=a.working_shape?o[a.working_shape]??a.working_shape:null,e=a.working_shape?p[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)(c.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.jsx)(l.AgentBadge,{agent:a.agent}),(0,b.jsxs)(c.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"]}),d&&(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:d}),"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`}a.s(["WeekDigest",0,function({digest:a,aiEnabled:d,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),r=a.agent_min_total/60,u=r>=1?`${r.toFixed(1)}h`:`${Math.round(a.agent_min_total)}m`,v=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:[u," agent time · ",q," active day",1===q?"":"s"," · ",p," PR",1===p?"":"s"]}),v&&(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: ",v]}),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:d?"No narrative yet.":`Worked ${u} 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)})]}),!d&&(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)(c.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})]})}],62684)}];
2
+
3
+ //# sourceMappingURL=apps_web_components_week-digest_tsx_0c9ha31._.js.map