Repository navigation
Conversation
An app that calls store.proxy.connect used to get a bar above it that read "This app wants to use your Pets account through <proxy origin>. The proxy keeps the connection under your account; this app may use it until you revoke that." It now gets a dialog titled "Connect <platform>" that says which app wants which account, that you approve it on the next page (naming the proxy's host, which is the address to expect there), and that the app never sees your password. When you already connected that platform, the dialog lists each such connection with when it was connected and which apps use it, each with "Use this account"; "Connect another account" still goes to the proxy. The lookup settles either way, so the dialog shows a placeholder while it runs instead of changing its buttons under your cursor. A failure (no app identity, proxy unreachable) is shown in the dialog so you can retry; the app hears `cancelled` if you close it. Closing the dialog while "Connect" is still preparing no longer navigates away afterwards. Dialog gains an optional `labelledBy`, so the dialog is named by its title for screen readers and tests.
…its on
Seen in screenshots of the dialog against the Pets demo:
- On a 390 px phone "Cancel" broke into "Cance" / "l" next to "Connect
another account". That button is now "Use another account", which sits
beside "Use this account" and fits, and the footer wraps its buttons
onto a second line instead of squeezing them.
- The placeholder shown while looking for existing connections was 0 px
high, so the dialog just had a gap. It is now a line-sized pulse.
- A proxy error ran out of its box, because it names the request path.
It now wraps, and leads with what failed ("Could not use this
account." or "Could not start connecting.") above the proxy's words.
The dialog's content already pads its bottom, so the list's own margin left an empty band above the buttons.
|
What failed: Why it is not this PR's: the diff changes the connect prompt inside an app page ( Re-running the failed job once on the same head. Update: that re-run was cancelled on purpose before it got a runner, so the red Generated by Claude Code |
|
Landed on develop through the batch #1946 (squash f2a07aa), tested together on Mancave. Closing this PR since its commits are in that batch. Generated by Claude Code |
Requested by Joep · project thread
Before: an app that calls
store.proxy.connectgot a bar above it: "This app wants to use your Pets account through http://127.0.0.1:19152. The proxy keeps the connection under your account; this app may use it until you revoke that." with "Use existing connection", "Connect" and "Cancel". "Use existing connection" picked the most recently used connection without showing which.After: a dialog titled "Connect Pets": "Pets wants to use your Pets account." / "You approve this on the next page, at 127.0.0.1:19152." / "Pets never sees your password." with Cancel and Connect. When you already connected that platform, the dialog lists each connection ("Pets account", "Connected today.", "Used by Timesheets.") with "Use this account", and the footer offers "Use another account". A failure stays in the dialog ("Could not use this account." above the proxy's words) so you can try again.
How:
ConnectDialog.tsxis built on the sharedDialog, which gains an optionallabelledByso the dialog is named by its title.AppFramekeeps the app's ask and answers it once the dialog has closed:connectedafter "Use this account",cancelledotherwise. The lookup of existing connections always settles (a failed lookup counts as none), so the dialog shows a placeholder line instead of swapping its buttons later. Closing the dialog while "Connect" is still preparing no longer navigates away afterwards.Screenshots (desktop and phone, every state) are not committed, per AGENTS.md; they are in the project thread. They were taken with this branch's frontend on Vite against the atomic-plugins
petslane and its mock proxy.Notes for review:
getByRole('group', { name: 'Connect an account' }), and pets also clicks "Use existing connection". When they move their atomic-server pin past this they should usegetByRole('dialog', { name: 'Connect <Platform>' })and "Use this account". The "Connect" button keeps its name.Related Issues
None.
Checklist