ccqa 1.26.0 → 1.26.2

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/dist/bin/ccqa.mjs CHANGED
@@ -19256,7 +19256,7 @@ const HTML_BODY = `
19256
19256
  <div class="card" id="runs-card">
19257
19257
  <div class="table-wrap">
19258
19258
  <table>
19259
- <thead><tr><th data-i18n="runs.col.run">Run</th><th data-i18n="runs.col.branch">Branch</th><th data-i18n="meta.profile">Profile</th><th data-i18n="runs.col.status">Status</th><th data-i18n="runs.col.specs">Specs</th><th data-i18n="runs.col.cost">Cost</th><th data-i18n="runs.col.created">Created</th></tr></thead>
19259
+ <thead><tr><th data-i18n="runs.col.run">Run</th><th data-i18n="runs.col.status">Status</th><th data-i18n="runs.col.cost">Cost</th><th data-i18n="runs.col.created">Created</th></tr></thead>
19260
19260
  <tbody id="runs-tbody"></tbody>
19261
19261
  </table>
19262
19262
  </div>
@@ -19715,13 +19715,6 @@ const CSS = `
19715
19715
  indents the first one away from the label and the ratio line below it. */
19716
19716
  .drift-meta-chips { display: flex; gap: 6px; }
19717
19717
  .drift-meta-chips .chip { margin-left: 0; }
19718
- .specs { display: inline-flex; align-items: center; gap: 9px; }
19719
- .meter { width: 54px; height: 6px; border-radius: 3px; background: var(--fail-bg); overflow: hidden; }
19720
- .meter i { display: block; height: 100%; background: var(--pass); }
19721
- /* A drift row's bar fills with what the audit FOUND, so a full bar is the bad
19722
- end — the opposite of a test run's. It must not be painted pass-green. */
19723
- .meter.drift { background: var(--surface-3); }
19724
- .meter.drift i { background: var(--amber-fill); }
19725
19718
 
19726
19719
  /* run detail */
19727
19720
  .rd-head { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
@@ -20182,8 +20175,8 @@ const CLIENT_JS = `
20182
20175
  "runs.title": "Runs", "runs.empty": "Select a project to see its runs.",
20183
20176
  "runs.none": "No runs yet for this project.", "projects.none": "No projects yet. Create one to get started.", "projects.noneShort": "No projects yet",
20184
20177
  "runs.noMatch": "No runs match this filter.",
20185
- "runs.col.run": "Run", "runs.col.branch": "Branch", "runs.col.status": "Status",
20186
- "runs.col.specs": "Specs", "runs.col.cost": "Cost", "runs.col.created": "Created",
20178
+ "runs.col.run": "Run", "runs.col.status": "Status",
20179
+ "runs.col.cost": "Cost", "runs.col.created": "Created",
20187
20180
  "runs.totalCost": "Cost of these {n}:", "runs.capped": "showing the first {n}",
20188
20181
  "runs.spend24h": "All spend, last 24h:",
20189
20182
  "runs.filter.date": "Date", "runs.filter.kind": "Kind", "runs.filter.status": "Status",
@@ -20345,8 +20338,8 @@ const CLIENT_JS = `
20345
20338
  "runs.title": "実行", "runs.empty": "プロジェクトを選択すると実行一覧が表示されます。",
20346
20339
  "runs.none": "このプロジェクトにはまだ実行がありません。", "projects.none": "まだプロジェクトがありません。作成して始めましょう。", "projects.noneShort": "プロジェクトなし",
20347
20340
  "runs.noMatch": "条件に一致する実行はありません。",
20348
- "runs.col.run": "実行", "runs.col.branch": "ブランチ", "runs.col.status": "ステータス",
20349
- "runs.col.specs": "スペック", "runs.col.cost": "コスト", "runs.col.created": "作成",
20341
+ "runs.col.run": "実行", "runs.col.status": "ステータス",
20342
+ "runs.col.cost": "コスト", "runs.col.created": "作成",
20350
20343
  "runs.totalCost": "この {n} 件のコスト:", "runs.capped": "先頭 {n} 件のみ表示",
20351
20344
  "runs.spend24h": "直近 24 時間の全支出:",
20352
20345
  "runs.filter.date": "日付", "runs.filter.kind": "種類", "runs.filter.status": "結果",
@@ -20747,14 +20740,14 @@ const CLIENT_JS = `
20747
20740
  // Shared by the runs-list row and the run-detail header — the one place
20748
20741
  // both decide whether a run's own status badge speaks drift's vocabulary.
20749
20742
  function runStatusBadge(run) {
20750
- return run.kind === "drift" ? driftFoundBadge(driftRunState(run), "drift.run.") : statusBadge(run.status);
20743
+ return answersDrift(run) ? driftFoundBadge(driftRunState(run), "drift.run.") : statusBadge(run.status);
20751
20744
  }
20752
20745
 
20753
20746
  // Which command left the run, and whether its spec counts are a tally of
20754
20747
  // what was verified. A recording's rows are the specs it wrote, not specs it
20755
- // checked, so "1 / 1 passed" and a full meter would claim a test result.
20756
- // A kind from a newer hub keeps the generic label but is read the same
20757
- // cautious way, since nothing here knows what its counts mean.
20748
+ // checked, so "1 / 1 passed" would claim a test result. A kind from a newer
20749
+ // hub keeps the generic label but is read the same cautious way, since
20750
+ // nothing here knows what its counts mean.
20758
20751
  var KINDS = {
20759
20752
  run: { label: "kind.run", verifies: true },
20760
20753
  drift: { label: "kind.drift", verifies: true },
@@ -20811,6 +20804,16 @@ const CLIENT_JS = `
20811
20804
  return r.status === "failed" ? "found" : "clean";
20812
20805
  }
