Skip to content

Commit bc814b2

Browse files
committed
fix: restore sans-serif for inputs; make Cmd+K work in capture phase
## Font rendering Pre-sync, the fork had only `pre, code, textarea, input` selectors using Geist Mono when code/terminal context demanded it, but the recent sync collapsed all four into a single rule that applied the monospace stack to *every* <input> in the app. The command palette search, model picker trait inputs, settings binary/server URL fields, etc. all rendered in Geist Mono, which is what produced the 'broken font' look. Narrow the rule back to `pre, code` (and `textarea` in code-focused contexts inherits naturally). Regular inputs now use the body font (DM Sans). ## Cmd+K shortcut The commandPalette.toggle keydown handler in CommandPalette.tsx used the bubble phase, which means xterm (when terminal has focus) or a contenteditable composer could swallow Cmd+K before it reached the window listener. Switch the listener to capture phase — matches upstream's CTRL+J fix for terminal.toggle (pingdotgg#2113). The project picker already lives inside the command palette (filesystem browse API + command-palette project picker from pingdotgg#2024); this restores access to it via the shortcut.
1 parent b0bcd1e commit bc814b2

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

apps/web/src/components/CommandPalette.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,10 @@ export function CommandPalette({ children }: { children: ReactNode }) {
171171
event.stopPropagation();
172172
toggleOpen();
173173
};
174-
window.addEventListener("keydown", onKeyDown);
175-
return () => window.removeEventListener("keydown", onKeyDown);
174+
// Capture phase so the shortcut fires even when a descendant (e.g.
175+
// xterm, a contenteditable composer) would otherwise swallow the event.
176+
window.addEventListener("keydown", onKeyDown, true);
177+
return () => window.removeEventListener("keydown", onKeyDown, true);
176178
}, [keybindings, terminalOpen, toggleOpen]);
177179

178180
return (

apps/web/src/index.css

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,7 @@ body::after {
177177
}
178178

179179
pre,
180-
code,
181-
textarea,
182-
input {
180+
code {
183181
font-family:
184182
"Geist Mono", "SF Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
185183
}

0 commit comments

Comments
 (0)