Skip to content

feat(web): remember the last 3D or flat device view - #10

Merged
Kaloyanes merged 1 commit into
mainfrom
feat/remember-device-view
Oct 28, 2026
Merged

Kaloyanes merged 1 commit into
mainfrom
feat/remember-device-view

Conversation

@Kaloyanes

Copy link
Copy Markdown
Owner

Problem

The device panel always opens in 3D. Choosing Flat view in the toolbar was only kept in component state, so every reload, new tab, or newly opened device went back to 3D. For anyone who finds the 3D view uncomfortable, that means switching to Flat again each time.

Change

  • New client setting deviceView ("3d" | "flat", default "3d", so nothing changes for anyone who never touches it) in packages/contracts/src/settings.ts.
  • DeviceStreamView reads it instead of its local useState("phone"). The 3D view and Flat view toolbar buttons write it with updateClientSettings, the same way the diff layout toggle does. The last choice is remembered across reloads and shared by all devices.
  • 3D still falls back to flat per device when it cannot run (Duo without hinge support, MJPEG, accessibility overlay, unsupported browser). That fallback does not overwrite the saved choice.
  • docs/user/devices.md mentions that the last choice is remembered. There is no settings row: the toolbar is the only control.

Mobile has no 3D device view, so it is unaffected. This is a view preference, not an agent capability, so there is no MCP surface.

Scope and approval

Filed on my fork only (draft), not on pingdotgg/t3code. It is a small preference on an existing control, not a new feature: no new UI, one contract field with a default.

Verification

  • vp run check:changed passes: format, lint, knip, typecheck (32 packages), and the 2 affected test files (the DesktopClientSettings fixture now carries deviceView, so persistence of the new key is covered there).
  • Manual, in a real client: dev server in an isolated worktree, iPhone simulator streamed through the Device panel, Settings app open for neutral content. Before is main's DeviceStreamView.tsx temporarily restored in the same worktree.
Default (unchanged) Before: pick Flat, reload After: pick Flat, reload
3D by default Back to 3D after reload Flat is remembered
  • After the reload, Flat view reports aria-pressed=true and deviceView: "flat" is in the persisted client settings.

Not checked: iPhone Duo and Android foldable 3D, the desktop (Electron) shell, and a remote or relay connection. There is no automated test for the toolbar toggle itself; I judged a browser test not worth the mocking for a one-line state swap.

Written by Claude Sonnet 5.5 (claude-sonnet-5-5) in the Claude Code harness, run from T3 Code.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:S labels Oct 28, 2026
@Kaloyanes
Kaloyanes marked this pull request as ready for review October 28, 2026 14:48
Copilot AI balanced review requested due to automatic review settings October 28, 2026 14:48
@Kaloyanes
Kaloyanes merged commit 0a3b6f4 into main Oct 28, 2026
9 of 20 checks passed
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-28T14:48:55.013422Z
We couldn’t complete this review. Comment @codex review to try again.
a1f8234 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants