Repository navigation
refactor(ui): move routed surfaces and agent-workspace state onto the view scope (RIG-4442) - #1675
Merged
trunk-io[bot] merged 3 commits intoOct 7, 2026
Conversation
… view scope (RIG-4442) Co-authored-by: Matt Wilkinson <matt@rigel.build>
|
Compass engineering docs preview: https://compass-ui-rig-4442-surfaces.compass-eng-docs.pages.dev Deployed from |
…allback URL (RIG-4442) Co-authored-by: Matt Wilkinson <matt@rigel.build>
…-4442) Co-authored-by: Matt Wilkinson <matt@rigel.build>
rigel-mintaka
marked this pull request as ready for review
October 5, 2026 02:02
This was referenced Oct 5, 2026
mattwilkinsonn
added this pull request to stack #1838
October 7, 2026 00:43
mattwilkinsonn
approved these changes
Oct 7, 2026
|
This pull request was merged into |
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.
This PR is part of a stack containing 7 PRs:
mainT2 of the in-window tabs and split views record (
docs/designs/ui/compass-in-window-tabs/design.md§T2). Stacked on #1652 (T1). There is still one view per window, so nothing changes for the user.agent-tabs.ts(new): the tab and split model moves out ofstore.tsunchanged.view-scope.ts: each view owns its agent workspace (tabs, active tab, repo id), keyed on the route's agent. The same agent, or a non-agent route, keeps it; a different agent starts fresh. This is the oldagentViewAgentIdrule. It addsagentTabs,activeAgentTab,agentSession,openTab,closeTab,splitFocusedandworkspaceChannel.components/ViewHost.tsx(new): renders a scope's route throughappRoutes, so the route table stays the one component map. A non-canonical path renders the*allcatch-all, which redirects home as before.store.ts: addsfocusedView.view,selectedChannelId,selectedTopicIdandactiveRepoIdnow derive from it. The router hash goes to the focused view, and a redirect the view makes itself is pushed back to the URL.applyRouteand theapply*Routefunctions are gone. Issue selection stays window-wide (§A1) and is re-anchored on each agent entry, as before.App.tsxrenders<ViewHost scope={store.focusedView()} />in<main>.AgentView,LogPanel,TopicViewandChannelView(when it has nochannelprop) readuseView().One test deleted:
store.test.ts › openAgent › a standalone channel selection does not move the workspace channel. It held a standalone channel and an agent workspace in one view at once. With a view owning its route,openChannelmoves the focused view off the agent, so that state can't exist. Per-view independence is now covered byViewHost.test.tsx. The mirror case (re-opening the agent-view agent shows its home DM…) still passes unchanged.Tests
ViewHost.test.tsx: twoViewHosts on/agent/acc-compass-uiand/agent/acc-compass-server. Before the change: 0 pass / 2 fail (each view renders its own agent: expected compass-ui, got undefined;opening a terminal tab in one view leaves the other unchanged: expected 1, got 0). After: 2 pass.moon run compass-ui:test: 1213 pass, 0 fail.typecheckandstylelintpass. biome reports 0 errors on the changed files; its 3 complexity warnings instore.tsalready exist on the parent.visual-smokeanddev-boot: 13 passed, with no baseline changes.Spec-impact: none.
Ledger-impact: none
Co-authored-by: Matt Wilkinson matt@rigel.build