@kyson8101/octiqflow-win32-x64 0.3.39 → 0.3.41

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 (78) hide show
  1. package/bin/octiq-server.exe +0 -0
  2. package/bin/v2/assets/DiskPage-DVfqyoqz.js +5 -0
  3. package/bin/v2/assets/DiskPage-DVfqyoqz.js.br +0 -0
  4. package/bin/v2/assets/DiskPage-DVfqyoqz.js.gz +0 -0
  5. package/bin/v2/assets/index-B8DT5HKJ.css +1 -0
  6. package/bin/v2/assets/index-B8DT5HKJ.css.br +0 -0
  7. package/bin/v2/assets/index-B8DT5HKJ.css.gz +0 -0
  8. package/bin/v2/assets/{index-Cd0n_VxC.js → index-BL1RAfWq.js} +1 -1
  9. package/bin/v2/assets/index-BL1RAfWq.js.br +0 -0
  10. package/bin/v2/assets/index-BL1RAfWq.js.gz +0 -0
  11. package/bin/v2/assets/index-B_vvHrU5.js +593 -0
  12. package/bin/v2/assets/index-B_vvHrU5.js.br +0 -0
  13. package/bin/v2/assets/index-B_vvHrU5.js.gz +0 -0
  14. package/bin/v2/assets/index-C1pngEyv.js +1 -0
  15. package/bin/v2/assets/index-C1pngEyv.js.br +0 -0
  16. package/bin/v2/assets/index-C1pngEyv.js.gz +0 -0
  17. package/bin/v2/assets/{index-BUnNGFRZ.js → index-CY1KRS3A.js} +1 -1
  18. package/bin/v2/assets/index-CY1KRS3A.js.br +0 -0
  19. package/bin/v2/assets/index-CY1KRS3A.js.gz +0 -0
  20. package/bin/v2/assets/{index-BTyjjsAP.js → index-CgUSmEaZ.js} +1 -1
  21. package/bin/v2/assets/index-CgUSmEaZ.js.br +0 -0
  22. package/bin/v2/assets/index-CgUSmEaZ.js.gz +0 -0
  23. package/bin/v2/assets/{index-x_0AZ0gO.js → index-Cr1ahHvS.js} +1 -1
  24. package/bin/v2/assets/index-Cr1ahHvS.js.br +0 -0
  25. package/bin/v2/assets/index-Cr1ahHvS.js.gz +0 -0
  26. package/bin/v2/assets/{index-QUPPQz05.js → index-D2WBuq1e.js} +1 -1
  27. package/bin/v2/assets/index-D2WBuq1e.js.br +0 -0
  28. package/bin/v2/assets/index-D2WBuq1e.js.gz +0 -0
  29. package/bin/v2/assets/index-DGfL328_.js +1 -0
  30. package/bin/v2/assets/index-DGfL328_.js.br +0 -0
  31. package/bin/v2/assets/index-DGfL328_.js.gz +0 -0
  32. package/bin/v2/assets/{index-Br2HaiAa.js → index-EHHEDw8H.js} +1 -1
  33. package/bin/v2/assets/index-EHHEDw8H.js.br +0 -0
  34. package/bin/v2/assets/index-EHHEDw8H.js.gz +0 -0
  35. package/bin/v2/assets/{index-DbCDAyrU.js → index-F2OEQF51.js} +1 -1
  36. package/bin/v2/assets/index-F2OEQF51.js.br +0 -0
  37. package/bin/v2/assets/index-F2OEQF51.js.gz +0 -0
  38. package/bin/v2/assets/{index-B_-XpF-s.js → index-mEU1Wi4u.js} +1 -1
  39. package/bin/v2/assets/index-mEU1Wi4u.js.br +0 -0
  40. package/bin/v2/assets/index-mEU1Wi4u.js.gz +0 -0
  41. package/bin/v2/assets/{index-BF-CBrxD.js → index-yWQh55Ga.js} +1 -1
  42. package/bin/v2/assets/index-yWQh55Ga.js.br +0 -0
  43. package/bin/v2/assets/index-yWQh55Ga.js.gz +0 -0
  44. package/bin/v2/index.html +2 -2
  45. package/package.json +1 -1
  46. package/bin/v2/assets/DiskPage-BnE_Fi4K.js +0 -5
  47. package/bin/v2/assets/DiskPage-BnE_Fi4K.js.br +0 -0
  48. package/bin/v2/assets/DiskPage-BnE_Fi4K.js.gz +0 -0
  49. package/bin/v2/assets/index-B4jDXDJN.js +0 -1
  50. package/bin/v2/assets/index-B4jDXDJN.js.br +0 -0
  51. package/bin/v2/assets/index-B4jDXDJN.js.gz +0 -0
  52. package/bin/v2/assets/index-BF-CBrxD.js.br +0 -0
  53. package/bin/v2/assets/index-BF-CBrxD.js.gz +0 -0
  54. package/bin/v2/assets/index-BTyjjsAP.js.br +0 -0
  55. package/bin/v2/assets/index-BTyjjsAP.js.gz +0 -0
  56. package/bin/v2/assets/index-BUnNGFRZ.js.br +0 -0
  57. package/bin/v2/assets/index-BUnNGFRZ.js.gz +0 -0
  58. package/bin/v2/assets/index-BWscB7HQ.css +0 -1
  59. package/bin/v2/assets/index-BWscB7HQ.css.br +0 -0
  60. package/bin/v2/assets/index-BWscB7HQ.css.gz +0 -0
  61. package/bin/v2/assets/index-B_-XpF-s.js.br +0 -0
  62. package/bin/v2/assets/index-B_-XpF-s.js.gz +0 -0
  63. package/bin/v2/assets/index-Br2HaiAa.js.br +0 -0
  64. package/bin/v2/assets/index-Br2HaiAa.js.gz +0 -0
  65. package/bin/v2/assets/index-Cd0n_VxC.js.br +0 -0
  66. package/bin/v2/assets/index-Cd0n_VxC.js.gz +0 -0
  67. package/bin/v2/assets/index-CgSm5IYM.js +0 -1
  68. package/bin/v2/assets/index-CgSm5IYM.js.br +0 -0
  69. package/bin/v2/assets/index-CgSm5IYM.js.gz +0 -0
  70. package/bin/v2/assets/index-DbCDAyrU.js.br +0 -0
  71. package/bin/v2/assets/index-DbCDAyrU.js.gz +0 -0
  72. package/bin/v2/assets/index-QUPPQz05.js.br +0 -0
  73. package/bin/v2/assets/index-QUPPQz05.js.gz +0 -0
  74. package/bin/v2/assets/index-vy2M7P1y.js +0 -593
  75. package/bin/v2/assets/index-vy2M7P1y.js.br +0 -0
  76. package/bin/v2/assets/index-vy2M7P1y.js.gz +0 -0
  77. package/bin/v2/assets/index-x_0AZ0gO.js.br +0 -0
  78. package/bin/v2/assets/index-x_0AZ0gO.js.gz +0 -0
