Skip to content

Show disconnect alongside reconnect on lost social connections - #332

Merged
paulocastellano merged 1 commit into
mainfrom
fix/disconnect-button-on-reconnect-state
Sep 4, 2026
Merged

Show disconnect alongside reconnect on lost social connections#332
paulocastellano merged 1 commit into
mainfrom
fix/disconnect-button-on-reconnect-state

Conversation

@paulocastellano

Copy link
Copy Markdown
Contributor

Summary

On /accounts, when a social account's connection is lost (disconnected or token_expired), the card only offered Reconnect. A user who wanted to drop that account and connect a different one couldn't do it from the UI.

The lost-connection card now shows Reconnect and Disconnect stacked. Disconnect reuses the existing confirmation modal and app.accounts.disconnect route, which already accepts accounts in any status, so this is a frontend-only change.

Changes

  • resources/js/components/accounts/NetworkConnectGrid.vue: render both buttons in the reconnect state; add data-testid on reconnect/disconnect buttons keyed by account id.
  • tests/Browser/NetworkConnectGridTest.php: new browser test seeding a tokenExpired() X account and asserting both buttons are visible.

Test plan

  • php artisan test tests/Browser/NetworkConnectGridTest.php --compact (3 passed, against npm run build output)
  • npx eslint resources/js/components/accounts/NetworkConnectGrid.vue
  • vendor/bin/pint --dirty

When a social account's token expired or the connection was lost, the
Connections card only offered "Reconnect". Users who wanted to drop
that account and connect a different one had no way to do it from the UI.

The lost-connection card now renders both Reconnect and Disconnect,
reusing the existing disconnect confirmation flow. The connected-state
Disconnect button gets a data-testid too so browser tests can target
either state by account id.
@paulocastellano
paulocastellano merged commit 82da3fd into main Sep 4, 2026
5 checks passed
@paulocastellano
paulocastellano deleted the fix/disconnect-button-on-reconnect-state branch September 4, 2026 21:29
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.

1 participant