fix: report whether a runtime is still initializing in ListResources - #9861
Open
nishantmonu51 wants to merge 1 commit into
Open
fix: report whether a runtime is still initializing in ListResources#9861nishantmonu51 wants to merge 1 commit into
ListResources#9861nishantmonu51 wants to merge 1 commit into
Conversation
`ListResources` returns 200 with an empty list when security policies deny every resource, which is what a deny-by-default project does for users who are entitled to nothing. The frontend read that as "the runtime isn't ready yet" and polled forever behind a spinner that never resolved. Add an `initializing` flag to `ListResourcesResponse`, derived from controller state rather than the returned resources, so it stays meaningful when every resource is filtered out. `Controller.Initializing` latches: once the initial parse and reconcile completes it stays false, so a later model refresh does not make the instance look like it is building again. Also surface access-denied errors on the canvas and explore embed surfaces, which previously rendered nothing at all for a denied user. Claude-Session: https://claude.ai/code/session_016toijNcMp2pV3UQ2WoZUhc
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.
ListResourcesreturns 200 with an empty list when security policies deny every resource, which is what a deny-by-default project does for users entitled to nothing. Clients read that as "the runtime isn't ready yet" and polled forever behind a spinner that never resolved.initializingtoListResourcesResponse, computed fromController.Initializing()rather than from the returned resources, so it stays meaningful when the response is empty or narrowed bykind/path.Controller.Initializing()latches: once the initial parse and reconcile completes it stays false for the controller's lifetime, so a model refresh or a hiddenRefreshTriggerdoes not make the instance look like it is building again. Astartedflag set alongsideRun's initial enqueue closes the window where every resource is stillIDLEand the instance would report "done" before it had begun.useIsInitialBuildand the dashboards refetch interval now key off the flag instead of guessing from an empty list.ResolveCanvasnow retries network errors only, so a 403 surfaces immediately instead of after five retries.Checklist:
https://claude.ai/code/session_016toijNcMp2pV3UQ2WoZUhc