Binary file
@@ -0,0 +1,5 @@
1
+ import{r as g,b as M,u as je,j as s,a as he,d as q,o as Ne,c as P,F as K,e as G,f as pe,n as fe,W as ve,A as Se}from"./index-B_vvHrU5.js";const T=e=>e&&typeof e=="object"?e:{},v=(e,n="")=>typeof e=="string"?e:n,L=e=>typeof e=="number"&&Number.isFinite(e)&&e>=0?e:0,H=e=>typeof e=="number"&&Number.isFinite(e)&&e>=0?e:null;function $e(e){const n=T(e);if(!v(n.scanId))return null;const i=new Set,d=(Array.isArray(n.items)?n.items:[]).flatMap(r=>{const o=T(r),m=v(o.id);if(!m||i.has(m))return[];i.add(m);const f=o.worktree?T(o.worktree):null;return[{id:m,key:v(o.key,m),group:o.group==="clean"||o.group==="review"?o.group:"work",kind:v(o.kind),label:v(o.label,v(o.kind,"Folder")),path:v(o.path),bytes:L(o.bytes),effect:v(o.effect),note:v(o.note),notRecommended:o.notRecommended===!0,action:["tool","docker","worktree","rm","rmOlderThan"].includes(v(T(o.action).type))?o.action:null,previousBytes:H(o.previousBytes),grew:o.grew===!0,worktree:f?{repo:v(f.repo),branch:v(f.branch),clean:typeof f.clean=="boolean"?f.clean:void 0,merged:typeof f.merged=="boolean"?f.merged:void 0,mainline:typeof f.mainline=="boolean"?f.mainline:void 0,inUse:typeof f.inUse=="boolean"?f.inUse:void 0,eligible:typeof f.eligible=="boolean"?f.eligible:void 0,idleDays:H(f.idleDays)??void 0,ignoredBytes:L(f.ignoredBytes)}:void 0}]});return{scanId:v(n.scanId),scannedAt:L(n.scannedAt),platform:n.platform==="macos"||n.platform==="windows"||n.platform==="linux"?n.platform:"unknown",home:v(n.home),thresholdBytes:L(n.thresholdBytes),totalBytes:H(n.totalBytes)??d.reduce((r,o)=>r+o.bytes,0),items:d,skipped:(Array.isArray(n.skipped)?n.skipped:[]).map(r=>{const o=T(r);return{path:v(o.path),reason:v(o.reason,"Unknown reason")}}),previousScanAt:H(n.previousScanAt)}}function me(e){const n=T(e);return v(n.scanId)?{scanId:v(n.scanId),startedAt:L(n.startedAt),phase:v(n.phase,"home"),entries:L(n.entries),bytes:L(n.bytes),path:v(n.path)}:null}function Ce(e){const n=T(e);return{running:me(n.running),report:$e(n.report)}}function Ie(e,n){return e.filter(i=>i.group===n).sort((i,d)=>d.bytes-i.bytes)}function _(e){return e.group!=="work"&&e.action!==null}function Ae(e,n){const i=new Set(e),d=n.filter(_),r=d.every(o=>e.has(o.id));return d.forEach(o=>r?i.delete(o.id):i.add(o.id)),i}function Fe(e,n,i){const d=e.filter(r=>_(r)&&n.has(r.id));return{ids:d.map(r=>r.id),count:d.length,bytes:d.reduce((r,o)=>r+o.bytes,0),skippedCount:d.filter(r=>!i&&(!r.action||r.action.type==="rm"||r.action.type==="rmOlderThan")).length}}function I(e){const n=L(e);return n<1e6?`${(n/1e3).toLocaleString("en-US",{maximumFractionDigits:0})} KB`:n<1e9?`${(n/1e6).toLocaleString("en-US",{maximumFractionDigits:1})} MB`:`${(n/1e9).toLocaleString("en-US",{maximumFractionDigits:2})} GB`}function Q(e){if(!e)return"an unknown date";const n=new Date(e<1e12?e*1e3:e);return Number.isNaN(n.getTime())?"an unknown date":n.toLocaleString("en-US",{dateStyle:"medium",timeStyle:"short"})}const R={clean:"Safe to clean",review:"Review first",work:"Your work"};function re(e,n,i){if(!(n>0&&i>0&&Number.isFinite(n*i)))return[];const d=e.filter(c=>c.bytes>0&&Number.isFinite(c.bytes)),r=d.reduce((c,x)=>Math.max(c,x.bytes),0),o=d.reduce((c,x)=>c+x.bytes/r,0),m=d.map(c=>({id:c.id,area:c.bytes/r/o*n*i})),f=[];let w=0,b=0,h=n,t=i,p=0;const k=(c,x)=>{const j=c.reduce((l,u)=>l+u.area,0),a=c.map(l=>l.area);return Math.max(x*x*Math.max(...a)/(j*j),j*j/(x*x*Math.min(...a)))};for(;p<m.length;){const c=[m[p++]],x=Math.min(h,t);for(;p<m.length&&k([...c,m[p]],x)<=k(c,x);)c.push(m[p++]);const j=c.reduce((y,N)=>y+N.area,0),a=h>=t,l=j/(a?t:h);let u=0;c.forEach((y,N)=>{const $=N===c.length-1?(a?t:h)-u:y.area/l;f.push({id:y.id,x:w+(a?0:u),y:b+(a?u:0),width:a?l:$,height:a?$:l}),u+=$}),a?(w+=l,h=Math.max(0,n-w)):(b+=l,t=Math.max(0,i-b))}return f}function De(e,n,i=.015){const d=[];for(const r of["clean","review","work"]){const o=new Map;for(const t of e){if(t.group!==r||!(t.bytes>0&&Number.isFinite(t.bytes)))continue;const p=o.get(t.kind)??[];p.push(t),o.set(t.kind,p)}const m=(t,p,k)=>({id:t,group:r,label:p,items:[...k].sort((c,x)=>x.bytes-c.bytes),bytes:k.reduce((c,x)=>c+x.bytes,0),selectedCount:k.filter(c=>_(c)&&n.has(c.id)).length}),f=[...o].map(([t,p])=>{const k=p.length===1?p[0].label:t==="git-worktree"?"Linked Git worktrees":p.every(c=>c.label===p[0].label)?p[0].label:(t.replace(/[-_]/g," ")||"Folders").replace(/^./,c=>c.toUpperCase());return m(JSON.stringify([r,t]),k,p)}),w=f.reduce((t,p)=>t+p.bytes,0),b=f.filter(t=>t.bytes/w<i),h=f.filter(t=>t.bytes/w>=i);b.length&&h.push(m(JSON.stringify([r,null]),"Other",b.flatMap(t=>[...t.items]))),d.push(...h.sort((t,p)=>p.bytes-t.bytes||t.id.localeCompare(p.id)))}return d}const ae=(e,n)=>n.bytes-e.bytes||e.id.localeCompare(n.id);function O(e,n,i){return{id:i,label:n,group:e[0].group,bytes:e.reduce((d,r)=>d+r.bytes,0),selectedCount:e.reduce((d,r)=>d+r.selectedCount,0),items:e.flatMap(d=>[...d.items]).sort((d,r)=>r.bytes-d.bytes)}}function Re(e,n,i,d){const r=["clean","review","work"].flatMap(b=>{const h=e.filter(t=>t.group===b);return h.length?[O(h,R[b],JSON.stringify([b]))]:[]}),o=(b,h)=>{const t=d(h);return b.width>=t.width&&b.height>=t.height},m=[],f=new Map(r.map(b=>[b.id,e.filter(h=>h.group===b.group).sort(ae)]));let w=r;for(;;){const b=re(w,n,i),h=[];let t=!1;for(const p of w){const k=b.find(u=>u.id===p.id);if(!k||!o(k,p)){m.push(p),f.delete(p.id),t=!0;continue}let c=f.get(p.id);const x=re(c,k.width,k.height),j=c.filter(u=>!o(x.find(y=>y.id===u.id),u));if(!j.length){h.push({box:k,tiles:x.map(u=>({...c.find(y=>y.id===u.id),...u}))});continue}if(t=!0,c.length===1){f.set(p.id,[p]);continue}const a=JSON.stringify([p.group,null]),l=c.find(u=>u.id===a);if(l&&j.every(u=>u===l))m.push(l),c=c.filter(u=>u!==l);else{const u=c.filter(N=>N!==l).at(-1);c=c.filter(N=>N!==u&&N!==l);const y=m.findIndex(N=>N.id===a);y>=0?m[y]=O([u,m[y]],"Other",a):(c.push(O(l?[u,l]:[u],"Other",a)),c.sort(ae)),c.length===1&&(c=[O(c,p.label,p.id)])}f.set(p.id,c)}if(!t)return{regions:h,summaries:m};w=w.filter(p=>f.has(p.id)).map(p=>O(f.get(p.id),p.label,p.id))}}const ie=e=>String(e?.message??e);function Be(e){const[n,i]=g.useState({running:null,report:null}),[d,r]=g.useState(null),[o,m]=g.useState(!1),[f,w]=g.useState(!0),b=g.useRef(0),h=g.useRef(!1),t=g.useRef(n),p=g.useRef(new Set),k=g.useCallback(j=>{t.current=j,i(j)},[]),c=g.useCallback(async()=>{const j=++b.current;try{const a=await M.invoke("disk_scan_state",{});if(!h.current||j!==b.current)return;const l=Ce(a);l.running&&p.current.has(l.running.scanId)&&(l.running=null),k(l),r(null)}catch(a){h.current&&j===b.current&&r(ie(a))}finally{h.current&&j===b.current&&w(!1)}},[k]);g.useEffect(()=>(h.current=!0,()=>{h.current=!1,++b.current}),[]),g.useEffect(()=>{if(!e){w(!1);return}const j=M.on("disk-scan-progress",l=>{const u=me(l);!u||p.current.has(u.scanId)||t.current.running&&t.current.running.scanId!==u.scanId||(++b.current,k({...t.current,running:u}),w(!1))}),a=M.on("disk-scan-done",l=>{l?.scanId&&(p.current.add(l.scanId),t.current.running?.scanId===l.scanId&&k({...t.current,running:null}),c().then(()=>{h.current&&l.error&&r(String(l.error))}))});return c(),()=>{j(),a(),++b.current}},[e,c,k]);const x=g.useCallback(async()=>{if(!e||o)return;m(!0),r(null);const j=t.current.running;try{await M.invoke(j?"disk_scan_cancel":"disk_scan_start",j?{scanId:j.scanId}:{}),h.current&&await c()}catch(a){h.current&&r(ie(a))}finally{h.current&&m(!1)}},[e,o,c]);return{...n,error:d,pending:o,loading:f,scan:x}}const Me={enabled:!0,buildAfterDays:3,removeAfterDays:14},Z=e=>`worktree-lifespan:${e}`,Ee=["Needs you","Waiting to clear","Kept","In use"];function Le(e){return e.owner.kind==="unknown"?"In use":e.pinned?"Kept":e.state==="abandoned"?"Needs you":e.state==="finished"||e.state==="idle"?"Waiting to clear":"In use"}function le(e){const n=[e.stripAt,e.removeAt].filter(i=>i!==null);return n.length?Math.min(...n):null}function Ue(e){return Ee.map(n=>({label:n,items:e.filter(i=>Le(i)===n).sort((i,d)=>(n==="Waiting to clear"?(le(i)??1/0)-(le(d)??1/0):0)||i.owner.label.localeCompare(d.owner.label)||i.key.localeCompare(d.key))})).filter(n=>n.items.length)}function W(e){return new Date(e).toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function Te(e){const n=Math.floor(e);return n<1?"Idle less than a day":`${n} idle ${n===1?"day":"days"}`}const ge="The host could not check for ignored files. Archive and remove is unavailable.";function be(e){return e.ignoredFiles!=null&&e.ignoredFiles>0?`${e.ignoredFiles} ignored ${e.ignoredFiles===1?"file":"files"}${e.ignoredBytes!=null?` (${I(e.ignoredBytes)})`:""}`:""}function V(e){return[e.dirtyFiles>0&&`${e.dirtyFiles} changed`,e.untrackedFiles>0&&`${e.untrackedFiles} new ${e.untrackedFiles===1?"file":"files"}`,be(e),e.unmergedCommits>0&&`${e.unmergedCommits} ${e.unmergedCommits===1?"commit":"commits"} not merged`,e.pushed===!1&&"Not pushed"].filter(Boolean).join(" · ")}function _e(e,n=!0){if(e.owner.kind==="unknown")return"Unknown owner · OctiqFlow leaves it alone";if(e.pinned)return"Kept · Automatic clearing paused";if(e.state==="active")return"In use";if(e.state==="abandoned")return"Abandoned · Waiting for you";const i=e.state==="finished"?"Finished":"Idle";if(!n)return`${i} · Automatic clearing off`;const d=[e.stripAt!==null&&`Build output clears ${W(e.stripAt)}`,e.removeAt!==null&&`Folder clears ${W(e.removeAt)}`].filter(Boolean);return[i,...d.length?d:["No clearing scheduled"]].join(" · ")}function We(e){return e.some(n=>n.bytes===null)?null:e.reduce((n,i)=>n+i.bytes,0)}function ke(e,n=!1){return`${n?"Last sweep":"Sweep"} removed ${e.removed.length} and freed ${I(e.freedBytes)}${e.stripped>0?` · ${e.stripped} build ${e.stripped===1?"output":"outputs"} cleared`:""}`}function ze(e,n){return!/^\d+$/.test(e)||!/^\d+$/.test(n)||!Number.isSafeInteger(Number(e))||!Number.isSafeInteger(Number(n))||Number(e)<1||Number(n)<1?"Use a whole number of at least 1 day for each window.":Number(e)>Number(n)?"Build output must clear no later than folders.":null}function Oe(e){const n=be(e),i=e.ignoredFiles==null?ge:n?`${n} will be deleted and ${e.ignoredFiles===1?"is":"are"} not in the archive.`:"";return{title:`Archive and remove ${e.owner.label}?`,body:`${i?`${i}
2
+ `:""}${e.path}
3
+ ${V(e)||"No changed files or unmerged commits reported."}
4
+ The archive keeps tracked changes and new files before removing this worktree.${i?"":" Ignored files are not kept."}`,confirmLabel:"Archive and remove",cancelLabel:"Keep worktree",decision:!0}}const J=e=>/'worktree_lifespan_\w+' is not available on this backend/.test(e),oe=e=>String(e?.message??e);function Pe({connected:e}){const[n,i]=g.useState(null),[d,r]=g.useState(!1),[o,m]=g.useState(null),[f,w]=g.useState({}),[b,h]=g.useState({}),t=g.useRef(!1),p=g.useRef(0),k=je(),c=g.useCallback(async()=>{const l=++p.current;try{const u=await M.invoke("worktree_lifespan_list",{});if(!t.current||l!==p.current)return;i(u),r(!1),m(null)}catch(u){if(!t.current||l!==p.current)return;const y=oe(u);r(J(y)),J(y)&&i(null),m(J(y)?null:y)}},[]);g.useEffect(()=>{if(t.current=!0,!e)return()=>{t.current=!1,++p.current};const l=M.on("worktree-swept",()=>{c()}),u=M.on("worktree-lifespan-changed",()=>{c()});return c(),()=>{t.current=!1,++p.current,l(),u()}},[e,c]);const x=async(l,u,y,N)=>{e&&(N&&N.ignoredFiles==null||await Ne(Z(l),async()=>{if(!(N&&!await k(Oe(N)))){t.current&&w($=>{const A={...$};return delete A[l],A});try{const $=await M.invoke(u,y);u==="worktree_lifespan_restore"&&t.current&&h(A=>({...A,[l]:$}))}catch($){t.current&&w(A=>({...A,[l]:oe($)}))}finally{await c()}}}))},j=n?We(n.items):null,a=n?.history.reduce((l,u)=>!l||u.at>l.at?u:l,null);return s.jsxs("section",{className:"worktree-lifespan","aria-label":"Worktrees",children:[s.jsxs("div",{className:"wt-head",children:[s.jsxs("h2",{children:["Worktrees",n?` · ${n.items.length}`:"",j!==null&&` · ${I(j)}`]}),n?.scanning&&s.jsx("span",{role:"status",children:"Scanning worktrees…"})]}),d?s.jsx("p",{className:"wt-quiet",children:"Worktree lifespan is not available on this backend."}):s.jsxs(s.Fragment,{children:[!e&&s.jsx("p",{className:"wt-quiet",children:"Connect to the host to review worktrees."}),o&&s.jsx("p",{className:"wt-error",role:"alert",children:o}),!n&&e&&!o&&s.jsx("p",{className:"wt-quiet",children:"Reading worktrees…"}),n&&s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"wt-quiet",children:a?ke(a,!0):n.lastSweepAt!==null?`Last sweep ${W(n.lastSweepAt)}`:"No sweep yet"}),s.jsx(He,{settings:n.settings,connected:e,error:f.settings,action:x}),Ue(n.items).map(l=>s.jsxs("section",{className:`wt-group${l.label==="Needs you"?" wt-needs":""}`,"aria-label":l.label,children:[s.jsxs("h3",{children:[l.label," · ",l.items.length]}),l.items.map(u=>s.jsx(Ke,{item:u,enabled:n.settings.enabled,connected:e,error:f[u.key],action:x},u.key))]},l.label)),!!n.archives.length&&s.jsxs("section",{className:"wt-group","aria-label":"Archived",children:[s.jsxs("h3",{children:["Archived · ",n.archives.length]}),n.archives.map(l=>s.jsx(Ge,{archive:l,restored:b[l.key],connected:e,error:f[l.key],action:x},l.key))]}),!n.items.length&&!n.archives.length&&s.jsx("p",{className:"wt-quiet",children:"No managed worktrees."}),!!n.history.length&&s.jsx(Ye,{history:n.history})]})]})]})}function X({flightKey:e,connected:n,children:i,onClick:d,leading:r=!1}){const o=he(Z(e));return s.jsx("button",{type:"button",className:`wt-button${r?" wt-answer":""}`,disabled:!n||o,onKeyDown:q,onClick:m=>{pe(m)||(fe(m),d())},children:i})}function Ke({item:e,enabled:n,connected:i,error:d,action:r}){const o=P(e.key),m=e.owner.kind!=="unknown",f=m&&!e.pinned&&e.state==="abandoned";return s.jsxs("article",{className:`wt-row${f?" wt-needs-row":""}`,"aria-label":e.owner.label,children:[s.jsxs("div",{className:"wt-row-head",children:[s.jsx("strong",{children:e.owner.label}),e.bytes!==null&&s.jsx("span",{children:I(e.bytes)})]}),s.jsxs("p",{children:[e.repo,e.branch!==null&&` · ${e.branch}`," · ",Te(e.idleDays)]}),s.jsx("p",{className:"wt-fact",children:_e(e,n)}),f&&V(e)&&s.jsx("p",{children:V(e)}),f&&e.ignoredFiles==null&&s.jsx("p",{children:ge}),s.jsx(K,{fold:o,labels:["Path and details"],what:`details for ${e.owner.label}`}),s.jsxs(G,{fold:o,children:[s.jsx("code",{className:"wt-path",children:e.path}),s.jsx("p",{children:e.why}),e.unmergedCommits>0&&s.jsxs("p",{children:[e.unmergedCommits," ",e.unmergedCommits===1?"commit":"commits"," not merged"]}),e.pushed!==null&&s.jsx("p",{children:e.pushed?"Pushed":"Not pushed"}),e.buildBytes!==null&&s.jsxs("p",{children:["Build output · ",I(e.buildBytes)]})]}),m&&(e.pinned||e.state!=="active")&&s.jsxs("div",{className:"wt-actions",children:[s.jsx(X,{flightKey:e.key,connected:i,leading:f,onClick:()=>{r(e.key,"worktree_lifespan_keep",{key:e.key,keep:!e.pinned})},children:e.pinned?"Stop keeping":"Keep"}),f&&e.ignoredFiles!=null&&s.jsx(X,{flightKey:e.key,connected:i,onClick:()=>{r(e.key,"worktree_lifespan_archive",{key:e.key,expectedHead:e.head,expectedStatusHash:e.statusHash},e)},children:"Archive and remove"})]}),d&&s.jsx("p",{className:"wt-error",role:"alert",children:d})]})}function Ge({archive:e,restored:n,connected:i,error:d,action:r}){const o=P(e.key);return s.jsxs("article",{className:"wt-row","aria-label":`Archive ${e.branch??e.ref}`,children:[s.jsxs("strong",{children:[e.repo,e.branch!==null&&` · ${e.branch}`]}),s.jsxs("p",{children:["Archived ",W(e.archivedAt),e.files>0&&` · ${e.files} ${e.files===1?"file":"files"}`]}),s.jsx(K,{fold:o,labels:["Archive and original path"],what:`archive details for ${e.branch??e.ref}`}),s.jsxs(G,{fold:o,children:[s.jsx("code",{className:"wt-path",children:e.path}),s.jsx("code",{className:"wt-path",children:e.ref})]}),n?s.jsxs("p",{role:"status",children:["Restored ",s.jsx("code",{children:n.path}),n.branch!==null&&` · ${n.branch}`]}):e.restoredAt!==null?s.jsxs("p",{children:["Restored ",W(e.restoredAt)]}):s.jsx(X,{flightKey:e.key,connected:i,onClick:()=>{r(e.key,"worktree_lifespan_restore",{key:e.key})},children:"Restore"}),d&&s.jsx("p",{className:"wt-error",role:"alert",children:d})]})}function He({settings:e=Me,connected:n,error:i,action:d}){const[r,o]=g.useState({enabled:e.enabled,build:String(e.buildAfterDays),remove:String(e.removeAfterDays)});g.useEffect(()=>o({enabled:e.enabled,build:String(e.buildAfterDays),remove:String(e.removeAfterDays)}),[e.enabled,e.buildAfterDays,e.removeAfterDays]);const m=ze(r.build,r.remove),f=r.enabled!==e.enabled||Number(r.build)!==e.buildAfterDays||Number(r.remove)!==e.removeAfterDays,w=he(Z("settings")),b=h=>pe(h)?(h.preventDefault(),!1):(fe(h),!0);return s.jsxs("form",{className:"wt-settings","aria-label":"Worktree lifespan settings",onSubmit:h=>{h.preventDefault(),!m&&f&&n&&d("settings","worktree_lifespan_set",{enabled:r.enabled,buildAfterDays:Number(r.build),removeAfterDays:Number(r.remove)})},children:[s.jsxs("label",{children:[s.jsx("input",{type:"checkbox",role:"switch",checked:r.enabled,disabled:!n||w,onKeyDown:q,onClick:b,onChange:h=>o(t=>({...t,enabled:h.target.checked}))}),"Automatic clearing ",r.enabled?"on":"off"]}),s.jsxs("label",{children:["Build output after ",s.jsx("input",{"aria-label":"Build output idle days",type:"number",min:"1",step:"1",value:r.build,disabled:!n||w,onChange:h=>o(t=>({...t,build:h.target.value}))})," idle days"]}),s.jsxs("label",{children:["Folders after ",s.jsx("input",{"aria-label":"Folder idle days",type:"number",min:"1",step:"1",value:r.remove,disabled:!n||w,onChange:h=>o(t=>({...t,remove:h.target.value}))})," idle days"]}),s.jsx("button",{className:"wt-button",type:"submit",disabled:!n||w||!f||!!m,onKeyDown:q,onClick:h=>{b(h)},children:"Save settings"}),m&&s.jsx("p",{className:"wt-validation",role:"status",children:m}),i&&s.jsx("p",{className:"wt-error",role:"alert",children:i})]})}function Ye({history:e}){const n=P("worktree-sweep-history");return s.jsxs("div",{className:"wt-history",children:[s.jsx(K,{fold:n,labels:[`Past sweeps · ${e.length}`],what:"past sweeps"}),s.jsx(G,{fold:n,children:[...e].sort((i,d)=>d.at-i.at).map((i,d)=>s.jsxs("div",{className:"wt-sweep",children:[s.jsx("strong",{children:W(i.at)}),s.jsx("p",{children:ke(i)}),i.removed.map((r,o)=>s.jsxs("p",{children:[s.jsx("code",{className:"wt-path",children:r.path}),r.owner.label,r.branch!==null&&` · ${r.branch}`,r.bytes!==null&&` · ${I(r.bytes)}`]},o)),i.failed.map((r,o)=>s.jsxs("p",{className:"wt-error",children:[s.jsx("code",{className:"wt-path",children:r.path}),r.why]},o))]},`${i.at}:${d}`))})]})}function ts({connected:e,onClose:n}){const i=Be(e);return s.jsx(qe,{...i,worktrees:s.jsx(Pe,{connected:e}),connected:e,onScan:()=>{i.scan()},onClose:n})}const Je=[],ce=new Set;function qe({report:e,running:n=null,error:i,pending:d=!1,loading:r=!1,connected:o=!0,worktrees:m,onScan:f,onClose:w}){const[b,h]=g.useState({scanId:"",ids:ce}),[t,p]=g.useState(null),k=!!e&&t===e.scanId,[c,x]=g.useState(null),[j,a]=g.useState(null),[l,u]=g.useState(!1),y=g.useRef(e?.scanId);y.current=e?.scanId;const N=g.useRef(!0);g.useEffect(()=>(N.current=!0,()=>{N.current=!1}),[]),g.useEffect(()=>{x(null),a(null)},[e?.scanId]);const $=g.useRef(new Map),A=e?.items??Je,B=b.scanId===e?.scanId?b.ids:ce,U=Fe(A,B,k),ee=S=>{e&&h({scanId:e.scanId,ids:S})},[se,ne]=g.useState(null),z=se?.scanId===e?.scanId?se:null,xe=S=>{ne({scanId:e.scanId,ids:new Set(S.items.map(E=>E.id)),label:S.label});const C=$.current.get(S.items[0].id);C?.scrollIntoView({block:"center",behavior:"instant"}),C?.focus({preventScroll:!0})},Y=o?n?"Wait for the scan to finish before downloading a script.":U.count?null:"Select at least one item to download a script.":"Connect to the host to download a script.",ye=async()=>{if(!e||Y||l)return;const S=e.scanId;u(!0),a(null);try{const C=await M.invoke("disk_cleanup_script",{scanId:S,itemIds:U.ids,allowRm:k});if(!N.current||y.current!==S)return;if(typeof C?.script!="string"||typeof C?.fileName!="string"||!C.fileName)throw new Error("The host did not return a cleanup script.");const E=C.fileName.split(/[\\/]/).pop()||(e.platform==="windows"?"disk-cleanup.ps1":"disk-cleanup.sh"),F=URL.createObjectURL(new Blob([C.script],{type:"text/plain;charset=utf-8"})),D=document.createElement("a");D.href=F,D.download=E,document.body.append(D),D.click(),D.remove(),window.setTimeout(()=>URL.revokeObjectURL(F),1e3),x({scanId:S,fileName:E})}catch(C){N.current&&y.current===S&&a(String(C?.message??C))}finally{N.current&&u(!1)}},te=c?.scanId===e?.scanId?c?.fileName:e?.platform==="windows"?"disk-cleanup.ps1":"disk-cleanup.sh";return s.jsxs("section",{className:"disk-page","aria-label":"Disk report",children:[s.jsx(ve,{root:!0,title:s.jsx("h1",{children:"Disk"}),back:{label:"Chat",onClick:w},actions:s.jsx("button",{className:`disk-button${n?" is-scanning":""}`,type:"button",disabled:!o||d||r,onClick:f,"data-icon-action":!0,title:d?n?"Cancelling…":"Starting…":n?"Cancel scan":"Scan","aria-label":d?n?"Cancelling…":"Starting…":n?"Cancel scan":"Scan",children:s.jsx(Se,{name:n?"cancel":"refresh"})})}),s.jsxs("div",{className:"disk-body",children:[m,s.jsxs("div",{className:"disk-intro",children:[s.jsxs("div",{children:[s.jsx("h2",{children:"Development leftovers"}),s.jsx("p",{children:"Manual scans of your home folder and system temp. Metadata, Git and open-file checks only."})]}),e&&s.jsxs("div",{className:"disk-total",children:[s.jsx("strong",{children:I(e.totalBytes)}),s.jsxs("span",{children:[e.platform==="macos"?"macOS":e.platform==="windows"?"Windows":e.platform==="linux"?"Linux":"Unknown platform"," · Last scanned ",Q(e.scannedAt)]})]})]}),s.jsx("p",{className:"disk-promise",children:"This manual scan never deletes anything. You choose items, download a cleanup script and run it yourself."}),!o&&s.jsx("p",{className:"disk-message",role:"status",children:"Connect to the host to scan."}),i&&s.jsx("p",{className:"disk-error",role:"alert",children:i}),n&&s.jsxs("div",{className:"disk-progress",role:"status",children:[s.jsx("span",{className:"disk-progress-mark","aria-hidden":"true"}),s.jsxs("span",{children:["Scanning ",Qe(n.phase)," · ",n.entries.toLocaleString("en-US")," entries · ",I(n.bytes)," counted"]})]}),r&&!e&&s.jsx("p",{className:"disk-message",children:"Reading the last report…"}),!e&&!r&&s.jsxs("div",{className:"disk-empty",children:[s.jsx("h2",{children:"No scan yet"}),s.jsx("p",{children:"Scan when you want to review large development leftovers. Nothing is selected automatically."})]}),e&&s.jsxs(s.Fragment,{children:[s.jsxs("p",{className:"disk-threshold",children:["Items ≥ ",I(e.thresholdBytes)," · Size history: ",s.jsx("code",{children:"~/disk-report/sizes.csv"}),e.previousScanAt?` · Compared with ${Q(e.previousScanAt)}`:" · First recorded scan"]}),s.jsxs("div",{className:"disk-layout",children:[s.jsxs("div",{className:"disk-map-column",children:[s.jsx(Ve,{items:A,selected:B,onFocus:xe}),s.jsx("p",{className:"disk-map-help",children:"Area represents size. Choose a cleanup tile to highlight its rows. Your work is labelled only."})]}),s.jsxs("div",{className:"disk-list-column",children:[z&&s.jsxs("div",{className:"disk-found",role:"status",children:[z.label," · ",z.ids.size," ",z.ids.size===1?"row":"rows"," highlighted ",s.jsx("button",{type:"button",onClick:()=>ne(null),children:"Clear highlight"})]}),["clean","review"].map(S=>{const C=Ie(A,S),E=C.filter(_);return s.jsxs("section",{className:`disk-section disk-${S}`,"aria-label":R[S],children:[s.jsxs("div",{className:"disk-section-heading",children:[s.jsxs("h2",{children:[R[S]," ",s.jsx("span",{children:C.length})]}),s.jsxs("label",{className:"disk-tick-all",children:[s.jsx("input",{type:"checkbox",checked:E.length>0&&E.every(F=>B.has(F.id)),disabled:!E.length,onChange:()=>ee(Ae(B,C))}),"Select all",s.jsxs("span",{className:"sr-only",children:[" ",R[S]]})]})]}),!C.length&&s.jsx("p",{className:"disk-message",children:"No items in this section."}),C.map(F=>s.jsx(es,{item:F,highlighted:z?.ids.has(F.id),previousScanAt:e.previousScanAt,checked:B.has(F.id),onTick:()=>{if(!_(F))return;const D=new Set(B);D.has(F.id)?D.delete(F.id):D.add(F.id),ee(D)},rowRef:D=>{D?$.current.set(F.id,D):$.current.delete(F.id)}},`${e.scanId}:${F.id}`))]},S)}),s.jsx(ss,{report:e}),s.jsxs("section",{className:"disk-controls","aria-label":"Cleanup script",children:[s.jsxs("label",{className:"disk-rm-switch",children:[s.jsx("input",{type:"checkbox",role:"switch",checked:k,onChange:S=>p(S.target.checked?e.scanId:null)}),s.jsx("span",{children:"Use rm -rf for items with no tool command"})]}),s.jsx("p",{children:k?e.platform==="windows"?"The script can use PowerShell Remove-Item for these items.":"The script can use rm -rf for these items.":"Items with no tool command are printed as Skipped."}),s.jsxs("div",{className:"disk-download-row",children:[s.jsxs("strong",{children:[U.count," selected · ",I(U.bytes)]}),s.jsx("button",{className:"disk-button",type:"button",disabled:!!Y||l,"aria-describedby":"disk-download-reason",onClick:()=>{ye()},children:l?"Preparing script…":"Download cleanup script"})]}),U.skippedCount>0&&s.jsxs("p",{children:[U.skippedCount," selected ",U.skippedCount===1?"item will":"items will"," be printed as Skipped."]}),s.jsx("p",{id:"disk-download-reason",children:Y??"Review the script before running it."}),j&&s.jsx("p",{className:"disk-error",role:"alert",children:j}),s.jsxs("p",{className:"disk-run-example",children:["Run it in your terminal, for example: ",s.jsx("code",{children:e.platform==="windows"?`powershell -File "$HOME\\Downloads\\${te}"`:`bash ~/Downloads/${te}`})]})]})]})]})]})]})]})}function Qe(e){return{home:"home folder",temp:"system temp",git:"Git worktrees",history:"size history"}[e]??e}function de(e,n,i){return{left:`${e.x/n*100}%`,top:`${e.y/i*100}%`,width:`${e.width/n*100}%`,height:`${e.height/i*100}%`}}function Ve({items:e,selected:n,onFocus:i}){const d=g.useRef(null),[r,o]=g.useState(0),[m,f]=g.useState(null),[w,b]=Xe();g.useLayoutEffect(()=>{const a=d.current;if(!a)return;o(a.getBoundingClientRect().width);const l=new ResizeObserver(u=>{const y=u[0]?.contentRect.width;y>0&&o(y)});return l.observe(a),()=>l.disconnect()},[]);const h=Math.max(340,Math.min(520,r*1.1)),t=g.useMemo(()=>De(e,n),[e,n]),p=g.useMemo(()=>["clean","review","work"].map(a=>({id:a,bytes:t.filter(l=>l.group===a).reduce((l,u)=>l+u.bytes,0)})),[t]),k=g.useMemo(()=>w?Re(t,r,h,w):{regions:[],summaries:t},[t,r,h,w]),c=[...k.regions.flatMap(a=>a.tiles),...k.summaries],x=c.find(a=>a.id===m),j=(a,l)=>{const u=ue(a),y=!l,N=y?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"disk-tile-label",children:[a.label,a.label==="Other"?` in ${R[a.group]}`:""," · ",a.items.length," ",a.items.length===1?"item":"items"]}),s.jsx("span",{className:"disk-tile-size",children:we(a)})]}):s.jsx(Ze,{entry:a}),$=`${u}
5
+ ${a.items.length===1?a.items[0].path:`${a.items.length} items in ${R[a.group]}`}`,A={onMouseEnter:()=>{d.current?.parentElement?.contains(document.activeElement)||f(a.id)},onFocus:()=>f(a.id)},B=`${y?"disk-map-summary":"disk-tile"} disk-${a.group}${a.group==="work"?" is-work":""}${a.selectedCount?" is-selected":""}`;return a.group==="work"?s.jsx("div",{className:B,style:l,title:$,"aria-label":`${u}. Your work is labelled only.`,tabIndex:0,...A,children:N},a.id):s.jsx("button",{type:"button",className:B,style:l,title:$,"aria-label":`${u}. Find in ${R[a.group]}`,onClick:()=>i(a),...A,children:N},a.id)};return s.jsxs("section",{className:"disk-map-panel","aria-label":"Disk size treemap",children:[s.jsx("h2",{children:"Where the space goes"}),s.jsx("div",{className:"disk-map-legend",children:p.map(a=>s.jsxs("span",{className:`disk-${a.id}`,children:[s.jsx("i",{"aria-hidden":"true"}),R[a.id]," · ",I(a.bytes)]},a.id))}),b,s.jsx("div",{className:"disk-map",ref:d,style:{height:k.regions.length?h:0},children:k.regions.map(({box:a,tiles:l})=>s.jsx("div",{className:`disk-map-region disk-${l[0].group}`,style:de(a,r,h),"aria-label":R[l[0].group],children:l.map(u=>j(u,de(u,a.width,a.height)))},a.id))}),!t.length&&s.jsx("p",{className:"disk-message",children:"No large development leftovers found."}),!!k.summaries.length&&s.jsxs("div",{className:"disk-map-summaries","aria-label":"Groups summarized outside the map",children:[w&&s.jsx("p",{className:"disk-message",children:"Small items are summarized here. Map area represents only the items shown above."}),k.summaries.map(a=>j(a))]}),c.some(a=>a.selectedCount>0)&&s.jsx("p",{className:"disk-map-ticked","aria-live":"polite",children:c.filter(a=>a.selectedCount>0).map(a=>`${a.label} · ${a.selectedCount} ticked`).join("; ")}),s.jsx("div",{className:"disk-map-inspector","aria-live":"polite",children:x?s.jsxs(s.Fragment,{children:[s.jsx("strong",{children:ue(x)}),s.jsx("code",{children:x.items.length===1?x.items[0].path:`${x.items.length} items in ${R[x.group]}${x.group==="work"?" · Your work is labelled only.":" · Choose to highlight their rows."}`})]}):"Hover or focus a tile to see its full name, count and size."})]})}function ue(e){return`${e.label}, ${e.items.length} ${e.items.length===1?"item":"items"}, ${I(e.bytes)}${e.selectedCount?`, ${e.selectedCount} ticked`:""}`}function we(e){return`${I(e.bytes)}${e.selectedCount?` · ${e.selectedCount} ticked`:""}`}function Xe(){const e=g.useRef(null),n=g.useRef(null),[i,d]=g.useState(null);return g.useLayoutEffect(()=>{const r=e.current,o=n.current;if(!r||!o)return;let m=!0,f="";const w=()=>{if(!m)return;const h=getComputedStyle(r),t=getComputedStyle(o),p=r.getBoundingClientRect(),k=o.getBoundingClientRect(),c=[h.font,t.font,h.letterSpacing,t.letterSpacing,p.width,p.height,k.width,k.height].join("|");if(c===f)return;f=c;const x=document.createElement("canvas").getContext("2d");if(!x)return;const j=(y,N)=>(x.font=N.font,x.measureText(y).width+(parseFloat(N.letterSpacing)||0)*y.length),a={font:h.font,letterSpacing:h.letterSpacing},l={font:t.font,letterSpacing:t.letterSpacing},u=Math.max(..."0123456789".split("").map(y=>j(y,l)));d(()=>y=>{const N=y.items.filter(_).length,$=j(I(y.bytes),l)+(N?j(" · ticked",l)+String(N).length*u:0),A=j(`${y.label.split(/\s+/)[0].slice(0,10)}…`,a);return{width:Math.ceil(Math.max($,A))+26,height:Math.ceil(p.height+k.height)+6+26}})},b=new ResizeObserver(w);return b.observe(r),b.observe(o),w(),document.fonts.ready.then(w),()=>{m=!1,b.disconnect()}},[]),[i,s.jsxs("span",{className:"disk-map-probes","aria-hidden":"true",children:[s.jsx("span",{className:"disk-tile-label",ref:e,children:"Overview…"}),s.jsx("span",{className:"disk-tile-size",ref:n,children:"888.8 GB · 888 ticked"})]},"font-probes")]}function Ze({entry:e}){return s.jsxs("span",{className:"disk-tile-content","data-fit":"full","aria-hidden":"true",children:[s.jsxs("span",{className:"disk-tile-label disk-tile-visible-label",children:[e.label,e.items.length>1?` · ${e.items.length} items`:""]}),s.jsx("span",{className:"disk-tile-size disk-tile-visible-size",children:we(e)})]})}function es({item:e,checked:n,highlighted:i,onTick:d,previousScanAt:r,rowRef:o}){const m=P(e.id),f=g.useId(),w=_(e),b=e.effect.length>200,h=(e.note?.length??0)>200,t=e.worktree,p=t?[{label:"Working tree clean",pass:t.clean},{label:"Merged to mainline",pass:t.merged},{label:"Not a mainline worktree",pass:t.mainline===void 0?void 0:!t.mainline},{label:"Not in use",pass:t.inUse===void 0?void 0:!t.inUse}]:[];return s.jsxs("article",{ref:o,tabIndex:-1,className:`disk-item${n?" is-selected":""}${i?" is-found":""}`,"aria-label":e.label,children:[s.jsxs("div",{className:"disk-item-heading",children:[s.jsxs("label",{children:[s.jsx("input",{type:"checkbox",checked:w&&n,"aria-disabled":!w||void 0,"aria-describedby":!w||e.notRecommended?f:void 0,onChange:()=>{w&&d()}}),s.jsx("strong",{children:e.label})]}),s.jsx("strong",{className:"disk-item-size",children:I(e.bytes)})]}),s.jsx("code",{className:"disk-path",title:e.path,children:e.path}),(!w||e.notRecommended)&&s.jsx("p",{id:f,className:"disk-not-recommended",children:e.notRecommended?"Not recommended to delete":"No safe cleanup command for this item"}),!b&&e.effect&&s.jsx("p",{children:e.effect}),!h&&e.note&&s.jsx("p",{className:"disk-note",children:e.note}),e.grew&&e.previousBytes!==null&&e.bytes>e.previousBytes&&s.jsxs("p",{className:"disk-growth",children:["+",((e.bytes-e.previousBytes)/1e6).toLocaleString("en-US",{maximumFractionDigits:1})," MB since ",Q(r)]}),t&&s.jsxs(s.Fragment,{children:[s.jsx("ul",{className:"disk-worktree-facts",children:p.map(k=>s.jsxs("li",{className:k.pass===!0?"is-pass":"is-fail",children:[s.jsx("span",{children:k.pass===!0?"✓ Pass":k.pass===!1?"✕ Fail":"? Unknown"})," ",k.label]},k.label))}),!!t.ignoredBytes&&s.jsxs("p",{className:"disk-not-recommended",children:["Includes ",I(t.ignoredBytes)," of ignored files. Git does not protect these files."]})]}),s.jsx(K,{fold:m,labels:["Full path",b&&`Effect · ${e.effect.length} characters`,h&&`Note · ${e.note.length} characters`,t&&"Worktree details"],what:`details for ${e.label}`}),s.jsxs(G,{fold:m,bounded:!1,children:[s.jsx("code",{className:"disk-full-path",children:e.path}),b&&s.jsx("p",{children:e.effect}),h&&s.jsx("p",{children:e.note}),t&&s.jsxs("p",{children:["Repository: ",s.jsx("code",{children:t.repo||"Unknown"}),s.jsx("br",{}),"Branch: ",s.jsx("code",{children:t.branch||"Unknown"}),s.jsx("br",{}),"Idle: ",t.idleDays??"Unknown"," days · Eligible: ",t.eligible===void 0?"Unknown":t.eligible?"Yes":"No"]})]})]})}function ss({report:e}){const n=P(`${e.scanId}:skipped`);return s.jsxs("div",{className:"disk-skipped",children:[s.jsx(K,{fold:n,labels:[`${e.skipped.length} folders skipped`],what:"skipped folders"}),s.jsxs(G,{fold:n,bounded:!1,children:[s.jsx("ul",{children:e.skipped.map((i,d)=>s.jsxs("li",{children:[s.jsx("code",{children:i.path}),s.jsx("p",{children:i.reason})]},d))}),!e.skipped.length&&s.jsx("p",{children:"No folders were skipped."})]})]})}export{Ve as DiskMap,qe as DiskReportPage,ts as default};