feat: show persisted investment data and sync state

Consume the provided resource-envelope API snapshot. Preserve financial snapshots during
refresh, observe synchronization without importing, and fence late responses across
account and connection changes.
This commit is contained in:
2026-09-26 21:22:49 +03:00
parent b987fd8e78
commit 4e5f564fa1
81 changed files with 4714 additions and 1420 deletions
+8 -9
View File
@@ -55,13 +55,10 @@ const BondPageView: FC<BondPageViewProps> = (props) => {
</div>
<Button
variant="subtle"
onClick={() => {
vm.bondState.retry();
vm.quoteState.retry();
vm.metricsState.retry();
}}
onClick={vm.refresh}
disabled={vm.refreshing}
>
{t("stock.refreshPrice")}
{t("investment.refresh")}
</Button>
</Group>
<Group mt="md" gap="xs">
@@ -80,8 +77,8 @@ const BondPageView: FC<BondPageViewProps> = (props) => {
</Badge>
) : null}
</Group>
{vm.bondState.error || vm.quoteState.error ? (
<Alert role="alert" color="orange" mt="md">
{vm.refreshError || vm.bondState.error || vm.quoteState.error ? (
<Alert role="status" aria-live="polite" color="orange" mt="md">
{t(vm.quote ? "accounts.refreshError" : "stock.sectionError")}
</Alert>
) : null}
@@ -322,7 +319,9 @@ const BondPageView: FC<BondPageViewProps> = (props) => {
{vm.coupons ? (
<Stack gap="md">
{vm.coupons.estimateUnavailable || vm.coupons.positionIsStale ? (
<Alert color="orange">{t("stock.estimateUnavailable")}</Alert>
<Alert color="orange" role="status" aria-live="polite">
{t("stock.estimateUnavailable")}
</Alert>
) : null}
{vm.upcoming.length ? (
vm.upcoming.map((coupon) => (