Skip to content

refactor(causa): hoist perf-tier ladder to theme/, wire event-detail tier dot (rf2-6ja23)#1029

Merged
mike-thompson-day8 merged 1 commit into
mainfrom
refactor/rf2-causa-v11-batch
May 14, 2026
Merged

refactor(causa): hoist perf-tier ladder to theme/, wire event-detail tier dot (rf2-6ja23)#1029
mike-thompson-day8 merged 1 commit into
mainfrom
refactor/rf2-causa-v11-batch

Conversation

@mike-thompson-day8
Copy link
Copy Markdown
Contributor

Summary

Per the rf2-6ja23 audit (causa ux — performance-tier colour-tag audit across panels):

  • Hoist the perf-tier ladder from panels/performance_helpers.cljc into a new day8.re-frame2-causa.theme.perf-tier ns. The ladder (classify-tier / tier-colour / tier-glyph / tier-label / over-budget? / default-budget-ms / tier-order) is design-system grade — one source of truth, spec-anchored, JVM-portable — not panel-local.
  • performance_helpers.cljc re-exports from the new ns so existing call-sites resolve unchanged. Zero behaviour change in the Performance panel.
  • Wire the first cross-panel consumer: event_detail handler-row renders a perf-tier coloured dot + label when :tags :duration-ms is present. Gated on (number? duration-ms) so malformed tags never produce a misleading green dot. The raw :duration-ms stays in the EDN dump for power users.
  • Audit ledger in the new ns's docstring names every panel surface that should carry the tier-dot, its status (LIVE / blocked on trace-stream / follow-on bead), and the structural prereq (per-event :duration-ms per Spec 009 L38) blocking the rest. Future panel-wiring beads land against the same ladder.

Beads landed

  • rf2-6ja23 — perf-tier audit; ladder hoisted to theme/, event-detail handler-row tier-dot wired, audit ledger documented.

Beads closed (already shipped)

Beads deferred (with bd notes)

  • rf2-wm7z4 (Cmd-K command palette) — substantial new feature spanning every panel; warrants its own focused PR with palette infrastructure built first.
  • rf2-1o9cq (v1.1 drop-in mode for non-re-frame2 apps) — already deferred to 2026-08-05; v1.1+ design-time decision.
  • rf2-3gn4f (v1.1 opt-in localStorage conversation persistence) — already deferred to 2026-08-05; Lock 12 privacy-posture change requires Mike's call at v1.1 design time.
  • rf2-0us27 (v1.1 per-cascade structured export) — already deferred to 2026-08-05; Lock 4 serialisation/round-trip design question requires Mike's call at v1.1 design time.

Test plan

  • cd tools/causa && clojure -M:test — 497 tests / 1423 assertions (was 488 / 1363), 0 failures
  • cd implementation && npm run test:cljs — 1837 tests, 0 failures
  • +9 theme.perf-tier ladder tests (boundaries, fallbacks, shape ↔ colour alignment)
  • +6 event-detail handler-row tier-dot tests (each tier + absent + non-numeric guards)
  • Test walker gains recursive descent through fn-component vectors so deep testids inside [handler-row ...] / [domino-row ...] bodies are reachable

…tier dot (rf2-6ja23)

Per the rf2-6ja23 audit:

- Hoist classify-tier / tier-colour / tier-glyph / tier-label /
  over-budget? / default-budget-ms / tier-order from
  panels/performance_helpers.cljc into a new
  day8.re-frame2-causa.theme.perf-tier ns. The ladder is design-
  system grade (one source of truth, spec-anchored, JVM-portable),
  not panel-local.
- performance_helpers.cljc re-exports from the new ns so existing
  call-sites resolve unchanged — no behaviour change in the
  Performance panel.
- event_detail.cljs handler-row renders a perf-tier coloured dot
  + label when :tags :duration-ms is present (gated on number? so
  malformed tags never produce a misleading green dot). Same ladder
  the Performance panel uses; the raw :duration-ms number stays in
  the EDN dump for power users.
- New theme.perf-tier ns docstring carries the audit ledger — which
  panels DO and DO NOT yet show tier dots, and the prereq (per-event
  :duration-ms in the trace stream, Spec 009 L38) blocking the rest.

Tests: +9 theme.perf-tier ladder coverage (boundaries, fallbacks,
shape ↔ colour alignment), +6 event-detail handler-row tier-dot
coverage (each tier + absent + non-numeric guards). The test walker
gains recursive descent through fn-component vectors so deep
testids inside [handler-row ...] / [domino-row ...] bodies are
reachable.

JVM: 497 tests / 1423 assertions (was 488 / 1363); CLJS: 1837 tests.
@mike-thompson-day8 mike-thompson-day8 merged commit bef7bd8 into main May 14, 2026
33 checks passed
@mike-thompson-day8 mike-thompson-day8 deleted the refactor/rf2-causa-v11-batch branch May 14, 2026 05:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant