From fd24b69039cac1f096a64f8696f6fe90ce7abd43 Mon Sep 17 00:00:00 2001 From: Gabriel Brown Date: Tue, 22 Sep 2026 14:54:05 -0400 Subject: [PATCH] Add the live ticket page and epic index renderer --- .../skills/ticket/templates/site/epic.html | 13 + .../skills/ticket/templates/site/site.css | 179 ++++++++++ .../skills/ticket/templates/site/site.js | 308 ++++++++++++++++++ .../skills/ticket/templates/site/ticket.html | 13 + 4 files changed, 513 insertions(+) create mode 100644 user/agents/skills/ticket/templates/site/epic.html create mode 100644 user/agents/skills/ticket/templates/site/site.css create mode 100644 user/agents/skills/ticket/templates/site/site.js create mode 100644 user/agents/skills/ticket/templates/site/ticket.html diff --git a/user/agents/skills/ticket/templates/site/epic.html b/user/agents/skills/ticket/templates/site/epic.html new file mode 100644 index 0000000..82603e2 --- /dev/null +++ b/user/agents/skills/ticket/templates/site/epic.html @@ -0,0 +1,13 @@ + + + + + +{{TITLE}} + + + +

Loading epic.data.js…

+ + + diff --git a/user/agents/skills/ticket/templates/site/site.css b/user/agents/skills/ticket/templates/site/site.css new file mode 100644 index 0000000..25d99a0 --- /dev/null +++ b/user/agents/skills/ticket/templates/site/site.css @@ -0,0 +1,179 @@ +/* Shared stylesheet for ticket and epic pages. Copied into .claude/docs/epics/_site/ by ticket-page. */ +:root { + --bg: #f6f6f3; --surface: #ffffff; --sunk: #efefea; --ink: #1c1c1a; --muted: #6b6b66; + --line: #e2e2dd; --accent: #2f5fd0; --accent-ink: #fff; --accent-soft: #e8eeff; + --ok: #1f7a3d; --ok-soft: #e4f4e8; --warn: #8a6100; --warn-soft: #fff4d6; + --run: #2f5fd0; --run-soft: #e8eeff; --todo: #9b9a93; + --mono: ui-monospace, "JetBrains Mono", "Cascadia Mono", Menlo, monospace; + --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Inter", sans-serif; +} +@media (prefers-color-scheme: dark) { + :root:not([data-theme="light"]) { + --bg: #141513; --surface: #1d1e1b; --sunk: #181917; --ink: #ecebe6; --muted: #9b9a93; + --line: #2d2e2a; --accent: #86a4f3; --accent-ink: #0f1420; --accent-soft: #1f2940; + --ok: #6fcf8e; --ok-soft: #173222; --warn: #e6c36b; --warn-soft: #2e2713; + --run: #86a4f3; --run-soft: #1f2940; --todo: #6b6b66; + } +} +:root[data-theme="dark"] { + --bg: #141513; --surface: #1d1e1b; --sunk: #181917; --ink: #ecebe6; --muted: #9b9a93; + --line: #2d2e2a; --accent: #86a4f3; --accent-ink: #0f1420; --accent-soft: #1f2940; + --ok: #6fcf8e; --ok-soft: #173222; --warn: #e6c36b; --warn-soft: #2e2713; + --run: #86a4f3; --run-soft: #1f2940; --todo: #6b6b66; +} +* { box-sizing: border-box; } +body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--sans); } +a { color: var(--accent); } +code, .mono { font-family: var(--mono); font-size: .9em; } +h1, h2, h3 { line-height: 1.25; } +h2 { font-size: 1.1em; margin: 0 0 12px; } +h3 { font-size: .95em; margin: 18px 0 8px; } +p { margin: 0 0 10px; max-width: 74ch; } +ul { margin: 0; padding-left: 20px; } +li { margin: 0 0 6px; max-width: 74ch; } +table { border-collapse: collapse; width: 100%; font-size: .92em; } +th, td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); } +th { font-size: .78em; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; } +.muted { color: var(--muted); } +.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; } +.stack > * + * { margin-top: 14px; } + +/* Status marks: done by the agent, running, not started. */ +.mark { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; + flex: none; font-size: 11px; font-weight: 700; border: 1.5px solid var(--todo); color: transparent; } +.mark.done { background: var(--ok); border-color: var(--ok); color: var(--surface); } +.mark.run { border-color: var(--run); background: var(--run-soft); } +.mark.done::after { content: "✓"; } +.pill { display: inline-block; font-size: .75em; font-weight: 600; padding: 2px 9px; border-radius: 99px; + background: var(--sunk); color: var(--muted); white-space: nowrap; } +.pill.ok { background: var(--ok-soft); color: var(--ok); } +.pill.run { background: var(--run-soft); color: var(--run); } +.pill.warn { background: var(--warn-soft); color: var(--warn); } +.bar { height: 6px; border-radius: 99px; background: var(--sunk); overflow: hidden; } +.bar > i { display: block; height: 100%; background: var(--ok); border-radius: 99px; transition: width .3s; } +.sha { font-family: var(--mono); font-size: .82em; color: var(--muted); } + +/* The review tick is the viewer's own, separate from the agent's done mark. */ +.seen { font-size: .78em; color: var(--muted); display: inline-flex; gap: 5px; align-items: center; cursor: pointer; user-select: none; } +.seen input { margin: 0; } + + +/* Video with a transcript that seeks the player. */ +.video { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 14px; } +.video video { width: 100%; border-radius: 8px; background: #000; display: block; } +.transcript { max-height: 340px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: .88em; } +.transcript button { display: flex; gap: 10px; width: 100%; text-align: left; font: inherit; color: inherit; background: none; border: 0; + border-bottom: 1px solid var(--line); padding: 6px 10px; cursor: pointer; } +.transcript button:hover { background: var(--sunk); } +.transcript button.now { background: var(--accent-soft); } +.transcript .t { font-family: var(--mono); color: var(--muted); flex: none; } +.frames { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; } +.frames img { height: 64px; border-radius: 5px; border: 1px solid var(--line); cursor: zoom-in; } +@media (max-width: 860px) { .video { grid-template-columns: 1fr; } } + +/* Mock artboard and proof, side by side. */ +.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } +.compare figure { margin: 0; } +.compare figcaption { font-size: .78em; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 6px; } +.artboard { width: 100%; height: 300px; border: 1px solid var(--line); border-radius: 8px; background: #fff; display: block; } +.shot { width: 100%; border: 1px solid var(--line); border-radius: 8px; display: block; background: var(--sunk); } +.placeholder { height: 300px; border: 1.5px dashed var(--line); border-radius: 8px; display: grid; place-items: center; color: var(--muted); font-size: .9em; text-align: center; padding: 20px; } +pre.textproof { margin: 0; max-height: 300px; overflow: auto; font-family: var(--mono); font-size: .8em; background: var(--surface); + border: 1px solid var(--line); border-radius: 8px; padding: 12px; } +@media (max-width: 860px) { .compare { grid-template-columns: 1fr; } } + +.timeline { list-style: none; padding: 0; margin: 0; position: relative; } +.timeline li { display: grid; grid-template-columns: 74px 18px 1fr; gap: 10px; align-items: start; margin: 0 0 10px; max-width: none; } +.timeline time { font-family: var(--mono); font-size: .8em; color: var(--muted); padding-top: 1px; white-space: nowrap; } +.timeline .dot { width: 9px; height: 9px; border-radius: 50%; margin: 6px auto 0; background: var(--todo); } +.timeline .dot.commit { background: var(--ok); } .timeline .dot.fix { background: var(--warn); } +.timeline .dot.verdict, .timeline .dot.approve { background: var(--accent); } + +/* Page chrome */ +.loading, .error { max-width: 720px; margin: 60px auto; padding: 0 16px; color: var(--muted); } +.error { color: var(--warn); } +.top { background: var(--surface); border-bottom: 1px solid var(--line); } +.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; } +.head { padding: 22px 0 14px; display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: end; } +.head h1 { margin: 4px 0 8px; font-size: 1.55em; } +.crumbs { font-size: .85em; color: var(--muted); } +.meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .86em; color: var(--muted); align-items: center; } +.live { font-size: .8em; color: var(--muted); } +.live.stale { color: var(--warn); } +.meters { display: grid; gap: 10px; font-size: .84em; } +.meters .row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; } +.meters .bar { grid-column: 1 / -1; } +.tabs { display: flex; gap: 2px; overflow-x: auto; } +.tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; font-size: .93em; } +.tabs a[aria-current] { color: var(--ink); border-color: var(--accent); font-weight: 600; } +.tabs .n { margin-left: 6px; font-size: .78em; } +main.wrap { padding-top: 24px; padding-bottom: 80px; } +.grid2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; } +.check { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); } +.check:last-child { border-bottom: 0; } +.check .body { flex: 1; min-width: 0; } +.check .sub { font-size: .82em; color: var(--muted); margin-top: 2px; } +.callout { background: var(--warn-soft); border: 1px solid var(--warn); border-radius: 8px; padding: 10px 14px; } +.empty { color: var(--muted); padding: 30px 0; text-align: center; } +.kv td:first-child { color: var(--muted); width: 140px; } + +/* Jira's own HTML, sanitized at import. */ +.jira { overflow-x: auto; } +.jira img { max-width: 100%; height: auto; border-radius: 6px; } +.jira table { margin: 8px 0; } +.jira td, .jira th { border: 1px solid var(--line); } +/* Jira hard-codes light panel colors inline, which would be unreadable in dark mode. */ +.jira *:not(img) { background-color: transparent !important; color: inherit !important; border-color: var(--line) !important; } +.jira .panel, .jira .panelHeader, .jira .panelContent { background-color: var(--sunk) !important; border-radius: 6px; } +.jira .panel { border: 1px solid var(--line); margin: 8px 0; } +.jira .panelHeader { font-weight: 600; padding: 6px 10px; } +.jira .panelContent { padding: 6px 10px; } +.note-tag { font-size: .72em; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); margin-left: 8px; } +.images { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; } +.images a { display: block; } .images img { width: 100%; border-radius: 6px; border: 1px solid var(--line); } + +/* Progress: criteria down the left, everything that traces to the picked one on the right. */ +.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; } +.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; } +.tile .n { font-size: 1.35em; font-weight: 700; } +.tile .l { font-size: .8em; color: var(--muted); } +.split { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 16px; } +.spine { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; position: sticky; top: 16px; } +.spine button { display: flex; gap: 10px; width: 100%; text-align: left; font: inherit; font-size: .9em; color: inherit; background: none; border: 0; + border-bottom: 1px solid var(--line); padding: 10px 14px; cursor: pointer; align-items: flex-start; } +.spine button:last-child { border-bottom: 0; } +.spine button[aria-current] { background: var(--accent-soft); } +.spine .id { font-family: var(--mono); font-size: .82em; color: var(--muted); width: 40px; flex: none; } +.spine .dots { display: flex; gap: 3px; margin-top: 5px; } +.spine .dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); } +.spine .dots i.on { background: var(--ok); } .spine .dots i.run { background: var(--run); } +.trace { display: grid; grid-template-columns: 110px 1fr; gap: 8px 14px; font-size: .92em; margin: 12px 0 18px; } +.trace dt { color: var(--muted); font-size: .85em; padding-top: 2px; } +.trace dd { margin: 0; } + +/* Epic index */ +.epic h1 { margin: 2px 0 6px; font-size: 1.6em; } +.epic main.wrap { max-width: 1040px; } +.sum { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); font-size: .9em; margin: 4px 0 18px; align-items: center; } +.sum .bar { width: 220px; } +.why { margin-bottom: 18px; } .why ol { margin: 6px 0 0; padding-left: 20px; } +.seq { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; } +.seq .row { display: grid; grid-template-columns: 44px 1fr 170px 120px; gap: 14px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); } +.seq .row:last-child { border-bottom: 0; } +.seq .n { font-family: var(--mono); font-weight: 700; color: var(--muted); font-size: 1.05em; text-align: right; } +.seq .row.done .n { color: var(--ok); } +.seq .row.next { background: var(--accent-soft); } .seq .row.next .n { color: var(--accent); } +.seq .t a { color: inherit; text-decoration: none; font-weight: 600; } .seq .t a[href]:hover { color: var(--accent); } +.seq .k { font-family: var(--mono); font-size: .8em; color: var(--muted); } +.seq .after { font-size: .8em; color: var(--muted); margin-top: 2px; } +.seq .prog { font-size: .78em; color: var(--muted); display: grid; gap: 4px; } +.seq .meta { text-align: right; font-size: .82em; color: var(--muted); display: grid; gap: 4px; justify-items: end; } +.risk-HIGH { color: #c2410c; font-weight: 700; } + +@media (max-width: 900px) { + .head, .grid2, .split { grid-template-columns: 1fr; } + .tiles { grid-template-columns: 1fr 1fr; } + .spine { position: static; } + .seq .row { grid-template-columns: 34px 1fr; } + .seq .prog, .seq .meta { grid-column: 2; text-align: left; justify-items: start; } +} diff --git a/user/agents/skills/ticket/templates/site/site.js b/user/agents/skills/ticket/templates/site/site.js new file mode 100644 index 0000000..c1b1507 --- /dev/null +++ b/user/agents/skills/ticket/templates/site/site.js @@ -0,0 +1,308 @@ +// Renderer for ticket and epic pages. Copied into .claude/docs/epics/_site/ by ticket-page. +// A page shell names its data file in . This script loads that file with a +// + +