Skip to content

feat: persist vault drafts, harden error recovery, deliver push notif… - #1583

Merged
1nonlypiece merged 2 commits into
Disciplr-Org:mainfrom
timmyp10111:feat/vault-drafts-recovery-push-delivery
Oct 25, 2026
Merged

1nonlypiece merged 2 commits into
Disciplr-Org:mainfrom
timmyp10111:feat/vault-drafts-recovery-push-delivery

Conversation

@timmyp10111

Copy link
Copy Markdown
Contributor

…ications

Fixes three related reliability gaps:

Issue 1542 - Create Vault draft persistence

  • src/utils/createVaultDraft.ts: per-wallet drafts under disciplr:create-vault-draft:v1::<address> with a 7-day TTL and a 50 KB cap.
  • 500 ms debounced autosave in CreateVault.tsx, a non-modal restore/discard banner, beforeunload protection, and in-app navigation guarding via src/utils/navigationGuard.ts + ConfirmationModal.
  • Drafts are cleared only on confirmed creation success and on wallet disconnect; they are kept on unknown or failed outcomes so users can retry.
    closes [create-vault] Autosave the create-vault form as a per-wallet draft with restore, discard and leave-page warning #1542

Issue 1538 - Error recovery and reporting

  • ErrorBoundary gains resetKeys/onReset and a page | section variant; route boundaries and the Layout backstop are keyed on location.pathname so navigation always recovers from a crashed screen.
  • src/utils/referenceId.ts: fallback-safe ID generation (crypto.randomUUID -> crypto.getRandomValues -> timestamp).
  • src/utils/errorReporter.ts: bounded 20-entry ring buffer, optional external sink, StrKey redaction, message truncation, and idempotent global error/unhandledrejection handlers installed in bootstrap().
    closes [errors] Reset error boundaries on navigation, add retry, and capture uncaught errors with a correlated reference ID #1538

Issue 1534 - Push notification delivery

  • src/notifications/delivery.ts: pure decideDelivery()/shouldFlushQueue() gating by push preference, permission, quiet hours, frequency and read state, plus permission and desktop-notification helpers.
  • src/notifications/usePushDelivery.ts: single app-wide subscriber mounted in Layout that diffs the notification store and delivers or queues updates; the queue and digest anchors stay in memory only.
  • The settings switch now requests permission on enable, reverts with an inline explanation when denied, and disables itself when unsupported.
    closes [notifications] Deliver browser notifications that respect permission, quiet hours and frequency #1534

Adds new tests across 8 suites; the full suite passes (121 files, 1746 passed / 1 skipped) with lint, build and design-token drift checks clean.

…ications

Fixes three related reliability gaps:

Issue 1 - Create Vault draft persistence
- src/utils/createVaultDraft.ts: per-wallet drafts under
  `disciplr:create-vault-draft:v1::<address>` with a 7-day TTL and a 50 KB cap.
- 500 ms debounced autosave in CreateVault.tsx, a non-modal restore/discard
  banner, beforeunload protection, and in-app navigation guarding via
  src/utils/navigationGuard.ts + ConfirmationModal.
- Drafts are cleared only on confirmed creation success and on wallet
  disconnect; they are kept on unknown or failed outcomes so users can retry.

Issue 2 - Error recovery and reporting
- ErrorBoundary gains resetKeys/onReset and a `page` | `section` variant; route
  boundaries and the Layout backstop are keyed on location.pathname so
  navigation always recovers from a crashed screen.
- src/utils/referenceId.ts: fallback-safe ID generation
  (crypto.randomUUID -> crypto.getRandomValues -> timestamp).
- src/utils/errorReporter.ts: bounded 20-entry ring buffer, optional external
  sink, StrKey redaction, message truncation, and idempotent global
  error/unhandledrejection handlers installed in bootstrap().

Issue 3 - Push notification delivery
- src/notifications/delivery.ts: pure decideDelivery()/shouldFlushQueue()
  gating by push preference, permission, quiet hours, frequency and read state,
  plus permission and desktop-notification helpers.
- src/notifications/usePushDelivery.ts: single app-wide subscriber mounted in
  Layout that diffs the notification store and delivers or queues updates; the
  queue and digest anchors stay in memory only.
- The settings switch now requests permission on enable, reverts with an inline
  explanation when denied, and disables itself when unsupported.

Adds new tests across 8 suites; the full suite passes (121 files,
1746 passed / 1 skipped) with lint, build and design-token drift checks clean.
@drips-wave

drips-wave Bot commented Oct 21, 2026

Copy link
Copy Markdown

@timmyp10111 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@timmyp10111

Copy link
Copy Markdown
Contributor Author

@1nonlypiece kindly review and merge

…conflicts

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@1nonlypiece
1nonlypiece merged commit 9d9fd6c into Disciplr-Org:main Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants