Repository navigation
fix(web): Esc in a font family field closes Settings when no edit is pending - #42361
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
…ean-escape Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
EvidenceReal web app in Chromium, 1280×800, light appearance, fresh isolated databases with synthetic Replay (dev) project/thread data. Steps on both commits: body-focus Escape control; focus each unchanged font family field and press Escape; reopen, replace its contents with Proven: base retains Settings on clean-field Escape and subsequent Escape presses; head closes Settings. Draft discard keeps Settings open on both.
Scenario source · Full runner evidence including control and third presses Not shown:
|
**v0.1.12-nightly.20261124.5209** · 23 changes from 11 contributors - **T3 Connect sign-in alerts.** Get notified when a new T3 Connect device signs in. - **Antigravity quota recovery.** Threads can resume or snooze automatically when Antigravity reports a quota reset time in its error message. - **Theme editor changes.** Canceling an input method candidate with Escape no longer closes the editor and discards unsaved changes. ### Plus 19 more bug fixes. <details> <summary>Full changelog</summary> ## What's Changed * fix(web): Voice Models language menu resets its search filter on close by @only21mil in pingdotgg/t3code#42321 * feat(connect): tell people when a new T3 Connect device signs in by @juliusmarminge in pingdotgg/t3code#42311 * fix(web): new-commits banner on a PR spans the full header width by @juliusmarminge in pingdotgg/t3code#42342 * fix(web): opening a resolved PR comment keeps its toggle under the cursor by @ipanasenko in pingdotgg/t3code#42312 * fix(web): large SVG project icons come back after their link expires by @smirea in pingdotgg/t3code#42329 * fix(server): Antigravity quota failures keep the 'Resets in' reset time by @juliusmarminge in pingdotgg/t3code#42339 * fix(server): file listing keeps gitignore status when a filename looks like a git pathspec by @only21mil in pingdotgg/t3code#42333 * fix(bitbucket): checkouts cloned from ssh.bitbucket.org match their pull requests by @adrhumphreys-atlas in pingdotgg/t3code#42330 * fix(client): a tab-indented fence line in a PR description code block no longer swaps which video plays by @Marve10s in pingdotgg/t3code#42331 * fix(web): script command field shows both hyphens with ligature fonts by @Mnigos in pingdotgg/t3code#42352 * fix(server): honor sort: "created" when merging IssueService.list entries by @AymanKhan9 in pingdotgg/t3code#42350 * fix(server): a terminal commit refreshes cached Changes totals by @juliusmarminge in pingdotgg/t3code#42365 * fix(web): an IME Escape no longer closes the theme editor or ends inspection by @omaribrahim6 in pingdotgg/t3code#42332 * fix(web): Esc in a font family field closes Settings when no edit is pending by @only21mil in pingdotgg/t3code#42361 * fix(relay): traces no longer record callers' IP addresses or user agents by @juliusmarminge in pingdotgg/t3code#42380 * fix(server): source control discovery no longer runs the auth command of a CLI that is not installed by @juliusmarminge in pingdotgg/t3code#42379 * fix(web): sidebar issue and pull request badges share one component by @Bil0000 in pingdotgg/t3code#42275 * feat(relay): delete a user's relay data when Clerk deletes the user by @juliusmarminge in pingdotgg/t3code#42285 * fix(web): Esc in Theme Editor color filter clears the filter without closing the editor by @juliusmarminge in pingdotgg/t3code#42395 * fix(mobile): analytics uses its own random device id by @juliusmarminge in pingdotgg/t3code#42394 * fix(desktop): Windows desktop applies the saved user telemetry opt-out by @juliusmarminge in pingdotgg/t3code#42376 * fix(web): Enter commits Background Activity interval values by @only21mil in pingdotgg/t3code#42392 * fix(server): analytics no longer reads or sends Codex and Claude account IDs by @gabrielelpidio in pingdotgg/t3code#42299 ## New Contributors * @adrhumphreys-atlas made their first contribution in pingdotgg/t3code#42330 **Full Changelog**: pingdotgg/t3code@v0.1.12-nightly.20261124.5204...v0.1.12-nightly.20261124.5209 </details> Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.1.12-nightly.20261124.5209












Problem
When the browser cannot list installed fonts (Firefox and Safari, or Chrome before local font access is allowed), each font family field in Settings → Appearance (Interface and Monospace, plus Prompt, Code, and Terminal under Separate fonts) is a plain text input, and it intercepted every Esc. So Esc in one of these fields never closed Settings, even with nothing to discard: on an untouched field, or right after an Esc that already discarded a draft.
Change
FontFamilySettingsRownow intercepts Esc only when the field holds an uncommitted draft (draft !== value), which that Esc still discards. Otherwise Esc reaches Settings and closes it, the same as the auto-settle days field inSettingsPanels.tsx(field.dirty). A held Esc after a discard still leaves Settings open, becauseAppRouteModalignores repeated Esc keydowns. IME handling, Enter, and save on blur are unchanged.Scope
One bug: a Settings field that traps Esc. One condition in
TypographySettings.tsxand one test inTypographySettings.browser.test.tsx. No issue: a small fix to an obvious bug with the direct repro below.Verification
An AI agent ran each check below.
Setup: Linux, Chromium (T3 Browser panel, incognito), 1280×800, isolated
vp run dev --no-seedserver, installed-font access not granted; main ran onaaadc0cb, this PR's app run used4a59e90e(sameTypographySettings.tsxas PR head587a6e7f; only the test changed since); fresh server, onboarding finished with nothing imported, so closing Settings returns to the empty chat view.Steps: open Settings → Appearance, focus Interface font, type
Georg, press Esc (discards the draft), then press Esc again.aaadc0cb(main)4a59e90e(this PR)aaadc0cband closes it on4a59e90e.4a59e90e, after discardingGeorgin Interface font, a dispatchedrepeat: trueEsc leaves Settings open becauseAppRouteModalignores repeats.only intercepts Escape when discarding a draftchecks bothdefaultPreventedand whether the keydown reachesdocument(what Settings' dismissal reads):document.aon a typed draft: not prevented, reachesdocument, draft kept (a handler without the Escape check fails here).document, field reverts to the saved value.document.aaadc0cbat its first assertion and passes 3 of 3 runs on587a6e7f, together with the file's other 2 tests (IME Escape included).vp run check:changedpasses on587a6e7f.Not checked:
FontFamilyPicker, used once font access is granted) is untouched.Generated with Gemini 4 Neon in T3 Code Nightly