@devries-cameron20 / t3code-1 / commits / c7e93f520b
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

refactor(web): remove unused aspect ratio reconciler (#9994)

Julius Marminge committed Sep 5, 2026 at 00:19 UTC c7e93f520bbd1ba4b795a5fb1aad14778aa1d047
2 files changed +1 -19
apps/web/src/browser/BrowserDeviceToolbar.test.ts
+1 -12
@@ -1,10 +1,7 @@
1 import type { PreviewViewportSetting } from "@t3tools/contracts";
2 import { describe, expect, it, vi } from "vite-plus/test";
3
4 -import {
5 - commitViewportAndAspectRatio,
6 - reconcileLockedAspectRatio,
7 -} from "./browserDeviceToolbarState";
4 +import { commitViewportAndAspectRatio } from "./browserDeviceToolbarState";
5
6 describe("commitViewportAndAspectRatio", () => {
7 it("commits the aspect ratio only after the viewport succeeds", async () => {
@@ -39,11 +36,3 @@ describe("commitViewportAndAspectRatio", () => {
36 expect(onAspectRatioChange).not.toHaveBeenCalled();
37 });
38 });
42 -
43 -describe("reconcileLockedAspectRatio", () => {
44 - it("tracks external viewport ratios only while the lock remains active", () => {
45 - expect(reconcileLockedAspectRatio(1.5, 16 / 9)).toBe(16 / 9);
46 - expect(reconcileLockedAspectRatio(null, 16 / 9)).toBeNull();
47 - expect(reconcileLockedAspectRatio(1.5, null)).toBeNull();
48 - });
49 -});
apps/web/src/browser/browserDeviceToolbarState.ts
-7
@@ -1,12 +1,5 @@
1 import type { PreviewViewportSetting } from "@t3tools/contracts";
2
3 -export function reconcileLockedAspectRatio(
4 - current: number | null,
5 - viewportAspectRatio: number | null,
6 -): number | null {
7 - return current === null || viewportAspectRatio === null ? null : viewportAspectRatio;
8 -}
9 -
3 export async function commitViewportAndAspectRatio(
4 setting: PreviewViewportSetting,
5 aspectRatio: number | null,