@caddis/cli 0.4.99 → 0.4.101
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/antigravity-plugin/plugin.json +1 -1
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_exit.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_file_lock.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_frontmatter.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_redact.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_roadmap.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_rows.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_status.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_tidy.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_todo.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_workstreams.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_worktree_safety.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/caddis_guide.json +2 -2
- package/bundles/manifest.json +2 -2
- package/dist/allowed-urls.txt +2 -1
- package/dist/export/assets/export-Cb3BXZCo.js +150 -0
- package/dist/export/assets/export-or4yLaQm.css +1 -0
- package/dist/export/fonts/jetbrains-mono-400.69ae33df.woff2 +0 -0
- package/dist/export/fonts/jetbrains-mono-500.347650fa.woff2 +0 -0
- package/dist/export/fonts/jetbrains-mono-700.7de821f9.woff2 +0 -0
- package/dist/export/fonts/plus-jakarta-sans-400.9b3aa900.woff2 +0 -0
- package/dist/export/fonts/plus-jakarta-sans-500.91dc7710.woff2 +0 -0
- package/dist/export/fonts/plus-jakarta-sans-600.7689b278.woff2 +0 -0
- package/dist/export/fonts/plus-jakarta-sans-700.55a58633.woff2 +0 -0
- package/dist/export/fonts/plus-jakarta-sans-800.66e135bf.woff2 +0 -0
- package/dist/export/index.html +2 -2
- package/dist/export/licenses/{OFL-IBMPlexMono.txt → OFL-JetBrainsMono.txt} +3 -3
- package/dist/{ui/licenses/OFL-IBMPlexMono.txt → export/licenses/OFL-PlusJakartaSans.txt} +3 -3
- package/dist/ui/assets/Activity-BH0Scw-H.js +1 -0
- package/dist/ui/assets/Guide-Bict51LS.css +1 -0
- package/dist/ui/assets/{Guide-BUXTwb19.js → Guide-f5f2DrlU.js} +2 -2
- package/dist/ui/assets/Palette-BIlBqNvr.css +1 -0
- package/dist/ui/assets/Palette-cTwLWgn4.js +11 -0
- package/dist/ui/assets/RoadmapTab-BqLBt4fW.js +21 -0
- package/dist/ui/assets/external-link-BFMu4CXk.js +6 -0
- package/dist/ui/assets/index-39J2d1qv.js +226 -0
- package/dist/ui/assets/index-h1dmppYX.css +1 -0
- package/dist/ui/fonts/jetbrains-mono-400.69ae33df.woff2 +0 -0
- package/dist/ui/fonts/jetbrains-mono-500.347650fa.woff2 +0 -0
- package/dist/ui/fonts/jetbrains-mono-700.7de821f9.woff2 +0 -0
- package/dist/ui/fonts/plus-jakarta-sans-400.9b3aa900.woff2 +0 -0
- package/dist/ui/fonts/plus-jakarta-sans-500.91dc7710.woff2 +0 -0
- package/dist/ui/fonts/plus-jakarta-sans-600.7689b278.woff2 +0 -0
- package/dist/ui/fonts/plus-jakarta-sans-700.55a58633.woff2 +0 -0
- package/dist/ui/fonts/plus-jakarta-sans-800.66e135bf.woff2 +0 -0
- package/dist/ui/index.html +2 -2
- package/dist/{export/licenses/OFL-IBMPlexSans.txt → ui/licenses/OFL-JetBrainsMono.txt} +3 -3
- package/dist/ui/licenses/{OFL-IBMPlexSans.txt → OFL-PlusJakartaSans.txt} +3 -3
- package/package.json +1 -1
- package/dist/export/assets/export-B3cUoxL1.js +0 -150
- package/dist/export/assets/export-DQss44R1.css +0 -1
- package/dist/export/fonts/ibm-plex-mono-400.6d569bb7.woff2 +0 -0
- package/dist/export/fonts/ibm-plex-mono-700.9f478677.woff2 +0 -0
- package/dist/export/fonts/ibm-plex-sans-400.17fc1ce7.woff2 +0 -0
- package/dist/export/fonts/ibm-plex-sans-500.dcc69acf.woff2 +0 -0
- package/dist/export/fonts/ibm-plex-sans-600.d4dad061.woff2 +0 -0
- package/dist/export/fonts/ibm-plex-sans-700.40d9a530.woff2 +0 -0
- package/dist/ui/assets/Activity-D69HiVjS.js +0 -6
- package/dist/ui/assets/Guide-DTd261-c.css +0 -1
- package/dist/ui/assets/RoadmapTab-CjYa5fye.js +0 -31
- package/dist/ui/assets/index--fRgH-8i.js +0 -236
- package/dist/ui/assets/index-9pdDzLVp.css +0 -1
- package/dist/ui/fonts/ibm-plex-mono-400.6d569bb7.woff2 +0 -0
- package/dist/ui/fonts/ibm-plex-mono-700.9f478677.woff2 +0 -0
- package/dist/ui/fonts/ibm-plex-sans-400.17fc1ce7.woff2 +0 -0
- package/dist/ui/fonts/ibm-plex-sans-500.dcc69acf.woff2 +0 -0
- package/dist/ui/fonts/ibm-plex-sans-600.d4dad061.woff2 +0 -0
- package/dist/ui/fonts/ibm-plex-sans-700.40d9a530.woff2 +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import{e as P,j as e,r as u,p as R,h as Y,i as Z,P as ee,w as se,k as I,m as $,n as T,O as ae,d as ne,b as M,o as re,q as C,u as le,v as te,x as ie,y as ce,z as oe,A as de,c as he,l as S,B as me,E as pe,F as xe,H as ue,J as je,S as Ne,N as ge,M as ke}from"./index-39J2d1qv.js";import{Q as qe}from"./index-39J2d1qv.js";/**
|
|
2
|
+
* @license lucide-react v1.61.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const _={name:"arrow-right-left",size:24,node:[["path",{d:"m16 3 4 4-4 4",key:"1x1c3m"}],["path",{d:"M20 7H4",key:"zbl0bi"}],["path",{d:"m8 21-4-4 4-4",key:"h9nckh"}],["path",{d:"M4 17h16",key:"g4d7ey"}]]};_.node;const fe=P(_);/**
|
|
7
|
+
* @license lucide-react v1.61.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/const A={name:"circle-check",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 9-5.5 5.5L8 12",key:"xofnsj"}]],aliases:["check-circle-2"]};A.node;const be=P(A);/**
|
|
12
|
+
* @license lucide-react v1.61.0 - ISC
|
|
13
|
+
*
|
|
14
|
+
* This source code is licensed under the ISC license.
|
|
15
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
+
*/const F={name:"circle",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]};F.node;const we=P(F);/**
|
|
17
|
+
* @license lucide-react v1.61.0 - ISC
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the ISC license.
|
|
20
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
+
*/const V={name:"loader",size:24,node:[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]]};V.node;const ye=P(V);function B({phase:s}){return e.jsxs(e.Fragment,{children:[s.prs.map(a=>a.url?e.jsxs("a",{className:"rm-pr mono","data-testid":"rm-pr",href:a.url,target:"_blank",rel:"noreferrer noopener",children:["#",a.number]},a.number):e.jsxs("span",{className:"rm-pr mono","data-testid":"rm-pr",children:["#",a.number]},a.number)),e.jsx("span",{className:`rm-stage tile-${s.tile}`,"data-testid":"rm-stage",children:s.stage})]})}function v({status:s}){const a=s==="done"||s==="not-needed";return e.jsx("span",{className:`chip ${a?"chip-resolved":s==="in-progress"?"chip-waiting":"chip-hub"}`,children:s})}function ve({detail:s,note:a=null,variant:l,onClose:t}){const n=u.useId(),r=u.useRef(null);if(u.useEffect(()=>{var g;(g=r.current)==null||g.focus()},[s==null?void 0:s.phase.ref]),!s)return null;const{title:i,text:o,phase:h}=s,x=R(h);return e.jsxs("aside",{className:"rm-panel","data-testid":"rm-panel",role:"dialog","aria-modal":"false","aria-labelledby":n,children:[e.jsxs("h3",{id:n,"data-testid":"rm-panel-title",tabIndex:-1,ref:r,children:[h.ref," ",i]}),e.jsx("button",{type:"button",className:"rm-panel-close","data-testid":"rm-panel-close","aria-label":"Close",onClick:t,children:"×"}),e.jsx(v,{status:h.tile}),h.tracker&&e.jsx("p",{"data-testid":"rm-panel-tracker",children:h.tracker}),x&&e.jsx("p",{"data-testid":"rm-panel-meta",children:x}),e.jsx("div",{className:"rm-panel-prs",children:e.jsx(B,{phase:h})}),l!=="site"&&(o!==null?e.jsx("pre",{className:"rm-panel-text","data-testid":"rm-panel-text",children:o}):a==="loading"?e.jsx("p",{"data-testid":"rm-panel-note",children:"Loading the plan section…"}):a==="error"?e.jsx("p",{"data-testid":"rm-panel-note",children:"Could not load the plan section."}):e.jsx("p",{"data-testid":"rm-panel-empty",children:"The plan has no section for this phase."}))]})}function E(){try{return typeof window<"u"?window.localStorage:null}catch{return null}}function z(s){const[a,l]=u.useState(()=>s??Y(E()));return[a,n=>()=>{l(n),se(E(),n)}]}function H({view:s,choose:a}){return e.jsxs("div",{className:"rm-view",role:"group","aria-label":"View","data-testid":"rm-view",children:[e.jsx("button",{type:"button","data-testid":"rm-view-timeline","aria-pressed":s==="timeline",onClick:a("timeline"),children:"Timeline"}),e.jsx("button",{type:"button","data-testid":"rm-view-board","aria-pressed":s==="board",onClick:a("board"),children:"Board"})]})}function K({m:s,pool:a,repo:l,variant:t}){const[n,r]=u.useState(null),[i,o]=u.useState(null),[h,x]=u.useState(0),g=u.useRef(null),d=n?Z(s,a,n):null,k=u.useContext(ee),c=d==null?void 0:d.planPath,m=d==null?void 0:d.key,w=d!==null&&t!=="site"&&d.hasSection&&d.text===null&&d.planPath!==null&&k!==null;u.useEffect(()=>{if(!w||!n||!d||!d.planPath||!k)return;let j=!0;return k(l.path,d.planPath,d.key).then(y=>{j&&o({ref:n,text:y.text||null,error:!1})},()=>{j&&o({ref:n,text:null,error:!0})}),()=>{j=!1}},[n,w,k,l.path,c,m,h]);const p=i&&i.ref===n?i:null,b=(j,y)=>{if(g.current=y,j===n){p!=null&&p.error&&(o(null),x(X=>X+1));return}o(null),r(j)},N=()=>{var j;o(null),r(null),(j=g.current)==null||j.focus()};u.useEffect(()=>{if(n===null)return;const j=y=>{I(y.target)||y.key==="Escape"&&N()};return window.addEventListener("keydown",j),()=>window.removeEventListener("keydown",j)},[n]);const f=e.jsx(ve,{detail:d?{title:d.title,text:d.text??(p==null?void 0:p.text)??null,phase:d.phase}:null,note:w&&!p?"loading":p!=null&&p.error?"error":null,variant:t,onClose:N});return{open:b,panel:f}}const $e={todo:we,"in-progress":ye,done:be,moved:fe,blocked:ae},q={size:14,"aria-hidden":!0};function D({tile:s}){const a=$e[s];return e.jsx(a,{...q})}function L({p:s}){const a=R(s);return e.jsxs(e.Fragment,{children:[e.jsxs("strong",{children:[s.ref," ",s.name]}),e.jsxs("span",{children:[T[s.tile]," · ",s.tracker||s.stage]}),s.prs.length>0&&e.jsx("span",{children:s.prs.map(l=>`#${l.number}`).join(" ")}),a&&e.jsx("span",{children:a}),s.highRisk&&e.jsx("span",{children:"high risk"})]})}const Pe=s=>`${s} ${s===1?"gate":"gates"}`;function Te(s){return[`run by ${s.owner}`,s.target?`target ${s.target}`:"",s.depends.length?`after ${s.depends.join(", ")}`:""].filter(Boolean).join(" · ")}function U({done:s,total:a}){const l=a?Math.round(100*s/a):0;return e.jsxs("div",{className:"rm-bar-wrap",children:[e.jsx("div",{className:"rm-bar",role:"img","aria-label":`${s} of ${a} phases done`,children:e.jsx("i",{style:{width:`${l}%`}})}),e.jsxs("span",{className:"rm-bar-text",children:[s,"/",a," phases · ",l,"%"]})]})}function Re(s,a){const l=document.getElementById(`ms-${s}-${a}`);l instanceof HTMLDetailsElement&&(l.open=!0),l==null||l.scrollIntoView({block:"start"})}function W({m:s,match:a,onOpen:l}){const t=r=>!a||a.phases.has(r.ref),n=s.milestones.length;return e.jsxs("section",{className:"rm-section","data-testid":"rm-timeline","aria-label":"Timeline",children:[e.jsx("h3",{className:"flow-h",children:"Timeline"}),e.jsxs("div",{className:"rm-timeline-grid",style:{"--rm-cols":n},children:[e.jsxs("div",{className:"rm-head-row",children:[e.jsx("div",{className:"rm-cell rm-head rm-lane",children:"Plan / milestone"}),s.milestones.map(r=>e.jsxs("div",{className:"rm-cell rm-head",children:[e.jsx("strong",{children:r.id})," ",e.jsx(v,{status:r.status}),e.jsx("span",{className:"rm-sub",children:r.depends.length?`after ${r.depends.join(", ")}`:"starts first"}),r.blockers.length>0&&e.jsx("span",{className:"rm-gate-count",children:Pe(r.blockers.length)})]},r.id))]}),s.lanes.map(r=>e.jsxs("div",{className:"rm-row",children:[e.jsxs("div",{className:"rm-cell rm-lane",children:[r.plan,e.jsxs("span",{className:"rm-sub",children:[r.done,"/",r.total," done"]})]}),s.milestones.map(i=>e.jsx("div",{className:"rm-cell",children:i.phases.filter(o=>o.plan===r.plan&&t(o)).map(o=>e.jsx($,{content:e.jsx(L,{p:o}),children:e.jsxs("button",{type:"button",className:"rm-tile","data-state":o.tile,"data-risk":o.highRisk?"high":void 0,onClick:h=>l(o.ref,h.currentTarget),children:[e.jsx(D,{tile:o.tile}),s.kind!=="plan"&&e.jsx("b",{className:"mono",children:o.num}),e.jsx("span",{children:o.name}),e.jsx("span",{className:"sr-only",children:T[o.tile]}),o.highRisk&&e.jsx("i",{className:"rm-risk","aria-label":"high risk"})]})},o.ref))},i.id))]},r.plan)),s.blockers.length>0&&e.jsxs("div",{className:"rm-row",children:[e.jsx("div",{className:"rm-cell rm-lane",children:"Owner and outside"}),s.milestones.map(r=>e.jsx("div",{className:"rm-cell",children:r.blockers.map((i,o)=>e.jsx($,{content:`${i.type}: ${i.reason}`,children:e.jsxs("div",{className:"rm-gate-note",tabIndex:0,children:[i.type,": ",i.reason.length>60?`${i.reason.slice(0,60)}…`:i.reason]})},o))},r.id))]})]}),e.jsx("div",{className:"rm-timeline-list","data-testid":"rm-timeline-list",children:s.milestones.map(r=>e.jsxs("div",{children:[e.jsxs("h4",{className:"rm-list-h",children:[r.id," ",e.jsx(v,{status:r.status})]}),r.phases.filter(t).map(i=>e.jsx($,{content:e.jsx(L,{p:i}),children:e.jsxs("button",{type:"button",className:"rm-tile","data-state":i.tile,"data-risk":i.highRisk?"high":void 0,onClick:o=>l(i.ref,o.currentTarget),children:[e.jsx(D,{tile:i.tile}),s.kind!=="plan"&&e.jsxs("b",{className:"mono",children:[i.plan," ",i.num]}),e.jsx("span",{children:i.name}),e.jsx("span",{className:"sr-only",children:T[i.tile]}),i.highRisk&&e.jsx("i",{className:"rm-risk","aria-label":"high risk"})]})},i.ref))]},r.id))}),e.jsxs("div",{className:"rm-legend","data-testid":"rm-legend",children:[e.jsx("span",{children:"to do · in progress · done · moved · blocked: each tile has an icon and a label"}),e.jsx("span",{children:"red dot = Risk high (stops for review)"})]})]})}function G({m:s,match:a,onOpen:l}){return e.jsxs("section",{className:"rm-section","data-testid":"rm-milestones","aria-label":"Milestones and phases",children:[e.jsx("h3",{className:"flow-h",children:"Milestones and phases"}),s.milestones.filter(t=>!a||a.milestones.has(t.id)).map(t=>e.jsxs("details",{className:"rm-ms",id:`ms-${s.slug}-${t.id}`,open:a?!0:void 0,children:[e.jsxs("summary",{children:[e.jsx("strong",{children:t.id})," ",e.jsx(v,{status:t.status}),s.kind!=="plan"&&e.jsx("span",{className:"rm-sub",children:Te(t)})]}),t.phases.length===0?e.jsx("p",{className:"col-empty",children:"No build phases."}):e.jsx("ul",{className:"flow-list",children:t.phases.filter(n=>!a||a.phases.has(n.ref)).map(n=>e.jsxs("li",{className:"flow-row","data-testid":"rm-phase","data-state":n.tile,children:[e.jsxs("div",{className:"flow-row-head",children:[e.jsx("code",{className:"mono",children:n.ref}),e.jsx("button",{type:"button",className:"flow-title rm-open",onClick:r=>l(n.ref,r.currentTarget),children:n.name}),e.jsx(B,{phase:n})]}),e.jsxs("span",{className:"flow-why",children:[R(n)||"no model, lane or risk recorded",n.tracker?` · Tracker: ${n.tracker}`:""]})]},n.ref))})]},`${t.id}-${a?"q":"n"}`))]})}const J=(s,a,l)=>s==="site"?l?`#/roadmap/${encodeURIComponent(l)}`:"#/":ne(a,"roadmap",l);function Ce({repo:s,m:a,variant:l}){const t=M(s);return e.jsxs("div",{className:"rm-list-view",children:[(a.errors.length>0||a.repoError||a.roadmaps.some(n=>n.detailError))&&e.jsxs("div",{className:"lane-note","data-testid":"rm-errors",children:[a.repoError&&e.jsxs("div",{children:["Could not read this repo: ",a.repoError]}),a.errors.map(n=>e.jsxs("div",{children:["Could not read ",n.slug,": ",n.error]},n.slug)),a.roadmaps.filter(n=>n.detailError).map(n=>e.jsxs("div",{children:["Detail unavailable for ",n.slug,": ",n.detailError]},n.slug))]}),e.jsx("ul",{className:"flow-list rm-cards","data-testid":"rm-list","aria-label":"Roadmaps",children:a.roadmaps.map(n=>{const r=re(n);return e.jsx("li",{children:e.jsxs("a",{className:`rm-rcard rm-card tone-${r.tone}`,"data-testid":"rm-card",href:J(l,t,n.slug),children:[e.jsxs("span",{children:[e.jsx("strong",{children:r.slug})," ",e.jsx("span",{className:"rm-sub",children:r.branch??""})]}),e.jsx(U,{done:r.phasesDone,total:r.phasesTotal}),e.jsxs("span",{className:"rm-sub",children:[r.milestonesDone,"/",r.milestonesTotal," milestones"]}),e.jsx("span",{className:"rm-dots",children:r.dots.map(i=>e.jsx("span",{className:`rm-dot s-${i.status}`,children:i.id},i.id))}),e.jsxs("span",{className:"rm-sub",children:["next: ",r.next,l==="hub"?` · runner: ${r.runner}`:"",r.gates>0?` · ${r.gates} open gate${r.gates===1?"":"s"}`:""]})]})},n.slug)})})]})}const Se=s=>new Date(s*1e3).toISOString().slice(0,10);function Ee({plans:s}){const[a,l]=u.useState(!1);if(s.length===0)return null;const t=a?s:s.slice(0,C);return e.jsxs("details",{className:"rm-done","data-testid":"rm-done",children:[e.jsxs("summary",{className:"rm-done-sum",children:[e.jsx("span",{className:"rm-plan-title",children:"Done plans"}),e.jsx("span",{className:"rm-sub",children:s.length})]}),e.jsx("ul",{className:"rm-done-list",children:t.map(n=>e.jsxs("li",{className:"rm-done-row","data-testid":"rm-done-row",children:[e.jsx($,{content:e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"mono",children:n.path}),e.jsxs("span",{children:["closed ",n.closedAt===null?"date unknown":new Date(n.closedAt*1e3).toISOString()]}),e.jsxs("span",{children:[n.phases," ",n.phases===1?"phase":"phases",n.pr?` · #${n.pr.number}`:""]})]}),children:e.jsx("span",{className:"rm-done-title",tabIndex:0,children:n.title})}),e.jsxs("span",{className:"rm-done-meta",children:[e.jsx("span",{className:"rm-done-date",children:n.closedAt===null?"date unknown":Se(n.closedAt)}),e.jsxs("span",{children:[n.phases," ",n.phases===1?"phase":"phases"]}),n.pr&&(n.pr.url?e.jsxs("a",{className:"rm-pr mono","data-testid":"rm-done-pr",href:n.pr.url,target:"_blank",rel:"noreferrer noopener",children:["#",n.pr.number]}):e.jsxs("span",{className:"rm-pr mono","data-testid":"rm-done-pr",children:["#",n.pr.number]}))]})]},n.path))}),!a&&s.length>C&&e.jsxs("button",{type:"button",className:"btn","data-testid":"rm-done-all",onClick:()=>l(!0),children:["Show all ",s.length]})]})}const De={todo:"todo","in-progress":"prog",blocked:"block",done:"done",moved:"done"},O=s=>s.replace(/^☐\s*/u,"").trim();function Le({plan:s}){if(s.rows.length===0)return null;const a=le(s);return e.jsxs("span",{className:"rm-pkpis","data-testid":"rm-plan-kpis",children:[e.jsxs("span",{className:"rm-pkpi",children:[e.jsxs("span",{className:"rm-pkpi-num",children:[a.done," / ",a.total]})," ","done"]}),e.jsx("span",{className:"rm-pbar",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":a.pct,"aria-label":"Share of rows done",children:e.jsx("span",{style:{width:`${a.pct}%`}})}),e.jsxs("span",{className:"rm-pkpi rm-pkpi-pct",children:[a.pct," %"]}),e.jsxs("span",{className:`rm-pkpi${a.inProgress?" tone-prog":""}`,children:[e.jsx("span",{className:"rm-pkpi-num",children:a.inProgress})," in progress"]}),e.jsxs("span",{className:`rm-pkpi${a.blocked?" tone-block":""}`,children:[e.jsx("span",{className:"rm-pkpi-num",children:a.blocked})," blocked"]}),e.jsxs("span",{className:"rm-pkpi",children:[e.jsx("span",{className:"rm-pkpi-num",children:a.todo})," to do"]})]})}function Oe({plan:s}){if(s.rows.length===0)return e.jsx("p",{className:"col-empty","data-testid":"rm-plan-board",children:"This plan has no Tracker table."});const a=te(s);return e.jsx("div",{className:"rm-cols rm-cols-4","data-testid":"rm-plan-board",children:ie.map(l=>e.jsxs("div",{"data-col":l.key,children:[e.jsxs("h4",{className:"rm-list-h",children:[l.label," · ",a[l.key].length]}),a[l.key].length===0?e.jsx("p",{className:"col-empty",children:"none"}):a[l.key].map((t,n)=>e.jsxs("div",{className:`rm-rcard rm-pcard tone-${De[t.state]}${t.state==="moved"?" is-moved":""}`,children:[e.jsx("strong",{children:t.phase}),O(t.status)?e.jsx("span",{className:"rm-sub",children:O(t.status)}):null]},`${t.phase}-${n}`))]},l.key))})}function Ie({m:s,plan:a,repo:l,variant:t,initialView:n}){const[r,i]=z(n),{open:o,panel:h}=K({m:s,pool:[a],repo:l,variant:t}),x=s.kpis;return e.jsxs("div",{className:"rm-detail","data-testid":"rm-detail",children:[s.detailError&&e.jsxs("div",{className:"lane-note","data-testid":"rm-errors",children:["Roadmap detail is unavailable: ",s.detailError,". Phase names, Tracker cells and PR links are missing."]}),e.jsx("header",{"data-testid":"rm-header",children:e.jsxs("p",{className:"page-subtitle",children:[x.phasesDone," of ",x.phasesTotal," phases done"]})}),e.jsx(H,{view:r,choose:i}),e.jsxs("section",{className:"rm-kpis kpi-strip","data-testid":"rm-kpis","aria-label":"Summary",children:[e.jsxs("div",{className:"kpi-tile",children:[e.jsx("span",{className:"kpi-label",children:"Phases done"}),e.jsxs("span",{className:"kpi-num",children:[x.phasesDone," / ",x.phasesTotal]})]}),e.jsxs("div",{className:"kpi-tile",children:[e.jsx("span",{className:"kpi-label",children:"In progress"}),e.jsx("span",{className:"kpi-num",children:x.inProgress.length}),e.jsx("span",{className:"kpi-sub tone-muted",children:x.inProgress.join(", ")||"none"})]})]}),r==="timeline"?e.jsx(W,{m:s,match:null,onOpen:o}):e.jsx(Oe,{plan:a}),e.jsx(G,{m:s,match:null,onOpen:o}),h]})}function Me(s){const[a]=u.useState(()=>ce(s));return a}function _e({plan:s,repo:a,variant:l,initialView:t,defaultOpen:n}){const[r,i]=u.useState(n);return e.jsxs("details",{className:"rm-plan","aria-label":s.title,open:r||void 0,onToggle:o=>i(o.currentTarget.open),children:[e.jsxs("summary",{className:"rm-plan-sum",children:[e.jsx("span",{className:"rm-plan-title",children:s.title}),e.jsxs("span",{className:"rm-sub",children:[s.open," open"]}),s.overlay&&e.jsx("span",{className:"rm-plan-branch","data-testid":"rm-plan-branch",children:oe(s.overlay)}),e.jsx(Le,{plan:s}),e.jsx("span",{className:"rm-plan-only",children:"plan only, no runner"})]}),r&&e.jsx(Ie,{m:de(a,s),plan:s,repo:a,variant:l,initialView:t})]})}function Q({plans:s,repo:a,variant:l,initialView:t,initialOpenAll:n}){const r=Me(s);return e.jsx(e.Fragment,{children:s.map(i=>e.jsx(_e,{plan:i,repo:a,variant:l,initialView:t,defaultOpen:n||i.path===r},i.path))})}function Ae({plans:s,repo:a,variant:l,initialView:t,initialOpenAll:n=!1}){return e.jsxs("div",{className:"flow","data-testid":"rm-plans",children:[e.jsx("p",{className:"page-subtitle",children:"No roadmap here. These plans are active. Click a plan to open or close it."}),e.jsx(Q,{plans:s,repo:a,variant:l,initialView:t,initialOpenAll:n})]})}function Fe({plans:s,repo:a,variant:l,initialView:t,initialOpenAll:n=!1}){return s.length===0?null:e.jsxs("div",{className:"flow","data-testid":"rm-other-plans",children:[e.jsx("h2",{className:"rm-title",children:"Plans with no roadmap"}),e.jsx(Q,{plans:s,repo:a,variant:l,initialView:t,initialOpenAll:n})]})}function Ve({m:s,repo:a,crumbHref:l,match:t,variant:n,initialView:r,plans:i}){const[o,h]=z(r),{open:x,panel:g}=K({m:s,pool:i??[],repo:a,variant:n}),d=s.kpis,k=c=>()=>Re(s.slug,c);return e.jsxs("div",{className:"rm-detail","data-testid":"rm-detail",children:[e.jsxs("nav",{className:"rm-crumbs","data-testid":"rm-crumbs","aria-label":"Breadcrumb",children:[l?e.jsx("a",{href:l,children:"Roadmaps"}):e.jsx("span",{children:"Roadmaps"})," › ",e.jsx("span",{children:he(a)})," › ",e.jsx("strong",{children:s.slug})]}),s.detailError&&e.jsxs("div",{className:"lane-note","data-testid":"rm-errors",children:["Roadmap detail is unavailable: ",s.detailError,". Phase names, Tracker cells and PR links are missing."]}),e.jsxs("header",{"data-testid":"rm-header",children:[e.jsxs("h2",{className:"rm-title",children:["Roadmap ",s.slug]}),e.jsxs("p",{className:"page-subtitle",children:[d.milestonesDone," of ",d.milestonesTotal," milestones · ",d.phasesDone," of ",d.phasesTotal," phases done",s.branch?e.jsxs(e.Fragment,{children:[" · branch ",e.jsx("code",{children:s.branch})]}):null,s.originCommit?e.jsxs(e.Fragment,{children:[" · origin ",e.jsx("code",{children:s.originCommit})]}):null]}),s.lanes.length>0&&e.jsx("div",{className:"rm-chips","data-testid":"rm-chips",children:s.lanes.map(c=>e.jsxs("span",{className:"rm-chip",children:[e.jsx("b",{children:c.plan})," ",e.jsxs("span",{className:"mono",children:[c.done,"/",c.total," phases"]})]},c.plan))})]}),e.jsx(H,{view:o,choose:h}),e.jsxs("section",{className:`rm-section rm-waiting${s.gates.length?" has":""}`,"data-testid":"rm-waiting","aria-label":"Waiting for you",children:[e.jsx("h3",{className:"flow-h",children:"Waiting for you"}),s.gates.length===0?e.jsx("p",{className:"col-empty",children:"No owner gate is waiting."}):e.jsx("ul",{className:"flow-list",children:s.gates.map((c,m)=>e.jsxs("li",{className:"flow-row",children:[e.jsxs("div",{className:"flow-row-head",children:[e.jsx("strong",{children:c.milestone}),e.jsx("span",{className:"chip chip-owner-gate",children:"owner-gate"})]}),e.jsx("span",{className:"flow-why",children:c.reason}),c.check&&e.jsx("code",{className:"mono",children:c.check})]},m))})]}),e.jsxs("section",{className:"rm-kpis kpi-strip","data-testid":"rm-kpis","aria-label":"Summary",children:[e.jsxs("div",{className:"kpi-tile",children:[e.jsx("span",{className:"kpi-label",children:"Phases done"}),e.jsxs("span",{className:"kpi-num",children:[d.phasesDone," / ",d.phasesTotal]})]}),e.jsxs("div",{className:"kpi-tile",children:[e.jsx("span",{className:"kpi-label",children:"Milestones done"}),e.jsxs("span",{className:"kpi-num",children:[d.milestonesDone," / ",d.milestonesTotal]})]}),e.jsxs("div",{className:"kpi-tile",children:[e.jsx("span",{className:"kpi-label",children:"In progress"}),e.jsx("span",{className:"kpi-num",children:d.inProgress.length}),e.jsx("span",{className:"kpi-sub tone-muted",children:d.inProgress.join(", ")||"none"})]}),e.jsxs("div",{className:"kpi-tile",children:[e.jsx("span",{className:"kpi-label",children:"High-risk phases"}),e.jsx("span",{className:`kpi-num${d.highRisk?" bad":""}`,children:d.highRisk})]}),e.jsxs("div",{className:"kpi-tile deploy",children:[e.jsx("span",{className:"kpi-label",children:"Next batch for the runner"}),e.jsx("span",{className:"kpi-val",children:d.next})]})]}),e.jsxs("section",{className:"rm-section","data-testid":"rm-flow","aria-label":"Flow",children:[e.jsx("h3",{className:"flow-h",children:"Flow"}),e.jsx("div",{className:"rm-chain",children:s.milestones.map((c,m)=>e.jsxs("span",{className:"rm-chain-item",children:[m>0&&e.jsx("span",{"aria-hidden":"true",children:"→"}),e.jsxs("button",{type:"button",className:`rm-node tone-${c.tone}`,onClick:k(c.id),children:[e.jsx("b",{children:c.id})," ",e.jsx(v,{status:c.status}),e.jsxs("span",{className:"rm-sub",children:[c.depends.length?`after ${c.depends.join(", ")}`:"starts first"," · ",c.done,"/",c.total," ph"]})]})]},c.id))})]}),o==="timeline"?e.jsx(W,{m:s,match:t,onOpen:x}):e.jsxs("section",{className:"rm-section","data-testid":"rm-board","aria-label":"Now, next, later",children:[e.jsx("h3",{className:"flow-h",children:"Now, next, later"}),e.jsx("div",{className:"rm-cols",children:["now","next","later"].map(c=>e.jsxs("div",{children:[e.jsx("h4",{className:"rm-list-h",children:c[0].toUpperCase()+c.slice(1)}),s.board[c].length===0?e.jsx("p",{className:"col-empty",children:"none"}):s.board[c].map(m=>e.jsxs("button",{type:"button",className:`rm-rcard tone-${m.tone}`,onClick:k(m.id),children:[e.jsxs("span",{children:[e.jsx("strong",{children:m.id})," ",e.jsx(v,{status:m.status})]}),e.jsx(U,{done:m.done,total:m.total}),m.blockers.map((w,p)=>e.jsx("span",{className:"rm-sub",children:w.type},p))]},m.id))]},c))})]}),e.jsxs("section",{className:"rm-section","data-testid":"rm-gates","aria-label":"Gates and blockers",children:[e.jsxs("h3",{className:"flow-h",children:["Gates and blockers · ",s.blockers.length," open"]}),s.blockers.length===0?e.jsx("p",{className:"col-empty",children:"No blockers."}):e.jsx("ul",{className:"flow-list",children:s.blockers.map((c,m)=>e.jsxs("li",{className:"flow-row",children:[e.jsxs("div",{className:"flow-row-head",children:[e.jsx("strong",{children:c.milestone}),e.jsx("span",{className:`chip ${c.type==="owner-gate"?"chip-owner-gate":"chip-hub"}`,children:c.type})]}),e.jsx("span",{className:"flow-why",children:c.reason}),c.check&&e.jsx("code",{className:"mono",children:c.check})]},m))})]}),e.jsx(G,{m:s,match:t,onOpen:x}),n==="hub"&&e.jsxs("section",{className:"rm-section","data-testid":"rm-runner","aria-label":"Runner",children:[e.jsx("h3",{className:"flow-h",children:"Runner"}),s.runner.running?e.jsxs("p",{children:["Running batch ",e.jsx("code",{children:s.runner.running.batch}),s.runner.running.since?` since ${S(s.runner.running.since)}`:"",s.runner.running.host?` (host ${s.runner.running.host}${s.runner.running.pid?`, pid ${s.runner.running.pid}`:""})`:"","."]}):e.jsx("p",{className:"col-empty",children:"No runner holds this roadmap now."}),s.runner.staleBatch!==null&&e.jsxs("p",{children:["A stale runner lock remains (batch ",e.jsx("code",{children:s.runner.staleBatch}),"): the runner that held it is gone."]}),s.runner.lastStop&&e.jsxs("p",{children:["Last stop record: ",s.runner.lastStopAt?`${S(s.runner.lastStopAt)}: `:"",s.runner.lastStop,"."]}),s.runner.errors.map(c=>e.jsxs("p",{className:"tone-warn",children:["Could not read ",c,"."]},c)),s.runner.next&&e.jsxs("p",{children:["Next batch: ",e.jsx("code",{children:s.runner.next})]})]}),g]})}function ze({repo:s,slug:a,stale:l=!1,lastOkAt:t=null,variant:n="hub",initialView:r,initialOpenAll:i=!1,nowMs:o}){const h=me(s),[x,g]=u.useState(""),d=u.useRef(null);u.useEffect(()=>{const b=N=>{var f;N.key==="/"&&!I(N.target)&&!N.ctrlKey&&!N.metaKey&&!N.altKey&&(N.preventDefault(),(f=d.current)==null||f.focus())};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[]);const k=M(s),c=l&&e.jsxs("p",{className:"lane-note","data-testid":"rm-stale",children:["Roadmap data is old. Last good read ",pe(t),". The numbers below are greyed."]}),m=n==="hub"?xe(s.plans,o??Date.now()):null,w=m&&e.jsx("p",{className:`page-subtitle rm-source${m.old?" tone-warn":""}`,"data-testid":"rm-source",children:m.text});let p;if(h.mode==="none")p=e.jsxs("div",{className:"notice","data-testid":"rm-none",children:[e.jsx("h2",{className:"rm-title",children:ge}),e.jsxs("p",{children:["Create one with ",e.jsx("code",{className:"cmd",children:ke}),"."]})]});else if(h.mode==="error")p=e.jsxs("div",{className:"lane-note","data-testid":"rm-errors",children:["Could not read this repo: ",h.repoError]});else if(h.mode==="plans")p=e.jsx(Ae,{plans:h.plans,repo:s,variant:n,initialView:r,initialOpenAll:i});else{const b=a?h.roadmaps.find(N=>N.slug===a):n==="hub"&&ue(h)?h.roadmaps[0]:void 0;if(b){const N=h.roadmaps.length+h.errors.length>1,f=je(b,x);p=e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"rm-searchbar",children:[e.jsxs("label",{className:"rm-search",children:[e.jsx(Ne,{...q}),e.jsx("span",{className:"sr-only",children:"Search this roadmap"}),e.jsx("input",{ref:d,type:"search","data-testid":"rm-search",placeholder:"Search phases, PRs, milestones (press /)",value:x,onChange:j=>g(j.target.value),onKeyDown:j=>{j.key==="Escape"&&g("")}})]}),e.jsx("span",{className:"rm-match","data-testid":"rm-match-count","aria-live":"polite",children:f?`${f.count} ${f.count===1?"match":"matches"}`:""})]}),e.jsx(Ve,{m:b,plans:h.plans,repo:s,crumbHref:N?J(n,k):null,match:f,variant:n,initialView:r})]})}else p=e.jsxs(e.Fragment,{children:[a&&e.jsxs("p",{className:"lane-note","data-testid":"rm-missing",children:["No roadmap named ",a," in this repo."]}),e.jsx(Ce,{repo:s,m:h,variant:n})]})}return e.jsxs("div",{className:`rm${l?" stale":""}`,"data-testid":"roadmap-tab",children:[c,w,p,h.mode==="roadmaps"?e.jsx(Fe,{plans:h.otherPlans,repo:s,variant:n,initialView:r,initialOpenAll:i}):null,h.mode!=="error"?e.jsx(Ee,{plans:h.done}):null]})}export{qe as collectorStale,ze as default};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{e}from"./index-39J2d1qv.js";/**
|
|
2
|
+
* @license lucide-react v1.61.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const a={name:"external-link",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]};a.node;const n=e(a);export{n as E};
|