diff --git a/DESIGN.md b/DESIGN.md
index a8f190f..604c9c4 100644
--- a/DESIGN.md
+++ b/DESIGN.md
@@ -132,6 +132,7 @@ The approved Persian-first baseline remains authoritative where the shipped arti
| Version | Date | Decision |
| ------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| 0.10.0 | 2026-08-20 | Reframed retry guidance around the share of failed payment paths retried, including an explicit zero state; made payment-flow bars proportional to counts; and removed single-day hover styling from whole-week selection. |
| 0.9.3 | 2026-08-20 | Replaced stacked field focus outlines with one narrow semantic-blue border across text fields, textareas, native selects, and custom select triggers; other keyboard targets retain a subtle 1px outline. |
| 0.9.2 | 2026-08-20 | Pinned the initialization skeleton sidebar to the physical right and reserved matching right-side content space so loading and loaded shells share the same geometry. |
| 0.9.1 | 2026-08-20 | Distributed the desktop period-type group and exact-period control across the available filter-bar width while preserving the compact mobile sheet layout. |
@@ -295,6 +296,10 @@ Scope changes immediately replace data-dependent cards, tables, detail panels, a
The signature chart is a blue line with outlined points, a low-opacity blue area, dashed neutral gridlines, labeled X/Y axes, Persian date ticks, and successful-payment count ticks. It follows a written title and reporting-period chip, provides focusable points with spoken values, and animates its initial trace once over 900ms while reduced-motion collapses the effect. Point tooltips use a short scale/fade transition, flip above or below according to vertical room, and clamp their center so the surface never leaves the chart wrapper.
+### Payment Performance
+
+Retry engagement is the share of failed payment paths that customers tried again, using final failures plus recovered failed paths as the opportunity denominator. When opportunities exist and none are retried, the merchant sees `۰٪`, not an unavailable state. The adaptive guidance depends only on this percentage. Flow bars use the same total-session scale, so equal counts always render at equal widths.
+
### Transaction Table
The table stays inside a bordered 8px surface, receives its compact filters from the shared page bar, uses aligned 14px rows and 12px identifiers/status, and exposes semantic detail links with a pointer and neutral row hover. Verified badges are green; Paid remains neutral gray. Narrow viewports may scroll the table horizontally after surrounding filters and summaries have reflowed.
diff --git a/src/lib/components/AnalyticsPage.svelte b/src/lib/components/AnalyticsPage.svelte
index 7f42cdb..ea28619 100644
--- a/src/lib/components/AnalyticsPage.svelte
+++ b/src/lib/components/AnalyticsPage.svelte
@@ -22,7 +22,13 @@
import { useDashboardContext } from '$lib/dashboard-context.svelte';
import { parseDashboardFilters } from '$lib/dashboard-filters';
import { formatMoney, formatMilliseconds, formatPercent, formatValue } from '$lib/format';
- import { describePercentile, formulas, peerProgressTone, retryOpportunity } from '$lib/insights';
+ import {
+ describePercentile,
+ formulas,
+ peerProgressTone,
+ retryEngagementRate,
+ retryOpportunity,
+ } from '$lib/insights';
import { formatPeerMetric, peerMetricLabel } from '$lib/peer-metrics';
import KpiCard from './KpiCard.svelte';
import FeeShareDonut from './FeeShareDonut.svelte';
@@ -102,6 +108,10 @@
icon: 'text-amber-600 dark:text-amber-400',
};
}
+
+ function flowWidth(value: number, total: number) {
+ return total > 0 ? Math.max(0, Math.min(100, (value * 100) / total)) : 0;
+ }
- {formatValue(performance.data.retriedSessions.value)} مشتری دوباره تلاش کردهاند و نرخ بازیابی آنها - {formatPercent(performance.data.retryRecoveryRate.value)} بوده است. {opportunity.copy} + از میان + {formatValue( + performance.data.failedSessions.value + performance.data.retryRecoveryRate.numerator, + )} مسیر ناموفق، + {formatValue(performance.data.retriedSessions.value)} مورد + دوباره امتحان شدهاند؛ یعنی + {formatPercent(retryRate)}. + {opportunity.copy}
diff --git a/src/lib/components/AppShell.svelte b/src/lib/components/AppShell.svelte index 5b425cf..9e06ab5 100644 --- a/src/lib/components/AppShell.svelte +++ b/src/lib/components/AppShell.svelte @@ -124,7 +124,7 @@