Skip to content

Open pending Contact Status read-only - #1537

Merged
osyed merged 2 commits into
mainfrom
agent/pending-contact-status
Aug 5, 2026
Merged

Open pending Contact Status read-only#1537
osyed merged 2 commits into
mainfrom
agent/pending-contact-status

Conversation

@dnlbui

@dnlbui dnlbui commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

What Changed

This PR keeps Contact Status available for viewing while an update_toll_required transaction is pending.

  • FriendModal.open now activates the modal and displays the cached or optimistic selection before applying the pending guard.
  • A dedicated pending state uses the existing animated “Status update pending…” loading toast while keeping the radio options and Update button disabled.
  • Connectivity changes preserve the pending state instead of replacing it with an editable refresh state.
  • Success, failure, and timeout settlement paths dismiss the pending toast, refresh the selected status, and confirm it with the network when online.
  • Offline and failed confirmation states retain persistent inline feedback.

Fixed Flow

  1. The user opens Contact Status while a status transaction is pending.
  2. The modal immediately displays the cached or optimistic status read-only with an animated pending toast.
  3. The client continues preventing overlapping status submissions while the transaction remains pending.
  4. When the transaction settles, the pending toast is replaced by the existing network-confirmation flow.
  5. Editing becomes available only after confirmation succeeds; offline and failed refreshes remain read-only.

Why

The previous pending guard returned before the modal became active. That prevented conflicting submissions, but also hid the entire status interface and blocked offline, reaction, and video-call setup flows waiting for it to open. Moving the guard into the modal state preserves the original transaction protection while restoring read access.

Validation

  • node --check app.js
  • node --test /tmp/contact-status-refresh.test.mjs (temporary focused harness covering pending open/toast, connectivity, settlement refresh, offline, failure, and timeout)
  • git diff --check origin/main...HEAD

Closes #1536

@dnlbui
dnlbui marked this pull request as ready for review August 5, 2026 18:07
@osyed
osyed merged commit b419a1f into main Aug 5, 2026
2 checks passed
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.

Open Contact Status read-only while a friend-status transaction is pending

2 participants