GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(device): Android fold 3D view keeps the frame's aspect by juliusmarminge · Pull Request #28779 · pingdotgg/t3code

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Nov 1, 2026

Copy link
Copy Markdown
Member

Problem

In the 3D Device view, any Android device that reports a hinge gets the foldable model, and the frame is mapped edge to edge onto its inner screen. That screen is shaped by the last fold-like frame or the default inner display (about 0.96). So a phone-shaped frame, such as the Resizable_Experimental emulator in Phone mode (1080×2400), comes out about 2.1× too wide, a 1920×1200 Tablet-mode frame is squashed, and switching the emulator from Foldable to Phone keeps the old panel. The closed cover screen has the same mismatch on a smaller scale.

Change

androidFoldScene.ts now fits the frame at its own aspect inside both the open inner screen and the closed cover screen, and keeps the fold model:

  • The inner screen's vertices are clamped to the fitted rectangle (next to the existing rounded-corner clamp), with UVs set against that rectangle. Fold-shaped frames still fill the panel edge to edge.
  • The cover screen is rebuilt as a rounded rectangle at the fitted size. Its corner radius is capped at half the shorter side.
  • Every setDisplay refits both screens and reapplies the current hinge angle, so a frame-size change (Foldable → Phone, or a cover/inner display switch) refits immediately.
  • screenPoint maps the visible frame to 0..1. A press that starts on the bars beside the frame behaves like the bezel: it orbits the model. A drag already in progress clamps to the frame's edge.

phoneViewer.ts is unchanged. The fold model stays in place rather than switching to the phone model by aspect. Opening a real foldable sets the angle to 180 before the frame changes from the cover display, so an aspect-based switch would swap models on every open.

Scope and approval

Fixes #28712

Verification

  • vp test run packages/client-runtime/src/device/phoneViewer.test.ts packages/client-runtime/src/device/androidFoldScene.test.ts: 6 passed.
    • New draws $name on an Android fold at the frame's own aspect (1080×2400; 1920×1200; 2208×1840 then 1080×2400). It checks the open inner picture's aspect, horizontal and vertical touch mapping, and the closed cover picture's aspect. All three cases fail on main: the open picture aspect is 0.96 where 0.45 or 1.6 is expected, and 1.2 where 0.45 is expected after the fold-like frame.
    • New treats the bars beside a letterboxed phone frame as bezel: a fresh press on a bar returns null and a captured one clamps.
  • vp run check:changed: format, lint, knip, typecheck (7 packages) and tests pass.
  • Before/after captures of the real createPhoneViewer and createPhoneInteraction with a synthetic test-pattern frame. This is a harness: no hinge-capable device hub was available, so the live Device panel was not driven. Base 1d626d02d9, head 6e9989e136 (fix commits), Playwright Chromium 148 with SwiftShader, viewer 800×800 at DPR 1 and 320×600 at DPR 2.
    • Phone frame, open (S1): the circle goes from a wide oval to round, with bezel bars at the sides. Tablet open (S3), portrait tablet (S7) and every cover case (S2, S4, S6, S8) are fitted the same way.
    • Fold-shaped frame, open (S5): pixel-identical to main (0 changed pixels).
    • Extreme 200×4000 and 4000×200 cover frames (E1, E2) render a clean fitted strip with capped rounded ends.
    • Recordings of bar and captured touches, fold/unfold across 89/90/91°, and Foldable → Phone → Tablet → Foldable frame changes match the tests.
    • Not changed by this PR, seen on both sides: with upside-down screen metadata, the fold model flips touches but not the picture.
  • Not checked: a live hinge-capable emulator in the Device panel, and the Electron shell.

Claude Opus 5.5 (lead, tests, implementation) and GPT-6.1 Sol (review, proof audit, captures) in Claude Code / Codex via T3 Code.

🤖 Generated with Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bramtechs reacted with heart emoji
All reactions
  • ❤️ 1 reaction
