From 4cea64bd07d77d896d6bf4424d11b66468283e9b Mon Sep 17 00:00:00 2001 From: fkwp Date: Thu, 17 Sep 2026 23:24:12 +0200 Subject: [PATCH] Format the branch - oxfmt over the six files the exploration added or changed. - Wrapping only, no behaviour: the formatter is a separate CI step from pnpm lint, which is why it went unnoticed on the branch. Co-Authored-By: Claude Opus 5 (1M context) --- .../MediaMuteAndSwitchButton.module.css | 3 +-- .../MediaMuteAndSwitchButton.stories.tsx | 7 +++--- src/components/MediaMuteAndSwitchButton.tsx | 25 ++++++++++--------- src/livekit/backgroundEffects.test.ts | 4 ++- src/livekit/backgroundImages.ts | 8 +++--- src/settings/SettingsModal.tsx | 5 +--- 6 files changed, 25 insertions(+), 27 deletions(-) diff --git a/src/components/MediaMuteAndSwitchButton.module.css b/src/components/MediaMuteAndSwitchButton.module.css index 09a4e302a..ed7926029 100644 --- a/src/components/MediaMuteAndSwitchButton.module.css +++ b/src/components/MediaMuteAndSwitchButton.module.css @@ -280,8 +280,7 @@ Please see LICENSE in the repository root for full details. .effectCheckOnImage { border-radius: 50%; background: var(--cpd-color-bg-canvas-default); - box-shadow: 0 0 0 var(--cpd-border-width-2) - var(--cpd-color-bg-canvas-default); + box-shadow: 0 0 0 var(--cpd-border-width-2) var(--cpd-color-bg-canvas-default); } /* A menu item's label is sized for a row; in a tile the design sets it a step diff --git a/src/components/MediaMuteAndSwitchButton.stories.tsx b/src/components/MediaMuteAndSwitchButton.stories.tsx index 3e358c2fd..c20af34bf 100644 --- a/src/components/MediaMuteAndSwitchButton.stories.tsx +++ b/src/components/MediaMuteAndSwitchButton.stories.tsx @@ -851,8 +851,7 @@ export const BackgroundEffects: Story = { const radio = document.body.querySelector("input[type='radio']")!; const tile = document.body.querySelector(`.${styles.effectTile}`)!; const under = (control: Element, rule: Element): number => - control.getBoundingClientRect().top - - rule.getBoundingClientRect().bottom; + control.getBoundingClientRect().top - rule.getBoundingClientRect().bottom; await expect( Math.abs(under(radio, rules[0]) - under(tile, rules[1])), ).toBeLessThanOrEqual(1); @@ -940,7 +939,9 @@ export const BackgroundEffectsWithALongDeviceName: Story = { }); // Three tiles to a row however wide the name makes the menu. const grid = none.parentElement!; - await expect(getComputedStyle(grid).gridTemplateColumns.split(" ")).toHaveLength(3); + await expect( + getComputedStyle(grid).gridTemplateColumns.split(" "), + ).toHaveLength(3); }, }; diff --git a/src/components/MediaMuteAndSwitchButton.tsx b/src/components/MediaMuteAndSwitchButton.tsx index 25ada915d..66732d8ff 100644 --- a/src/components/MediaMuteAndSwitchButton.tsx +++ b/src/components/MediaMuteAndSwitchButton.tsx @@ -759,18 +759,19 @@ export const MediaMuteAndSwitchButton: FC = ({ )} - {backgroundEffectError !== undefined && !refusalSeen && ( - // Outside the list, which scrolls and is bounded by the call: inside - // it, a message could be cut off by the menu's own height or left - // below the fold, which is no way to tell someone something failed. -
- setRefusalSeen(true)} - /> -
- )} + {backgroundEffectError !== undefined && + !refusalSeen && ( + // Outside the list, which scrolls and is bounded by the call: inside + // it, a message could be cut off by the menu's own height or left + // below the fold, which is no way to tell someone something failed. +
+ setRefusalSeen(true)} + /> +
+ )} {toggles.length > 0 &&
} {toggles.map((toggle) => ( { serializeEffect(on ? { kind: "blur" } : { kind: "none" }); test("reads as off while an image background is in force", () => { - expect(shows(serializeEffect({ kind: "shipped", id: "indoor" }))).toBe(false); + expect(shows(serializeEffect({ kind: "shipped", id: "indoor" }))).toBe( + false, + ); expect(shows(serializeEffect({ kind: "added", id: "a-uuid" }))).toBe(false); }); diff --git a/src/livekit/backgroundImages.ts b/src/livekit/backgroundImages.ts index 7141b5763..f8554aaab 100644 --- a/src/livekit/backgroundImages.ts +++ b/src/livekit/backgroundImages.ts @@ -53,9 +53,8 @@ async function isAnimated(file: Blob): Promise { try { const d = new decoder({ data: await file.arrayBuffer(), type: file.type }); await (d as { completed: Promise }).completed; - const track = ( - d as { tracks: { selectedTrack?: { frameCount: number } } } - ).tracks.selectedTrack; + const track = (d as { tracks: { selectedTrack?: { frameCount: number } } }) + .tracks.selectedTrack; return (track?.frameCount ?? 1) > 1; } catch (e) { logger.debug("Could not read frame count, judging by type", e); @@ -72,8 +71,7 @@ async function isAnimated(file: Blob): Promise { * shape and lose the rest of the picture for good. */ export async function prepareImage(file: Blob): Promise { - if (!file.type.startsWith("image/")) - throw new UnusableImage("not-an-image"); + if (!file.type.startsWith("image/")) throw new UnusableImage("not-an-image"); if (await isAnimated(file)) throw new UnusableImage("animated"); let bitmap: ImageBitmap; diff --git a/src/settings/SettingsModal.tsx b/src/settings/SettingsModal.tsx index 7c0472e01..e4a17942e 100644 --- a/src/settings/SettingsModal.tsx +++ b/src/settings/SettingsModal.tsx @@ -29,10 +29,7 @@ import { PreferencesSettingsTab } from "./PreferencesSettingsTab"; import { Slider } from "../Slider"; import { DeviceSelection } from "./DeviceSelection"; import { useTrackProcessor } from "../livekit/TrackProcessorContext"; -import { - parseEffect, - serializeEffect, -} from "../livekit/backgroundEffects"; +import { parseEffect, serializeEffect } from "../livekit/backgroundEffects"; import { DeveloperSettingsTab, type DeveloperSettingsSnapshot,