Repository navigation
✨ Use scoped logins for CLI actions - #397
Merged
Merged
Conversation
Keep user sessions isolated by API origin and coordinate rotating credentials across processes. Preserve granted permissions and report scope failures without changing identity or replaying submitted writes. Use the selected login for developer uploads and reporter reads; linking saves only the checkout destination while explicit CI tokens remain authoritative.
Separate project names, qualified selectors, and organizations in the project list. Show the automatically selected credential, explain token precedence without requiring an auth flag, and suggest concrete commands for a single project. Remove the session identifier from normal whoami output while retaining its machine-readable contract.
Persist refresh uncertainty before sending a rotating credential and refuse reuse when the response or durable save is lost. Definite rejected requests remain retryable; successful replacement or new consent clears the marker. Cover fresh-store and subprocess recovery and remove the redundant authentication guide.
Robdel12
force-pushed
the
rd/scoped-user-login
branch
from
November 4, 2026 06:44
6493f23 to
7a790f1
Compare
Vizzly - Visual Test ResultsCLI Reporter - Waiting for buildNo builds received yet for this pull request. CLI TUI - 1 change needs review
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Builds on the project discovery work merged in #395.
Why
Signing in should be enough to use Vizzly within the permissions the user grants. Requiring another project credential for uploads made a valid login feel incomplete, while shared refresh state could make simultaneous CLI processes invalidate one another.
Approach
Save consented sessions by API origin, use native credential storage where available, and coordinate refresh across processes before rereading the saved successor. Persist refresh uncertainty before rotation so a dropped response, process exit, or failed save cannot cause a later command to replay a consumed token. Login supports explicit scope requests and headless terminals; whoami and permission errors report the actual grant. Selected-user failures never switch identities, while explicit CI tokens remain authoritative.
Project linking now saves the checkout destination without minting credentials. The same selected session reaches uploads, run screenshot forwarding, finalization, previews, and reporter cloud reads through supported SDK routes. Build-only uploads work without read permission, and submitted generic writes are not replayed after authentication failures.
Evidence
The full CLI suite passed 1,884 tests with six skips; the reporter browser suite passed 98 journeys with two skips. Build, published types, lint, formatting, and architecture checks passed. Additional local end-to-end verification used the real API for browser-approved login, four concurrent CLI processes sharing one refresh, user/token build attribution, read-only rejection before writes, a build-only run with screenshot forwarding and finalization, isolated logout, and a committed refresh with a dropped response whose successor remains valid because the later CLI process refuses replay. The production review also covers durable uncertain-refresh recovery through real HTTP, disk reload, and fresh CLI processes. Review covered process-owner death, repeated expiry windows, lock collisions, bounded authentication requests, and safe JSON projections.
Rollout
Release alongside the scoped-session API contract. Existing generic logins require one fresh browser consent; they are not silently upgraded. Project-token CI remains supported. Custom VIZZLY_HOME directories use isolated credential files by default. The duplicate authentication guide is removed; the README and command help retain the user workflow.