Skip to content

Fix/offline mutation success and dynamic focus - #1499

Open
dorismaduegbunam wants to merge 2 commits into
Streampay-Org:mainfrom
dorismaduegbunam:fix/offline-mutation-success-and-dynamic-focus
Open

Fix/offline mutation success and dynamic focus#1499
dorismaduegbunam wants to merge 2 commits into
Streampay-Org:mainfrom
dorismaduegbunam:fix/offline-mutation-success-and-dynamic-focus

Conversation

@dorismaduegbunam

Copy link
Copy Markdown

1. Prevent offline mode from presenting stale mutation success (#1449)

Stream mutations (start, pause, stop, settle, withdraw, cancel) previously presented a "success" whenever the request promise resolved, even if the browser was offline or the server never applied the transition. A stale or dropped request could surface as a successful mutation.

  • Gates every stream mutation on browser connectivity using a new useNetworkStatus hook (navigator.onLine + online/offline events). While offline the mutation is never dispatched and an "Offline - action not applied" error is shown instead.
  • Adds a fail-closed confirmation guard: success is only presented when the response confirms the persisted server state (data.status). A resolved-but-unconfirmed body is treated as failure ("Action not confirmed").
  • Applies the guard to both the stream row action button and the detail page actions, including the destructive withdraw/cancel flow.
  • Adds focused tests for the hook, the guard, and offline / confirmed-success / unconfirmed-response / retry-after-reconnect scenarios.
  • Also restores syntax corruption in the payment timeline, timestamp, and activity timeline components (build-blocking defects from an earlier merge) that prevented the suites from even loading.

Closes #1449

2. Add visible focus treatment for dynamic controls (#1424)

The CommandPalette combobox suppressed its native outline and relied on inline JS focus styling, and its aria-activedescendant listbox active option was distinguishable only by background tint — no visible focus ring for keyboard and assistive-technology users.

  • Moves the palette input onto the shared @layer focus rules: a :focus-visible accent ring plus theme-safe suppression for mouse/touch focus.
  • Adds a visible active-option ring (inset theme-background framing around the accent pill).
  • Adds Home/End navigation and aria-autocomplete="list" for a complete combobox autocomplete pattern.
  • Extends the focus-layer regression tests and adds behavior tests.

Closes #1424

…eampay-Org#1449)

Block stream mutations while the browser reports offline and only present a success when the mutation response confirms the server-side state transition (data.status). Adds a connectivity hook and a fail-closed confirmation guard used by both the stream row and detail page. Also restores syntax corruption in PaymentTimeline, Timestamp, and ActivityTimeline (build-blocking defects from Streampay-Org#1480) required for tests to run.
…ls (Streampay-Org#1424)

Move the palette combobox off inline outline suppression and JS focus styling onto the shared @layer focus rules, add a visible active-option ring for the aria-activedescendant listbox, and add Home/End navigation plus aria-autocomplete=list.
@drips-wave

drips-wave Bot commented Aug 30, 2026

Copy link
Copy Markdown

@dorismaduegbunam 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Quality-2][High] Prevent offline mode from presenting stale mutation success [Quality-2][High] Add visible focus treatment for dynamic controls

1 participant