docs(#4499): add frontend conventions to scorecard AGENTS.md - #4500
docs(#4499): add frontend conventions to scorecard AGENTS.md#4500fullsend-ai-coder[bot] wants to merge 1 commit into
Conversation
Add a Frontend Component Conventions section documenting four conventions that the review agent missed on PR #4395: 1. i18n translation key namespaces: keys are organized by domain in ref.ts (metric.*, aggregation.*, thresholds.*, errors.*, common.*). Aggregation type labels belong under aggregation.*, not metric.*. 2. Empty/error state rendering: scalar cards with no successful samples (result.total === 0) must render in neutral grey, not apply threshold coloring. ScalarStatCard guards this with a total > 0 check before threshold evaluation. 3. AggregatedMetricCard dispatch: uses result-shape discrimination (numeric value field vs values[] array) via type guards in isScalarAggregation.ts, not aggregation type name matching. 4. Frontend/backend threshold boundary: threshold evaluation is the backend responsibility. The frontend mirrors the logic for display coloring only (RHIDP-16510 tracks deferring to backend-provided values). Closes #4499
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4500 +/- ##
=======================================
Coverage 61.66% 61.66%
=======================================
Files 2572 2572
Lines 102950 102950
Branches 28857 28855 -2
=======================================
Hits 63482 63482
Misses 37614 37614
Partials 1854 1854
*This pull request uses carry forward flags. Click here to find out more. Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
|
|
🤖 Finished Review · ✅ Success · Started 4:35 PM UTC · Completed 4:40 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Cost: $0.77 |
Review — ApproveScope: docs-only — adds a Verification against source codeAll four documented conventions were verified against the current codebase:
Intent & coherenceThe PR directly addresses issue #4499 (retro agent finding from PR #4395), which identified that the review agent missed two frontend convention violations because AssessmentNo findings. The documentation is accurate, well-structured, and properly scoped to the scorecard workspace's frontend conventions. Labels: PR adds frontend documentation conventions to scorecard workspace AGENTS.md |



Add a Frontend Component Conventions section documenting four conventions that the review agent missed on PR #4395:
i18n translation key namespaces: keys are organized by domain
in ref.ts (metric., aggregation., thresholds., errors.,
common.). Aggregation type labels belong under aggregation.,
not metric.*.
Empty/error state rendering: scalar cards with no successful
samples (result.total === 0) must render in neutral grey, not
apply threshold coloring. ScalarStatCard guards this with a
total > 0 check before threshold evaluation.
AggregatedMetricCard dispatch: uses result-shape discrimination
(numeric value field vs values[] array) via type guards in
isScalarAggregation.ts, not aggregation type name matching.
Frontend/backend threshold boundary: threshold evaluation is
the backend responsibility. The frontend mirrors the logic for
display coloring only (RHIDP-16510 tracks deferring to
backend-provided values).
Closes #4499
Post-script verification
agent/4499-frontend-conventions)08e6312205c83d9bd493e5dbc6f7af94d021af8e..HEAD)