diff --git a/apps/api/src/autopilot/look.ts b/apps/api/src/autopilot/look.ts new file mode 100644 index 0000000..ba9bc3b --- /dev/null +++ b/apps/api/src/autopilot/look.ts @@ -0,0 +1,51 @@ +/** + * The autopilot's finishing "look": colour, local contrast, sharpening and noise reduction, on top of the measured + * white balance and tone (docs/photo-editing-rules.md §4). Fixed values, not measured per photo, so a match looks + * like one set. Measured on the agencies (October 2026): + * + * - kolektiff images (EHF/IHF handball, 600 photos of 2025-26): saturated, punchy kits (HSV saturation 0.47), + * pure blacks, neutral whites, shadows a touch cool (blue-magenta) in every photographer's work. + * - Getty Images and AFP (Paris 2024, 1093 action photos): the same cool shadows and neutral whites, more natural + * colour (0.40-0.43). + * + * "agency" follows kolektiff, "natural" Getty. Both stay inside the ethics rules: toning for clear reproduction, + * no vignette or background darkening, nothing local. + */ + +export type Look = "agency" | "natural" | "none"; + +const BASE: Record, Record> = { + agency: { + "color.vibrance": 18, + "color.saturation": 4, + "effects.clarity": 8, + "effects.texture": 6, + "grading.shadows.hue": 245, + "grading.shadows.sat": 8, + "grading.balance": -10, + }, + natural: { + "color.vibrance": 8, + "effects.clarity": 4, + "effects.texture": 4, + "grading.shadows.hue": 245, + "grading.shadows.sat": 4, + }, +}; + +/** Capture sharpening for both looks (Lightroom-like amount, radius, detail; masking keeps flat skin and floor smooth). */ +const SHARPEN = { "detail.sharpenAmount": 40, "detail.sharpenRadius": 1, "detail.sharpenDetail": 25, "detail.sharpenMasking": 35 }; + +/** Noise reduction by ISO: none in good light, more in dim arenas (sports halls run ISO 3200-12800). */ +export function noiseReduction(iso: number | null | undefined): Record { + const out: Record = { "detail.nrColor": 25 }; + if (!iso || iso < 1600) return out; + out["detail.nrLuminance"] = iso < 3200 ? 8 : iso < 6400 ? 15 : iso < 12800 ? 22 : 30; + return out; +} + +/** The look's values for one photo (empty for "none"). */ +export function lookValues(look: Look, iso?: number | null): Record { + if (look === "none") return {}; + return { ...BASE[look], ...SHARPEN, ...noiseReduction(iso) }; +} diff --git a/apps/api/src/autopilot/service.ts b/apps/api/src/autopilot/service.ts index 6a4c3eb..63c708d 100644 --- a/apps/api/src/autopilot/service.ts +++ b/apps/api/src/autopilot/service.ts @@ -18,6 +18,7 @@ import { sequenceWeights } from "./sequence.js"; import { bestOf, groupBursts } from "./bursts.js"; import { curate, matchMinutes } from "./curate.js"; import { type LearntStyle, learntStyle, TONE_KEYS, WB_KEYS } from "./learning.js"; +import { lookValues } from "./look.js"; const STALE_RUNNING_MS = 10 * 60_000; /** A burst is decided once no new frame of it has arrived for this long. */ @@ -25,12 +26,16 @@ const BURST_SETTLE_MS = 15_000; /** Straightening beyond this is more likely a creative tilt than a crooked horizon: left alone. */ const MAX_LEVEL = 5; const MIN_LEVEL = 0.3; +/** A crop this close to the whole frame (width) is not worth making: the photo stays as shot (agencies send a third uncropped). */ +const KEEP_WHOLE = 0.92; export interface AutopilotRecord { score: number; reason: string | null; subject: Box | null; crop: Box | null; + /** The whole-body frame, when the crop is tight: the second pick of a burst gets it (variety). */ + wide?: Box | null; angle: number; /** What it had learnt from corrections and added to its own edit. */ style?: LearntStyle | null; @@ -111,6 +116,8 @@ export class AutopilotService { const v = (auto.values[k] ?? 0) * settings.toneStrength + (style?.offsets[k] ?? 0); if (v) values[k] = Math.round(v * 100) / 100; } + // The finishing look (colour, local contrast, sharpening, noise by ISO): never over what was measured. + for (const [k, v] of Object.entries(lookValues(settings.look, photo.iso))) if (values[k] === undefined) values[k] = v; if (Object.keys(values).length) ops.push({ command: "develop.set", params: { values } } as EditCommand); if (settings.level && auto.angle !== null && Math.abs(auto.angle) >= MIN_LEVEL && Math.abs(auto.angle) <= MAX_LEVEL) angle = auto.angle; } @@ -121,14 +128,18 @@ export class AutopilotService { const aspect = settings.aspect ? settings.aspect[0] / settings.aspect[1] : null; const focusFile = photo.originalStored ? storage.resolve(photo.storageKey) : preview; const focus = focusFromExifJson(photo.exif) ?? (existsSync(focusFile) ? await readFocusPoint(focusFile) : null); - const composition = detections ? compose(detections, aspect, { minWidth: minCropWidth(W, H, settings.minLongEdge), focus }) : null; + const minWidth = minCropWidth(W, H, settings.minLongEdge); + const composition = detections ? compose(detections, aspect, { minWidth, focus, framing: settings.framing }) : null; + const wideComposition = detections && settings.framing === "tight" ? compose(detections, aspect, { minWidth, focus, framing: "full" }) : null; let crop: Box | null = null; if (settings.crop && composition) { // Photographers who always tighten the autopilot's crop get it tighter (never cutting into the subject). const rect = style?.cropFactor ? tighter(composition.rect, composition.subject, style.cropFactor) : composition.rect; - crop = constrainRotated(rect, angle, W, H); + // Almost the whole frame: leave the photo as shot. + if (rect.x1 - rect.x0 < KEEP_WHOLE) crop = constrainRotated(rect, angle, W, H); } - else if (angle) crop = constrainRotated({ x0: 0, y0: 0, x1: 1, y1: 1 }, angle, W, H); + const wide = settings.crop && wideComposition && wideComposition.rect.x1 - wideComposition.rect.x0 < KEEP_WHOLE ? constrainRotated(wideComposition.rect, angle, W, H) : null; + if (!crop && angle) crop = constrainRotated({ x0: 0, y0: 0, x1: 1, y1: 1 }, angle, W, H); if (crop) ops.push({ command: "crop.set", params: { rect: crop, angle, aspect: settings.aspect ?? [W, H] } } as EditCommand); // Someone already edited it (on the desktop app without a network, before it was uploaded): their edit @@ -147,6 +158,7 @@ export class AutopilotService { reason: composition?.reason ?? null, subject: composition?.subject ?? null, crop, + wide, angle, style: style && (Object.keys(style.offsets).length || style.cropFactor) ? style : null, }; @@ -200,11 +212,14 @@ export class AutopilotService { broadcaster.library(event.organizationId, { type: "photo.updated", ids: toFlag, patch: { flag: "PICK" } }); picked += toFlag.length; } - // Variety: the second pick gets a slightly tighter frame than the first. + // Variety: the second pick gets the other framing. A tight first pick: the wider, whole-body frame (the + // context the agencies mix in); otherwise a slightly tighter one. const second = best[1]; const secondEdited = second ? await db.photoEdit.count({ where: { photoId: second.id, NOT: { clientId: "autopilot" } } }) : 0; - if (second?.rec?.crop && second.rec.subject && settings.crop && !secondEdited) { - const rect = constrainRotated(tighter(second.rec.crop, second.rec.subject, 0.88), second.rec.angle, second.width ?? 3, second.height ?? 2); + const crop2 = second?.rec?.crop; + const wider = crop2 && second.rec?.wide && (second.rec.wide.x1 - second.rec.wide.x0) / (crop2.x1 - crop2.x0) > 1.12 ? second.rec.wide : null; + if (crop2 && second.rec?.subject && settings.crop && !secondEdited) { + const rect = wider ?? constrainRotated(tighter(crop2, second.rec.subject, 0.88), second.rec.angle, second.width ?? 3, second.height ?? 2); await develop .append(second.id, second.uploaderId ?? event.createdById ?? null, { clientId: "autopilot", diff --git a/apps/api/src/composition/compose.ts b/apps/api/src/composition/compose.ts index 24d5626..0a55f87 100644 --- a/apps/api/src/composition/compose.ts +++ b/apps/api/src/composition/compose.ts @@ -9,6 +9,9 @@ * body a little above the middle and little or no empty pitch under the feet (spare height goes above, to the * crowd and the stands). Legs may be cut; heads and the ball may not. * - Cutting another sharp person in half is avoided; cutting blurred ones doesn't matter. + * - "tight" framing (the agencies' handball look: kolektiff images, measured on 600 photos of 2025-26): the + * subject fills the height, cut mid-shin or mid-thigh, the face big (about a seventh of the frame) near the top. + * "full" keeps whole bodies when they fit (Peter's usual two thirds of the frame). * * Boxes are fractions of the upright photo (0..1, y down). * When the camera wrote a focus point, the person under it is the subject; sharpness still frames everyone else. @@ -79,7 +82,12 @@ export const TUNING = { const JOINTS = [0.17, 0.53, 0.74, 0.95]; const JOINT_BAND = 0.035; +/** Tight framing: the subject's tallest body about this many crop heights (a little cut at the bottom). */ +export const TIGHT = { fillAt: 1.05, wFill: 2.2, chestAt: 0.34, headMax: 0.2 }; + export interface ComposeOptions { + /** "full": whole bodies when they fit (default); "tight": the agencies' close framing, legs cut mid-limb. */ + framing?: "full" | "tight"; /** Narrowest crop allowed, as a fraction of the photo's width (from the delivery's minimum resolution). */ minWidth?: number; /** Where the camera focused. The person there is the subject; the rest of the crop still follows the model. */ @@ -100,7 +108,7 @@ const atEdge = (b: Box) => b.x0 < 0.01 || b.x1 > 0.99; const sharp = (p: Detection) => p.sharpness ?? 1; /** Who the photo is about. Null when there is nobody clear enough (empty pitch, distant crowd). */ -export function findSubject(d: Detections, focus?: FocusHint | null): { box: Box; reason: Composition["reason"]; people: Detection[] } | null { +export function findSubject(d: Detections, focus?: FocusHint | null): { box: Box; reason: Composition["reason"]; people: Detection[]; ball?: Box } | null { const people = d.people.filter((p) => p.score >= MIN_PERSON && h(p) >= MIN_HEIGHT); if (!people.length) return null; // The main subject: the person the camera focused on, when that point lands on someone. Otherwise in focus @@ -119,7 +127,7 @@ export function findSubject(d: Detections, focus?: FocusHint | null): { box: Box const contest = people.filter((p) => p === main || (h(p) >= 0.6 * h(main) && Math.abs(cx(p) - cx(ball)) <= 0.9 * h(main) && overlap(p, { x0: 0, y0: 0, x1: 1, y1: 1 }) > 0.7 * area(p))); if (!contest.includes(main)) contest.push(main); const box = contest.reduce((u, p) => union(u, p), { x0: ball.x0, y0: ball.y0, x1: ball.x1, y1: ball.y1 }); - return { box, reason: "ball", people: contest }; + return { box, reason: "ball", people: contest, ball }; } // No ball: the subject and the sharp people standing with them (a duel, a celebration, a line-up). @@ -162,13 +170,24 @@ function personAtFocus(people: Detection[], focus: FocusHint): Detection | null export function compose(d: Detections, aspect: number | null = null, opts: ComposeOptions = {}): Composition | null { const found = findSubject(d, opts.focus); if (!found) return null; - const { box: s, reason, people: inSubject } = found; + const { box: s, reason, people: inSubject, ball } = found; const ratio = (aspect ?? d.width / d.height) * (d.height / d.width); // width/height in frame fractions const tallest = Math.max(...inSubject.map(h)); const others = d.people.filter((p) => p.score >= MIN_PERSON && !inSubject.includes(p)); const headroom = 0.04 * tallest; - // Whole bodies, feet included; only when that can't fit, down to the waist. const minWidth = opts.minWidth ?? 0; + if (opts.framing === "tight") { + // The ball (and the hands on it) is never cut: the bottom edge stays below it. + const keep = (y: number) => Math.min(s.y1, Math.max(y, ball ? ball.y1 + 0.01 : 0)); + // Mid-shin, mid-thigh, or whole: the cost (fill, head, joints) chooses; the waist only when nothing else fits. + const tries = [keep(s.y0 + 0.86 * tallest), keep(s.y0 + 0.64 * tallest), s.y1] + .map((bottom) => frame(s, ratio, bottom, headroom, tallest, others, inSubject, reason, minWidth, true)) + .filter((c): c is Composition & { cost: number } => !!c); + const best = tries.reduce<(Composition & { cost: number }) | null>((a, b) => (!a || b.cost < a.cost ? b : a), null); + if (best) return { rect: best.rect, subject: best.subject, reason: best.reason, people: best.people }; + return frame(s, ratio, keep(s.y0 + 0.55 * tallest), headroom, tallest, others, inSubject, reason, minWidth, true); + } + // Whole bodies, feet included; only when that can't fit, down to the waist. return frame(s, ratio, s.y1, headroom, tallest, others, inSubject, reason, minWidth) ?? frame(s, ratio, s.y0 + 0.55 * tallest, headroom, tallest, others, inSubject, reason, minWidth); } @@ -178,7 +197,7 @@ export function minCropWidth(width: number, height: number, minLongEdge = 2400): return Math.min(1, Math.max(0.35, minLongEdge / long) * (width >= height ? 1 : height / width)); } -function frame(s: Box, ratio: number, mustBottom: number, headroom: number, tallest: number, others: Detection[], inSubject: Detection[], reason: Composition["reason"], minWidth: number): Composition | null { +function frame(s: Box, ratio: number, mustBottom: number, headroom: number, tallest: number, others: Detection[], inSubject: Detection[], reason: Composition["reason"], minWidth: number, tight = false): (Composition & { cost: number }) | null { const mainSharp = Math.max(...inSubject.map(sharp)); let best: { rect: Box; cost: number } | null = null; for (let k = 0.35; k <= 1.0001; k += 0.025) { @@ -200,16 +219,16 @@ function frame(s: Box, ratio: number, mustBottom: number, headroom: number, tall const y0 = Math.min(Math.max(0, top - (j / 20) * spare), 1 - ch); const r = { x0, y0, x1: x0 + cw, y1: y0 + ch }; if (r.x0 > s.x0 + 1e-6 || r.x1 < s.x1 - 1e-6 || r.y0 > Math.max(0, s.y0 - headroom) + 1e-6 || r.y1 < mustBottom - 1e-6) continue; - const c = cost(r, s, others, ch, tallest, mainSharp, ratio, inSubject) + jointCost(r, inSubject, others, mainSharp); + const c = cost(r, s, others, ch, tallest, mainSharp, ratio, inSubject, tight) + jointCost(r, inSubject, others, mainSharp); if (!best || c < best.cost) best = { rect: r, cost: c }; } } } if (!best) return null; - return { rect: best.rect, subject: s, reason, people: inSubject.length }; + return { rect: best.rect, subject: s, reason, people: inSubject.length, cost: best.cost }; } -function cost(r: Box, s: Box, others: Detection[], ch: number, tallest: number, mainSharp: number, ratio: number, inSubject: Detection[]): number { +function cost(r: Box, s: Box, others: Detection[], ch: number, tallest: number, mainSharp: number, ratio: number, inSubject: Detection[], tight = false): number { let c = 0; // Sharp people cut in half by the crop's edge look wrong; blurred ones (foreground, background) don't matter. for (const p of others) { @@ -220,21 +239,26 @@ function cost(r: Box, s: Box, others: Detection[], ch: number, tallest: number, const size = Math.min(1, h(p) / tallest); c += TUNING.wCut * focus * size * (0.3 + Math.min(f, 1 - f)); } - // Peter's usual crop is two thirds of the frame; bigger only when the subject needs it. - const k = Math.max(ch, w(r) / ratio); - c += TUNING.wScale * Math.abs(k - TUNING.usualScale); - // The subject fills a good part of the height (people tall in the frame). - c += TUNING.wFill * Math.max(0, TUNING.fillAt - tallest / ch); + if (tight) { + // The agencies' framing: the subject as tall as the crop (or a little taller, legs cut mid-limb). + c += TIGHT.wFill * Math.abs(tallest / ch - TIGHT.fillAt); + } else { + // Peter's usual crop is two thirds of the frame; bigger only when the subject needs it. + const k = Math.max(ch, w(r) / ratio); + c += TUNING.wScale * Math.abs(k - TUNING.usualScale); + // The subject fills a good part of the height (people tall in the frame). + c += TUNING.wFill * Math.max(0, TUNING.fillAt - tallest / ch); + } // Centred across. c += TUNING.wCentre * (Math.abs(cx(s) - cx(r)) / w(r)); // Heads a little below the top: not touching it, not floating in empty space. const head = (s.y0 - r.y0) / ch; - c += TUNING.wHead * (Math.max(0, TUNING.headMin - head) + Math.max(0, head - TUNING.headMax)); + c += TUNING.wHead * (Math.max(0, TUNING.headMin - head) + Math.max(0, head - (tight ? TIGHT.headMax : TUNING.headMax))); // The upper body (chest, faces) near the middle, a little above it, as a photographer frames: not the knees in // the middle with a strip of grass below. const main = inSubject.reduce((a, b) => (h(b) > h(a) ? b : a)); const chest = (main.y0 + 0.3 * h(main) - r.y0) / ch; - c += TUNING.wChest * Math.abs(chest - TUNING.chestAt); + c += TUNING.wChest * Math.abs(chest - (tight ? TIGHT.chestAt : TUNING.chestAt)); // Empty space under the subject (pitch, floor) is the first thing an editor crops away. const below = (r.y1 - Math.min(s.y1, r.y1)) / ch; c += TUNING.wBelow * Math.max(0, below - TUNING.belowMax); diff --git a/apps/api/test/autopilot.test.ts b/apps/api/test/autopilot.test.ts index 31a20dd..13d3ff1 100644 --- a/apps/api/test/autopilot.test.ts +++ b/apps/api/test/autopilot.test.ts @@ -187,7 +187,8 @@ describe("autopilot", () => { ingestFrom: new Date("2026-10-11T12:00:00Z"), ingestUntil: new Date("2026-10-11T18:00:00Z"), iptcTemplate: {}, - ...(autopilotOn && { autopilot: { enabled: true, picksPerBurst: 2 } }), + // The original settings (half tone, white balance as shot, no look, whole bodies); the agency defaults have a test of their own. + ...(autopilotOn && { autopilot: { enabled: true, picksPerBurst: 2, toneStrength: 0.5, whiteBalance: false, look: "none", framing: "full" } }), }, }); return { orgId: org!.id, userId: user.id, eventId: event.id }; @@ -297,6 +298,18 @@ describe("autopilot", () => { expect((await ctx.db.photo.findUniqueOrThrow({ where: { id: photoId } })).autopilotStatus).toBe("DONE"); }); + it("edits the agencies' way by default: neutral whites, fuller tone, the finishing look", async () => { + const { orgId, userId, eventId } = await setup(); + await ctx.db.event.update({ where: { id: eventId }, data: { autopilot: { enabled: true } } }); + const id = await shot(orgId, userId, eventId, 0, 300); + await ctx.db.photo.update({ where: { id }, data: { iso: 6400 } }); + await runQueue(); + const edits = await ctx.db.photoEdit.findMany({ where: { photoId: id }, orderBy: { seq: "asc" } }); + const values = (edits[0]!.command as { params: { values: Record } }).params.values; + expect(values).toMatchObject({ "wb.temp": 5200, "wb.tint": 4, "light.exposure": 0.3, "light.contrast": 15, "color.vibrance": 18, "detail.sharpenAmount": 40, "detail.nrLuminance": 22 }); + expect(Object.keys(values).some((k) => k.startsWith("vignette."))).toBe(false); + }); + it("leaves events without autopilot alone", async () => { const { orgId, userId, eventId } = await setup(false); await shot(orgId, userId, eventId, 0, 100); diff --git a/apps/api/test/compose.test.ts b/apps/api/test/compose.test.ts index 72577b4..80addc4 100644 --- a/apps/api/test/compose.test.ts +++ b/apps/api/test/compose.test.ts @@ -84,3 +84,29 @@ describe("automatic crop", () => { expect(((c.rect.x1 - c.rect.x0) * 3000) / ((c.rect.y1 - c.rect.y0) * 2000)).toBeCloseTo(0.8, 2); }); }); + +describe("tight framing (the agencies' handball look)", () => { + it("fills the height with the player, cutting the legs mid-limb, never at a joint or below the ball", () => { + const p = { ...person(0.42, 0.1, 0.56, 0.9), sharpness: 1 }; + const ball = { x0: 0.5, y0: 0.35, x1: 0.54, y1: 0.41, score: 0.8 }; + const full = compose({ ...frame, people: [p], balls: [ball] })!; + const tight = compose({ ...frame, people: [p], balls: [ball] }, null, { framing: "tight" })!; + const hT = tight.rect.y1 - tight.rect.y0; + expect(hT).toBeLessThan(full.rect.y1 - full.rect.y0); + // The player about as tall as the crop: feet out, head in. + expect(tight.rect.y1).toBeLessThan(p.y1); + expect(tight.rect.y0).toBeLessThanOrEqual(p.y0); + expect(tight.rect.y1).toBeGreaterThan(ball.y1); + const at = (tight.rect.y1 - p.y0) / (p.y1 - p.y0); + for (const j of [0.53, 0.74, 0.95]) expect(Math.abs(at - j)).toBeGreaterThanOrEqual(0.035); + // Same shape as the photo. + expect(((tight.rect.x1 - tight.rect.x0) * 3000) / (hT * 2000)).toBeCloseTo(1.5, 2); + }); + + it("keeps a ball held low inside the crop", () => { + const p = { ...person(0.42, 0.1, 0.56, 0.9), sharpness: 1 }; + const ball = { x0: 0.5, y0: 0.7, x1: 0.54, y1: 0.76, score: 0.8 }; + const tight = compose({ ...frame, people: [p], balls: [ball] }, null, { framing: "tight" })!; + expect(tight.rect.y1).toBeGreaterThan(ball.y1); + }); +}); diff --git a/apps/api/test/look.test.ts b/apps/api/test/look.test.ts new file mode 100644 index 0000000..dc8ecf9 --- /dev/null +++ b/apps/api/test/look.test.ts @@ -0,0 +1,19 @@ +import { describe, expect, it } from "vitest"; +import { lookValues, noiseReduction } from "../src/autopilot/look.js"; + +describe("autopilot look", () => { + it("gives the agency look punchier colour than the natural one, and nothing for none", () => { + const agency = lookValues("agency", 400); + const natural = lookValues("natural", 400); + expect(agency["color.vibrance"]!).toBeGreaterThan(natural["color.vibrance"]!); + expect(agency["detail.sharpenAmount"]).toBe(40); + expect(lookValues("none", 6400)).toEqual({}); + // Never a vignette: the ethics rules forbid darkening the background. + expect(Object.keys(agency).some((k) => k.startsWith("vignette."))).toBe(false); + }); + + it("reduces noise more as the ISO climbs", () => { + expect(noiseReduction(800)["detail.nrLuminance"]).toBeUndefined(); + expect(noiseReduction(3200)["detail.nrLuminance"]!).toBeLessThan(noiseReduction(12800)["detail.nrLuminance"]!); + }); +}); diff --git a/apps/app/src/i18n.ts b/apps/app/src/i18n.ts index abc1830..f377a92 100644 --- a/apps/app/src/i18n.ts +++ b/apps/app/src/i18n.ts @@ -303,6 +303,15 @@ export const t = { tone: "Tom", whiteBalance: "Equilíbrio de brancos", toneStrength: (n: number) => `Intensidade do tom: ${n}%`, + framing: "Enquadramento", + framingTight: "Apertado (estilo agência)", + framingFull: "Corpo inteiro", + framingHelp: "Apertado: o jogador ocupa a altura, cortado a meio da perna, a cara grande; a segunda escolhida de cada sequência leva o enquadramento largo, de corpo inteiro. Fotos já bem enquadradas ficam como foram tiradas.", + look: "Acabamento", + lookAgency: "Agência (cores fortes)", + lookNatural: "Natural", + lookNone: "Nenhum", + lookHelp: "Cor, contraste local, nitidez e redução de ruído conforme o ISO, iguais em todas as fotos do jogo. Nunca escurece o fundo nem mexe numa zona só.", picksPerBurst: "Escolher por sequência", noPicks: "Não escolher", minLongEdge: "Resolução mínima do recorte", diff --git a/apps/app/src/library/Autopilot.tsx b/apps/app/src/library/Autopilot.tsx index a9f3fe4..b1628be 100644 --- a/apps/app/src/library/Autopilot.tsx +++ b/apps/app/src/library/Autopilot.tsx @@ -58,6 +58,21 @@ export function AutopilotButton(props: { api: ApiClient; event: EventSummary; ta {L.toneStrength(Math.round(s.toneStrength * 100))} setS({ ...s, toneStrength: Number(e.target.value) / 100 })} onPointerUp={() => void save(s)} /> + +