Presentation-only UI over the already-complete 015-reporting-dashboards backend: four new dashboards (Management, Product, Support, AI) wired into a tabbed Analytics & Reports page alongside the existing SLA Monitor/Escalation Matrix views, plus the new stat-tile/ranked-bar-list/status-distribution/meter primitives they share. Applies the dataviz skill's methodology throughout (form before color, status colors reserved and always paired with an icon + label, validated against both light and dark mode) and fixes a real mobile overflow bug in the Tabs primitive found via screenshot review, not just accessibility-tree checks. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
5.4 KiB
5.4 KiB
Specification Quality Checklist: Reporting and Analytics Dashboards UI
Purpose: Validate specification completeness and quality before proceeding to planning Created: 2026-09-09 Feature: spec.md
Content Quality
- No implementation details (languages, frameworks, APIs)
- Focused on user value and business needs
- Written for non-technical stakeholders
- All mandatory sections completed
Requirement Completeness
- No [NEEDS CLARIFICATION] markers remain
- Requirements are testable and unambiguous
- Success criteria are measurable
- Success criteria are technology-agnostic (no implementation details)
- All acceptance scenarios are defined
- Edge cases are identified
- Scope is clearly bounded
- Dependencies and assumptions identified
Feature Readiness
- All functional requirements have clear acceptance criteria
- User scenarios cover primary flows
- Feature meets measurable outcomes defined in Success Criteria
- No implementation details leak into specification
Notes
- Backend counterpart (
supporthub-api's 015-reporting-dashboards) is already complete and committed — this feature is presentation-only, per the same backend-first pattern already used for every prior feature spanning both repos this session. - The user asked explicitly for "production-level design" — this feature's plan.md accordingly
applies this project's
datavizskill methodology (form selection before color, status colors reserved for status-flavored distributions, sequential single-hue for magnitude rankings, validated against both light and dark mode) rather than an ad hoc visual treatment. - All items pass; no revision iterations were needed. No [NEEDS CLARIFICATION] markers were required.
Implementation-time findings
datavizpalette validation caught a real dark-mode gap in this app's existing status colors. Runningscripts/validate_palette.jsagainst the Badge component's own emerald-500/amber-500/--destructiveconvention (chosen over the raw--warning/--successCSS tokens, which fail contrast outright in light mode) showed the convention passes in light mode but fails two checks in dark mode: warning/success CVD separation is 5.5, under the 6 floor, and destructive's dark value (#7f1d1d) has a contrast ratio of only 1.74 against the dark surface. Rather than reworking this app's established status-color tokens (out of this feature's scope), every new status-flavored component (StatusDistribution) applies the skill's own prescribed mitigation for a borderline palette: identity never rides on color alone — each segment pairs its bar color with a distinct icon shape (CheckCircle2/AlertTriangle/XCircle) and a visible text label, in both the legend and the segment itself. This satisfies the CVD floor-band's secondary-encoding requirement and the contrast WARN's "visible labels required" mitigation.- A real backend bug was found and fixed via manual verification against real seeded data,
not by any automated test:
ManagementRepository.countEverEscalatedToHumanandProductReportRepository.countEverEscalatedToHuman(015-reporting-dashboards) checked a list of terminal statuses that, perticket-state-machine.ts's own transition table, is reachable from BOTH the AI-resolved path and the human-escalation path once they converge on shared terminal statuses (RESOLUTION_PENDING_CUSTOMER/RESOLVED/CLOSED/REOPENED) — so every AI-resolved ticket was being double-counted as human-escalated too (confirmed live: 34/34 tickets, 100%, against real dev data). Fixed by keying offassignments: { some: {} }instead, sinceorchestrationService.handleHumanEscalationis the only code path that ever creates anAssignmentrow. This is why this feature's own frontend verification session is the reason 015's own dashboards now report correct figures. - The
Tabsprimitive's mobile layout had a real overflow bug, found only by taking an actual screenshot (not just an accessibility-tree read) at a 390px viewport:TabsListcentered its six tabs with no scroll affordance, so the active tab was clipped off-screen on both edges instead of being scrollable into view. Fixed incomponents/ui/tabs.tsxby making the list horizontally scrollable on narrow viewports (overflow-x-auto, left-aligned,shrink-0triggers) while keeping the existing centered/inline layout atsm:and above. - Per-agent workload in the Support dashboard displays the raw
agentId(no name-lookup endpoint exists yet) — accepted as data-model.md's own documented fallback rather than adding a new endpoint or an N+1 lookup out of this feature's scope. - The full Playwright E2E suite, run serially against the real dev backend, intermittently trips
013-auth-hardening's real login rate limiter (
LOGIN_RATE_LIMIT_MAX_ATTEMPTS=5perLOGIN_RATE_LIMIT_WINDOW_SECONDS=300) because every spec file shares the sameadmin@supporthub.internaltest account and each does its own real login. This is confirmed pre-existing: the same failures occur running the suite with this feature's newreports-dashboards.spec.tsentirely excluded. This feature's own E2E spec passes 3/3 cleanly in isolation; the shared-account rate-limit interaction is a systemic property of the existing E2E suite design, not a regression introduced here.