Repository navigation
Proton Pass: fix browser login, show its progress, add Check Again and Logout - #31877
Conversation
…extension's pass-cli - Not Logged In screens (Search Items, List Vaults and the Login command) have a Check Again action (Cmd+R), which picks up a session started elsewhere, such as a browser login that completed after Raycast closed - Open Terminal Login ran whichever `pass-cli` the shell found, while the extension runs the CLI Path preference or the pass-cli it installed. It now runs the same one, quoted for the shell since the installed path contains spaces, and brings Terminal to the front. The script builder is a tested core helper Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thank you for your contribution! 🎉 🔔 @izyuumi @FeernandoOFF you might want to have a look. You can use this guide to learn how to check out the Pull Request locally in order to test it. 📋 Quick checkout commandsBRANCH="proton-pass-login-fixes"
FORK_URL="https://github.com/bst1n/extensions.git"
EXTENSION_NAME="proton-pass"
REPO_NAME="extensions"
git clone -n --depth=1 --filter=tree:0 -b $BRANCH $FORK_URL
cd $REPO_NAME
git sparse-checkout set --no-cone "extensions/$EXTENSION_NAME"
git checkout
cd "extensions/$EXTENSION_NAME"
npm install && npm run devWe're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 15 business days. |
|
Check Again could overlap with the reload after a browser login, and an older failed check could then put the Not Logged In screen back over the vaults loaded since. Loads now go through a request tracker, as in Search Items, and each one shows the loading state, so Check Again no longer flashes No Vaults Found or the vaults of the ended session, which are also cleared once the session has ended. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
New actions go at the end of the action panel, so the existing ones keep their place. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@bst1n can you resolve the merge conflicts 🙂 |
…ton-pass-login-fixes # Conflicts: # extensions/proton-pass/CHANGELOG.md
Check Again cleared the Not Logged In error before the list was loading, so the empty list showed "No Items Found" for a moment, with the vault menu still holding the ended session's vaults. Search Items now loads from the start of each load, and an ended session clears its vaults as well as its items, as List Vaults does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Login with Browser ran `pass-cli login` inside the extension and waited for it there. Once the browser came to the front, Raycast could stop the extension before the login completed, with nothing on screen saying so: the browser showed a successful login, and the extension stayed logged out. pass-cli now runs on its own, writing to a file in the extension's support folder, so the login completes however long it takes in the browser. Its state is kept there too, and removed once the login is over, since the output holds the login URL and its payload. While the login runs, the Not Logged In screen says to finish it in the browser, with Open Login Page Again, Check Again and Cancel Login, and checks on it every second. Opening the extension again picks a running login up. Once pass-cli exits, its exit code, or else the session, tells success from failure: the view reloads, or says why the login didn't complete. The Login command and Get TOTP use the same screen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…pped Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ssion A browser login failed with "Error opening temp session file: No such file or directory": the extension had started another pass-cli command as the login was saving the new session. That command can find the session's data without its key yet, and pass-cli then logs out "for security", deleting the session folder being written. A login in the terminal works because nothing else runs meanwhile. The running login is now recorded as soon as pass-cli starts, and every pass-cli command waits for it to end: the views show the login screen, which follows the login and reloads once it has completed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Clicking Login with Browser switched screens twice just as the browser came to the front and closed Raycast. The screen now stays as it is, with an "Opening the Login Page" toast, until the browser is in front. Coming back, the view showed Not Logged In until it found the running login, then said to log in in the browser although that was done: pass-cli checks the browser every 10 seconds. It now spins until it knows, says the login continues by itself within about 10 seconds, and says when pass-cli is saving the session. Once logged in, Search Items, List Vaults and Get TOTP showed an empty list while loading the items. They now keep the login screen, saying you're logged in, until there's something to show; Check Again keeps it too, rather than flashing an empty list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was no way to log out from the extension. The Login command's logged-in screen now has Logout, after a confirmation that the terminal shares the session. It ends the session with pass-cli and clears the extension's cache. When ending the session on Proton's servers fails, e.g. offline, the failure toast offers Force Logout, which only removes it from this computer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- After a login, "You're Logged In" stays while the view loads, then the login screen gets its actions back if the view still shows it. After Logout in the Login command, it showed "You're Logged In" with no actions. - The previous account's cache is cleared when a browser login starts, rather than when a view notices it completed: a view opened first after the login could show the previous account's items. - A login whose page couldn't open in the browser is canceled: nobody could finish it, and no other pass-cli command runs while it does. - Logout comes after the existing actions in the Login command. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@pernielsentikaer the merge conflicts are resolved 🙂 Since then, this PR also fixes the browser login: it could succeed in the browser while the extension stayed logged out. The description explains the cause and the fix. It's ready for review. |
|
Validated the current head One additional regression remains: cancel a login whose process takes time to stop, complete a replacement login, then let the canceled process exit. Its late failure overwrites the shared exit-code file and Check Again reports failure for the successful replacement. Implemented a small follow-up in bst1n/extensions#1, targeting this PR's branch: exit results are separated by process ID. The synthetic delayed-cancellation test fails before the fix and passes afterward. All 135 tests, distribution build/TypeScript, Raycast metadata validation, ESLint, Prettier, and diff checks pass. No real account or password CLI was used. The follow-up is a draft for human review and integration; this PR remains the Raycast publication path. |
It fixes the login flow this PR adds, which isn't released yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pass-cli's exit code can be written into the login folder while it's removed, after a cancel or once the login is over: the removal then failed as "directory not empty", e.g. Cancel Login showed that error. The login tests hit it under load. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks @izyuumi for testing it and for the fix 🙏 Good catch. I merged it into this branch. |
Comments Outside DiffThese findings could not be posted inline.
|
…mand Its files, which hold the login URL, stayed until a login screen read the result, but none shows once logged in: after a login that succeeded while Raycast was closed, they stayed on disk. The check that runs before every pass-cli command now removes them once pass-cli has exited, unless the login failed: the login screen, which then shows, still says why. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…screen Once pass-cli has exited, the next pass-cli command removed the login's files when the exit code was missing, which happens when Raycast closed first. A failed login then reached the login screen without its explanation. Only a login that exited with 0 is removed now; otherwise the URL is taken out of the files, and why the login failed stays until the login screen reads it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Cleaning up after a finished login read the shared files, then rewrote them: a login started in between could lose its output, and its saved state could be replaced by the finished one's, letting other pass-cli commands run during it. Each attempt now writes its output and failure to files named after it, and login.json no longer holds the URL, which is read from the output. The cleanup only removes the finished attempt's output, after saving why it failed, and never writes login.json. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two cleanups of the same finished login could overlap: the second read the output after the first removed it, and overwrote the saved failure with nothing. The failure is now only written when there's a reason. A login whose output was forgotten kept its success result, which the next login screen showed even after Logout. Such a login's result now comes from the current session: succeeded when logged in, otherwise its saved failure, or nothing. Logout also forgets a finished login. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tarted Logout canceled whatever login was saved once it was done, so a login started from the Login command while Logout waited for pass-cli was stopped. Logout now reads the saved login first, which can only be over since a running one stops Logout, and afterwards only removes that attempt's files, never the saved state another login may have written. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ton-pass-login-fixes # Conflicts: # extensions/proton-pass/CHANGELOG.md # extensions/proton-pass/src/lib/review-regressions.test.ts # extensions/proton-pass/src/lib/search-items-view.tsx # extensions/proton-pass/src/list-vaults.tsx
…ogin The Login command shows Re-Run Browser Login while the check of an earlier login may still be running. That check removed the new login's files and then reported its own result over the new login's: the screen stopped following a login that was still running. Starting or canceling a login now waits for the check in flight, and no check starts while a login is being started. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e687d61. Configure here.
Canceling waited for the check in flight, but the view could start another one while pass-cli was stopped and its files removed, which takes a moment. That check still found the login, and put it back on screen after the cancel. No check starts while a login is being canceled now, as while one is being started. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Validated both remaining outside-diff sharing findings on current head
Implemented the narrow follow-up in bst1n/extensions#3, targeting this branch. The three regression cases fail before the fix and pass afterward; the older-response sharing/count regression also remains green. All 160 tests, distribution build/TypeScript, Raycast metadata validation, ESLint, Prettier, and diff checks pass. No real account, password CLI, or actual session disruption was used. The changes preserve |
The login guard on member commands is part of the login flow this PR adds, which isn't released yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks @izyuumi for testing it and for the fix 🙏 I merged it into this branch. |
pernielsentikaer
left a comment
There was a problem hiding this comment.
Looks good to me, approved 🔥
|
Published to the Raycast Store: |
|
🎉 🎉 🎉 Such a great contribution deserves a reward, but unfortunately we couldn't find your Raycast account based on your GitHub username (@bst1n). Please link your GitHub account to your Raycast account to receive your credits and soon be able to exchange them for some swag. |
| @@ -1,5 +1,16 @@ | |||
| # proton-pass Changelog | |||
|
|
|||
| ## [Login Fixes] - 2026-10-10 | |||
There was a problem hiding this comment.
The new CHANGELOG.md heading uses a fixed date. The repository requires new changelog headings to keep {PR_MERGE_DATE} so the date can be filled in when the PR merges. Please restore the placeholder before merging.
| ## [Login Fixes] - 2026-10-10 | |
| ## [Login Fixes] - {PR_MERGE_DATE} |
Rule Used: What: Changelog entries must use {PR_MERGE_DATE} placeholder in titles, be placed at the top of the file, and maintain descending version order. Why: Standardized placeholders and consistent ordering ensure changelogs are maintainable and merge da... (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: extensions/proton-pass/CHANGELOG.md
Line: 3
Comment:
**Release date is set early**
The new `CHANGELOG.md` heading uses a fixed date. The repository requires new changelog headings to keep `{PR_MERGE_DATE}` so the date can be filled in when the PR merges. Please restore the placeholder before merging.
```suggestion
## [Login Fixes] - {PR_MERGE_DATE}
```
**Rule Used:** What: Changelog entries must use `{PR_MERGE_DATE}` placeholder in titles, be placed at the top of the file, and maintain descending version order. Why: Standardized placeholders and consistent ordering ensure changelogs are maintainable and merge da... ([source](https://app.greptile.com/raycast/-/custom-context?memory=c2214c11-df56-490a-b1c0-09a385df481a))
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Description
Fixes browser logins that succeeded in the browser while the extension stayed logged out, and makes the Not Logged In screens say what's going on.
pass-cli loginsaves the new session a few seconds after the browser step, and the extension ran otherpass-clicommands meanwhile: reopening Search Items lists vaults. A command starting while the session is saved can find its data without its keyring key yet, and pass-cli then logs out "for security" (features/keyring.rs), deleting the session folder being written. The login then ends withError opening temp session file: No such file or directory; in a failing login, another command had started in the same second. Nopass-clicommand runs during a login now: the views show the login screen until it's over. A login in the terminal never hits this, since nothing else runs then.pass-cli loginran inside the extension, which Raycast can stop once the browser comes to the front. It now runs detached, writing to a file in the extension's support folder, where its state is kept too. Both are removed once the login is over, since the output holds the login URL and its payload. Opening the extension again picks a running login up.The tests run the detached login with the fake CLI:
They also cover the guard that keeps other commands from running during a login, and the screens' sequence.
npm testpasses (160 tests) andray buildsucceeds.Screencast
No new command: the Not Logged In screens gain the login's progress, and the Login command a Logout action.
Checklist
npm run buildand tested this distribution build in Raycastassetsfolder are used by the extension itselfREADMEare located outside the metadata folder if they were not generated with our metadata tool🤖 Generated with Claude Code
Note
Medium Risk
Changes authentication orchestration and session timing (detached processes, blocking other CLI during login), but behavior is heavily tested and errors redact sensitive login output.
Overview
Fixes browser login races where reopening the extension right after authenticating could leave you logged out: while
pass-clisaves the session, no otherpass-clicalls run until login finishes.Detached login replaces the in-process flow:
pass-cli loginruns on its own with state under the extension support folder, survives Raycast closing, and is picked up when you return. Not Logged In screens (Search Items, List Vaults, Get TOTP, Login) share aLoginScreenwith step-by-step status (browser, finishing, loading items), Open Login Page Again, Cancel Login, and Check Again (⌘R) for sessions completed elsewhere.The Login command adds Logout (with confirmation and Force Logout fallback) via new adapter
logoutsupport. Open Terminal Login uses the same bundled/configuredpass-cliwith safe shell/AppleScript quoting and activates Terminal. List Vaults shows vaults and item counts immediately and applies optional sharing metadata when it arrives.Reviewed by Cursor Bugbot for commit 31d7242. Bugbot is set up for automated code reviews on this repo. Configure here.