20813
20806
 
20807
+ /**
20808
+ * Whether a run's badge should say what the audit found, rather than how the
20809
+ * run itself is going. Only once it is over: an audit still streaming its
20810
+ * rows has no summary yet, and reading that absence as "no drift" claims the
20811
+ * one answer nobody has earned.
20812
+ */
20813
+ function answersDrift(run) {
20814
+ return run.kind === "drift" && run.status !== "running";
20815
+ }
20816
+
20814
20817
  /** A whole drift run's state. Label counts beat status for the same reason. */
20815
20818
  function driftRunState(run) {
20816
20819
  var d = driftSummary(run);
@@ -21100,11 +21103,17 @@ const CLIENT_JS = `
21100
21103
  var tr = el("tr", "row");
21101
21104
  tr.addEventListener("click", function () { location.hash = "#/runs/" + encodeURIComponent(r.id); });
21102
21105
 
21106
+ // Four columns: which run, how it went, what it cost, when. Everything
21107
+ // else is one click away, and a column that has to mean something
21108
+ // different per kind (a spec tally that counts passes for a run and
21109
+ // findings for an audit) reads wrong before it reads useful.
21103
21110
  var runCell = document.createElement("td");
21104
21111
  runCell.appendChild(el("div", "runid", r.id.slice(0, 8)));
21105
21112
  var sub = el("div", "subline");
21106
21113
  sub.appendChild(ciBadge(r));
21107
21114
  sub.appendChild(kindChip(r.kind));
21115
+ sub.appendChild(el("span", "chip", r.branch || "—"));
21116
+ if (r.profile) sub.appendChild(el("span", "chip", r.profile));
21108
21117
  if (r.kind === "drift") {
21109
21118
  var rowDrift = driftSummary(r);
21110
21119
  if (rowDrift) driftChips(rowDrift).forEach(function (chip) { sub.appendChild(chip); });
@@ -21112,47 +21121,10 @@ const CLIENT_JS = `
21112
21121
  runCell.appendChild(sub);
21113
21122
  tr.appendChild(runCell);
21114
21123
 
21115
- var branchCell = document.createElement("td");
21116
- branchCell.appendChild(el("span", "chip", r.branch || "—"));
21117
- tr.appendChild(branchCell);
21118
-
21119
- var profileCell = document.createElement("td");
21120
- profileCell.appendChild(r.profile ? el("span", "chip", r.profile) : el("span", "muted", "—"));
21121
- tr.appendChild(profileCell);
21122
-
21123
21124
  var statusCell = document.createElement("td");
21124
21125
  statusCell.appendChild(runStatusBadge(r));
21125
21126
  tr.appendChild(statusCell);
21126
21127
 
21127
- var specsCell = document.createElement("td");
21128
- if (!kindOf(r.kind).verifies) {
21129
- specsCell.appendChild(el("span", "muted", "—"));
21130
- } else {
21131
- // A drift row counts what the audit found, not what "passed" — the same
21132
- // ratio its detail page shows. Reading passed/total here printed a
21133
- // different number for the same run in the two places you would compare.
21134
- var rowDriftSummary = r.kind === "drift" ? driftSummary(r) : null;
21135
- var found = rowDriftSummary
21136
- ? rowDriftSummary.testDrift + rowDriftSummary.specChange + rowDriftSummary.unknown
21137
- : null;
21138
- var num = rowDriftSummary
21139
- ? found + " / " + rowDriftSummary.specs
21140
- : r.specs.passed + " / " + r.specs.total;
21141
- var fillTotal = rowDriftSummary ? rowDriftSummary.specs : r.specs.total;
21142
- var fillPart = rowDriftSummary ? found : r.specs.passed;
21143
-
21144
- var specsWrap = el("div", "specs");
21145
- var meter = el("span", "meter" + (rowDriftSummary ? " drift" : ""));
21146
- var pct = fillTotal > 0 ? Math.round((fillPart / fillTotal) * 100) : 0;
21147
- var bar = el("i");
21148
- bar.style.width = pct + "%";
21149
- meter.appendChild(bar);
21150
- specsWrap.appendChild(meter);
21151
- specsWrap.appendChild(el("span", "num muted", num));
21152
- specsCell.appendChild(specsWrap);
21153
- }
21154
- tr.appendChild(specsCell);
21155
-
21156
21128
  tr.appendChild(el("td", "muted num", costText(r.costUsd)));
21157
21129
  tr.appendChild(el("td", "muted num", relTime(r.createdAt)));
21158
21130
  tbody.appendChild(tr);
@@ -35,9 +35,9 @@ declare const RunSchema: z.ZodObject<{
35
35
  running: "running";
36
36
  }>;
37
37
  kind: z.ZodDefault<z.ZodEnum<{
38
+ record: "record";
38
39
  run: "run";
39
40
  drift: "drift";
40
- record: "record";
41
41
  }>>;
42
42
  drift: z.ZodDefault<z.ZodNullable<z.ZodObject<{
43
43
  specs: z.ZodNumber;
@@ -615,9 +615,9 @@ type ReportSpecResult = z.infer<typeof ReportSpecResultSchema>;
615
615
  declare const RunReportDataSchema: z.ZodObject<{
616
616
  schemaVersion: z.ZodLiteral<1>;
617
617
  kind: z.ZodDefault<z.ZodEnum<{
618
+ record: "record";
618
619
  run: "run";
619
620
  drift: "drift";
620
- record: "record";
621
621
  }>>;
622
622
  createdAt: z.ZodString;
623
623
  runId: z.ZodNullable<z.ZodString>;
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccqa",
3
- "version": "1.26.0",
3
+ "version": "1.26.2",
4
4
  "type": "module",
5
5
  "description": "Browser test recorder powered by Claude Code and agent-browser",
6
6
  "repository": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccqa",
3
- "version": "1.26.0",
3
+ "version": "1.26.2",
4
4
  "type": "module",
5
5
  "description": "Browser test recorder powered by Claude Code and agent-browser",
6
6
  "repository": {