@caddis/cli 0.4.97 → 0.4.99
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/README.md +4 -0
- package/bundles/antigravity-plugin/plugin.json +1 -1
- package/bundles/antigravity-plugin/repo_hygiene.py +134 -20
- 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_gate.py +18 -1
- package/bundles/antigravity-plugin/scripts/caddis_guide.json +2 -2
- package/bundles/antigravity-plugin/scripts/caddis_handoff.py +235 -0
- package/bundles/antigravity-plugin/scripts/caddis_hub_collect.py +23 -12
- package/bundles/antigravity-plugin/scripts/caddis_review.py +12 -0
- package/bundles/antigravity-plugin/scripts/caddis_tidy.py +152 -51
- package/bundles/antigravity-plugin/scripts/caddis_todo.py +136 -17
- package/bundles/antigravity-plugin/scripts/schemas/hub-collect.schema.json +60 -1
- package/bundles/antigravity-plugin/scripts/schemas/hub-plans.schema.json +60 -1
- package/bundles/antigravity-plugin/scripts/setup_project_ai.py +60 -2
- package/bundles/antigravity-plugin/skills/cross-review/SKILL.md +6 -0
- package/bundles/antigravity-plugin/skills/handoff/SKILL.md +80 -15
- package/bundles/antigravity-plugin/skills/implement/SKILL.md +6 -0
- package/bundles/antigravity-plugin/skills/park/SKILL.md +7 -2
- package/bundles/antigravity-plugin/skills/pr-merge/SKILL.md +1 -0
- package/bundles/antigravity-plugin/skills/ship-pr/SKILL.md +1 -0
- package/bundles/manifest.json +2 -2
- package/dist/cli.js +451 -170
- package/dist/export/assets/export-B3cUoxL1.js +150 -0
- package/dist/export/assets/export-DQss44R1.css +1 -0
- package/dist/export/index.html +2 -2
- package/dist/ui/assets/Activity-D69HiVjS.js +6 -0
- package/dist/ui/assets/{Guide-D-lZVEKf.js → Guide-BUXTwb19.js} +1 -1
- package/dist/ui/assets/Guide-DTd261-c.css +1 -0
- package/dist/ui/assets/RoadmapTab-CjYa5fye.js +31 -0
- package/dist/ui/assets/index--fRgH-8i.js +236 -0
- package/dist/ui/assets/index-9pdDzLVp.css +1 -0
- package/dist/ui/index.html +2 -2
- package/package.json +1 -1
- package/dist/export/assets/export-B5Lzo-9e.css +0 -1
- package/dist/export/assets/export-PF4z_ff4.js +0 -150
- package/dist/ui/assets/Activity-DN1XBfsH.js +0 -6
- package/dist/ui/assets/Guide-D-Zy4cUT.css +0 -1
- package/dist/ui/assets/RoadmapTab-tqQd2sYq.js +0 -31
- package/dist/ui/assets/index-CWslZIzV.js +0 -231
- package/dist/ui/assets/index-CwgRPpjT.css +0 -1
- package/dist/ui/assets/time-D00tu2ZP.js +0 -1
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{c as K,a as _,D as I,b as O,d as z,r as C,j as n,e as B}from"./index-CWslZIzV.js";import{l as Y}from"./time-D00tu2ZP.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 q={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"}]]};q.node;const F=K(q),G=["merge","deploy","health","owner","coordinator","approval"],U={merge:"Merges",deploy:"Deploys",health:"Health checks",owner:"Your actions",coordinator:"Coordinator results",approval:"Routine approvals"},A=100,E=s=>s&&typeof s=="object"&&!Array.isArray(s)?s:{},p=s=>typeof s=="string"&&s?s:null,D=s=>typeof s=="number"&&Number.isInteger(s)?s:null,L=O,b=(s,c)=>{var d;return(d=s==null?void 0:s.github)!=null&&d.repo&&c!==null?`https://github.com/${s.github.repo}/pull/${c}`:null},H={hotfix:"marked as hotfix",unhotfix:"unmarked as hotfix",hold:"held",release:"released",approve:"approved",decline:"declined"};function P(s){const c=s.action?H[s.action]??s.action:"sent a request",d=s.pr!==null?` #${s.pr}`:s.what?`: ${s.what}`:"";return s.result==="refused"?`Refused: you ${c}${d}`:`You ${c}${d}`}function V(s){var m,g,h,k,j;const c=[],d=new Map(s.repos.map(e=>[L(e),e])),M=e=>{const t=d.get(e);return t?z(t):e.replace("__","/")},u=e=>{const t=Date.parse(e.at);Number.isNaN(t)||c.push({...e,ms:t,repoLabel:M(e.repo)})};for(const e of s.repos){const t=L(e),x=new Set;for(const o of _((m=e.coordinator)==null?void 0:m.deploy_checks)){const a=E(o),r=D(a.pr),l=p(a.at);if(r===null||!l)continue;const f=(p(a.merge_sha)??"").toLowerCase();x.add(r);const i=E(a.checks),y=Object.keys(i).length>0,R=y?I.map(N=>`${N} ${p(i[N])??"skip"}`).join(" · "):null,T=y&&I.some(N=>i[N]==="fail"),S=D(a.deploy_run);u({id:`deploy:${t}:${r}:${f}`,kind:"deploy",repo:t,at:l,text:`Deploy check for #${r}`,detail:[R,S!==null?`run ${S}`:null,p(a.reason)].filter(Boolean).join(" · ")||null,tone:T?"bad":y?"good":"muted",pr:r,prUrl:b(e,r)});const v=p(a.health);(v==="ok"||v==="failed")&&u({id:`health:${t}:${r}:${f}`,kind:"health",repo:t,at:l,text:`Health check ${v} for #${r}`,detail:null,tone:v==="ok"?"good":"bad",pr:r,prUrl:b(e,r)})}for(const o of((g=e.github)==null?void 0:g.merges)??[])if(u({id:`merge:${t}:${o.number}:${o.merge_sha.toLowerCase()}`,kind:"merge",repo:t,at:o.merged_at,text:`Merged #${o.number} ${o.title}`,detail:o.merge_sha.slice(0,10),tone:"good",pr:o.number,prUrl:b(e,o.number)}),!x.has(o.number)&&o.runs.length){const a=o.runs.some(l=>l.conclusion==="failure"||l.conclusion==="cancelled"),r=o.runs.some(l=>l.status!=="completed");u({id:`deploy-runs:${t}:${o.number}:${o.merge_sha.toLowerCase()}`,kind:"deploy",repo:t,at:o.merged_at,text:`Deploy runs for #${o.number}`,detail:o.runs.map(l=>`${l.name} ${l.status==="completed"?l.conclusion??"done":l.status}`).join(" · "),tone:a?"bad":r?"muted":"good",pr:o.number,prUrl:b(e,o.number)})}const $=new Map((((h=e.coordinator)==null?void 0:h.requests)??[]).map(o=>[o.id,o]));for(const o of _((k=e.coordinator)==null?void 0:k.processed_requests)){const a=E(o),r=p(a.id),l=p(a.at),f=p(a.result);if(!r||!l||!f)continue;const i=$.get(r),y=i?`${H[i.action]??i.action}${i.pr!==null?` #${i.pr}`:i.what?`: ${i.what}`:""}`:`request ${r.slice(0,8)}`;u({id:`result:${t}:${r}`,kind:"coordinator",repo:t,at:l,text:`Coordinator ${f}: ${y}`,detail:p(a.reason),tone:f==="done"?"good":f==="rejected"?"bad":"warn",pr:(i==null?void 0:i.pr)??null,prUrl:b(e,(i==null?void 0:i.pr)??null)})}for(const o of _((j=e.coordinator)==null?void 0:j.ledger)){const a=E(o),r=p(a.at),l=p(a.what);a.approved_by!=="coordinator"||!r||!l||u({id:`ledger:${t}:${r}:${l}`,kind:"approval",repo:t,at:r,text:`Coordinator ${a.decision==="decline"?"declined":"approved"}: ${l}`,detail:p(a.reason),tone:a.decision==="decline"?"warn":"good",pr:null,prUrl:null})}}const w=new Map;return _(s.audit).forEach(e=>{const t=e,x=t.repo??"unknown",$=`audit:${t.at}:${t.request_id??"x"}:${t.action??""}:${t.result??""}`,o=(w.get($)??0)+1;w.set($,o),u({id:o===1?$:`${$}:${o}`,kind:"owner",repo:x,at:t.at,text:P(t),detail:t.reason,tone:t.result==="refused"?"warn":"muted",pr:t.pr,prUrl:b(d.get(x),t.pr)})}),c.sort((e,t)=>t.ms-e.ms||(e.id<t.id?-1:1))}function Z(s,c){return s.filter(d=>(c.repo===null||d.repo===c.repo)&&(c.kinds.size===0||c.kinds.has(d.kind)))}function W({state:s}){const c=C.useMemo(()=>V(s),[s]),[d,M]=C.useState(null),[u,w]=C.useState(new Set),[m,g]=C.useState(A),h=Z(c,{repo:d,kinds:u}),k=e=>{const t=new Set(u);t.has(e)?t.delete(e):t.add(e),w(t),g(A)},j=!s.sources.github.ok||s.sources.github.stale;return n.jsxs("div",{className:"flow","data-testid":"activity",children:[n.jsxs("div",{className:"page-header",children:[n.jsx("h1",{className:"page-title",children:"Activity"}),n.jsxs("span",{className:"page-subtitle",children:[h.length," events, newest first"]})]}),j&&n.jsx("p",{className:"lane-note","data-testid":"activity-stale",children:"GitHub data is old, so merges and deploys may be missing the newest events."}),n.jsxs("div",{className:"act-filters",role:"group","aria-label":"Filters",children:[n.jsxs("label",{children:[n.jsx("span",{className:"sr-only",children:"Repo"}),n.jsxs("select",{"data-testid":"activity-repo",value:d??"",onChange:e=>{M(e.target.value||null),g(A)},children:[n.jsx("option",{value:"",children:"All repos"}),s.repos.map(e=>{var t;return n.jsx("option",{value:L(e),children:((t=e.github)==null?void 0:t.repo)??e.name},L(e))})]})]}),n.jsx("div",{className:"act-kinds",role:"group","aria-label":"Kinds",children:G.map(e=>n.jsx("button",{type:"button",className:"act-kind","aria-pressed":u.has(e),"data-testid":`kind-${e}`,onClick:()=>k(e),children:U[e]},e))})]}),h.length===0?n.jsx("p",{className:"col-empty","data-testid":"activity-empty",children:c.length===0?"No activity yet. Merges, deploys and your actions show here.":"No event matches these filters."}):n.jsx("ul",{className:"flow-list","aria-label":"Events",children:h.slice(0,m).map(e=>n.jsxs("li",{className:"flow-row","data-testid":"activity-item","data-kind":e.kind,children:[n.jsxs("div",{className:"flow-row-head",children:[n.jsx("span",{className:"act-kindtag",children:U[e.kind]}),n.jsx("span",{className:`flow-title tone-${e.tone}`,children:e.text})]}),e.detail&&n.jsx("span",{className:"flow-why",children:e.detail}),n.jsxs("span",{className:"act-time",children:[n.jsx("time",{dateTime:e.at,children:Y(e.at)})," ·"," ",n.jsx("a",{href:B(e.repo,"flow"),children:e.repoLabel}),e.prUrl&&n.jsxs(n.Fragment,{children:[" · ",n.jsxs("a",{href:e.prUrl,target:"_blank",rel:"noreferrer noopener","data-testid":"activity-pr",children:["#",e.pr," ",n.jsx(F,{size:12,"aria-hidden":"true"})]})]})]})]},e.id))}),h.length>m&&n.jsxs("button",{type:"button",className:"btn","data-testid":"activity-more",onClick:()=>g(m+A),children:["Show more (",h.length-m," left)"]})]})}export{W as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.guide-hero{display:flex;align-items:center;gap:16px;margin-bottom:16px}.guide-mark{flex:none;width:56px;height:56px}.guide-mark svg{width:100%;height:100%}.guide-tools{display:grid;gap:12px;margin-bottom:20px}.guide-filter{display:grid;gap:4px}.guide-filter-label{font-size:13px;color:var(--text-sub)}.guide-filter-input{width:100%;min-height:40px;padding:0 12px;border-radius:8px;border:1px solid var(--border-bright);background:var(--bg-card);color:var(--text-main);font:inherit}.guide-filter-input:focus-visible,.guide-jump:focus-visible{outline:2px solid var(--green);outline-offset:2px}.guide-chips{display:flex;flex-wrap:wrap;gap:8px}.guide-jump{min-height:36px;padding:0 12px;border-radius:999px;border:1px solid var(--border-bright);background:transparent;color:var(--text-main);font:inherit;font-size:13px;cursor:pointer}.guide-jump:hover{background:var(--bg-elevated)}.guide-note{margin:0;font-size:13px;color:var(--text-dim)}.guide-section{margin-bottom:28px}.guide-section-title{display:flex;flex-wrap:wrap;align-items:baseline;gap:10px;margin:0 0 12px;font-size:20px}.guide-count,.guide-shown{font-size:13px;font-weight:600;color:var(--text-sub)}.guide-group-title{margin:16px 0 8px;font-size:13px;letter-spacing:.06em;text-transform:uppercase;color:var(--text-sub)}.guide-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,320px),1fr));gap:10px;margin:0;padding:0;list-style:none}.guide-entry{display:grid;gap:6px;min-width:0;padding:12px 14px;border-radius:10px;border:1px solid var(--border-dim);background:var(--bg-card)}.guide-entry-head{display:flex;flex-wrap:wrap;align-items:center;gap:6px}.guide-entry-name{font-weight:700;overflow-wrap:anywhere}.guide-entry-purpose{margin:0;font-size:14px;color:var(--text-sub);overflow-wrap:anywhere}.guide-entry-invoke{font-family:var(--font-mono);font-size:12.5px;color:var(--text-main);overflow-wrap:anywhere;white-space:pre-wrap}.guide-chip{padding:1px 8px;border-radius:999px;border:1px solid var(--border-bright);font-size:12px;color:var(--text-sub);white-space:nowrap}.guide-chip.good{color:var(--text-main);border-color:var(--green)}.guide-chip.warn{color:var(--text-main);border-color:var(--mk-warn)}.guide-none{color:var(--text-sub)}.guide-state-title{margin:0 0 6px;font-size:18px}.guide-tabs{display:flex;gap:4px;border-bottom:1px solid var(--border-dim);margin-bottom:20px}.guide-tabs [role=tab]{padding:8px 14px;border-bottom:2px solid transparent;text-decoration:none;color:inherit}.guide-tabs [role=tab][aria-selected=true]{border-bottom:2px solid var(--purple);color:var(--purple)}.gd-section{margin-bottom:28px}.gd-item summary{display:grid;grid-template-columns:minmax(180px,240px) 1fr auto;grid-auto-flow:column;gap:12px;padding:8px 0;cursor:pointer;align-items:baseline}.gd-blurb{color:var(--text-sub)}@media(max-width:560px){.gd-item summary{display:flex;flex-wrap:wrap;gap:4px 8px}.gd-item summary .gd-blurb{order:1;flex:0 0 100%}}.gd-stage{font-family:var(--font-head);font-size:15px;font-weight:600;margin:20px 0 6px}.gd-steps{margin:8px 0 8px 22px}.gd-hint{font-family:var(--font-mono);color:var(--text-sub)}.gd-group{border:1px solid var(--border-dim);border-radius:8px;padding:8px 12px;margin-bottom:8px}.gd-group summary{cursor:pointer;font-weight:600}.gd-skill{display:flex;align-items:baseline;gap:10px;padding:4px 0}.gd-table{width:100%;border-collapse:collapse}.gd-table th,.gd-table td{padding:6px 8px;border-bottom:1px solid var(--border-dim);text-align:left;vertical-align:top}.is-target{outline:2px solid var(--purple);outline-offset:4px}.gp-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px 16px;margin-bottom:18px}.gp-head-left{display:flex;align-items:center;gap:16px;min-width:0}.gp-title{font-family:var(--font-head);margin:0 0 4px;font-size:20px}.gp-counts{margin:0;font-size:13px;color:var(--text-sub)}.gp-switch{display:inline-flex;gap:2px;padding:2px;border:1px solid var(--border-dim);border-radius:999px;background:var(--bg-card);margin-left:auto}.gp-print{padding:6px 14px;border:1px solid var(--border-dim);border-radius:999px;background:var(--bg-card);color:var(--text-main);font:inherit;font-size:13px;cursor:pointer}.gp-print:hover{border-color:var(--purple)}.gp-hidden{display:none}.gp-switch button{padding:6px 12px;border:0;border-radius:999px;background:transparent;color:var(--text-sub);font:inherit;font-size:13px;cursor:pointer}.gp-switch button[aria-pressed=true]{background:var(--purple);color:var(--bg-canvas);font-weight:600}.gp-flow{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px}.gp-stage,.gp-band,.gp-card{background:var(--bg-card);border:1px solid var(--border-dim);border-radius:12px;padding:14px;min-width:0}.gp-stage{position:relative}.gp-stage:not(:last-child):after{content:"→";position:absolute;right:-12px;top:14px;color:var(--text-sub);pointer-events:none}.gp-stage h3,.gp-band h3,.gp-card h3{font-family:var(--font-head);display:flex;align-items:center;gap:8px;margin:0 0 10px;font-size:16px}.gp-step{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;border:1px solid var(--border-dim);font-size:12px;color:var(--text-sub);flex-shrink:0}.gp-sub{font-family:var(--font-head);font-size:13px;color:var(--text-sub);margin:8px 0 6px}.gp-bands{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:14px;margin-top:18px}.gp-foot{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px;margin-top:18px}.gp-chip{display:inline-block;padding:3px 8px;border-radius:999px;border:1px solid var(--border-dim);margin:0 6px 6px 0;font-family:var(--font-mono);font-size:13px;color:var(--text-main);text-decoration:none;max-width:100%;overflow-wrap:anywhere}.gp-chip:hover{border-color:var(--purple)}.gp-chip.is-daily{font-size:15px;font-weight:600}@media(max-width:900px){.gp-flow{grid-template-columns:repeat(2,minmax(0,1fr))}.gp-stage:not(:last-child):after{display:none}}@media(max-width:560px){.gp-flow{grid-template-columns:1fr}}.gp-map-wrap{max-width:1000px;margin:0 auto}.gp-map{display:block;width:100%;height:auto;overflow:visible}.gp-map a{text-decoration:none}@keyframes gp-pulse{0%{opacity:.85}to{opacity:1}}.gp-pulse{animation:gp-pulse 3s ease-in-out infinite alternate!important}html[data-motion=off] .gp-pulse{animation:none!important}@page{size:A3 landscape;margin:10mm}@media print{.app-bar,.mobile-topbar,.drawer-backdrop,.sidebar,.sidebar-top,.sidebar-footer,.banners,.banner,nav,footer,.guide-tabs,.gp-switch,.gp-print,.guide-hero{display:none!important}.main-area{margin-left:0!important}.page-wrap{max-width:none;padding:0;gap:0}.gp-hidden{display:block!important}.gp-map-wrap{break-before:page;max-width:250mm;max-height:250mm}.gp-map{max-height:250mm;width:auto;margin:0 auto}a,.gp a{color:inherit;text-decoration:none}.gp-stage,.gp-band,.gp-card{break-inside:avoid}}.gw{display:flex;flex-direction:column;gap:12px;overflow-x:auto}.gw-bar{display:flex;align-items:center;justify-content:space-between;gap:12px}.gw-bar p{margin:0;color:var(--text-muted, #5d6677)}.gw-sheet{--ink: #1b2130;--muted: #5d6677;--line: #dde2ea;--plan: #2f7de1;--build: #1f9d6b;--review: #d9822b;--ship: #d6455d;--cont: #7a5af5;--know: #0f8c95;--setup: #6b7280;--accent: #6b4fd8;flex:none;width:297mm;height:210mm;box-sizing:border-box;padding:8mm 9mm 7mm;background:#fff;color:var(--ink);font:8.3pt/1.3 var(--font-body, system-ui, sans-serif);display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;gap:3.2mm;overflow:hidden;box-shadow:0 4px 24px #00000026;-webkit-print-color-adjust:exact;print-color-adjust:exact;page:wall}.gw-sheet a{color:inherit;text-decoration:none}.gw-head{display:flex;align-items:flex-end;justify-content:space-between;border-bottom:2.5px solid var(--ink);padding-bottom:2mm}.gw-brand{font:800 30pt/1 var(--font-head, system-ui, sans-serif);letter-spacing:-1.5px}.gw-brand span{color:var(--accent)}.gw-tag{font-size:10pt;color:var(--muted);margin-left:4mm}.gw-stats{display:flex;gap:4mm;text-align:center}.gw-stats div{font-size:7pt;color:var(--muted);text-transform:uppercase;letter-spacing:.4px}.gw-stats b{display:block;font-size:15pt;line-height:1;color:var(--ink)}.gw-loop{display:flex;gap:1.6mm}.gw-step{flex:1 1 0;min-width:0;border-radius:2mm;padding:1.6mm 2mm;color:#fff!important;background:var(--accent)}.gw-step b{display:block;font:700 9.5pt var(--font-mono, monospace)}.gw-step span{font-size:7pt}.gw-cards{--gw-scale: 1;font-size:calc(8.3pt * var(--gw-scale));columns:4;column-gap:2.6mm;min-height:0;overflow:hidden}.gw-card{break-inside:avoid;margin:0 0 2.6mm;border:1px solid var(--line);border-top:3px solid var(--c, var(--accent));border-radius:1.6mm;padding:1.6mm 2.2mm 1.8mm}.gw-plan{--c: var(--plan)}.gw-build{--c: var(--build)}.gw-review{--c: var(--review)}.gw-ship{--c: var(--ship)}.gw-continuity{--c: var(--cont)}.gw-knowledge{--c: var(--know)}.gw-setup,.gw-other,.gw-agents{--c: var(--setup)}.gw-card h2{margin:0 0 1mm;font-size:1.18em;color:var(--c);text-transform:uppercase;letter-spacing:.6px}.gw-card h2 small{color:var(--muted);font-weight:400;text-transform:none;letter-spacing:0;font-size:.85em}.gw-row{padding:.55mm 0;border-top:1px dotted var(--line)}.gw-row:first-of-type{border-top:0}.gw-name{font:600 .99em var(--font-mono, monospace);overflow-wrap:anywhere}.gw-name.is-daily:before{content:"★ ";color:#c99400}.gw-blurb{color:var(--muted);font-size:.89em}.gw-foot{display:flex;justify-content:space-between;gap:4mm;color:var(--muted);font-size:7pt;border-top:1px solid var(--line);padding-top:1.5mm}@page wall{size:A4 landscape;margin:0}@media print{.gw-bar{display:none!important}.gw{overflow:visible}.gw-sheet{box-shadow:none}}.gm{--gm-bg: var(--bg-card);--gm-ink: var(--text-main);--gm-muted: var(--text-sub);--gm-line: var(--border-dim);--gm-accent: var(--purple);--gm-plan: var(--cyan);--gm-build: var(--green);--gm-review: var(--orange);--gm-ship: var(--pink);--gm-continuity: var(--purple);--gm-knowledge: var(--yellow);--gm-setup: var(--text-dim);--gm-core: var(--yellow);display:flex;flex-direction:column;gap:14px;min-width:0}.gm a{color:inherit;text-decoration:none}.gm a:hover{text-decoration:underline}.gm a:focus-visible,.gm-print:focus-visible{outline:2px solid var(--focus-ring);outline-offset:2px}.gm-bar{display:flex;flex-wrap:wrap;align-items:end;gap:12px 16px}.gm-filter{display:grid;gap:4px;flex:1 1 260px;max-width:420px}.gm-matches{margin:0;min-height:40px;display:flex;align-items:center;font-size:13px;color:var(--text-sub)}.gm-print{margin-left:auto;min-height:40px;padding:0 16px;border:1px solid var(--border-dim);border-radius:999px;background:var(--bg-card);color:var(--text-main);font:inherit;font-size:13px;cursor:pointer}.gm-print:hover{border-color:var(--purple)}.gm-sheet{display:grid;gap:26px;min-width:0;padding:20px;border:1px solid var(--gm-line);border-radius:12px;background:var(--bg-lane);color:var(--gm-ink);page:map}.gm-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:14px 24px;padding-bottom:14px;border-bottom:2px solid var(--gm-ink)}.gm-eyebrow{margin:0 0 4px;font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--gm-muted)}.gm-title{margin:0 0 6px;font-family:var(--font-head);font-size:clamp(26px,4vw,34px);line-height:1.1}.gm-lede{margin:0;max-width:64ch;color:var(--gm-muted)}.gm-stats{display:flex;flex-wrap:wrap;gap:8px 20px;margin:0}.gm-stats div{min-width:0}.gm-stats dt{font-size:11px;letter-spacing:.05em;text-transform:uppercase;color:var(--gm-muted)}.gm-stats dd{margin:0;font-family:var(--font-head);font-size:24px;font-weight:700;line-height:1.1;font-variant-numeric:tabular-nums}.gm-section{display:grid;gap:12px;min-width:0}.gm-h{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 10px;margin:0;font-family:var(--font-head);font-size:20px}.gm-h small{font-size:13px;font-weight:400;color:var(--gm-muted)}.gm-loop{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}.gm-lanes{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:14px}.gm-stage{--c: var(--gm-accent);position:relative;min-width:0;padding:12px 14px 14px;border:1px solid var(--gm-line);border-top:4px solid var(--c);border-radius:8px;background:var(--gm-bg)}.gm-s-plan{--c: var(--gm-plan)}.gm-s-build{--c: var(--gm-build)}.gm-s-review{--c: var(--gm-review)}.gm-s-ship{--c: var(--gm-ship)}.gm-s-continuity{--c: var(--gm-continuity)}.gm-s-knowledge{--c: var(--gm-knowledge)}.gm-s-setup,.gm-s-other{--c: var(--gm-setup)}.gm-stage.has-arrow:after{content:"→";position:absolute;right:-16px;top:8px;width:14px;text-align:center;color:var(--gm-muted);pointer-events:none}.gm-stage h3{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 8px;margin:0 0 8px;font-family:var(--font-head);font-size:16px;color:var(--c)}.gm-stage h3 small{font-size:12px;font-weight:400;color:var(--gm-muted)}.gm-count{margin-left:auto;font-size:12px;font-weight:600;color:var(--gm-muted);font-variant-numeric:tabular-nums}.gm-list{display:grid;gap:7px;margin:0;padding:0;list-style:none}.gm-item{display:grid;gap:1px;min-width:0}.gm-name{font-family:var(--font-mono);font-size:13px;font-weight:600;overflow-wrap:anywhere}.gm-name.is-daily:before{content:"★ ";color:var(--gm-core)}.gm-blurb{font-size:12.5px;color:var(--gm-muted)}.gm-dim{opacity:.25}.gm-timeline{position:relative;display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:6px 0;margin:0;padding:0;list-style:none}.gm-event{position:relative;display:grid;align-content:start;gap:4px;min-width:0;padding:22px 12px 0 0}.gm-event:before{content:"";position:absolute;left:0;right:0;top:7px;height:2px;background:var(--gm-line)}.gm-event:after{content:"";position:absolute;left:0;top:1px;width:12px;height:12px;border-radius:50%;background:var(--gm-accent)}.gm-matcher{font-size:12px;color:var(--gm-muted);overflow-wrap:anywhere}.gm-handlers{display:grid;gap:2px;margin:0;padding:0;list-style:none;font-family:var(--font-mono);font-size:12px;overflow-wrap:anywhere}.gm-agents{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,250px),1fr));gap:10px}.gm-agent{display:grid;gap:4px;min-width:0;padding:10px 12px;border:1px solid var(--gm-line);border-radius:8px;background:var(--gm-bg)}.gm-agent-head{display:flex;flex-wrap:wrap;align-items:center;gap:4px 6px}.gm-badge{padding:0 6px;border:1px solid var(--gm-line);border-radius:4px;font-size:10.5px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--gm-muted);white-space:nowrap}.gm-model{color:var(--gm-accent);border-color:var(--gm-accent)}.gm-families{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,280px),1fr));gap:16px 22px}.gm-family{display:grid;align-content:start;gap:6px;min-width:0}.gm-family h3{display:flex;align-items:baseline;gap:8px;margin:0;font-size:14px}.gm-chips{display:flex;flex-wrap:wrap;gap:5px}.gm-chip{max-width:100%;padding:1px 7px;border:1px solid var(--gm-line);border-radius:4px;background:var(--gm-bg);font-family:var(--font-mono);font-size:12px;overflow-wrap:anywhere}.gm-chip.is-core{border-color:var(--gm-core);font-weight:600}.gm-runtimes{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,220px),1fr));gap:10px}.gm-runtime{display:grid;gap:2px;min-width:0;padding:10px 12px;border:1px solid var(--gm-line);border-left:4px solid var(--gm-accent);border-radius:8px;background:var(--gm-bg)}.gm-runtime span{font-size:12.5px;color:var(--gm-muted)}.gm-foot{padding-top:10px;border-top:1px solid var(--gm-line);font-size:12px;color:var(--gm-muted)}@media(max-width:1000px){.gm-loop{grid-template-columns:repeat(2,minmax(0,1fr))}.gm-stage.has-arrow:after{display:none}}@media(max-width:700px){.gm-sheet{padding:14px 12px}.gm-loop{grid-template-columns:minmax(0,1fr)}.gm-timeline{grid-template-columns:minmax(0,1fr);padding-left:22px}.gm-event{padding:0 0 14px}.gm-event:before{left:-16px;right:auto;top:6px;bottom:-6px;width:2px;height:auto}.gm-event:last-child:before{display:none}.gm-event:after{left:-21px;top:4px;width:10px;height:10px}}@page map{size:A3 landscape;margin:8mm}@media print{.gm-bar{display:none!important}.gm{--gm-bg: #fff;--gm-ink: #1b2130;--gm-muted: #5d6677;--gm-line: #cfd5e0;--gm-accent: #6b4fd8;--gm-plan: #2f7de1;--gm-build: #1f9d6b;--gm-review: #d9822b;--gm-ship: #d6455d;--gm-continuity: #7a5af5;--gm-knowledge: #0f8c95;--gm-setup: #6b7280;--gm-core: #c99400;-webkit-print-color-adjust:exact;print-color-adjust:exact}.gm-sheet{padding:0;border:0;border-radius:0;background:#fff;gap:5mm;zoom:.85}.gm-list{gap:4px}.gm-h{break-after:avoid}.gm-stage,.gm-agent,.gm-family,.gm-event{break-inside:avoid}.gm-dim{opacity:1}}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import{c as $,j as e,r as j,p as L,f as Q,h as Y,P as Z,w as ee,T,e as se,b as D,l as ae,i as ne,k as re,m as le,n as te,o as ie,q as ce,d as oe,s as de,t as he,u as me,v as pe,x as xe,N as ue,y as je}from"./index-CWslZIzV.js";import{z as Fe}from"./index-CWslZIzV.js";import{l as P}from"./time-D00tu2ZP.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 S={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"}]]};S.node;const Ne=$(S);/**
|
|
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 M={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"]};M.node;const ke=$(M);/**
|
|
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 _={name:"circle",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]};_.node;const ge=$(_);/**
|
|
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 I={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"}]]};I.node;const fe=$(I);/**
|
|
22
|
-
* @license lucide-react v1.61.0 - ISC
|
|
23
|
-
*
|
|
24
|
-
* This source code is licensed under the ISC license.
|
|
25
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/const O={name:"octagon-alert",size:24,node:[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]],aliases:["alert-octagon"]};O.node;const be=$(O);/**
|
|
27
|
-
* @license lucide-react v1.61.0 - ISC
|
|
28
|
-
*
|
|
29
|
-
* This source code is licensed under the ISC license.
|
|
30
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
-
*/const A={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};A.node;const we=$(A);function z({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 ye({detail:s,note:a=null,variant:l,onClose:t}){const n=j.useId(),r=j.useRef(null);if(j.useEffect(()=>{var k;(k=r.current)==null||k.focus()},[s==null?void 0:s.phase.ref]),!s)return null;const{title:i,text:o,phase:h}=s,x=L(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(z,{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 R(){try{return typeof window<"u"?window.localStorage:null}catch{return null}}function V(s){const[a,l]=j.useState(()=>s??Q(R()));return[a,n=>()=>{l(n),ee(R(),n)}]}function F({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"})]})}const H=s=>s instanceof HTMLElement&&/^(INPUT|TEXTAREA|SELECT)$/.test(s.tagName);function B({m:s,pool:a,repo:l,variant:t}){const[n,r]=j.useState(null),[i,o]=j.useState(null),[h,x]=j.useState(0),k=j.useRef(null),d=n?Y(s,a,n):null,g=j.useContext(Z),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&&g!==null;j.useEffect(()=>{if(!w||!n||!d||!d.planPath||!g)return;let u=!0;return g(l.path,d.planPath,d.key).then(y=>{u&&o({ref:n,text:y.text||null,error:!1})},()=>{u&&o({ref:n,text:null,error:!0})}),()=>{u=!1}},[n,w,g,l.path,c,m,h]);const p=i&&i.ref===n?i:null,b=(u,y)=>{if(k.current=y,u===n){p!=null&&p.error&&(o(null),x(J=>J+1));return}o(null),r(u)},N=()=>{var u;o(null),r(null),(u=k.current)==null||u.focus()};j.useEffect(()=>{if(n===null)return;const u=y=>{H(y.target)||y.key==="Escape"&&N()};return window.addEventListener("keydown",u),()=>window.removeEventListener("keydown",u)},[n]);const f=e.jsx(ye,{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 ve={todo:ge,"in-progress":fe,done:ke,moved:Ne,blocked:be},K={size:14,"aria-hidden":!0};function E({tile:s}){const a=ve[s];return e.jsx(a,{...K})}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 $e(s,a){const l=document.getElementById(`ms-${s}-${a}`);l instanceof HTMLDetailsElement&&(l.open=!0),l==null||l.scrollIntoView({block:"start"})}function q({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.jsxs("span",{className:"rm-gate-count",children:[r.blockers.length," gate(s)"]})]},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.jsxs("button",{type:"button",className:"rm-tile","data-state":o.tile,"data-risk":o.highRisk?"high":void 0,title:`${o.ref} ${o.name} | ${o.tracker||o.stage}`,onClick:h=>l(o.ref,h.currentTarget),children:[e.jsx(E,{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.jsxs("div",{className:"rm-gate-note",title:i.reason,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.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(E,{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.jsxs("span",{className:"rm-sub",children:["owner ",t.owner,t.target?` · target ${t.target}`:""," · after ",t.depends.join(", ")||"-"]})]}),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(z,{phase:n})]}),e.jsxs("span",{className:"flow-why",children:[L(n)||"no model, lane or risk recorded",n.tracker?` · Tracker: ${n.tracker}`:""]})]},n.ref))})]},`${t.id}-${a?"q":"n"}`))]})}const W=(s,a,l)=>s==="site"?l?`#/roadmap/${encodeURIComponent(l)}`:"#/":se(a,"roadmap",l);function Te({repo:s,m:a,variant:l}){const t=D(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=ae(n);return e.jsx("li",{children:e.jsxs("a",{className:`rm-rcard rm-card tone-${r.tone}`,"data-testid":"rm-card",href:W(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 Pe={todo:"todo","in-progress":"prog",blocked:"block",done:"done",moved:"done"},C=s=>s.replace(/^☐\s*/u,"").trim();function Re({plan:s}){if(s.rows.length===0)return null;const a=ne(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 Ee({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=re(s);return e.jsx("div",{className:"rm-cols rm-cols-4","data-testid":"rm-plan-board",children:le.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-${Pe[t.state]}${t.state==="moved"?" is-moved":""}`,children:[e.jsx("strong",{children:t.phase}),C(t.status)?e.jsx("span",{className:"rm-sub",children:C(t.status)}):null]},`${t.phase}-${n}`))]},l.key))})}function Ce({m:s,plan:a,repo:l,variant:t,initialView:n}){const[r,i]=V(n),{open:o,panel:h}=B({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(F,{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(q,{m:s,match:null,onOpen:o}):e.jsx(Ee,{plan:a}),e.jsx(G,{m:s,match:null,onOpen:o}),h]})}function Le(s){const[a]=j.useState(()=>te(s));return a}function De({plan:s,repo:a,variant:l,initialView:t,defaultOpen:n}){const[r,i]=j.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:ie(s.overlay)}),e.jsx(Re,{plan:s}),e.jsx("span",{className:"rm-plan-only",children:"plan only, no runner"})]}),r&&e.jsx(Ce,{m:ce(a,s),plan:s,repo:a,variant:l,initialView:t})]})}function X({plans:s,repo:a,variant:l,initialView:t,initialOpenAll:n}){const r=Le(s);return e.jsx(e.Fragment,{children:s.map(i=>e.jsx(De,{plan:i,repo:a,variant:l,initialView:t,defaultOpen:n||i.path===r},i.path))})}function Se({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(X,{plans:s,repo:a,variant:l,initialView:t,initialOpenAll:n})]})}function Me({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(X,{plans:s,repo:a,variant:l,initialView:t,initialOpenAll:n})]})}function _e({m:s,repo:a,crumbHref:l,match:t,variant:n,initialView:r,plans:i}){const[o,h]=V(r),{open:x,panel:k}=B({m:s,pool:i??[],repo:a,variant:n}),d=s.kpis,g=c=>()=>$e(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:oe(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(F,{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:g(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(q,{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:g(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 ${P(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?`${P(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})]})]}),k]})}function Ae({repo:s,slug:a,stale:l=!1,lastOkAt:t=null,variant:n="hub",initialView:r,initialOpenAll:i=!1,nowMs:o}){const h=de(s),[x,k]=j.useState(""),d=j.useRef(null);j.useEffect(()=>{const b=N=>{var f;N.key==="/"&&!H(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 g=D(s),c=l&&e.jsxs("p",{className:"lane-note","data-testid":"rm-stale",children:["Roadmap data is old. Last good read ",he(t),". The numbers below are greyed."]}),m=n==="hub"?me(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:ue}),e.jsxs("p",{children:["Create one with ",e.jsx("code",{className:"cmd",children:je}),"."]})]});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(Se,{plans:h.plans,repo:s,variant:n,initialView:r,initialOpenAll:i});else{const b=a?h.roadmaps.find(N=>N.slug===a):n==="hub"&&pe(h)?h.roadmaps[0]:void 0;if(b){const N=h.roadmaps.length+h.errors.length>1,f=xe(b,x);p=e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"rm-searchbar",children:[e.jsxs("label",{className:"rm-search",children:[e.jsx(we,{...K}),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:u=>k(u.target.value),onKeyDown:u=>{u.key==="Escape"&&k("")}})]}),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(_e,{m:b,plans:h.plans,repo:s,crumbHref:N?W(n,g):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(Te,{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(Me,{plans:h.otherPlans,repo:s,variant:n,initialView:r,initialOpenAll:i}):null]})}export{Fe as collectorStale,Ae as default};
|