docs(spec): align dashboard implementation contracts

This commit is contained in:
2026-08-20 19:00:08 +03:30
parent 98dada4cb0
commit 1654fd5f65
3 changed files with 16 additions and 15 deletions

View File

@@ -401,7 +401,7 @@ Do not reveal which threshold failed, a near-threshold count that could aid diff
- Payment lifecycle: why `Paid` and `Verified` are bank successes and only `Verified` is finalized.
- Coverage: unknown statuses, timing non-null coverage, sample counts, and missing baseline behavior.
- Peer privacy: equal-per-merchant median, direction-aware percentile, suppression, and prohibited peer detail.
- Calculation lifecycle: lazy first access, independent four-section delivery, revision/version trace, and 30-day disposable cache without implying TTL-based staleness.
- Calculation lifecycle: lazy first access, independent four-section delivery, immutable dataset-snapshot/metric-version trace, and 30-day disposable cache without implying TTL-based staleness.
- Insight policy: 100-session evidence floor and approved change thresholds; observational, not causal language.
Definitions open as a page or anchored side panel. They are linkable, keyboard reachable, and do not trap important content inside hover-only tooltips.
@@ -451,7 +451,7 @@ Overall progress is written as a contextual message such as «۲ از ۴ بخش
### 10.3 Stale/freshness language
The frontend does not label data stale merely because a Redis entry is old or its 30-day TTL is approaching. Revisioned source/cohort keys and metric-definition version determine reuse. “Stale” appears only if a future approved interface returns an explicit stale/quality state. During SSE interruption, ready data is labeled with its calculation timestamp and connection recovery state, not silently called current or stale.
The frontend does not label data stale merely because a Redis entry is old or its 30-day TTL is approaching. The immutable completed-import dataset snapshot and metric-definition version determine reuse. “Stale” appears only if a future approved interface returns an explicit stale/quality state. During SSE interruption, ready data is labeled with its calculation timestamp and connection recovery state, not silently called current or stale.
### 10.4 Event ordering and duplication
@@ -771,7 +771,7 @@ Persian digits are applied to rendered variable values. Technical identifiers in
## 20. Implementation handoff checklist (after approval only)
- Obtain approved machine-readable analytics, identity, detail, SSE, error, and export contracts.
- Generate transport types only from approved backend `docs/openapi.yaml` version `1.0.0` and fail checks on drift.
- Resolve static adapter/Nginx fallback behavior.
- Verify that local, CI, and Docker builds consume the tracked FaNum variable font and retain its adjacent license file without external downloads.
- Create implementation tasks for shell, formatting, authentication, filters, run/SSE state model, each canonical section, detail tables, export, themes, and tests.
@@ -780,9 +780,9 @@ Persian digits are applied to rendered variable values. Technical identifiers in
No implementation work begins until the dashboard capability and this UX specification are explicitly approved.
## 21. Remaining approval questions
## 21. Resolved implementation handoff
1. Approve or revise the backend draft CSV contract: synchronous delivery, eligible detail types/columns, UTF-8 BOM, ASCII `snake_case` headers, UTC timestamps, filename policy, 100,000-row/50-MiB caps, 60-second deadline, throttling, retention, and audit event.
2. Should CSV preflight be a modal dialog on desktop or an inline disclosure, provided the mobile experience remains a focus-managed full-screen dialog/sheet?
3. Approve the draft `AuthSession.merchant.displayName` field as authoritative for the shell and export preflight when the demo username differs.
4. Is a downloadable chart-data table required in MVP, or is a visible semantic table alternative sufficient while CSV remains limited to authorized detail views?
- CSV follows the approved backend contract: synchronous merchant-detail export, Persian headers, UTF-8 BOM, UTC timestamps, safe filename, 100,000-row/50-MiB/60-second caps, throttling, and 90-day analytics/export audit retention.
- Export confirmation may use a compact inline disclosure on desktop and a focus-managed full-screen dialog/sheet on narrow screens.
- `AuthSession.merchant.displayName` is authoritative for the shell and export confirmation when it differs from the demo username.
- Every chart has a visible semantic table alternative. CSV remains limited to approved merchant-owned detail views; chart-data download is not a separate MVP export.