# feat\(web\): proper number fields, orientation, and floating-preview toggle · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/commit/86975b87a75cc2d65d470dffc49d87443a5833f9)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

Requested revision: 86975b87a75cc2d65d470dffc49d87443a5833f9

Requested commit: 86975b87a75cc2d65d470dffc49d87443a5833f9

Commit: 86975b87a75cc2d65d470dffc49d87443a5833f9

Tree: e73767d9ca214ca1b91a5220a4712374dbf371d9

Author: Julius Marminge

Committer: Julius Marminge

## Message

```
feat(web): proper number fields, orientation, and floating-preview toggle

Three follow-ups to the browser defaults:

The dimension inputs were bare `Input type=number` at w-16, which clipped
4-digit values ("1280" rendered as "128("). They are now `NumberField`, the
repo's real numeric control, widened to fit and with grouping switched off so
a height reads "1024" rather than "1,024".

They commit on blur via `onValueCommitted` instead of per keystroke. Typing
"2560" passes through "256", which is itself a legal dimension, so a
change-handler would persist that intermediate size and rewrite settings on
every key.

Adds an orientation control next to the dimensions, reusing the device
toolbar's rotate affordance — its icon moves to a shared module rather than
being duplicated. Rotating a preset keeps the preset: `resolvePreviewViewport`
already stores rotated presets as the id plus swapped dimensions, so a rotated
iPad Mini stays an iPad Mini instead of decaying into a custom size.

Adds `browserAutoShowFloatingPreview` (on by default) for whether an
agent-opened preview pops the floating player into view. An explicit
`open`/`show` on `preview_open` still wins: that is the agent deliberately
surfacing or hiding its work, which shouldn't be overridden by a default.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

```

## Parents

- [de4c1ee1e1edf8a97fc6c2d39c1d23703f722df3](https://git.cafe/pingdotgg/t3code/commit/de4c1ee1e1edf8a97fc6c2d39c1d23703f722df3?format=markdown)

[Source at this commit](https://git.cafe/pingdotgg/t3code/tree/86975b87a75cc2d65d470dffc49d87443a5833f9?format=markdown)
