Repository navigation
feat(sign-in): a graph's tab says where to sign in, in place of its refused reads - #39
Merged
Merged
Conversation
…efused reads
While the server asks for a sign-in nobody holds, every read is refused,
and each pane showed the raw 401 ("one bearer credential is required")
with a Refresh or Try again that would be refused too. Only the status
chip said "Sign in needed", and nothing in the window said where.
A tab that reads the graph now shows "Sign in to <server>", the Open
dialog's sentence with the server named ("<server> asks you to sign in
at <issuer host>."), and Sign in, or Cancel while the browser is open.
The types sidebar says "Sign in to <server> to see its types." Tabs
that read nothing from the server (settings, the design gallery, agent
conversations) are drawn as they are.
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: b3273bbc-9d1a-406d-a7d1-9ebb60ff0f3f) |
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.
While a server asks for a sign-in nobody holds, every read is refused. Each pane showed the raw 401 ("one bearer credential is required") with a Refresh or Try again that would be refused too. Only the status chip said "Sign in needed", and nothing in the window said where to sign in. It was first seen on a managed cluster after its sign-in was enabled.
What the window shows now
<server>", then the Open dialog's sentence with the server named ("<server>asks you to sign in at<issuer host>."), and Sign in. While the browser is open, it says "Finish signing in at<issuer host>in your browser." and offers Cancel.<server>to see its types." in place of its 401 and Try again.Item::reads_graph, true by default).Connection::sign_in_prompt(graph_store) decides the sentence and the action, andstudio_workspace::sign_in_promptdraws it. The pane and the sidebar both use them.Tests
graph_storesign_in::tests::a_server_that_offers_sign_in_is_signed_in_through_the_browseris extended: the prompt while sign-in is offered, while the browser is open, and none once signed in.studio_workspacetests::a_tab_that_reads_the_graph_shows_the_sign_in_its_server_asks_foris new: a graph tab shows the prompt, a settings-like tab doesn't, and the tab comes back when the server stops asking. It fails without the pane's prompt (checked).The full local gate passes: fmt, layers, design tokens, brand, clippy
-D warningsandcargo test --workspace.Note
Low Risk
Presentation-layer gating on existing connection sign-in state; auth/token logic is largely unchanged aside from new prompt derivation.
Overview
When the graph server is unauthorized and no sign-in flow is already held, graph-backed tabs no longer surface useless 401 errors with Refresh / Try again. They show a dedicated sign-in empty state instead.
Connection::sign_in_prompt(withSignInPrompt/PromptAction) maps connection sign-in state to the message and optional Sign in or Cancel action, aligned with the Open dialog copy.studio_workspace::sign_in_promptrenders that as UI and wires buttons tosign_in/cancel_sign_in.Workspace pane rendering checks
Item::reads_graph(default true; settings, design gallery, and agent tabs opt out) and replaces tab body content with the prompt when needed. The types sidebar shows a short “Sign in to … to see its types.” note in the same situation. After sign-in completes, panes redraw from the existing connection observation path.Tests cover prompt text through the browser flow in
graph_storeand tab vs non-tab behavior instudio_workspace; spec 016 documents the UX.Reviewed by Cursor Bugbot for commit 050090d. Bugbot is set up for automated code reviews on this repo. Configure here.