juliusmarminge and others added 5 commits November 1, 2026 15:41
@juliusmarminge @claude
test(device): reproduce stretched frames on the Android fold (#28712)
62840cf
These tests reproduce #28712: an Android profile with a fold angle sizes the
fold's inner and cover screens from a fold aspect rather than the frame, so a
1080x2400 phone frame, a 1920x1200 tablet frame, and a phone frame that
follows a fold-like one are drawn stretched. They assert the textured screen
region keeps the frame's aspect open and closed, and that a touch on the
frame's edge maps back to that edge.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@juliusmarminge @claude
fix(web): Android fold 3D view keeps the frame's aspect
29690c0
The fold model sized its inner and cover screens from a fold aspect and
mapped the whole frame edge to edge, so phone and tablet frames were drawn
stretched. Each screen now fits the frame at its own aspect, letterboxed on
the bezel, and touches map the visible frame to 0..1. Fold-like frames
still fill the panel.

Fixes #28712

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@juliusmarminge @claude
test(device): check vertical touch mapping on a letterboxed fold frame
6e9989e
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@juliusmarminge @claude
test(device): pin the letterboxed fold touch mapping
0157d5a
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@juliusmarminge
Merge remote-tracking branch 'origin/main' into fix/issue-28712
a09757f
@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Nov 1, 2026
@macroscopeapp

macroscopeapp Bot commented Nov 1, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 2c4afd0

Macroscope's review found this PR approvable — The Android fold viewer now preserves the live frame’s aspect ratio and maps touches to the fitted content rather than its letterbox bars. The change is limited to viewer rendering and input coordinates, with no product-default or persistent-data changes.

No code changes detected at 5bae529. Prior analysis still applies.

You can add or adjust custom eligibility rules. Learn more.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Nov 1, 2026
View reviewed changes
@coderabbitai

coderabbitai Bot commented Nov 1, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Explain Change →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration

  • Source mode: Auto
  • Repository: pingdotgg/t3code
  • Branch: fix/issue-28712
  • File: .coderabbit.config.ts
  • Commit: 5bae529
  • Layers: Repository TS config
  • Review profile: CHILL
  • Plan: Team
  • Run ID: 87e1c5cf-5ed6-4479-af9e-25fba03793b1
Commits

Reviewing files that changed from the base of the PR and between 4f58821 and 5bae529.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

The Android fold scene fits display content to the inner and cover screens. Screen-point mapping now accounts for fitted content, capture, bounds, and rotation. Tests check display aspect ratios and letterboxed input.

Changes: Android fold display fitting

Layer / File(s) Summary
Fit inner and cover displays
packages/client-runtime/src/device/androidFoldScene.ts, packages/client-runtime/src/device/androidFoldScene.test.ts
The scene fits inner and cover screen geometry to the active display layout. It stores fitted coordinates for angle updates. Tests check phone and tablet aspect ratios.
Map fitted screen points
packages/client-runtime/src/device/androidFoldScene.ts, packages/client-runtime/src/device/androidFoldScene.test.ts
Screen-point mapping accounts for zoom, capture, bounds, and rotation. Tests check bezel mapping, out-of-frame rejection, and clamping.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Low

Possibly related PRs

  • pingdotgg/t3code#28726: Changes phone-model selection for frames that do not match an inner display aspect.
  • pingdotgg/t3code#13574: Changes how fold body geometry preserves display proportions.
  • pingdotgg/t3code#13534: Introduces the Android fold scene and its display update and screen-point mapping behavior.

Suggested reviewers: t3dotgg

Merge Risk: Minimal · previous review 2c4af

The fitted screens preserve frame aspect. A very small touch offset remains, but it does not block merging.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title clearly summarizes the main change: preserving the frame’s aspect ratio in the Android fold 3D view.
Description check Passed The description covers the problem, implementation, scope and linked issue, verification results, and checks that were not performed. It provides focused test outcomes and relevant before-and-after ev…
Linked Issues check Passed The prior assessment's evidence remains valid. The current production change fits frames within the fold model's inner and cover screens and refits both displays when setDisplay runs. The incrementa…
Out of Scope Changes check Passed The production and test changes remain focused on frame aspect handling in [#28712]. The incremental test covers phone and tablet frame fitting in the Android fold scene. No unrelated change is eviden…
Full details: Description check

Explanation

The description covers the problem, implementation, scope and linked issue, verification results, and checks that were not performed. It provides focused test outcomes and relevant before-and-after evidence.

Full details: Linked Issues check

Explanation

The prior assessment's evidence remains valid. The current production change fits frames within the fold model's inner and cover screens and refits both displays when setDisplay runs. The incremental test change adds direct coverage for phone and tablet frame aspects after a fold-sized frame. These changes meet the coding requirements in [#28712].

Full details: Out of Scope Changes check

Explanation

The production and test changes remain focused on frame aspect handling in [#28712]. The incremental test covers phone and tablet frame fitting in the Android fold scene. No unrelated change is evident.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: pingdotgg/t3code
  • Branch: fix/issue-28712
  • File: .coderabbit.config.ts
  • Commit: 2c4afd0
  • Layers: Repository TS config
  • Review profile: CHILL
  • Plan: Team
  • Run ID: d6681b70-174c-4194-b1e0-828519799fef
Commits

Reviewing files that changed from the base of the PR and between a09757f and 2c4afd0.

Files selected for processing: 1

  • packages/client-runtime/src/device/androidFoldScene.test.ts

Limit details: You’ve used all 10 included reviews currently available.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@shivamhwp shivamhwp mentioned this pull request Nov 10, 2026
fix(web): preserve Android device frame proportions in 3D view #28726
Closed
juliusmarminge added 2 commits November 10, 2026 23:39
@juliusmarminge
Merge remote-tracking branch 'origin/main' into fix/issue-28712
ba6f021
@juliusmarminge
test(device): pin fold frame aspect at the scene layer
2c4afd0
Moves the aspect regression from the phone viewer harness into the fold
scene test, where the bug lives, and drops the viewer fixture changes.

AI-assisted; verified with the tests and tools listed above.
@macroscopeapp
macroscopeapp Bot dismissed their stale review November 10, 2026 23:54

Dismissing prior approval to re-evaluate 2c4afd0

macroscopeapp[bot]
macroscopeapp Bot approved these changes Nov 10, 2026
View reviewed changes
@juliusmarminge GitCafe Production

juliusmarminge commented Nov 11, 2026

Copy link
Copy Markdown
Member Author

The automated pipeline stopped on this pull request and will not merge it:

the capture step could not show the problem on the base commit, so there is nothing to prove fixed.

Opened each app and entered Device setup. Requested the Resizable emulator; the first request timed out. Retried after one minute and obtained a lease. Ran agent-device fold open; the emulator console refused the posture and reported that a foldable profile with hw.sensor.hinge=yes was required. The requested 3D interaction sequence could not begin on either commit.

It stays open for a person to finish or close.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Nov 14, 2026
@juliusmarminge
Merge remote-tracking branch 'origin/main' into fix/issue-28712
4f58821
@juliusmarminge juliusmarminge added takeover:blocked Takeover blocked; reason in the PR body and removed takeover:in-progress A takeover lead is working on this PR labels Nov 14, 2026
@juliusmarminge juliusmarminge added takeover:in-progress A takeover lead is working on this PR and removed takeover:blocked Takeover blocked; reason in the PR body labels Nov 22, 2026
@juliusmarminge @claude
Merge remote-tracking branch 'origin/main' into fix/issue-28712
5bae529
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@juliusmarminge
juliusmarminge force-pushed the fix/issue-28712 branch from a10fc26 to 5bae529 Compare November 22, 2026 11:49
@juliusmarminge

juliusmarminge commented Nov 22, 2026

Copy link
Copy Markdown
Member Author

The automated pipeline stopped on this pull request and will not merge it:

the fix is written and reviewed, but proving it needs something no worker has:

  • Permanent blocker: the reproduction needs a Resizable (Experimental) emulator configured with a working hinge sensor. The available pooled emulator refused the open posture with KO: Failed to set posture, and the available pool controls do not expose AVD hinge configuration.
  • Inner and cover screen proportions, immediate preset updates, letterbox-bar orbiting, and touch clamping remain unverified on both commits.

It stays open for a person to finish or close.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge juliusmarminge added takeover:blocked Takeover blocked; reason in the PR body and removed takeover:in-progress A takeover lead is working on this PR labels Nov 22, 2026
@ipanasenko ipanasenko mentioned this pull request Nov 25, 2026
fix(device): Android emulators with a wm size override fill the Device panel without black bars #42961
Open

This branch has not been deployed

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

Reviewers

@macroscopeapp macroscopeapp[bot] macroscopeapp[bot] approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

size:M 30-99 changed lines (additions + deletions). takeover:blocked Takeover blocked; reason in the PR body vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[Bug]: Android 3D view stretches the frame when a hinge-capable emulator isn't on its fold inner display

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@juliusmarminge
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.