Skip to content

UX: tree table completion bar + outcome pill per scenario (#14) - #16

Merged
vivganes merged 6 commits into
mainfrom
feat/issue-14-tree-bar-pill
Jul 22, 2026
Merged

UX: tree table completion bar + outcome pill per scenario (#14)#16
vivganes merged 6 commits into
mainfrom
feat/issue-14-tree-bar-pill

Conversation

@vivganes

Copy link
Copy Markdown
Collaborator

Summary

Closes #14. Replaces the single Status column in the Feature Breakdown tree with two orthogonal, glanceable signals per scenario row (decisions D1–D6):

  • Completion — a proportional bar + N/M count showing how many declared @require-* requirements are present (layer + module match). Color: full=green, partial=amber, empty=red. Presence-based (not pass/fail), so a present-but-failed result still fills the bar (D1, D3, D4).
  • Result — an outcome pill (Passed / Failed / Skipped) carrying the worst linked result; Failed > Skipped > Passed, no-results ⇒ Skipped (D5).

Feature-level rows roll up as average child completion + worst outcome (D6).

Consistency fix (closes #9)

The dashboard summary card now uses the same presence-based completion basis as the bar: complete = scenarios where 100% of requirements are satisfied. The JSON summary.completion gains optional pct/satisfied/required fields; the schema keeps tested/total/percent for backwards compatibility, so the summary/tree divergence from #9 can't return.

Why this is split from #13

This PR keeps the JSON schema key tested as-is (renaming coveragecompletion and tightening to a strict pass-based definition is tracked in #13). The UI wording drops tested/complete in favor of satisfied/completion.

Verification

  • 90 unit + 17 integration tests pass.
  • Full behave features/ suite passes (22 scenarios).
  • Generated JSON report validates against spectracer-report.schema.json.

Out of scope (separate issues)

Missing-requirement reason text (#6), renaming coverage→completion + strict pass-based definition (#13), module validation/case sensitivity (#1#3).

vivganes added 6 commits July 22, 2026 16:29
Replace the single Status column in the Feature Breakdown tree with two
orthogonal, glanceable signals per scenario row (decisions D1-D6):

- Completion: a proportional bar + N/M count showing how many declared
  @require-* requirements are present (layer + module match). Color:
  full=green, partial=amber, empty=red. Presence-based, NOT pass/fail, so a
  present-but-failed result still fills the bar (D1, D3, D4).
- Result: an outcome pill (Passed/Failed/Skipped) carrying the worst result
  across linked results; Failed > Skipped > Passed, no-results => Skipped (D5).

Feature-level rows roll up as the average child completion + worst outcome (D6).
The dashboard summary card adopts the SAME presence-based completion basis as
the bar (complete = scenarios where 100% of requirements are satisfied), so the
summary/tree divergence from #9 cannot return. The JSON report summary gains
optional pct/satisfied/required fields; the schema keeps tested/total/percent
for backwards compatibility.

Tests updated: unit + integration + BDD specs now assert the new
'X/Y scenarios satisfied' wording and presence-based completion basis.
Render the presence-based completion percentage ({{ pct }}%) centered on the
dashboard progress bar instead of only as a stat card. The bar is now taller
(26px) to host the label, which sits above both the filled and unfilled
portions with a subtle text-shadow for legibility in light and dark themes.
Each scenario/feature row's completion bar now carries a centered NN%
overlay (same treatment as the dashboard progress bar), with the N/M
requirement count kept beside it. The bar is taller (20px) to host the
label and is colored full=green / partial=amber / empty=red. Verified
visually via Playwright (bars render at the correct width/height with the
percentage label centered).
In dark mode the partial/amber bar fill made white overlay text illegible.
Switch the partial bar's percentage overlay to dark text with a white halo
(only in dark theme) so it stays readable on both the yellow fill and the
dark track. Light mode is unchanged.
Drop the jargon 'satisfied' from the visible UI in favor of 'complete', which
reads naturally alongside the headline 'NN% complete' and the per-requirement
completion bar. Internal code/JSON/schema/docs terms (satisfied/requirement
satisfied) are unchanged — this is a user-facing label fix only.
@vivganes
vivganes merged commit e13c1b1 into main Jul 22, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant