Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
|
Note Written by Thanks for explaining the repeated view selection. The prior-approval rule applies because replacing per-view state with one browser-wide storage key makes a choice persist across all devices and threads. Please discuss that behavior in an Ideas discussion and obtain approval of the direction and scope before requesting reconsideration. |
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.
Problem
When you open a device in the device hub and switch to Flat view, the choice does not stick. Switch to another thread and come back, and the device is in the 3D view again. Users who prefer the flat view have to pick it again on every visit.
To reproduce, open a device from + → Device, choose Flat view, open another thread, then go back to the first thread. The device shows the 3D view.
Change
DeviceStreamViewkept the choice in component state, so it reset to 3D each time the view mounted again. The choice now goes through the existinguseLocalStoragehook undert3code:device-presentation. The default stays 3D, so nothing changes for anyone who never picks Flat.The user guide for devices now says that the app remembers the choice.
Scope and approval
This is a small fix for an obvious bug, so it has no prior issue. A view choice the user made explicitly is lost on remount. The fix keeps every default and adds no setting. It only stops the app from discarding the choice.
It covers the full device panel on web and desktop, which share this component. Mobile has no 3D view, so it needs no change. The preference is stored per browser or desktop app. It is not synced across devices.
Verification
DeviceStreamView.test.tsxstreams a device, presses Flat, unmounts, and mounts the view again. Before the fix, the 3D viewer mounted again (expected 2 to be 1). After the fix, it stays flat. The four existing tests in that file still pass.vp linton the changed files andtsc-rs --noEmitforapps/webboth pass.Made with Claude Opus 5.5 in Claude Code.
🤖 Generated with Claude Code