enhance: group sidebar workspaces by remote server#26
Merged
Conversation
The sidebar previously only showed workspaces from the active server, forcing users to round-trip through Settings to see what was on other servers. Now every configured remote renders as its own section so the full inventory is visible in one glance and a single click switches both server and workspace. - api: rawFetch helper splits transport from singleton resolution so the new fetchJsonAt(remoteId, ...) can target any remote without disturbing the active one - useAllRemoteWorkspaces hook parallel-fetches /workspaces from every remote via useQueries; unauthenticated and unreachable states are surfaced so the sidebar can render Sign In / error affordances inline - useResetOnRemoteChange clears the react-query cache when the active remote flips so workspace-scoped queries don't return stale data from the previous server - Sidebar renders one section per remote with Notion-style heading (Laptop / Globe icon + name); clicking a workspace from a non-active remote silently switches active before navigating - ListRow gains stripeClassName / stripeDim so the row can advertise which remote it belongs to via a 2px left-edge bar that coexists with the active indicator - Details affordance moved from <button> to <span role="button"> to resolve a long-standing nested-button HTML validity warning Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
list() now skips unreadable rootPaths with a warn-level log so one ghost entry doesn't block boot. load() unchanged. Also drops the unused api.registerWorkspace shim in Studio whose server endpoint was removed earlier. Co-Authored-By: Claude Opus 4.7 (1M context) <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.
Summary
Sign Inaffordances for remotes without a stored token.Notes
fetchJsonAt(remoteId, …)lets the aggregate hook target an explicit remote without touching the active singleton. The active-serverfetchJsonis unchanged.Detailsbutton on each workspace row moved from a real<button>to<span role="button">to fix a long-standing nested-button HTML validity warning.useResetOnRemoteChangeclears the whole react-query cache; can be narrowed to workspace-scoped keys later if cost matters.