fleetlens 0.2.9 → 0.3.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 (88) hide show
  1. package/app/apps/web/.next/BUILD_ID +1 -1
  2. package/app/apps/web/.next/build-manifest.json +3 -3
  3. package/app/apps/web/.next/prerender-manifest.json +3 -3
  4. package/app/apps/web/.next/server/app/_global-error.html +1 -1
  5. package/app/apps/web/.next/server/app/_global-error.rsc +1 -1
  6. package/app/apps/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  7. package/app/apps/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  8. package/app/apps/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  9. package/app/apps/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  10. package/app/apps/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  11. package/app/apps/web/.next/server/app/_not-found/page.js +1 -1
  12. package/app/apps/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  13. package/app/apps/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  14. package/app/apps/web/.next/server/app/page.js +3 -3
  15. package/app/apps/web/.next/server/app/page.js.nft.json +1 -1
  16. package/app/apps/web/.next/server/app/page_client-reference-manifest.js +1 -1
  17. package/app/apps/web/.next/server/app/parallelism/page.js +1 -1
  18. package/app/apps/web/.next/server/app/parallelism/page.js.nft.json +1 -1
  19. package/app/apps/web/.next/server/app/parallelism/page_client-reference-manifest.js +1 -1
  20. package/app/apps/web/.next/server/app/projects/[slug]/page.js +3 -3
  21. package/app/apps/web/.next/server/app/projects/[slug]/page.js.nft.json +1 -1
  22. package/app/apps/web/.next/server/app/projects/[slug]/page_client-reference-manifest.js +1 -1
  23. package/app/apps/web/.next/server/app/projects/page.js +1 -1
  24. package/app/apps/web/.next/server/app/projects/page.js.nft.json +1 -1
  25. package/app/apps/web/.next/server/app/projects/page_client-reference-manifest.js +1 -1
  26. package/app/apps/web/.next/server/app/sessions/[id]/page.js +3 -2
  27. package/app/apps/web/.next/server/app/sessions/[id]/page.js.nft.json +1 -1
  28. package/app/apps/web/.next/server/app/sessions/[id]/page_client-reference-manifest.js +1 -1
  29. package/app/apps/web/.next/server/app/sessions/page.js +1 -1
  30. package/app/apps/web/.next/server/app/sessions/page.js.nft.json +1 -1
  31. package/app/apps/web/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  32. package/app/apps/web/.next/server/app/usage/page.js +1 -1
  33. package/app/apps/web/.next/server/app/usage/page.js.nft.json +1 -1
  34. package/app/apps/web/.next/server/app/usage/page_client-reference-manifest.js +1 -1
  35. package/app/apps/web/.next/server/chunks/[root-of-the-server]__0op9af~._.js +1 -1
  36. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__00z7zlm._.js +3 -0
  37. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__05lbtny._.js +12 -0
  38. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0ms7h0~._.js +1 -1
  39. package/app/apps/web/.next/server/chunks/ssr/{[root-of-the-server]__08cr2u9._.js → [root-of-the-server]__0p~g4m6._.js} +2 -2
  40. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0w52fbc._.js +1 -1
  41. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0wvzyl7._.js +3 -0
  42. package/app/apps/web/.next/server/chunks/ssr/_09n75_5._.js +1 -1
  43. package/app/apps/web/.next/server/chunks/ssr/_0ph19-k._.js +12 -0
  44. package/app/apps/web/.next/server/chunks/ssr/_0u29mdd._.js +3 -0
  45. package/app/apps/web/.next/server/chunks/ssr/_0xies90._.js +1 -1
  46. package/app/apps/web/.next/server/chunks/ssr/apps_web_components_06j3c.0._.js +1 -1
  47. package/app/apps/web/.next/server/chunks/ssr/packages_parser_dist_0-jvt~a._.js +1 -1
  48. package/app/apps/web/.next/server/chunks/ssr/packages_parser_dist_analytics_0k4dgst.js +1 -1
  49. package/app/apps/web/.next/server/middleware-build-manifest.js +3 -3
  50. package/app/apps/web/.next/server/pages/500.html +1 -1
  51. package/app/apps/web/.next/server/server-reference-manifest.js +1 -1
  52. package/app/apps/web/.next/server/server-reference-manifest.json +1 -1
  53. package/app/apps/web/.next/static/chunks/03.mv4y4.w-vb.js +6 -0
  54. package/app/apps/web/.next/static/chunks/08983lz4~hffx.js +6 -0
  55. package/app/apps/web/.next/static/chunks/0fc6dk2qtokwh.js +1 -0
  56. package/app/apps/web/.next/static/chunks/0p1lpoh02zh8h.js +10 -0
  57. package/app/apps/web/.next/static/chunks/{03fw7f2obcvq~.js → 14q3xsfpkvuef.js} +2 -2
  58. package/app/apps/web/app/layout.tsx +2 -0
  59. package/app/apps/web/app/projects/[slug]/page.tsx +2 -0
  60. package/app/apps/web/app/sessions/[id]/page.tsx +27 -1
  61. package/app/apps/web/app/sessions/[id]/session-view.tsx +372 -793
  62. package/app/apps/web/app/sessions/[id]/team-tab/adapter.ts +633 -0
  63. package/app/apps/web/app/sessions/[id]/team-tab/format.ts +20 -0
  64. package/app/apps/web/app/sessions/[id]/team-tab/team-minimap.tsx +682 -0
  65. package/app/apps/web/app/sessions/[id]/team-tab/team-tab-client.tsx +78 -0
  66. package/app/apps/web/app/sessions/[id]/team-tab/team-table.tsx +796 -0
  67. package/app/apps/web/app/sessions/[id]/team-tab/turn-drawer.tsx +805 -0
  68. package/app/apps/web/app/sessions/[id]/tool-cards.tsx +461 -0
  69. package/app/apps/web/app/sessions/[id]/turn-steps.tsx +306 -0
  70. package/app/apps/web/app/sessions/sessions-grid.tsx +36 -5
  71. package/app/apps/web/components/live-sessions-widget.tsx +20 -6
  72. package/app/apps/web/components/team-badge.tsx +90 -0
  73. package/app/apps/web/package.json +1 -1
  74. package/app/apps/web/tsconfig.tsbuildinfo +1 -1
  75. package/dist/index.js +71 -13
  76. package/package.json +1 -1
  77. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0b..h_8._.js +0 -3
  78. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0cdd~8n._.js +0 -3
  79. package/app/apps/web/.next/server/chunks/ssr/[root-of-the-server]__0~a~v00._.js +0 -3
  80. package/app/apps/web/.next/server/chunks/ssr/_0zv~jv-._.js +0 -12
  81. package/app/apps/web/.next/server/chunks/ssr/_12dtryh._.js +0 -12
  82. package/app/apps/web/.next/static/chunks/07oyxajlp3dvb.js +0 -6
  83. package/app/apps/web/.next/static/chunks/0a24elrqoqqep.js +0 -10
  84. package/app/apps/web/.next/static/chunks/0i4zodv86~~~i.js +0 -1
  85. package/app/apps/web/.next/static/chunks/0rbm60-qyshdm.js +0 -6
  86. /package/app/apps/web/.next/static/{2rEsiJssG30QsuNT0Lp9S → 0fPDRTdMQ-Y62h6fHNJXL}/_buildManifest.js +0 -0
  87. /package/app/apps/web/.next/static/{2rEsiJssG30QsuNT0Lp9S → 0fPDRTdMQ-Y62h6fHNJXL}/_clientMiddlewareManifest.js +0 -0
  88. /package/app/apps/web/.next/static/{2rEsiJssG30QsuNT0Lp9S → 0fPDRTdMQ-Y62h6fHNJXL}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,98572,e=>{"use strict";let t=/gh\s+pr\s+create\b/i,r=/#(\d+)/,s=/--title\s+["']([^"']+)["']/;e.s(["canonicalProjectName",0,function(e){let t=e.lastIndexOf("/.worktrees/");return t>=0?e.slice(0,t):e},"detectPrMarkers",0,function(e){let n=[],a=e.durationMs??0;for(let i of e.events){if("tool-call"!==i.role||"Bash"!==i.toolName)continue;let o=i.blocks.find(e=>e&&"type"in e&&"tool_use"===e.type);if(!o||"tool_use"!==o.type)continue;let l=o.input,d="string"==typeof l?.command?l.command:"";if(!t.test(d))continue;let c=d.match(s),p=d.match(r);n.push({sessionId:e.id,timestamp:i.timestamp??e.firstTimestamp??"",tOffsetMs:i.tOffsetMs,positionInSession:a>0&&void 0!==i.tOffsetMs?Math.min(1,Math.max(0,i.tOffsetMs/a)):void 0,command:d.slice(0,300),prNumber:p?Number(p[1]):void 0,title:c?.[1]})}return n}])},46633,e=>{"use strict";var t=e.i(18050),r=e.i(22016),s=e.i(71645),n=e.i(98572),a=e.i(56324);let i=["rgba(45, 212, 191, 0.75)","rgba(167, 139, 250, 0.75)","rgba(248, 113, 113, 0.75)","rgba(52, 211, 153, 0.75)","rgba(251, 191, 36, 0.75)","rgba(236, 72, 153, 0.75)","rgba(34, 211, 238, 0.75)","rgba(168, 85, 247, 0.75)","rgba(244, 114, 82, 0.75)","rgba(96, 165, 250, 0.75)"];function o(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r)|0;return i[Math.abs(t)%i.length]}function l(e){return o((0,n.canonicalProjectName)(e.projectName))}function d(e){return e.replace(/<[^>]+>/g,"").replace(/\s+/g," ").trim()}function c(e){let t=new Date(e);return`${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`}function p({onClose:e}){return(0,s.useEffect)(()=>{let t=t=>{"Escape"===t.key&&e()};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[e]),(0,t.jsx)("div",{role:"dialog","aria-modal":"true","aria-labelledby":"concurrency-modal-title",onClick:e,style:{position:"fixed",inset:0,zIndex:200,background:"rgba(0, 0, 0, 0.5)",backdropFilter:"blur(4px)",WebkitBackdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",padding:20},children:(0,t.jsxs)("div",{onClick:e=>e.stopPropagation(),style:{background:"var(--af-surface-elevated)",border:"1px solid var(--af-border-subtle)",borderRadius:12,maxWidth:560,width:"100%",maxHeight:"85vh",overflow:"auto",boxShadow:"0 16px 48px rgba(0, 0, 0, 0.3)"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"18px 22px",borderBottom:"1px solid var(--af-border-subtle)"},children:[(0,t.jsx)("h2",{id:"concurrency-modal-title",style:{margin:0,fontSize:16,fontWeight:700,letterSpacing:"-0.01em"},children:"How concurrency is measured"}),(0,t.jsx)("button",{type:"button",onClick:e,"aria-label":"Close",style:{background:"transparent",border:"none",color:"var(--af-text-tertiary)",fontSize:22,lineHeight:1,cursor:"pointer",padding:0,width:28,height:28},children:"×"})]}),(0,t.jsxs)("div",{style:{padding:"18px 22px",fontSize:13,color:"var(--af-text-secondary)",lineHeight:1.55},children:[(0,t.jsxs)("p",{style:{margin:"0 0 14px"},children:["A ",(0,t.jsx)("strong",{style:{color:"var(--af-text)"},children:"concurrency burst"})," ","is a window of time when two or more Claude Code sessions were actively working in parallel. The goal is to surface moments when you were running a multi-agent fleet — not every accidental tab overlap."]}),(0,t.jsx)("h3",{style:{margin:"18px 0 8px",fontSize:12,fontWeight:700,color:"var(--af-text)",textTransform:"uppercase",letterSpacing:"0.04em"},children:'1. What counts as "active"'}),(0,t.jsxs)("p",{style:{margin:"0 0 6px"},children:["Each session's events are split into"," ",(0,t.jsx)("strong",{style:{color:"var(--af-text)"},children:"active segments"})," — stretches of time where no gap between consecutive events exceeds"," ",(0,t.jsx)("strong",{style:{color:"var(--af-text)"},children:"3 minutes"}),". Any longer gap (walked away, laptop closed, thinking) splits the session into separate segments."]}),(0,t.jsx)("p",{style:{margin:"0 0 6px",fontSize:12,color:"var(--af-text-tertiary)"},children:'This is the same definition used for the "active time" metric on the dashboard, so numbers stay consistent.'}),(0,t.jsx)("h3",{style:{margin:"18px 0 8px",fontSize:12,fontWeight:700,color:"var(--af-text)",textTransform:"uppercase",letterSpacing:"0.04em"},children:"2. Detecting overlap"}),(0,t.jsxs)("p",{style:{margin:"0 0 6px"},children:["A sweep-line walks every segment start/end across all sessions. Whenever the active count is ≥2, that stretch becomes a raw overlap. The ",(0,t.jsx)("strong",{style:{color:"var(--af-text)"},children:"peak"})," ","reported on each burst is the maximum active count reached anywhere inside it."]}),(0,t.jsx)("h3",{style:{margin:"18px 0 8px",fontSize:12,fontWeight:700,color:"var(--af-text)",textTransform:"uppercase",letterSpacing:"0.04em"},children:"3. Cleaning up noise"}),(0,t.jsx)("p",{style:{margin:"0 0 6px"},children:"Raw overlaps are noisy — a typical day produces dozens of sub-minute artifacts from switching between sessions. Two rules collapse them into human-readable bursts:"}),(0,t.jsxs)("ul",{style:{margin:"6px 0 0 0",paddingLeft:22},children:[(0,t.jsxs)("li",{style:{marginBottom:4},children:[(0,t.jsx)("strong",{style:{color:"var(--af-text)"},children:"Drop under 1 minute"})," — overlaps shorter than that are almost always tab-switch artifacts, not real parallel work."]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{style:{color:"var(--af-text)"},children:"Merge within 10 minutes"})," — two overlaps separated by less than 10 minutes of idle time fuse into a single burst. A morning of back-and-forth agent work becomes one burst, not forty."]})]}),(0,t.jsx)("h3",{style:{margin:"18px 0 8px",fontSize:12,fontWeight:700,color:"var(--af-text)",textTransform:"uppercase",letterSpacing:"0.04em"},children:"4. Same-project vs cross-project"}),(0,t.jsxs)("p",{style:{margin:"0 0 6px"},children:["Bursts are colored by whether the involved sessions span more than one project directory."," ",(0,t.jsx)("span",{style:{color:"rgba(167, 139, 250, 1)",fontWeight:600},children:"Purple = cross-project"})," ","— different repos running at once, usually genuine fleet work."," ",(0,t.jsx)("span",{style:{color:"rgba(45, 212, 191, 1)",fontWeight:600},children:"Teal = same-project"})," ","— multiple sessions in one repo, usually context-switching inside a single task."]}),(0,t.jsx)("h3",{style:{margin:"18px 0 8px",fontSize:12,fontWeight:700,color:"var(--af-text)",textTransform:"uppercase",letterSpacing:"0.04em"},children:"Why bursts, not runs"}),(0,t.jsx)("p",{style:{margin:"0 0 6px"},children:'An earlier version reported every raw overlap as a separate "parallel run". On a busy day that produced 40–80 entries, most of them seconds long, most of them meaningless. Bursts are the unit humans actually think in: "this morning I was running 3 agents at once for about 20 minutes."'})]})]})})}function x({burst:e,gantt:n,onClose:i,onShowInTimeline:o}){(0,s.useEffect)(()=>{let e=e=>{"Escape"===e.key&&i()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[i]);let[p,f]=(0,s.useState)(null),h=(0,s.useRef)(new Map),u=(0,s.useMemo)(()=>{let e=new Map;for(let t of n.sessions)e.set(t.id,t);return e},[n]),g=e.sessionIds.map(e=>u.get(e)).filter(e=>!!e);g.sort((e,t)=>e.startMs-t.startMs);let y=e=>{f(e);let t=h.current.get(e);t&&t.scrollIntoView({behavior:"smooth",block:"center"})},m=Math.min(e.startMs,...g.map(e=>e.startMs)),v=Math.max(e.endMs,...g.map(e=>e.endMs)),b=m-9e5,j=v+9e5,w=j-b,S=22+(25*g.length-3)+6,k=e=>(e-b)/w*510,M=[];{let e=new Date(b);for(e.setMinutes(0,0,0),e.getTime()<b&&e.setHours(e.getHours()+1);e.getTime()<=j;)M.push(e.getTime()),e.setHours(e.getHours()+1)}let z=k(e.startMs),T=k(e.endMs),W=e.endMs-e.startMs;return(0,t.jsx)("div",{role:"dialog","aria-modal":"true","aria-labelledby":"burst-detail-title",onClick:i,style:{position:"fixed",inset:0,zIndex:200,background:"rgba(0, 0, 0, 0.55)",backdropFilter:"blur(4px)",WebkitBackdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center",padding:20},children:(0,t.jsxs)("div",{onClick:e=>e.stopPropagation(),style:{background:"var(--af-surface-elevated)",border:"1px solid var(--af-border-subtle)",borderRadius:12,width:"min(720px, 100%)",maxHeight:"90vh",display:"flex",flexDirection:"column",boxShadow:"0 20px 60px rgba(0, 0, 0, 0.4)"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:14,padding:"16px 22px",borderBottom:"1px solid var(--af-border-subtle)"},children:[(0,t.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:4},children:[(0,t.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",padding:"3px 10px",borderRadius:10,fontFamily:"var(--font-mono)",fontSize:11,fontWeight:700,color:"white",background:e.crossProject?"rgba(167, 139, 250, 0.95)":"rgba(45, 212, 191, 0.95)"},children:["×",e.peak," peak"]}),e.crossProject&&(0,t.jsx)("span",{style:{fontSize:9,color:"rgba(167, 139, 250, 1)",textTransform:"uppercase",letterSpacing:"0.05em",fontWeight:700},children:"cross-project"})]}),(0,t.jsxs)("h2",{id:"burst-detail-title",style:{margin:0,fontSize:16,fontWeight:700,letterSpacing:"-0.01em",display:"flex",alignItems:"center",gap:10,flexWrap:"wrap"},children:[(0,t.jsxs)("span",{style:{fontFamily:"var(--font-mono)"},children:[c(e.startMs),"–",c(e.endMs)]}),(0,t.jsx)("span",{style:{fontSize:12,fontWeight:400,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)"},children:(0,a.formatDuration)(W)}),(0,t.jsxs)("span",{style:{fontSize:12,fontWeight:400,color:"var(--af-text-tertiary)"},children:["· ",g.length," session",1===g.length?"":"s"]})]})]}),(0,t.jsx)("button",{type:"button",onClick:o,style:{padding:"6px 12px",background:"transparent",border:"1px solid var(--af-border-subtle)",borderRadius:6,fontSize:11,color:"var(--af-text-secondary)",cursor:"pointer",fontWeight:500,whiteSpace:"nowrap"},title:"Pin this burst on the main timeline and close",children:"Show in timeline →"}),(0,t.jsx)("button",{type:"button",onClick:i,"aria-label":"Close",style:{background:"transparent",border:"none",color:"var(--af-text-tertiary)",fontSize:24,lineHeight:1,cursor:"pointer",padding:0,width:28,height:28},children:"×"})]}),(0,t.jsxs)("div",{style:{overflow:"auto",padding:"18px 22px"},children:[(0,t.jsx)("div",{style:{fontSize:10,color:"var(--af-text-tertiary)",textTransform:"uppercase",letterSpacing:"0.05em",marginBottom:8,fontWeight:600},children:"Timeline (shaded = burst window)"}),(0,t.jsx)("div",{style:{background:"var(--af-surface)",border:"1px solid var(--af-border-subtle)",borderRadius:8,padding:"8px 10px",overflow:"auto"},children:(0,t.jsxs)("svg",{width:534,height:S,style:{display:"block"},children:[g.map((e,r)=>{let s=22+25*r+11,n=l(e),a=p===e.id;return(0,t.jsxs)("g",{onClick:()=>y(e.id),style:{cursor:"pointer"},children:[(0,t.jsx)("title",{children:`Track ${r+1} — click to focus in list below`}),(0,t.jsx)("circle",{cx:12,cy:s,r:9,fill:a?n:"var(--af-surface-elevated)",stroke:n,strokeWidth:a?2:1.5}),(0,t.jsx)("text",{x:12,y:s+3.5,textAnchor:"middle",fontSize:10,fontWeight:700,fill:a?"#fff":"var(--af-text)",style:{pointerEvents:"none"},children:r+1})]},`num-${e.id}`)}),(0,t.jsxs)("g",{transform:"translate(24, 0)",children:[(0,t.jsx)("rect",{x:z,y:0,width:Math.max(T-z,2),height:S,fill:e.crossProject?"rgba(167, 139, 250, 0.14)":"rgba(45, 212, 191, 0.14)"}),(0,t.jsx)("line",{x1:z,x2:z,y1:0,y2:S,stroke:e.crossProject?"rgba(167, 139, 250, 0.7)":"rgba(45, 212, 191, 0.7)",strokeWidth:1,strokeDasharray:"3 2"}),(0,t.jsx)("line",{x1:T,x2:T,y1:0,y2:S,stroke:e.crossProject?"rgba(167, 139, 250, 0.7)":"rgba(45, 212, 191, 0.7)",strokeWidth:1,strokeDasharray:"3 2"}),M.map(e=>{let r=k(e);return(0,t.jsxs)("g",{children:[(0,t.jsx)("line",{x1:r,x2:r,y1:22,y2:S,stroke:"var(--af-border-subtle)",strokeWidth:.5,strokeDasharray:"2 3"}),(0,t.jsx)("text",{x:r,y:16,textAnchor:"middle",fontSize:9,fill:"var(--af-text-tertiary)",children:c(e)})]},`mini-hm-${e}`)}),g.map((e,r)=>{let s=22+25*r,n=l(e),a=p===e.id;return(0,t.jsxs)("g",{children:[(0,t.jsx)("rect",{x:0,y:s,width:510,height:22,fill:a?"rgba(255,255,255,0.05)":"transparent",onClick:()=>y(e.id),style:{cursor:"pointer"}}),e.segments.map((e,r)=>{let i=k(e.startMs),o=Math.max(k(e.endMs)-i,2);return(0,t.jsx)("rect",{x:i,y:s+3,width:o,height:16,fill:n,rx:2,stroke:a?"var(--af-text)":"none",strokeWidth:+!!a,style:{pointerEvents:"none"}},`mini-seg-${r}`)})]},`mini-row-${e.id}`)})]})]})}),(0,t.jsx)("div",{style:{fontSize:10,color:"var(--af-text-tertiary)",textTransform:"uppercase",letterSpacing:"0.05em",margin:"18px 0 8px",fontWeight:600},children:"Sessions in this burst"}),(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:g.map((s,n)=>{let i,o,c=l(s),x=(t=>{let r=0;for(let s of t.segments){let t=Math.max(s.startMs,e.startMs),n=Math.min(s.endMs,e.endMs);n>t&&(r+=n-t)}return r})(s),f=W>0?Math.round(x/W*100):0,u=p===s.id;return(0,t.jsx)(r.default,{href:`/sessions/${s.id}`,ref:e=>{e?h.current.set(s.id,e):h.current.delete(s.id)},style:{display:"block",padding:"11px 14px",background:u?"var(--af-surface-hover)":"var(--af-surface)",border:u?"1px solid var(--af-text-tertiary)":"1px solid var(--af-border-subtle)",borderLeft:`3px solid ${c}`,borderRadius:8,textDecoration:"none",color:"var(--af-text)",fontSize:12,lineHeight:1.45,transition:"background 0.15s, border-color 0.15s",boxShadow:u?`0 0 0 2px ${c}`:"none"},children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:10},children:[(0,t.jsx)("span",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:20,height:20,borderRadius:"50%",background:u?c:"transparent",border:`1.5px solid ${c}`,color:u?"#fff":"var(--af-text)",fontSize:10,fontWeight:700,flexShrink:0,marginTop:2},"aria-label":`Track ${n+1}`,children:n+1}),(0,t.jsxs)("div",{style:{minWidth:0,flex:1},children:[(0,t.jsx)("div",{style:{fontSize:11,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)",marginBottom:3,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:(0,a.prettyProjectName)(s.projectName),children:(o=(i=(0,a.prettyProjectName)(s.projectName)).split("/").filter(Boolean)).length>2?"…/"+o.slice(-2).join("/"):i}),(0,t.jsx)("div",{style:{fontWeight:500,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:d(s.firstUserPreview??""),children:d(s.firstUserPreview??"")||(0,t.jsx)("em",{style:{color:"var(--af-text-tertiary)"},children:"(no user message)"})}),s.lastAgentPreview&&(0,t.jsxs)("div",{style:{fontSize:11,color:"var(--af-text-secondary)",marginTop:3,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontStyle:"italic"},title:d(s.lastAgentPreview),children:["↳ ",d(s.lastAgentPreview)]})]}),(0,t.jsxs)("div",{style:{fontFamily:"var(--font-mono)",fontSize:10,color:"var(--af-text-tertiary)",textAlign:"right",whiteSpace:"nowrap",flexShrink:0},children:[(0,t.jsxs)("div",{style:{color:"var(--af-text-secondary)"},children:[(0,a.formatDuration)(x)," ",(0,t.jsxs)("span",{style:{opacity:.6},children:["(",f,"%)"]})]}),(0,t.jsx)("div",{style:{fontSize:9,marginTop:2},children:"in burst"})]})]})},`burst-session-${s.id}`)})})]})]})})}e.s(["GanttChart",0,function({gantt:e,bursts:i=[]}){let[f,h]=(0,s.useState)(null),[u,g]=(0,s.useState)(null),[y,m]=(0,s.useState)(null),[v,b]=(0,s.useState)(!1),[j,w]=(0,s.useState)(null),[S,k]=(0,s.useState)(!1),M=(0,s.useRef)(null),z=y??u,T=(0,s.useMemo)(()=>{if(null===z)return null;let e=i[z];return e?new Set(e.sessionIds):null},[z,i]),W=(0,s.useMemo)(()=>{let t=new Map;for(let r of e.sessions){let e=(0,n.canonicalProjectName)(r.projectName),s=t.get(e);s?s.count++:t.set(e,{name:(0,a.prettyProjectName)(e),color:o(e),count:1})}return Array.from(t.values()).sort((e,t)=>t.count-e.count)},[e.sessions]),{rangeStartMs:C,rangeEndMs:$,hourMarks:I}=(0,s.useMemo)(()=>{if(0===e.sessions.length)return{rangeStartMs:e.dayStartMs,rangeEndMs:e.dayEndMs,hourMarks:[]};let t=1/0,r=-1/0;for(let s of e.sessions)for(let e of s.segments)e.startMs<t&&(t=e.startMs),e.endMs>r&&(r=e.endMs);let s=r+18e5,n=new Date(t-18e5);n.setMinutes(0,0,0);let a=new Date(s);a.setMinutes(0,0,0),a.setHours(a.getHours()+1);let i=Math.max(n.getTime(),e.dayStartMs),o=Math.min(a.getTime(),e.dayEndMs),l=[],d=new Date(i);for(d.setMinutes(0,0,0),d.getTime()<i&&d.setHours(d.getHours()+1);d.getTime()<=o;)l.push(d.getTime()),d.setHours(d.getHours()+1);return{rangeStartMs:i,rangeEndMs:o,hourMarks:l}},[e]),R=$-C,P=Math.max(700,Math.ceil(R/36e5*80)),D=33*e.sessions.length+3+8,B=e=>(e-C)/R*P,H="var(--af-surface)",N=S?i:i.slice(0,3),A=i.length-N.length;return(0,t.jsxs)(t.Fragment,{children:[i.length>0&&(0,t.jsxs)("div",{className:"af-panel",style:{marginBottom:16},children:[(0,t.jsxs)("div",{className:"af-panel-header",children:[(0,t.jsx)("span",{children:"Concurrency"}),(0,t.jsx)("span",{style:{fontSize:11,color:"var(--af-text-tertiary)",fontWeight:400},children:"periods when ≥2 agents were actively working at once"}),(0,t.jsxs)("button",{type:"button",onClick:()=>b(!0),"aria-label":"How concurrency is detected",style:{marginLeft:"auto",display:"inline-flex",alignItems:"center",gap:5,padding:"3px 9px",background:"transparent",border:"1px solid var(--af-border-subtle)",borderRadius:100,fontSize:10,color:"var(--af-text-tertiary)",cursor:"pointer",fontWeight:500},children:[(0,t.jsx)("span",{style:{fontSize:11,lineHeight:1},children:"ⓘ"}),"How this is measured"]})]}),(0,t.jsxs)("div",{children:[N.map((r,s)=>{let n=y===s,i=u===s,o=r.projectDirs.map(t=>{let r=e.sessions.find(e=>e.projectDir===t);return r?(0,a.prettyProjectName)(r.projectName):t}).map(e=>{let t=e.split("/").filter(Boolean);return t.length>2?"…/"+t.slice(-2).join("/"):e});return(0,t.jsxs)("div",{onMouseEnter:()=>g(s),onMouseLeave:()=>g(null),onClick:()=>w(s),style:{display:"grid",gridTemplateColumns:"auto auto auto 1fr auto",gap:14,padding:"10px 18px",fontSize:12,borderBottom:"1px solid var(--af-border-subtle)",cursor:"pointer",background:n||i?"var(--af-surface-hover)":"transparent",alignItems:"center",transition:"background 0.12s"},title:"Open burst detail",children:[(0,t.jsxs)("span",{style:{fontFamily:"var(--font-mono)",fontSize:11,color:"var(--af-text-secondary)",minWidth:110},children:[c(r.startMs),"–",c(r.endMs)]}),(0,t.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",padding:"2px 8px",borderRadius:10,fontFamily:"var(--font-mono)",fontSize:10,fontWeight:700,color:"white",background:r.crossProject?"rgba(167, 139, 250, 0.9)":"rgba(45, 212, 191, 0.9)",minWidth:28,justifyContent:"center"},children:["×",r.peak]}),r.crossProject?(0,t.jsx)("span",{style:{fontSize:9,color:"rgba(167, 139, 250, 1)",textTransform:"uppercase",letterSpacing:"0.04em",fontWeight:600},children:"cross-project"}):(0,t.jsx)("span",{}),(0,t.jsx)("span",{style:{fontSize:11,color:"var(--af-text-tertiary)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:o.join(", "),children:o.join(" · ")}),(0,t.jsx)("span",{style:{fontFamily:"var(--font-mono)",fontSize:11,color:"var(--af-text-secondary)",minWidth:60,textAlign:"right"},children:(0,a.formatDuration)(r.endMs-r.startMs)})]},`burst-row-${s}`)}),i.length>3&&(0,t.jsx)("button",{type:"button",onClick:()=>k(e=>!e),style:{width:"100%",padding:"10px 18px",background:"transparent",border:"none",borderTop:"1px solid var(--af-border-subtle)",fontSize:11,color:"var(--af-text-secondary)",cursor:"pointer",fontWeight:500,textAlign:"center"},children:S?"Show fewer (first 3) ↑":`Show all ${i.length} bursts (+${A} more) ↓`})]})]}),(0,t.jsxs)("div",{className:"af-panel",style:{overflow:"hidden"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:14,padding:"10px 16px",borderBottom:"1px solid var(--af-border-subtle)",fontSize:11,color:"var(--af-text-secondary)",flexWrap:"wrap"},children:[W.map(e=>{let r=e.name.split("/").filter(Boolean),s=r.length>2?"…/"+r.slice(-2).join("/"):e.name;return(0,t.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:5,cursor:"default"},title:`${e.name} — ${e.count} session${1===e.count?"":"s"} on this day`,children:[(0,t.jsx)("span",{style:{width:8,height:8,borderRadius:2,background:e.color,flexShrink:0}}),(0,t.jsx)("span",{style:{maxWidth:160,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:s}),(0,t.jsxs)("span",{style:{color:"var(--af-text-tertiary)",fontSize:10},children:["(",e.count,")"]})]},e.name)}),(0,t.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:5,marginLeft:8,color:"var(--af-text-tertiary)",cursor:"default"},title:"Idle gap — the session was open but the agent was not actively working (gap > 3 minutes between events)",children:[(0,t.jsx)("span",{style:{width:16,height:8,borderRadius:2,background:"repeating-linear-gradient(45deg, var(--af-surface-hover), var(--af-surface-hover) 2px, var(--af-border-subtle) 2px, var(--af-border-subtle) 4px)",flexShrink:0}}),"idle"]})]}),(0,t.jsxs)("div",{ref:M,style:{overflow:"auto",maxHeight:"calc(100vh - 240px)",position:"relative"},onMouseLeave:()=>h(null),children:[(0,t.jsxs)("div",{style:{display:"grid",gridTemplateColumns:`220px ${P}px`,gridTemplateRows:`50px ${D}px`,width:220+P},children:[(0,t.jsxs)("div",{style:{position:"sticky",top:0,left:0,zIndex:3,background:H,borderBottom:"1px solid var(--af-border-subtle)",borderRight:"1px solid var(--af-border-subtle)",display:"flex",flexDirection:"column"},children:[(0,t.jsx)("div",{style:{height:24,display:"flex",alignItems:"center",justifyContent:"flex-end",padding:"0 10px",fontSize:9,color:"var(--af-text-tertiary)",letterSpacing:"0.04em",textTransform:"uppercase",fontWeight:600},children:i.length>0?"Concurrency":""}),(0,t.jsx)("div",{style:{height:26}})]}),(0,t.jsxs)("div",{style:{position:"sticky",top:0,zIndex:2,background:H,borderBottom:"1px solid var(--af-border-subtle)"},children:[(0,t.jsx)("svg",{width:P,height:24,style:{display:"block"},children:i.map((e,r)=>{let s=B(e.startMs),n=B(e.endMs)-s,i=Math.max(n,26),o=n<26?s+n/2-13:s,l=z===r,d=null!==z&&!l,p=e.crossProject?"rgba(167, 139, 250, 0.9)":"rgba(45, 212, 191, 0.9)";return(0,t.jsxs)("g",{children:[(0,t.jsx)("rect",{x:o,y:4,width:i,height:14,fill:p,rx:4,opacity:d?.3:1,stroke:y===r?"var(--af-text)":u===r?"var(--af-text-secondary)":"none",strokeWidth:y===r?1.5:1,style:{cursor:"pointer",transition:"opacity 0.12s"},onMouseEnter:()=>g(r),onMouseLeave:()=>g(null),onClick:()=>w(r),children:(0,t.jsx)("title",{children:`\xd7${e.peak} ${e.crossProject?"cross-project":"same-project"} \xb7 ${c(e.startMs)}–${c(e.endMs)} \xb7 ${(0,a.formatDuration)(e.endMs-e.startMs)} — click for detail`})}),(0,t.jsxs)("text",{x:o+i/2,y:15,textAnchor:"middle",fontSize:9,fontWeight:700,fill:"white",opacity:d?.3:1,style:{pointerEvents:"none"},children:["×",e.peak]})]},`burst-${r}`)})}),(0,t.jsx)("svg",{width:P,height:26,style:{display:"block"},children:I.map(e=>{let r=B(e),s=new Date(e).getHours()%3==0;return(0,t.jsx)("text",{x:r,y:18,textAnchor:"middle",fontSize:10,fill:s?"var(--af-text-secondary)":"var(--af-text-tertiary)",fontWeight:s?600:400,children:c(e)},e)})})]}),(0,t.jsx)("div",{style:{position:"sticky",left:0,zIndex:1,background:H,borderRight:"1px solid var(--af-border-subtle)"},children:(0,t.jsx)("div",{style:{paddingTop:3},children:e.sessions.map((e,s)=>{let n=l(e),i=e.firstUserPreview?d(e.firstUserPreview).slice(0,45):(0,a.prettyProjectName)(e.projectName),o=(0,a.prettyProjectName)(e.projectName),c=null!==T&&!T.has(e.id);return(0,t.jsxs)("div",{style:{height:30,marginBottom:3,display:"flex",alignItems:"center",gap:6,padding:"0 8px 0 6px",background:s%2==1?"var(--af-surface-hover)":"transparent",opacity:c?.3:1,transition:"opacity 0.12s"},children:[(0,t.jsx)("span",{style:{width:6,height:6,borderRadius:2,background:n,flexShrink:0}}),(0,t.jsx)(r.default,{href:`/sessions/${e.id}`,style:{fontSize:10.5,color:"var(--af-text)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",lineHeight:1.2,textDecoration:"none"},title:`${d(e.firstUserPreview??"")} — ${o}`,children:i})]},`label-${e.id}-${s}`)})})}),(0,t.jsx)("div",{children:(0,t.jsxs)("svg",{width:P,height:D,style:{display:"block"},children:[(0,t.jsx)("defs",{children:(0,t.jsxs)("pattern",{id:"gantt-idle-stripes",patternUnits:"userSpaceOnUse",width:"6",height:"6",patternTransform:"rotate(45)",children:[(0,t.jsx)("rect",{width:"6",height:"6",fill:"var(--af-surface-hover)"}),(0,t.jsx)("line",{x1:"0",y1:"0",x2:"0",y2:"6",stroke:"var(--af-border-subtle)",strokeWidth:"1.5"})]})}),I.map(e=>{let r=B(e),s=new Date(e).getHours()%3==0;return(0,t.jsx)("line",{x1:r,y1:0,x2:r,y2:D,stroke:"var(--af-border-subtle)",strokeWidth:s?.8:.4,strokeDasharray:s?void 0:"2 4"},e)}),e.sessions.map((e,r)=>{let s=33*r+3,n=l(e),i=null!==T&&!T.has(e.id);return(0,t.jsxs)("g",{opacity:i?.25:1,style:{transition:"opacity 0.12s"},children:[r%2==1&&(0,t.jsx)("rect",{x:0,y:s,width:P,height:30,fill:"var(--af-surface-hover)",opacity:.25}),e.segments.map((r,a)=>{let i=B(r.startMs),o=Math.max(B(r.endMs)-i,4);return(0,t.jsx)("rect",{x:i,y:s+5,width:o,height:20,fill:n,rx:3,style:{cursor:"pointer"},onMouseEnter:t=>{let r=t.currentTarget.closest("svg").getBoundingClientRect();h({session:e,x:t.clientX-r.left+220,y:s+30+24+26+4})}},a)}),e.segments.length>1&&e.segments.slice(0,-1).map((r,n)=>{let a=e.segments[n+1],i=B(r.endMs),o=B(a.startMs);return o-i<4?null:(0,t.jsx)("rect",{x:i+1,y:s+7,width:o-i-2,height:16,fill:"url(#gantt-idle-stripes)",rx:2,opacity:.7},`idle-${n}`)}),(0,t.jsxs)("text",{x:Math.min(B(e.endMs)+8,P-100),y:s+15+3.5,fontSize:9,fill:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)",children:[(0,a.formatDuration)(e.activeMs)," · ",c(e.startMs),"–",c(e.endMs)]})]},`row-${e.id}-${r}`)})]})})]}),f&&(0,t.jsxs)("div",{style:{position:"absolute",left:Math.max(8,Math.min(f.x,220+P-340)),top:Math.min(f.y,50+D-100),zIndex:50,background:"var(--af-surface-elevated)",border:"1px solid var(--af-border-subtle)",borderRadius:8,padding:"10px 14px",fontSize:11,color:"var(--af-text)",pointerEvents:"none",boxShadow:"0 4px 12px rgba(0,0,0,0.15)",maxWidth:340,lineHeight:1.45},children:[(0,t.jsx)("div",{style:{fontWeight:600,marginBottom:4},children:d(f.session.firstUserPreview??"").slice(0,100)||(0,a.prettyProjectName)(f.session.projectName)}),(0,t.jsxs)("div",{style:{fontSize:10,color:"var(--af-text-secondary)",marginBottom:6,fontFamily:"var(--font-mono)"},children:[(0,a.prettyProjectName)(f.session.projectName),f.session.model&&` \xb7 ${f.session.model}`]}),(0,t.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"3px 12px",fontSize:10,color:"var(--af-text-secondary)"},children:[(0,t.jsxs)("span",{children:["Active: ",(0,t.jsx)("strong",{children:(0,a.formatDuration)(f.session.activeMs)})]}),(0,t.jsxs)("span",{children:["Segments: ",f.session.segments.length]}),(0,t.jsxs)("span",{children:["Range: ",c(f.session.startMs),"–",c(f.session.endMs)]}),(0,t.jsxs)("span",{children:["Tokens:"," ",(0,a.formatTokens)(f.session.totalUsage.input+f.session.totalUsage.cacheRead+f.session.totalUsage.cacheWrite),"/",(0,a.formatTokens)(f.session.totalUsage.output)]})]})]})]})]}),v&&(0,t.jsx)(p,{onClose:()=>b(!1)}),null!==j&&i[j]&&(0,t.jsx)(x,{burst:i[j],gantt:e,onClose:()=>w(null),onShowInTimeline:()=>{w(null),null!==j&&(e=>{m(t=>t===e?null:e);let t=i[e],r=M.current;if(!t||!r)return;let s=220+(B(t.startMs)+B(t.endMs))/2-r.clientWidth/2;r.scrollTo({left:Math.max(0,s),behavior:"smooth"})})(j)}})]})}])},88065,e=>{"use strict";var t=e.i(18050),r=e.i(18566),s=e.i(71645),n=e.i(22016);function a(e){if(e<6e4)return`${Math.round(e/1e3)}s`;let t=Math.round(e/6e4);if(t<60)return`${t}m`;let r=Math.floor(t/60),s=t%60;return s?`${r}h ${s}m`:`${r}h`}e.s(["DateNav",0,function({date:e,today:i,prevDay:o,nextDay:l,dayStats:d}){let c,p,x,f,h,u,g=(0,r.useRouter)(),[y,m]=(0,s.useState)(!1),[v,b]=(0,s.useMemo)(()=>{let[t,r]=e.split("-").map(Number);return[t,r]},[e]),[j,w]=(0,s.useState)(v),[S,k]=(0,s.useState)(b),[M,z]=(0,s.useState)(null),[T,W]=(0,s.useState)(null),C=(0,s.useMemo)(()=>{let e=new Map;for(let t of d)e.set(t.date,t);return e},[d]),$=(0,s.useMemo)(()=>{let e=new Date(j,S-1,1).getDay(),t=new Date(j,S,0).getDate(),r=[];for(let t=0;t<e;t++)r.push(null);for(let e=1;e<=t;e++){let t=String(S).padStart(2,"0"),s=String(e).padStart(2,"0");r.push(`${j}-${t}-${s}`)}return r},[j,S]),I=(0,s.useMemo)(()=>{let e=0;for(let t of d)t.airTimeMs>e&&(e=t.airTimeMs);return e},[d]),R=new Date(j,S-1).toLocaleString(void 0,{month:"long",year:"numeric"}),P=e=>{let t=S+e,r=j;t<1&&(t=12,r--),t>12&&(t=1,r++),k(t),w(r)};return(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,flexWrap:"wrap",position:"relative"},children:[o?(0,t.jsx)(n.default,{href:`/parallelism?date=${o}`,style:{padding:"5px 10px",border:"1px solid var(--af-border-subtle)",borderRadius:6,fontSize:11,color:"var(--af-text-secondary)"},children:"←"}):(0,t.jsx)("span",{style:{padding:"5px 10px",opacity:.3,fontSize:11,color:"var(--af-text-tertiary)"},children:"←"}),(0,t.jsx)("button",{type:"button",onClick:()=>{w(v),k(b),m(e=>!e)},style:{padding:"5px 12px",fontSize:12,fontFamily:"var(--font-mono)",border:"1px solid var(--af-border-subtle)",borderRadius:6,background:y?"var(--af-accent-subtle)":"transparent",color:y?"var(--af-accent)":"var(--af-text)",cursor:"pointer",fontWeight:500,minWidth:120,textAlign:"center"},children:e}),l?(0,t.jsx)(n.default,{href:`/parallelism?date=${l}`,style:{padding:"5px 10px",border:"1px solid var(--af-border-subtle)",borderRadius:6,fontSize:11,color:"var(--af-text-secondary)"},children:"→"}):(0,t.jsx)("span",{style:{padding:"5px 10px",opacity:.3,fontSize:11,color:"var(--af-text-tertiary)"},children:"→"}),(0,t.jsx)(n.default,{href:`/parallelism?date=${i}`,style:{padding:"5px 12px",border:"1px solid var(--af-border-subtle)",borderRadius:6,fontSize:11,color:e===i?"var(--af-accent)":"var(--af-text-secondary)",background:e===i?"var(--af-accent-subtle)":"transparent",fontWeight:500},children:"Today"}),y&&(0,t.jsxs)("div",{style:{position:"absolute",top:"calc(100% + 8px)",right:0,zIndex:60,background:"var(--af-surface)",border:"1px solid var(--af-border-subtle)",borderRadius:10,padding:"12px 14px",boxShadow:"0 8px 28px rgba(0,0,0,0.18)",minWidth:300},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:10},children:[(0,t.jsx)("button",{type:"button",onClick:()=>P(-1),style:{background:"transparent",border:"none",cursor:"pointer",color:"var(--af-text-secondary)",fontSize:14,padding:"2px 8px",borderRadius:4},children:"‹"}),(0,t.jsx)("span",{style:{fontSize:13,fontWeight:600,color:"var(--af-text)"},children:R}),(0,t.jsx)("button",{type:"button",onClick:()=>P(1),style:{background:"transparent",border:"none",cursor:"pointer",color:"var(--af-text-secondary)",fontSize:14,padding:"2px 8px",borderRadius:4},children:"›"})]}),(0,t.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:2,marginBottom:4},children:["Su","Mo","Tu","We","Th","Fr","Sa"].map(e=>(0,t.jsx)("div",{style:{textAlign:"center",fontSize:9,color:"var(--af-text-tertiary)",fontWeight:600,padding:"2px 0"},children:e},e))}),(0,t.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gap:2},children:$.map((r,s)=>{if(!r)return(0,t.jsx)("div",{},`blank-${s}`);let n=C.get(r);n?.sessions;let o=n?.airTimeMs??0;n?.parallelMs;let l=n?.burstCount??0;n?.peakConcurrency;let d=r===e,c=r===i,p=r>i,x=o>0&&I>0?Math.min(1,o/I):0,f=parseInt(r.split("-")[2],10);return(0,t.jsxs)("button",{type:"button",onClick:()=>{m(!1),g.push(`/parallelism?date=${r}`)},disabled:p,onMouseEnter:e=>{if(p)return;let t=e.currentTarget.getBoundingClientRect(),s=e.currentTarget.offsetParent?.getBoundingClientRect()??t;z(r),W({x:t.left-s.left+t.width/2,y:t.bottom-s.top+6})},onMouseLeave:()=>{z(null),W(null)},style:{position:"relative",width:40,height:40,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:1,border:d?"2px solid var(--af-accent)":c?"1px solid var(--af-text-tertiary)":"1px solid transparent",borderRadius:6,background:x>0?`rgba(45, 212, 191, ${.08+.35*x})`:"transparent",color:p?"var(--af-text-tertiary)":d?"var(--af-accent)":"var(--af-text)",cursor:p?"not-allowed":"pointer",fontSize:11,fontWeight:d?700:400,fontFamily:"var(--font-mono)",padding:0,opacity:p?.4:1},children:[(0,t.jsx)("span",{style:{lineHeight:1},children:f}),o>0&&(0,t.jsx)("span",{style:{fontSize:8,color:d?"var(--af-accent)":"var(--af-text-tertiary)",lineHeight:1,fontWeight:600,marginTop:2},children:a(o)}),l>0&&(0,t.jsx)("span",{style:{position:"absolute",top:3,right:3,width:5,height:5,borderRadius:"50%",background:"rgba(167, 139, 250, 0.95)",boxShadow:"0 0 0 1px var(--af-surface)"}})]},r)})}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:10,marginTop:10,paddingTop:8,borderTop:"1px solid var(--af-border-subtle)",fontSize:9,color:"var(--af-text-tertiary)"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:5},children:[(0,t.jsx)("span",{children:"less"}),(0,t.jsx)("div",{style:{display:"flex",gap:2},children:[0,.15,.3,.5,.8].map((e,r)=>(0,t.jsx)("span",{style:{width:10,height:10,borderRadius:2,background:0===e?"var(--af-border-subtle)":`rgba(45, 212, 191, ${.08+.35*e})`}},r))}),(0,t.jsx)("span",{children:"more active"})]}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:5},title:"Days with at least one concurrency burst",children:[(0,t.jsx)("span",{style:{width:5,height:5,borderRadius:"50%",background:"rgba(167, 139, 250, 0.95)"}}),"parallel"]})]}),M&&T&&(c=C.get(M),p=c?.sessions??0,x=c?.airTimeMs??0,f=c?.parallelMs??0,h=c?.burstCount??0,u=c?.peakConcurrency??0,(0,t.jsxs)("div",{style:{position:"absolute",left:Math.max(10,Math.min(T.x-110,290)),top:T.y,width:220,pointerEvents:"none",background:"var(--af-surface-elevated)",border:"1px solid var(--af-border-subtle)",borderRadius:8,padding:"9px 12px",boxShadow:"0 6px 22px rgba(0,0,0,0.22)",fontSize:11,color:"var(--af-text)",zIndex:65,lineHeight:1.5},children:[(0,t.jsx)("div",{style:{fontFamily:"var(--font-mono)",fontWeight:700,fontSize:11,marginBottom:4},children:M}),0===p&&0===x&&0===f?(0,t.jsx)("div",{style:{color:"var(--af-text-tertiary)",fontSize:10},children:"no activity"}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",color:"var(--af-text-secondary)",fontSize:10},children:[(0,t.jsx)("span",{children:"sessions"}),(0,t.jsx)("strong",{style:{color:"var(--af-text)"},children:p})]}),(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",color:"var(--af-text-secondary)",fontSize:10},children:[(0,t.jsx)("span",{children:"active time"}),(0,t.jsx)("strong",{style:{color:"var(--af-text)"},children:x>0?a(x):"—"})]}),f>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",color:"var(--af-text-secondary)",fontSize:10,marginTop:4,paddingTop:4,borderTop:"1px dashed var(--af-border-subtle)"},children:[(0,t.jsx)("span",{children:"parallel time"}),(0,t.jsx)("strong",{style:{color:"var(--af-text)"},children:a(f)})]}),(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",color:"var(--af-text-secondary)",fontSize:10},children:[(0,t.jsx)("span",{children:"peak concurrency"}),(0,t.jsxs)("strong",{style:{color:"rgba(167, 139, 250, 1)"},children:["×",u]})]}),(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",color:"var(--af-text-secondary)",fontSize:10},children:[(0,t.jsx)("span",{children:"bursts"}),(0,t.jsx)("strong",{style:{color:"var(--af-text)"},children:h})]})]})]})]}))]})]})}])}]);
@@ -1,6 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,75254,e=>{"use strict";var t=e.i(71645);let r=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim();var n={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let a=(0,t.forwardRef)(({color:e="currentColor",size:a=24,strokeWidth:o=2,absoluteStrokeWidth:i,className:l="",children:s,iconNode:c,...u},d)=>(0,t.createElement)("svg",{ref:d,...n,width:a,height:a,stroke:e,strokeWidth:i?24*Number(o)/Number(a):o,className:r("lucide",l),...u},[...c.map(([e,r])=>(0,t.createElement)(e,r)),...Array.isArray(s)?s:[s]]));e.s(["default",0,(e,n)=>{let o=(0,t.forwardRef)(({className:o,...i},l)=>(0,t.createElement)(a,{ref:l,iconNode:n,className:r(`lucide-${e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,o),...i}));return o.displayName=`${e}`,o}],75254)},98183,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={assign:function(){return s},searchParamsToUrlQuery:function(){return o},urlQueryToSearchParams:function(){return l}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});function o(e){let t={};for(let[r,n]of e.entries()){let e=t[r];void 0===e?t[r]=n:Array.isArray(e)?e.push(n):t[r]=[e,n]}return t}function i(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function l(e){let t=new URLSearchParams;for(let[r,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)t.append(r,i(e));else t.set(r,i(n));return t}function s(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,n]of r.entries())e.append(t,n)}return e}},18967,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return x},MiddlewareNotFoundError:function(){return w},MissingStaticPage:function(){return b},NormalizeError:function(){return m},PageNotFoundError:function(){return v},SP:function(){return g},ST:function(){return y},WEB_VITALS:function(){return o},execOnce:function(){return i},getDisplayName:function(){return d},getLocationOrigin:function(){return c},getURL:function(){return u},isAbsoluteUrl:function(){return s},isResSent:function(){return f},loadGetInitialProps:function(){return h},normalizeRepeatedSlashes:function(){return p},stringifyError:function(){return j}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let o=["CLS","FCP","FID","INP","LCP","TTFB"];function i(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let l=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,s=e=>l.test(e);function c(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function u(){let{href:e}=window.location,t=c();return e.substring(t.length)}function d(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function f(e){return e.finished||e.headersSent}function p(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function h(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await h(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&f(r))return n;if(!n)throw Object.defineProperty(Error(`"${d(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});return n}let g="u">typeof performance,y=g&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class x extends Error{}class m extends Error{}class v extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class b extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class w extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function j(e){return JSON.stringify({message:e.message,stack:e.stack})}},33525,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"warnOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},95057,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return l},formatWithValidation:function(){return c},urlObjectKeys:function(){return s}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let o=e.r(90809)._(e.r(98183)),i=/https?|ftp|gopher|file/;function l(e){let{auth:t,hostname:r}=e,n=e.protocol||"",a=e.pathname||"",l=e.hash||"",s=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:r&&(c=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(c+=":"+e.port)),s&&"object"==typeof s&&(s=String(o.urlQueryToSearchParams(s)));let u=e.search||s&&`?${s}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||i.test(n))&&!1!==c?(c="//"+(c||""),a&&"/"!==a[0]&&(a="/"+a)):c||(c=""),l&&"#"!==l[0]&&(l="#"+l),u&&"?"!==u[0]&&(u="?"+u),a=a.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${n}${c}${a}${u}${l}`}let s=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return l(e)}},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return a}});let n=e.r(71645);function a(e,t){let r=(0,n.useRef)(null),a=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=a.current;t&&(a.current=null,t())}else e&&(r.current=o(e,n)),t&&(a.current=o(t,n))},[e,t])}function o(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},73668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return o}});let n=e.r(18967),a=e.r(52817);function o(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,a.hasBasePath)(r.pathname)}catch(e){return!1}}},84508,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},22016,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return x},useLinkStatus:function(){return v}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let o=e.r(90809),i=e.r(18050),l=o._(e.r(71645)),s=e.r(95057),c=e.r(8372),u=e.r(18581),d=e.r(18967),f=e.r(5550);e.r(33525);let p=e.r(88540),h=e.r(91949),g=e.r(73668),y=e.r(9396);function x(t){var r,n;let a,o,x,[v,b]=(0,l.useOptimistic)(h.IDLE_LINK_STATUS),w=(0,l.useRef)(null),{href:j,as:S,children:k,prefetch:M=null,passHref:$,replace:P,shallow:T,scroll:E,onClick:O,onMouseEnter:C,onTouchStart:z,legacyBehavior:R=!1,onNavigate:N,transitionTypes:_,ref:I,unstable_dynamicOnHover:D,...A}=t;a=k,R&&("string"==typeof a||"number"==typeof a)&&(a=(0,i.jsx)("a",{children:a}));let L=l.default.useContext(c.AppRouterContext),W=!1!==M,F=!1!==M?null===(n=M)||"auto"===n?y.FetchStrategy.PPR:y.FetchStrategy.Full:y.FetchStrategy.PPR,U="string"==typeof(r=S||j)?r:(0,s.formatUrl)(r);if(R){if(a?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});o=l.default.Children.only(a)}let B=R?o&&"object"==typeof o&&o.ref:I,H=l.default.useCallback(e=>(null!==L&&(w.current=(0,h.mountLinkInstance)(e,U,L,F,W,b)),()=>{w.current&&((0,h.unmountLinkForCurrentNavigation)(w.current),w.current=null),(0,h.unmountPrefetchableInstance)(e)}),[W,U,L,F,b]),q={ref:(0,u.useMergedRef)(H,B),onClick(t){R||"function"!=typeof O||O(t),R&&o.props&&"function"==typeof o.props.onClick&&o.props.onClick(t),!L||t.defaultPrevented||function(t,r,n,a,o,i,s){if("u">typeof window){let c,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,g.isLocalURL)(r)){a&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),i){let e=!1;if(i({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(99781);l.default.startTransition(()=>{d(r,a?"replace":"push",!1===o?p.ScrollBehavior.NoScroll:p.ScrollBehavior.Default,n.current,s)})}}(t,U,w,P,E,N,_)},onMouseEnter(e){R||"function"!=typeof C||C(e),R&&o.props&&"function"==typeof o.props.onMouseEnter&&o.props.onMouseEnter(e),L&&W&&(0,h.onNavigationIntent)(e.currentTarget,!0===D)},onTouchStart:function(e){R||"function"!=typeof z||z(e),R&&o.props&&"function"==typeof o.props.onTouchStart&&o.props.onTouchStart(e),L&&W&&(0,h.onNavigationIntent)(e.currentTarget,!0===D)}};return(0,d.isAbsoluteUrl)(U)?q.href=U:R&&!$&&("a"!==o.type||"href"in o.props)||(q.href=(0,f.addBasePath)(U)),x=R?l.default.cloneElement(o,q):(0,i.jsx)("a",{...A,...q,children:a}),(0,i.jsx)(m.Provider,{value:v,children:x})}e.r(84508);let m=(0,l.createContext)(h.IDLE_LINK_STATUS),v=()=>(0,l.useContext)(m);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},86619,e=>{"use strict";var t=e.i(71645);e.s(["usePersistentBoolean",0,function(e,r){let[n,a]=(0,t.useState)(r),[o,i]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{try{let t=window.localStorage.getItem(e);"1"===t?a(!0):"0"===t&&a(!1)}catch{}i(!0)},[e]),(0,t.useEffect)(()=>{let t=t=>{let r=t.detail;r?.key===e&&"boolean"==typeof r.value&&a(r.value)},r=t=>{t.key===e&&("1"===t.newValue?a(!0):"0"===t.newValue&&a(!1))};return window.addEventListener("cclens:persistent-boolean",t),window.addEventListener("storage",r),()=>{window.removeEventListener("cclens:persistent-boolean",t),window.removeEventListener("storage",r)}},[e]),[n,(0,t.useCallback)(t=>{a(t);try{window.localStorage.setItem(e,t?"1":"0")}catch{}window.dispatchEvent(new CustomEvent("cclens:persistent-boolean",{detail:{key:e,value:t}}))},[e]),o]}])},18566,(e,t,r)=>{t.exports=e.r(76562)},56324,e=>{"use strict";e.s(["formatDuration",0,function(e){if(void 0===e)return"—";if(e<1e3)return`${e}ms`;let t=Math.round(e/1e3);if(t<60)return`${t}s`;let r=Math.floor(t/60),n=t%60;if(r<60)return n?`${r}m ${n}s`:`${r}m`;let a=Math.floor(r/60),o=r%60;return o?`${a}h ${o}m`:`${a}h`},"formatGap",0,function(e){if(e<1e3)return`${e}ms`;let t=e/1e3;if(t<60)return`${t.toFixed(1)}s`;let r=Math.floor(t/60);if(r<60){let e=Math.round(t%60);return`${r}m ${e}s`}let n=Math.floor(r/60),a=r%60;if(n<24)return a?`${n}h ${a}m`:`${n}h`;let o=Math.floor(n/24),i=n%24;return i?`${o}d ${i}h`:`${o}d`},"formatOffset",0,function(e){if(void 0===e||e<0)return"—";let t=Math.floor(e/1e3),r=Math.floor(t/3600),n=String(Math.floor(t%3600/60)).padStart(2,"0"),a=String(t%60).padStart(2,"0");return`${r}:${n}:${a}`},"formatRelative",0,function(e){let t=Date.parse(e);if(Number.isNaN(t))return e;let r=Math.round((Date.now()-t)/1e3);if(r<60)return`${r}s ago`;let n=Math.round(r/60);if(n<60)return`${n}m ago`;let a=Math.round(n/60);if(a<24)return`${a}h ago`;let o=Math.round(a/24);return`${o}d ago`},"formatTokens",0,function(e){return e<1e3?String(e):e<1e4?(e/1e3).toFixed(1)+"k":e<1e6?Math.round(e/1e3)+"k":e<1e7?(e/1e6).toFixed(2)+"M":(e/1e6).toFixed(1)+"M"},"prettyProjectName",0,function(e,t=35){let r=e.split("/").filter(Boolean),n=r.lastIndexOf(".worktrees");if(n>0&&n<r.length-1){let e=r[n-1],a=r[n+1],o=`${e}/${a}`;return o.length<=t?o:"…"+o.slice(o.length-t+1)}let a=r.length>=2?`${r[r.length-2]}/${r[r.length-1]}`:r[r.length-1]??e;return a.length<=t?a:"…"+a.slice(a.length-t+1)},"shortId",0,function(e){return e.length<=10?e:e.slice(0,6)+"…"+e.slice(-4)}])},55436,e=>{"use strict";let t=(0,e.i(75254).default)("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);e.s(["Search",0,t],55436)},86566,e=>{"use strict";var t=e.i(18050),r=e.i(22016),n=e.i(18566),a=e.i(71645),o=e.i(75254);let i=(0,o.default)("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]),l=(0,o.default)("ListTree",[["path",{d:"M21 12h-8",key:"1bmf0i"}],["path",{d:"M21 6H8",key:"1pqkrb"}],["path",{d:"M21 18h-8",key:"1tm79t"}],["path",{d:"M3 6v4c0 1.1.9 2 2 2h3",key:"1ywdgy"}],["path",{d:"M3 10v6c0 1.1.9 2 2 2h3",key:"2wc746"}]]),s=(0,o.default)("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]),c=(0,o.default)("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]),u=(0,o.default)("Pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]),d=(0,o.default)("PinOff",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89",key:"znwnzq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",key:"c9qhm2"}]]);var f=e.i(55436);let p=(0,o.default)("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]),h=(0,o.default)("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);var g=e.i(56324);let y=(0,o.default)("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]),x=(0,o.default)("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]),m="claude-lens:theme";function v(e){if("u">typeof document){document.documentElement.setAttribute("data-theme",e);try{document.cookie=`claude-lens-theme=${e};path=/;max-age=31536000;samesite=lax`}catch{}}}function b(){let[e,r]=(0,a.useState)("dark"),[n,o]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{let e=document.documentElement.getAttribute("data-theme");if("light"===e||"dark"===e)r(e);else{let e=function(){try{let e=window.localStorage.getItem(m);if("light"===e||"dark"===e)return e}catch{}return null}()??(window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark");r(e),v(e)}o(!0)},[]),(0,t.jsx)("button",{type:"button",onClick:()=>{let t="dark"===e?"light":"dark";r(t),v(t);try{window.localStorage.setItem(m,t)}catch{}},"aria-label":"dark"===e?"Switch to light mode":"Switch to dark mode",title:"dark"===e?"Switch to light mode":"Switch to dark mode",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:28,height:28,borderRadius:6,background:"transparent",border:"1px solid var(--af-border-subtle)",color:"var(--af-text-secondary)",cursor:"pointer",transition:"all 0.12s"},onMouseEnter:e=>{e.currentTarget.style.background="var(--af-surface-hover)",e.currentTarget.style.color="var(--af-text)"},onMouseLeave:e=>{e.currentTarget.style.background="transparent",e.currentTarget.style.color="var(--af-text-secondary)"},children:n?"dark"===e?(0,t.jsx)(x,{size:14}):(0,t.jsx)(y,{size:14}):null})}var w=e.i(86619);function j({snapshot:e}){let n,a,[o,,i]=(0,w.usePersistentBoolean)("cclens:usage:show-sonnet",!1);if(!e)return(0,t.jsxs)("div",{style:{padding:"10px 16px 12px",borderTop:"1px solid var(--af-border-subtle)",fontSize:10,color:"var(--af-text-tertiary)",lineHeight:1.4},children:[(0,t.jsx)("div",{style:{textTransform:"uppercase",letterSpacing:"0.06em",fontWeight:600,marginBottom:4},children:"Usage"}),(0,t.jsxs)("div",{children:["Run ",(0,t.jsx)("code",{style:{fontFamily:"var(--font-mono)"},children:"cclens daemon start"})," to collect metrics."]})]});let l=[{label:"5h",window:e.five_hour},{label:"7d",window:e.seven_day}];return i&&o&&l.push({label:"Sonnet 7d",window:e.seven_day_sonnet}),(0,t.jsxs)(r.default,{href:"/usage",style:{display:"block",padding:"10px 16px 12px",borderTop:"1px solid var(--af-border-subtle)",textDecoration:"none",color:"inherit"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",fontSize:10,fontWeight:600,color:"var(--af-text-tertiary)",textTransform:"uppercase",letterSpacing:"0.06em",marginBottom:8},children:[(0,t.jsx)("span",{children:"Current usage"}),(0,t.jsx)("span",{suppressHydrationWarning:!0,style:{fontWeight:500,textTransform:"none",letterSpacing:0},children:(n=new Date(e.captured_at).getTime(),(a=Math.round((Date.now()-n)/1e3))<60?`${a}s ago`:a<3600?`${Math.floor(a/60)}m ago`:a<86400?`${Math.floor(a/3600)}h ago`:`${Math.floor(a/86400)}d ago`)})]}),(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:6},children:l.map(e=>(0,t.jsx)(S,{...e},e.label))})]})}function S({label:e,window:r}){let n=r?.utilization??null,a=null!==n,o=a?Math.max(0,Math.min(100,n)):0,i=o>=90?"var(--af-danger)":o>=70?"var(--af-warning)":"var(--af-success)";return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:6,fontSize:10,color:"var(--af-text-secondary)",marginBottom:2,fontVariantNumeric:"tabular-nums"},children:[(0,t.jsx)("span",{children:e}),r?.resets_at&&(0,t.jsxs)("span",{suppressHydrationWarning:!0,style:{fontSize:9,color:"var(--af-text-tertiary)",flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:["resets ",function(e){let t,r=Math.round((new Date(e).getTime()-Date.now())/1e3),n=Math.abs(r);if(n<60)t=`${n}s`;else if(n<3600)t=`${Math.floor(n/60)}m`;else if(n<86400){let e=Math.floor(n/3600),r=Math.floor(n%3600/60);t=r>0?`${e}h${r}m`:`${e}h`}else{let e=Math.floor(n/86400),r=Math.floor(n%86400/3600);t=r>0?`${e}d${r}h`:`${e}d`}return r<0?`${t} ago`:`in ${t}`}(r.resets_at)]}),(0,t.jsx)("span",{style:{fontWeight:600,color:"var(--af-text)",marginLeft:"auto"},children:a?`${o.toFixed(0)}%`:"—"})]}),(0,t.jsx)("div",{style:{height:4,background:"var(--af-border-subtle)",borderRadius:999,overflow:"hidden"},children:(0,t.jsx)("div",{style:{height:"100%",width:a?`${o}%`:"0%",background:i,borderRadius:999,transition:"width 0.24s ease"}})})]})}let k="claude-lens:pinned-projects:v1";function M({href:e,active:n,icon:a,trailing:o,children:i}){return(0,t.jsxs)(r.default,{href:e,style:{display:"flex",alignItems:"center",gap:10,padding:"8px 12px",borderRadius:7,fontSize:13,fontWeight:500,color:n?"var(--af-accent)":"var(--af-text-secondary)",background:n?"var(--af-accent-subtle)":"transparent",transition:"all 0.12s"},children:[a,(0,t.jsx)("span",{style:{flex:1},children:i}),o&&(0,t.jsx)("span",{style:{fontSize:10,color:n?"var(--af-accent)":"var(--af-text-tertiary)",fontFamily:"var(--font-mono)"},children:o})]})}function $({label:e,items:n,pathname:a,isPinned:o,onTogglePin:i}){return 0===n.length?null:(0,t.jsxs)("div",{style:{marginTop:10},children:[(0,t.jsx)("div",{style:{fontSize:10,color:"var(--af-text-tertiary)",textTransform:"uppercase",letterSpacing:"0.06em",padding:"0 10px 6px",fontWeight:600},children:e}),(0,t.jsx)("div",{style:{display:"flex",flexDirection:"column"},children:n.map(e=>{let n=`/projects/${encodeURIComponent(e.projectDir)}`,l=a===n,s=(0,g.prettyProjectName)(e.projectName);return(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4,padding:"5px 6px 5px 10px",borderRadius:6,background:l?"var(--af-accent-subtle)":"transparent",color:l?"var(--af-accent)":"var(--af-text-secondary)"},children:[(0,t.jsxs)(r.default,{href:n,style:{flex:1,minWidth:0,fontSize:12,color:"inherit",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"flex",alignItems:"center",gap:5},title:(e.worktreeCount??0)>0?`${e.projectName} — ${e.worktreeCount} worktree${1===e.worktreeCount?"":"s"}`:e.projectName,children:[(0,t.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:s}),(e.worktreeCount??0)>0&&(0,t.jsxs)("span",{style:{fontSize:9,fontWeight:600,padding:"1px 5px",borderRadius:100,background:"rgba(167, 139, 250, 0.15)",color:"rgba(167, 139, 250, 1)",flexShrink:0},children:["+",e.worktreeCount," wt"]})]}),(0,t.jsx)("span",{style:{fontSize:10,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)",marginLeft:4},children:e.sessionCount}),(0,t.jsx)("button",{type:"button",onClick:t=>{t.preventDefault(),t.stopPropagation(),i(e.projectDir)},"aria-label":o(e.projectDir)?"Unpin project":"Pin project",title:o(e.projectDir)?"Unpin":"Pin",style:{background:"transparent",border:"none",padding:3,borderRadius:4,color:o(e.projectDir)?"var(--af-accent)":"var(--af-text-tertiary)",display:"flex",alignItems:"center"},children:o(e.projectDir)?(0,t.jsx)(d,{size:12}):(0,t.jsx)(u,{size:12})}),e.lastActiveMs&&(0,t.jsx)("span",{style:{fontSize:9,color:"var(--af-text-tertiary)",marginLeft:2,minWidth:32,textAlign:"right"},title:new Date(e.lastActiveMs).toISOString(),suppressHydrationWarning:!0,children:(0,g.formatRelative)(new Date(e.lastActiveMs).toISOString())})]},e.projectDir)})})]})}e.s(["Sidebar",0,function({projects:e,totalSessions:r,currentUsage:o,version:u}){let d=(0,n.usePathname)(),[g,y]=(0,a.useState)(new Set),[x,m]=(0,a.useState)(!1),[v,w]=(0,a.useState)("");(0,a.useEffect)(()=>{y(function(){try{let e=window.localStorage.getItem(k);if(!e)return new Set;let t=JSON.parse(e);return new Set(Array.isArray(t)?t:[])}catch{return new Set}}()),m(!0)},[]);let S=e=>{y(t=>{let r=new Set(t);r.has(e)?r.delete(e):r.add(e);try{window.localStorage.setItem(k,JSON.stringify(Array.from(r)))}catch{}return r})},P=(0,a.useMemo)(()=>{if(!v.trim())return e;let t=v.toLowerCase();return e.filter(e=>e.projectName.toLowerCase().includes(t))},[e,v]),T=P.filter(e=>g.has(e.projectDir)),E=P.filter(e=>!g.has(e.projectDir));return(0,t.jsxs)("aside",{style:{width:260,flexShrink:0,borderRight:"1px solid var(--af-border-subtle)",background:"var(--af-surface)",display:"flex",flexDirection:"column",position:"sticky",top:0,height:"100vh"},children:[(0,t.jsx)("div",{style:{padding:"18px 20px 12px",borderBottom:"1px solid var(--af-border-subtle)"},children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10},children:[(0,t.jsx)("div",{style:{width:28,height:28,borderRadius:7,background:"var(--af-accent-subtle)",display:"flex",alignItems:"center",justifyContent:"center",color:"var(--af-accent)"},children:(0,t.jsx)(p,{size:16,strokeWidth:2.25})}),(0,t.jsxs)("div",{style:{minWidth:0,flex:1},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:6},children:[(0,t.jsx)("span",{style:{fontSize:14,fontWeight:700,letterSpacing:"-0.01em"},children:"Fleetlens"}),(0,t.jsxs)("span",{style:{fontSize:10,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)",fontWeight:500},title:`fleetlens ${u}`,children:["v",u]})]}),(0,t.jsx)("div",{style:{fontSize:11,color:"var(--af-text-tertiary)"},children:"Claude Code fleet analytics"})]})]})}),(0,t.jsxs)("nav",{style:{padding:"10px 10px 6px",display:"flex",flexDirection:"column",gap:2},children:[(0,t.jsx)(M,{href:"/",active:"/"===d,icon:(0,t.jsx)(i,{size:15}),children:"Overview"}),(0,t.jsx)(M,{href:"/sessions",active:"/sessions"===d||d.startsWith("/sessions/"),icon:(0,t.jsx)(l,{size:15}),trailing:r>0?String(r):void 0,children:"All sessions"}),(0,t.jsx)(M,{href:"/projects",active:"/projects"===d,icon:(0,t.jsx)(s,{size:15}),trailing:e.length>0?String(e.length):void 0,children:"Projects"}),(0,t.jsx)(M,{href:"/parallelism",active:"/parallelism"===d,icon:(0,t.jsx)(c,{size:15}),children:"Timeline"}),(0,t.jsx)(M,{href:"/usage",active:"/usage"===d,icon:(0,t.jsx)(h,{size:15}),children:"Usage"})]}),(0,t.jsxs)("div",{style:{margin:"0 14px",padding:"8px 0",borderTop:"1px solid var(--af-border-subtle)",borderBottom:"1px solid var(--af-border-subtle)",display:"flex",alignItems:"center",gap:6},children:[(0,t.jsx)(f.Search,{size:13,color:"var(--af-text-tertiary)"}),(0,t.jsx)("input",{type:"text",placeholder:"Search projects",value:v,onChange:e=>w(e.target.value),style:{flex:1,background:"transparent",border:"none",padding:"4px 0",fontSize:12,color:"var(--af-text)"}})]}),(0,t.jsxs)("div",{style:{flex:1,overflow:"auto",padding:"4px 8px 20px"},children:[x&&T.length>0&&(0,t.jsx)($,{label:"Pinned",items:T,pathname:d,isPinned:e=>g.has(e),onTogglePin:S}),(0,t.jsx)($,{label:"Projects",items:E,pathname:d,isPinned:e=>g.has(e),onTogglePin:S})]}),(0,t.jsx)(j,{snapshot:o}),(0,t.jsxs)("div",{style:{padding:"10px 16px 10px 20px",fontSize:10,color:"var(--af-text-tertiary)",borderTop:"1px solid var(--af-border-subtle)",display:"flex",alignItems:"center",gap:8},children:[(0,t.jsxs)("span",{style:{flex:1,minWidth:0},children:[r," sessions · ",e.length," projects"]}),(0,t.jsx)(b,{})]})]})}],86566)},51878,e=>{"use strict";var t=e.i(18566),r=e.i(71645);e.s(["LiveRefresher",0,function(){var e;let n,a=(0,t.useRouter)(),o=(0,r.useRef)(null),i=(0,r.useRef)({session:0,usage:0});return e=(0,r.useCallback)(e=>{let t="usage-updated"===e.type?"usage":"session";e.mtimeMs<=(i.current[t]??0)||(i.current[t]=e.mtimeMs,o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{a.refresh()},400))},[a]),n=(0,r.useRef)(e),(0,r.useEffect)(()=>{n.current=e},[e]),(0,r.useEffect)(()=>{let e=new EventSource("/api/events");return e.onmessage=e=>{try{let t=JSON.parse(e.data);("session-updated"===t.type||"usage-updated"===t.type)&&n.current(t)}catch{}},e.onerror=()=>{},()=>{e.close()}},[]),(0,r.useEffect)(()=>()=>{o.current&&clearTimeout(o.current)},[]),null}],51878)},23884,e=>{"use strict";var t=e.i(18050),r=e.i(71645),n=e.i(18566),a=e.i(22016),o=e.i(56324);let i="cclens-live-widget-expanded";e.s(["LiveSessionsWidget",0,function({sessions:e}){let l=(0,n.usePathname)(),[s,c]=(0,r.useState)(()=>Date.now()),[u,d]=(0,r.useState)(!1);if((0,r.useEffect)(()=>{try{let e=localStorage.getItem(i);null!==e&&d("true"===e)}catch{}},[]),(0,r.useEffect)(()=>{let e=setInterval(()=>c(Date.now()),1e4);return()=>clearInterval(e)},[]),l&&/^\/sessions\/[^/]+$/.test(l))return null;let f=e.filter(e=>{if(!e.lastTimestamp)return!1;let t=Date.parse(e.lastTimestamp);return!Number.isNaN(t)&&s-t<=45e3}).slice().sort((e,t)=>{let r=e.firstTimestamp?Date.parse(e.firstTimestamp):0;return(t.firstTimestamp?Date.parse(t.firstTimestamp):0)-r});if(0===f.length)return null;let p=u?f.slice(0,5):[],h=u?f.length-p.length:0;return(0,t.jsxs)("div",{style:{position:"fixed",right:20,bottom:20,zIndex:100,display:"flex",flexDirection:"column-reverse",gap:6,maxWidth:320,pointerEvents:"auto"},children:[(0,t.jsxs)("button",{type:"button",onClick:()=>{var e;return e=e=>!e,void d(t=>{let r=e(t);try{localStorage.setItem(i,String(r))}catch{}return r})},style:{display:"inline-flex",alignItems:"center",gap:6,padding:"5px 11px 5px 9px",background:"rgba(239, 68, 68, 0.14)",border:"1px solid rgba(239, 68, 68, 0.4)",borderRadius:100,fontSize:10,fontWeight:700,color:"#ef4444",letterSpacing:"0.06em",textTransform:"uppercase",alignSelf:"flex-end",cursor:"pointer",userSelect:"none",backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)",boxShadow:"0 2px 10px rgba(239, 68, 68, 0.15)"},title:u?"Collapse":`Show ${f.length} live session${1===f.length?"":"s"}`,children:[(0,t.jsx)("span",{style:{display:"inline-block",width:6,height:6,borderRadius:"50%",background:"#ef4444",animation:"cs-live-pulse 1.6s ease-in-out infinite"}}),"Live · ",f.length]}),u&&h>0&&(0,t.jsxs)("div",{style:{fontSize:10,color:"var(--af-text-tertiary)",padding:"0 4px",textAlign:"right"},children:["+",h," more live"]}),p.map(e=>(0,t.jsxs)(a.default,{href:`/sessions/${e.id}`,style:{display:"block",padding:"10px 12px",background:"var(--af-surface-elevated)",border:"1px solid var(--af-border-subtle)",borderLeft:"2px solid #ef4444",borderRadius:8,boxShadow:"0 4px 16px rgba(0, 0, 0, 0.12)",textDecoration:"none",color:"var(--af-text)",fontSize:11,lineHeight:1.35,backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)"},title:(e.lastUserPreview||e.firstUserPreview||e.lastAgentPreview)??(0,o.prettyProjectName)(e.projectName),children:[(0,t.jsx)("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontWeight:500,color:"var(--af-text)"},children:e.lastUserPreview||e.firstUserPreview||(0,t.jsx)("em",{style:{color:"var(--af-text-tertiary)"},children:"(no user message)"})}),(0,t.jsx)("div",{style:{fontSize:10,color:"var(--af-text-secondary)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",marginTop:3,fontStyle:"italic"},children:e.lastAgentPreview?(0,t.jsxs)(t.Fragment,{children:["↳ ",e.lastAgentPreview]}):(0,t.jsx)("em",{style:{color:"var(--af-text-tertiary)"},children:"waiting…"})}),(0,t.jsx)("div",{style:{fontSize:9,color:"var(--af-text-tertiary)",fontFamily:"var(--font-mono)",marginTop:4,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:(0,o.prettyProjectName)(e.projectName)})]},e.id)),(0,t.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
- `})]})}])}]);