@caddis/cli 0.4.85 → 0.4.87
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_hub_collect.py +36 -1
- package/bundles/antigravity-plugin/scripts/caddis_prod_check.py +59 -11
- package/bundles/antigravity-plugin/scripts/caddis_roadmap.py +5 -13
- package/bundles/antigravity-plugin/scripts/caddis_status.py +45 -0
- package/bundles/antigravity-plugin/scripts/caddis_todo.py +111 -23
- package/bundles/antigravity-plugin/scripts/schemas/hub-collect.schema.json +16 -1
- package/bundles/antigravity-plugin/scripts/schemas/hub-plans.schema.json +16 -1
- package/bundles/antigravity-plugin/skills/feature-plan/SKILL.md +4 -0
- package/bundles/antigravity-plugin/skills/implement/SKILL.md +2 -1
- package/bundles/manifest.json +2 -2
- package/dist/cli.js +1 -1
- package/dist/export/assets/{export-DErZHj4B.js → export-Dro73_I7.js} +29 -29
- package/dist/export/assets/{export-C0_skoDL.css → export-N0paGhbL.css} +1 -1
- package/dist/export/index.html +2 -2
- package/dist/ui/assets/{Activity-CaqQ_HdD.js → Activity-BgqFFOv1.js} +1 -1
- package/dist/ui/assets/{Guide-9PV1m0e9.js → Guide-Df0Kg8wI.js} +1 -1
- package/dist/ui/assets/RoadmapTab-CV7WCGBL.js +31 -0
- package/dist/ui/assets/{index-Cv4RVfyi.css → index-DEge93wH.css} +1 -1
- package/dist/ui/assets/{index-Dotj3WfG.js → index-DQbpiY2a.js} +39 -39
- package/dist/ui/index.html +2 -2
- package/package.json +1 -1
- package/dist/ui/assets/RoadmapTab-CDm42wB2.js +0 -31
package/dist/ui/index.html
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
6
|
<title>caddis hub</title>
|
|
7
7
|
<link rel="icon" type="image/svg+xml" href="/assets/favicon-DtHQyAC1.svg" />
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
9
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-DQbpiY2a.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/assets/index-DEge93wH.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
12
12
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import{c as x,f as A,r as f,b as y,j as e,g as P,o as I,h as S,N as z,i as H,d as O,e as B,l as F,T as b}from"./index-Dotj3WfG.js";import{k as ce}from"./index-Dotj3WfG.js";import{l as w}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 $={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 K=x($);/**
|
|
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 T={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"]};T.node;const U=x(T);/**
|
|
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 R={name:"circle",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]};R.node;const V=x(R);/**
|
|
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 E={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"}]]};E.node;const q=x(E);/**
|
|
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 D={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"]};D.node;const G=x(D);/**
|
|
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 M={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};M.node;const W=x(M),X={todo:V,"in-progress":q,done:U,moved:K,blocked:G},_={size:14,"aria-hidden":!0};function v({tile:s}){const n=X[s];return e.jsx(n,{..._})}function C({done:s,total:n}){const l=n?Math.round(100*s/n):0;return e.jsxs("div",{className:"rm-bar-wrap",children:[e.jsx("div",{className:"rm-bar",role:"img","aria-label":`${s} of ${n} phases done`,children:e.jsx("i",{style:{width:`${l}%`}})}),e.jsxs("span",{className:"rm-bar-text",children:[s,"/",n," phases · ",l,"%"]})]})}function J({phase:s}){return e.jsxs(e.Fragment,{children:[s.prs.map(n=>n.url?e.jsxs("a",{className:"rm-pr mono","data-testid":"rm-pr",href:n.url,target:"_blank",rel:"noreferrer noopener",children:["#",n.number]},n.number):e.jsxs("span",{className:"rm-pr mono","data-testid":"rm-pr",children:["#",n.number]},n.number)),e.jsx("span",{className:`rm-stage tile-${s.tile}`,"data-testid":"rm-stage",children:s.stage})]})}function u({status:s}){const n=s==="done"||s==="not-needed";return e.jsx("span",{className:`chip ${n?"chip-resolved":s==="in-progress"?"chip-waiting":"chip-hub"}`,children:s})}function Q(s,n){const l=document.getElementById(`ms-${s}-${n}`);l instanceof HTMLDetailsElement&&(l.open=!0),l==null||l.scrollIntoView({block:"start"})}function Y({m:s,match:n}){const l=r=>!n||n.phases.has(r.ref),c=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":c},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(u,{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(a=>e.jsx("div",{className:"rm-cell",children:a.phases.filter(t=>t.plan===r.plan&&l(t)).map(t=>e.jsxs("div",{className:"rm-tile","data-state":t.tile,"data-risk":t.highRisk?"high":void 0,title:`${t.ref} ${t.name} | ${t.tracker||t.stage}`,children:[e.jsx(v,{tile:t.tile}),e.jsx("b",{className:"mono",children:t.num}),e.jsx("span",{children:t.name}),e.jsx("span",{className:"sr-only",children:b[t.tile]}),t.highRisk&&e.jsx("i",{className:"rm-risk","aria-label":"high risk"})]},t.ref))},a.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((a,t)=>e.jsxs("div",{className:"rm-gate-note",title:a.reason,children:[a.type,": ",a.reason.length>60?`${a.reason.slice(0,60)}…`:a.reason]},t))},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(u,{status:r.status})]}),r.phases.filter(l).map(a=>e.jsxs("div",{className:"rm-tile","data-state":a.tile,"data-risk":a.highRisk?"high":void 0,children:[e.jsx(v,{tile:a.tile}),e.jsxs("b",{className:"mono",children:[a.plan," ",a.num]}),e.jsx("span",{children:a.name}),e.jsx("span",{className:"sr-only",children:b[a.tile]}),a.highRisk&&e.jsx("i",{className:"rm-risk","aria-label":"high risk"})]},a.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 Z({m:s,match:n}){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(l=>!n||n.milestones.has(l.id)).map(l=>e.jsxs("details",{className:"rm-ms",id:`ms-${s.slug}-${l.id}`,open:n?!0:void 0,children:[e.jsxs("summary",{children:[e.jsx("strong",{children:l.id})," ",e.jsx(u,{status:l.status}),e.jsxs("span",{className:"rm-sub",children:["owner ",l.owner,l.target?` · target ${l.target}`:""," · after ",l.depends.join(", ")||"-"]})]}),l.phases.length===0?e.jsx("p",{className:"col-empty",children:"No build phases."}):e.jsx("ul",{className:"flow-list",children:l.phases.filter(c=>!n||n.phases.has(c.ref)).map(c=>e.jsxs("li",{className:"flow-row","data-testid":"rm-phase","data-state":c.tile,children:[e.jsxs("div",{className:"flow-row-head",children:[e.jsx("code",{className:"mono",children:c.ref}),e.jsx("span",{className:"flow-title",children:c.name}),e.jsx(J,{phase:c})]}),e.jsxs("span",{className:"flow-why",children:[[c.model&&`model ${c.model}`,c.lane&&`lane ${c.lane.split(" ")[0]}`,c.risk&&`risk ${c.risk}`].filter(Boolean).join(" · ")||"no model, lane or risk recorded",c.tracker?` · Tracker: ${c.tracker}`:""]})]},c.ref))})]},`${l.id}-${n?"q":"n"}`))]})}function ee({m:s,repo:n,crumbHref:l,match:c,variant:r}){const a=s.kpis,t=i=>()=>Q(s.slug,i);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:O(n)})," › ",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:[a.milestonesDone," of ",a.milestonesTotal," milestones · ",a.phasesDone," of ",a.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(i=>e.jsxs("span",{className:"rm-chip",children:[e.jsx("b",{children:i.plan})," ",e.jsxs("span",{className:"mono",children:[i.done,"/",i.total," phases"]})]},i.plan))})]}),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((i,d)=>e.jsxs("li",{className:"flow-row",children:[e.jsxs("div",{className:"flow-row-head",children:[e.jsx("strong",{children:i.milestone}),e.jsx("span",{className:"chip chip-owner-gate",children:"owner-gate"})]}),e.jsx("span",{className:"flow-why",children:i.reason}),i.check&&e.jsx("code",{className:"mono",children:i.check})]},d))})]}),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:[a.phasesDone," / ",a.phasesTotal]})]}),e.jsxs("div",{className:"kpi-tile",children:[e.jsx("span",{className:"kpi-label",children:"Milestones done"}),e.jsxs("span",{className:"kpi-num",children:[a.milestonesDone," / ",a.milestonesTotal]})]}),e.jsxs("div",{className:"kpi-tile",children:[e.jsx("span",{className:"kpi-label",children:"In progress"}),e.jsx("span",{className:"kpi-num",children:a.inProgress.length}),e.jsx("span",{className:"kpi-sub tone-muted",children:a.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${a.highRisk?" bad":""}`,children:a.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:a.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((i,d)=>e.jsxs("span",{className:"rm-chain-item",children:[d>0&&e.jsx("span",{"aria-hidden":"true",children:"→"}),e.jsxs("button",{type:"button",className:`rm-node tone-${i.tone}`,onClick:t(i.id),children:[e.jsx("b",{children:i.id})," ",e.jsx(u,{status:i.status}),e.jsxs("span",{className:"rm-sub",children:[i.depends.length?`after ${i.depends.join(", ")}`:"starts first"," · ",i.done,"/",i.total," ph"]})]})]},i.id))})]}),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(i=>e.jsxs("div",{children:[e.jsx("h4",{className:"rm-list-h",children:i[0].toUpperCase()+i.slice(1)}),s.board[i].length===0?e.jsx("p",{className:"col-empty",children:"none"}):s.board[i].map(d=>e.jsxs("button",{type:"button",className:`rm-rcard tone-${d.tone}`,onClick:t(d.id),children:[e.jsxs("span",{children:[e.jsx("strong",{children:d.id})," ",e.jsx(u,{status:d.status})]}),e.jsx(C,{done:d.done,total:d.total}),d.blockers.map((N,g)=>e.jsx("span",{className:"rm-sub",children:N.type},g))]},d.id))]},i))})]}),e.jsx(Y,{m:s,match: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((i,d)=>e.jsxs("li",{className:"flow-row",children:[e.jsxs("div",{className:"flow-row-head",children:[e.jsx("strong",{children:i.milestone}),e.jsx("span",{className:`chip ${i.type==="owner-gate"?"chip-owner-gate":"chip-hub"}`,children:i.type})]}),e.jsx("span",{className:"flow-why",children:i.reason}),i.check&&e.jsx("code",{className:"mono",children:i.check})]},d))})]}),e.jsx(Z,{m:s,match:c}),r==="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 ${w(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?`${w(s.runner.lastStopAt)}: `:"",s.runner.lastStop,"."]}),s.runner.errors.map(i=>e.jsxs("p",{className:"tone-warn",children:["Could not read ",i,"."]},i)),s.runner.next&&e.jsxs("p",{children:["Next batch: ",e.jsx("code",{children:s.runner.next})]})]})]})}function se({repo:s,m:n,variant:l}){const c=y(s);return e.jsxs("div",{className:"rm-list-view",children:[(n.errors.length>0||n.repoError||n.roadmaps.some(r=>r.detailError))&&e.jsxs("div",{className:"lane-note","data-testid":"rm-errors",children:[n.repoError&&e.jsxs("div",{children:["Could not read this repo: ",n.repoError]}),n.errors.map(r=>e.jsxs("div",{children:["Could not read ",r.slug,": ",r.error]},r.slug)),n.roadmaps.filter(r=>r.detailError).map(r=>e.jsxs("div",{children:["Detail unavailable for ",r.slug,": ",r.detailError]},r.slug))]}),e.jsx("ul",{className:"flow-list rm-cards","data-testid":"rm-list","aria-label":"Roadmaps",children:n.roadmaps.map(r=>{const a=F(r);return e.jsx("li",{children:e.jsxs("a",{className:`rm-rcard rm-card tone-${a.tone}`,"data-testid":"rm-card",href:L(l,c,r.slug),children:[e.jsxs("span",{children:[e.jsx("strong",{children:a.slug})," ",e.jsx("span",{className:"rm-sub",children:a.branch??""})]}),e.jsx(C,{done:a.phasesDone,total:a.phasesTotal}),e.jsxs("span",{className:"rm-sub",children:[a.milestonesDone,"/",a.milestonesTotal," milestones"]}),e.jsx("span",{className:"rm-dots",children:a.dots.map(t=>e.jsx("span",{className:`rm-dot s-${t.status}`,children:t.id},t.id))}),e.jsxs("span",{className:"rm-sub",children:["next: ",a.next,l==="hub"?` · runner: ${a.runner}`:"",a.gates>0?` · ${a.gates} open gate${a.gates===1?"":"s"}`:""]})]})},r.slug)})})]})}function ae({plans:s}){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."}),s.map(n=>e.jsxs("section",{className:"flow-section","aria-label":n.title,children:[e.jsxs("h3",{className:"flow-h",children:[n.title," · ",n.open," open"]}),e.jsx("ul",{className:"flow-list",children:n.rows.map(l=>e.jsx("li",{className:"flow-row",children:e.jsxs("div",{className:"flow-row-head",children:[e.jsxs("code",{className:"mono",children:["Phase ",l.phase]}),e.jsx("span",{children:l.status||"no status"})]})},l.phase))})]},n.path))]})}const L=(s,n,l)=>s==="site"?l?`#/roadmap/${encodeURIComponent(l)}`:"#/":B(n,"roadmap",l);function le({repo:s,slug:n,stale:l=!1,lastOkAt:c=null,variant:r="hub"}){const a=A(s),[t,i]=f.useState(""),d=f.useRef(null);f.useEffect(()=>{const p=o=>{var k;const h=o.target,j=h instanceof HTMLElement&&/^(INPUT|TEXTAREA|SELECT)$/.test(h.tagName);o.key==="/"&&!j&&!o.ctrlKey&&!o.metaKey&&!o.altKey&&(o.preventDefault(),(k=d.current)==null||k.focus())};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[]);const N=y(s),g=l&&e.jsxs("p",{className:"lane-note","data-testid":"rm-stale",children:["Roadmap data is old. Last good read ",P(c),". The numbers below are greyed."]});let m;if(a.mode==="none")m=e.jsxs("div",{className:"notice","data-testid":"rm-none",children:[e.jsx("h2",{className:"rm-title",children:z}),e.jsxs("p",{children:["Create one with ",e.jsx("code",{className:"cmd",children:H}),"."]})]});else if(a.mode==="error")m=e.jsxs("div",{className:"lane-note","data-testid":"rm-errors",children:["Could not read this repo: ",a.repoError]});else if(a.mode==="plans")m=e.jsx(ae,{plans:a.plans});else{const p=n?a.roadmaps.find(o=>o.slug===n):r==="hub"&&I(a)?a.roadmaps[0]:void 0;if(p){const o=a.roadmaps.length+a.errors.length>1,h=S(p,t);m=e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"rm-searchbar",children:[e.jsxs("label",{className:"rm-search",children:[e.jsx(W,{..._}),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:t,onChange:j=>i(j.target.value),onKeyDown:j=>{j.key==="Escape"&&i("")}})]}),e.jsx("span",{className:"rm-match","data-testid":"rm-match-count","aria-live":"polite",children:h?`${h.count} ${h.count===1?"match":"matches"}`:""})]}),e.jsx(ee,{m:p,repo:s,crumbHref:o?L(r,N):null,match:h,variant:r})]})}else m=e.jsxs(e.Fragment,{children:[n&&e.jsxs("p",{className:"lane-note","data-testid":"rm-missing",children:["No roadmap named ",n," in this repo."]}),e.jsx(se,{repo:s,m:a,variant:r})]})}return e.jsxs("div",{className:`rm${l?" stale":""}`,"data-testid":"roadmap-tab",children:[g,m]})}export{ce as collectorStale,le as default};
|