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) <noreply@anthropic.com>
This commit is contained in:
fkwp
2026-09-17 23:24:12 +02:00
co-authored by Claude Opus 5
parent 61cc12d937
commit 4cea64bd07
6 changed files with 25 additions and 27 deletions
@@ -280,8 +280,7 @@ Please see LICENSE in the repository root for full details.
.effectCheckOnImage { .effectCheckOnImage {
border-radius: 50%; border-radius: 50%;
background: var(--cpd-color-bg-canvas-default); background: var(--cpd-color-bg-canvas-default);
box-shadow: 0 0 0 var(--cpd-border-width-2) box-shadow: 0 0 0 var(--cpd-border-width-2) var(--cpd-color-bg-canvas-default);
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 /* A menu item's label is sized for a row; in a tile the design sets it a step
@@ -851,8 +851,7 @@ export const BackgroundEffects: Story = {
const radio = document.body.querySelector("input[type='radio']")!; const radio = document.body.querySelector("input[type='radio']")!;
const tile = document.body.querySelector(`.${styles.effectTile}`)!; const tile = document.body.querySelector(`.${styles.effectTile}`)!;
const under = (control: Element, rule: Element): number => const under = (control: Element, rule: Element): number =>
control.getBoundingClientRect().top - control.getBoundingClientRect().top - rule.getBoundingClientRect().bottom;
rule.getBoundingClientRect().bottom;
await expect( await expect(
Math.abs(under(radio, rules[0]) - under(tile, rules[1])), Math.abs(under(radio, rules[0]) - under(tile, rules[1])),
).toBeLessThanOrEqual(1); ).toBeLessThanOrEqual(1);
@@ -940,7 +939,9 @@ export const BackgroundEffectsWithALongDeviceName: Story = {
}); });
// Three tiles to a row however wide the name makes the menu. // Three tiles to a row however wide the name makes the menu.
const grid = none.parentElement!; const grid = none.parentElement!;
await expect(getComputedStyle(grid).gridTemplateColumns.split(" ")).toHaveLength(3); await expect(
getComputedStyle(grid).gridTemplateColumns.split(" "),
).toHaveLength(3);
}, },
}; };
+2 -1
View File
@@ -759,7 +759,8 @@ export const MediaMuteAndSwitchButton: FC<MediaMuteAndSwitchButtonProps> = ({
</div> </div>
)} )}
</div> </div>
{backgroundEffectError !== undefined && !refusalSeen && ( {backgroundEffectError !== undefined &&
!refusalSeen && (
// Outside the list, which scrolls and is bounded by the call: inside // 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 // 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. // below the fold, which is no way to tell someone something failed.
+3 -1
View File
@@ -49,7 +49,9 @@ describe("the blur control in settings", () => {
serializeEffect(on ? { kind: "blur" } : { kind: "none" }); serializeEffect(on ? { kind: "blur" } : { kind: "none" });
test("reads as off while an image background is in force", () => { 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); expect(shows(serializeEffect({ kind: "added", id: "a-uuid" }))).toBe(false);
}); });
+3 -5
View File
@@ -53,9 +53,8 @@ async function isAnimated(file: Blob): Promise<boolean> {
try { try {
const d = new decoder({ data: await file.arrayBuffer(), type: file.type }); const d = new decoder({ data: await file.arrayBuffer(), type: file.type });
await (d as { completed: Promise<void> }).completed; await (d as { completed: Promise<void> }).completed;
const track = ( const track = (d as { tracks: { selectedTrack?: { frameCount: number } } })
d as { tracks: { selectedTrack?: { frameCount: number } } } .tracks.selectedTrack;
).tracks.selectedTrack;
return (track?.frameCount ?? 1) > 1; return (track?.frameCount ?? 1) > 1;
} catch (e) { } catch (e) {
logger.debug("Could not read frame count, judging by type", e); logger.debug("Could not read frame count, judging by type", e);
@@ -72,8 +71,7 @@ async function isAnimated(file: Blob): Promise<boolean> {
* shape and lose the rest of the picture for good. * shape and lose the rest of the picture for good.
*/ */
export async function prepareImage(file: Blob): Promise<Blob> { export async function prepareImage(file: Blob): Promise<Blob> {
if (!file.type.startsWith("image/")) if (!file.type.startsWith("image/")) throw new UnusableImage("not-an-image");
throw new UnusableImage("not-an-image");
if (await isAnimated(file)) throw new UnusableImage("animated"); if (await isAnimated(file)) throw new UnusableImage("animated");
let bitmap: ImageBitmap; let bitmap: ImageBitmap;
+1 -4
View File
@@ -29,10 +29,7 @@ import { PreferencesSettingsTab } from "./PreferencesSettingsTab";
import { Slider } from "../Slider"; import { Slider } from "../Slider";
import { DeviceSelection } from "./DeviceSelection"; import { DeviceSelection } from "./DeviceSelection";
import { useTrackProcessor } from "../livekit/TrackProcessorContext"; import { useTrackProcessor } from "../livekit/TrackProcessorContext";
import { import { parseEffect, serializeEffect } from "../livekit/backgroundEffects";
parseEffect,
serializeEffect,
} from "../livekit/backgroundEffects";
import { import {
DeveloperSettingsTab, DeveloperSettingsTab,
type DeveloperSettingsSnapshot, type DeveloperSettingsSnapshot,