Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions apps/console/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ function cell(className, text) {
return node;
}

function taskCell(label, className, text) {
const node = document.createElement("span");
node.className = "task-cell";
node.dataset.label = label;
node.setAttribute("role", "cell");
node.append(cell(className, text));
return node;
}

function stateLabel(state) {
return state.replaceAll("_", " ");
}
Expand Down Expand Up @@ -86,17 +95,18 @@ function renderTask(task) {
row.setAttribute("role", "row");
const title = document.createElement("span");
title.className = "task-title";
title.setAttribute("role", "cell");
const strong = document.createElement("strong");
strong.textContent = task.title;
const small = document.createElement("small");
small.textContent = `${task.id} · ${task.history.length} transitions · policy ${task.policy_valid ? "valid" : "failed"}`;
title.append(strong, small);
row.append(
title,
cell(`badge badge-state ${task.policy_valid ? "" : "badge-policy-failed"}`, stateLabel(task.derived_state)),
cell(`badge badge-risk-${task.risk}`, task.risk),
cell("", String(task.evidence_count)),
cell("", String(task.review_count))
taskCell("State", `badge badge-state ${task.policy_valid ? "" : "badge-policy-failed"}`, stateLabel(task.derived_state)),
taskCell("Risk", `badge badge-risk-${task.risk}`, task.risk),
taskCell("Evidence", "", String(task.evidence_count)),
taskCell("Reviews", "", String(task.review_count))
);
const gates = document.createElement("div");
gates.className = "task-gates";
Expand Down
7 changes: 4 additions & 3 deletions apps/console/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ <h1>One record for work<br />across many minds.</h1>
<article><span>Tasks</span><strong id="metric-tasks">—</strong></article>
<article><span>Active</span><strong id="metric-active">—</strong></article>
<article><span>Evidence</span><strong id="metric-evidence">—</strong></article>
<article><span>Reviews</span><strong id="metric-reviews">—</strong></article>
<article><span>Decisions</span><strong id="metric-decisions">—</strong></article>
</section>

<section class="project-status" id="roadmap">
<div class="section-heading">
<div>
Expand Down Expand Up @@ -65,9 +69,6 @@ <h2>Pilot readiness</h2>
</div>
<div id="pilot-rows" class="pilot-grid"></div>
</section>
<article><span>Reviews</span><strong id="metric-reviews">—</strong></article>
<article><span>Decisions</span><strong id="metric-decisions">—</strong></article>
</section>

<section class="workspace" id="workspace">
<div class="section-heading">
Expand Down
3 changes: 3 additions & 0 deletions apps/console/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ footer { border-top: 1px solid var(--line); color: var(--muted); display: flex;
.task-header { display: none; }
.task-row { gap: 12px; grid-template-columns: 1fr 1fr; padding: 18px 6px; }
.task-title { grid-column: 1 / -1; }
.task-cell { align-items: flex-start; display: flex; flex-direction: column; gap: 6px; }
.task-cell::before { color: var(--muted); content: attr(data-label); font-family: ui-monospace, monospace; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.flow { grid-template-columns: 1fr; }
.flow li { min-height: 150px; }
.flow li > span { margin-top: 36px; }
Expand Down Expand Up @@ -142,3 +144,4 @@ h3 { font-size: 19px; margin: 5px 0 0; }
.project-metrics article { border-bottom: 1px solid var(--line); }
.milestone-grid { grid-template-columns: 1fr; }
.milestone-heading, .pilot-heading { align-items: start; flex-direction: column; }
}
18 changes: 14 additions & 4 deletions docs/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ function cell(className, text) {
return node;
}

function taskCell(label, className, text) {
const node = document.createElement("span");
node.className = "task-cell";
node.dataset.label = label;
node.setAttribute("role", "cell");
node.append(cell(className, text));
return node;
}

function stateLabel(state) {
return state.replaceAll("_", " ");
}
Expand Down Expand Up @@ -86,17 +95,18 @@ function renderTask(task) {
row.setAttribute("role", "row");
const title = document.createElement("span");
title.className = "task-title";
title.setAttribute("role", "cell");
const strong = document.createElement("strong");
strong.textContent = task.title;
const small = document.createElement("small");
small.textContent = `${task.id} · ${task.history.length} transitions · policy ${task.policy_valid ? "valid" : "failed"}`;
title.append(strong, small);
row.append(
title,
cell(`badge badge-state ${task.policy_valid ? "" : "badge-policy-failed"}`, stateLabel(task.derived_state)),
cell(`badge badge-risk-${task.risk}`, task.risk),
cell("", String(task.evidence_count)),
cell("", String(task.review_count))
taskCell("State", `badge badge-state ${task.policy_valid ? "" : "badge-policy-failed"}`, stateLabel(task.derived_state)),
taskCell("Risk", `badge badge-risk-${task.risk}`, task.risk),
taskCell("Evidence", "", String(task.evidence_count)),
taskCell("Reviews", "", String(task.review_count))
);
const gates = document.createElement("div");
gates.className = "task-gates";
Expand Down
7 changes: 4 additions & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ <h1>One record for work<br />across many minds.</h1>
<article><span>Tasks</span><strong id="metric-tasks">—</strong></article>
<article><span>Active</span><strong id="metric-active">—</strong></article>
<article><span>Evidence</span><strong id="metric-evidence">—</strong></article>
<article><span>Reviews</span><strong id="metric-reviews">—</strong></article>
<article><span>Decisions</span><strong id="metric-decisions">—</strong></article>
</section>

<section class="project-status" id="roadmap">
<div class="section-heading">
<div>
Expand Down Expand Up @@ -65,9 +69,6 @@ <h2>Pilot readiness</h2>
</div>
<div id="pilot-rows" class="pilot-grid"></div>
</section>
<article><span>Reviews</span><strong id="metric-reviews">—</strong></article>
<article><span>Decisions</span><strong id="metric-decisions">—</strong></article>
</section>

<section class="workspace" id="workspace">
<div class="section-heading">
Expand Down
3 changes: 3 additions & 0 deletions docs/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ footer { border-top: 1px solid var(--line); color: var(--muted); display: flex;
.task-header { display: none; }
.task-row { gap: 12px; grid-template-columns: 1fr 1fr; padding: 18px 6px; }
.task-title { grid-column: 1 / -1; }
.task-cell { align-items: flex-start; display: flex; flex-direction: column; gap: 6px; }
.task-cell::before { color: var(--muted); content: attr(data-label); font-family: ui-monospace, monospace; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.flow { grid-template-columns: 1fr; }
.flow li { min-height: 150px; }
.flow li > span { margin-top: 36px; }
Expand Down Expand Up @@ -142,3 +144,4 @@ h3 { font-size: 19px; margin: 5px 0 0; }
.project-metrics article { border-bottom: 1px solid var(--line); }
.milestone-grid { grid-template-columns: 1fr; }
.milestone-heading, .pilot-heading { align-items: start; flex-direction: column; }
}