Repository navigation
Show the workspace inspector per workspace - #608
Open
thiblahute wants to merge 1 commit into
Open
thiblahute wants to merge 1 commit into
thiblahute wants to merge 1 commit into
Conversation
Showing or hiding Files, Changes, Commits and History now applies to the workspace you are in only. Switching workspaces shows each one's inspector as it was left there, in that checkout's view, dock and expansion, and a reload brings it back. A workspace where it was never shown keeps it hidden. Phones are unchanged. The shown state is kept per browser, connection and workspace in localStorage (inspectorShown.v1); before, one open state followed every switch. The initial JS budget goes from 833 to 834 KiB (gzip 257 to 258 KiB): main sits within half a KiB of both ceilings.
This branch has not been deployed
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
Showing or hiding the workspace Inspector (Files, Changes, Commits, Agent History) now applies to the current workspace only. Switching workspaces shows each one's Inspector as it was left there, in that checkout's view, dock and expansion, and a reload brings it back.
Why
The open state was one session-wide value that followed every workspace switch (
keepInspectorForWorkspace): opening Changes in one workspace opened it in every workspace visited afterwards, and closing it anywhere closed it everywhere. The view, dock and size were already per checkout; only whether it is shown was not.What changed
web/src/inspectorShown.ts(new):inspectorShown.v1inlocalStorage, connection id to the ids of the workspaces whose Inspector was left shown. Validated on read (anything malformed reads as hidden), capped, and a full storage only loses the memory.web/src/App.tsx:commitInspectorStaterecords a user show or hide for that workspace; a hide caused by switching to a workspace that has it hidden is not recorded, so the one left keeps it shown.keepInspectorForWorkspace(desktop) opens the target workspace's Inspector in its checkout's remembered view, or hides it.scripts/check-web-assets.mjs: initial JS budget 833 to 834 KiB, gzip 257 to 258 KiB. This adds about 1.4 KiB raw to the initial bundle andmainsits within 0.7 KiB of the raw ceiling.FEATURES.md(Workspace Inspector) anddocs/ARCHITECTURE.md(Workspace resource ownership).No migration: the open state was never persisted before.
Verification
bun test web/src/inspectorShown.test.ts: per connection and workspace, malformed or unwritable storage.bun run format:check,bun run lint,bun run typecheck:bun,bun run build:web,bun run test:quickwith an isolatedHOME/TMPDIR.Manual checks