Repository navigation
Conversation
A colleague who opened a shared document through the sign-in screen got no Assistant in the rail. The router opens the document as soon as the auth status flips to signed in, but the assistant is installed only when the sign-in setup finishes (profile, preferences), and the editor screens built their panel list once from `services.assistant` without listening to it. The server was not at fault: keys resolve per requesting user, so an organization member gets the organization's key on any document. - ShellServices.assistantOffered (installed and not switched off) is updated when the assistant is installed, removed or its status changes. - Write, Sheets and Slides rebuild their panels from it. - Server tests pin whose key pays on a shared document; spec 10 §1/§3 document it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
A colleague in the same organization opened a document shared with them (edit access) and the Assistant was missing from the side rail, although the organization has a shared AI key.
Root cause
services.assistantand never rebuilt when the assistant was installed, so the Assistant icon stayed out of the rail until a reload. Users who open documents from Drive after sign-in never hit it.assistant.getStatususe the requesting user's organization, so a colleague gets the organization's key on any document.Fix
ShellServices.assistantOffered(the assistant is installed and not switched off on the server) is updated when the assistant is installed, removed, or its status changes.Whose key pays on a shared document
Keys follow the requesting user, not the file (spec 10 §1):
Spec 10 §1 and §3 document this and the rebuild.
Test plan
dart analyzeclean (wonky_app, Write, Sheets, Slides, server);dart formatno changes.ai_org_key_test.dartfor the shared-document cases above;test/integration/platform/aiandtest/integration/write/aipass (66).🤖 Generated with Claude Code