refactor(causa): hoist perf-tier ladder to theme/, wire event-detail tier dot (rf2-6ja23)#1029
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Per the rf2-6ja23 audit (causa ux — performance-tier colour-tag audit across panels):
panels/performance_helpers.cljcinto a newday8.re-frame2-causa.theme.perf-tierns. 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.event_detailhandler-row renders a perf-tier coloured dot + label when:tags :duration-msis present. Gated on(number? duration-ms)so malformed tags never produce a misleading green dot. The raw:duration-msstays in the EDN dump for power users.:duration-msper Spec 009 L38) blocking the rest. Future panel-wiring beads land against the same ladder.Beads landed
theme/, event-detail handler-row tier-dot wired, audit ledger documented.Beads closed (already shipped)
Beads deferred (with bd notes)
Test plan
cd tools/causa && clojure -M:test— 497 tests / 1423 assertions (was 488 / 1363), 0 failurescd implementation && npm run test:cljs— 1837 tests, 0 failures[handler-row ...]/[domino-row ...]bodies are reachable