From 9c0c9970e23789be21bdcf9b2ffdf441b38b19d9 Mon Sep 17 00:00:00 2001 From: Yuto Nishida Date: Sun, 9 Aug 2026 16:07:57 -0700 Subject: [PATCH] [papyrus] Group terminal settings by emulator; move line spacing under xterm The Settings pane stacked the Emulator selector and Line spacing under one "Terminal" heading, implying line spacing applied to whichever emulator was active. It is xterm.js-only (libghostty has no line-height knob). Split it into the Emulator section plus a new section holding options for the selected emulator only: line spacing under xterm.js; libghostty shows a muted empty state until it has options of its own. Co-Authored-By: Claude Opus 4.8 (1M context) Claude-Session: https://claude.ai/code/session_01GBWyw3DyRvvNmgJpFZBsC5 --- .../client/src/components/SettingsPanel.tsx | 82 +++++++++++-------- 1 file changed, 49 insertions(+), 33 deletions(-) diff --git a/experimental/papyrus/client/src/components/SettingsPanel.tsx b/experimental/papyrus/client/src/components/SettingsPanel.tsx index 12749ba..c149685 100644 --- a/experimental/papyrus/client/src/components/SettingsPanel.tsx +++ b/experimental/papyrus/client/src/components/SettingsPanel.tsx @@ -16,8 +16,8 @@ const BACKEND_ICON: Record = { // Global appearance settings, docked to the right edge and toggled by the header gear. // Mirrors Sidebar's slide-in; sits above it (z-[60]) so the two never collide. Holds the -// terminal controls: the emulator backend (segmented toggle) and line spacing (stepper); -// the store persists both. +// emulator backend selector, then a section of options for the selected emulator only — +// line spacing (stepper) under xterm; ghostty has none yet. The store persists both fields. export function SettingsPanel() { const settingsOpen = useStore((s) => s.settingsOpen); const setSettingsOpen = useStore((s) => s.setSettingsOpen); @@ -28,6 +28,8 @@ export function SettingsPanel() { const atMin = lineSpacing <= MIN_LINE_SPACING; const atMax = lineSpacing >= MAX_LINE_SPACING; + const activeBackendLabel = + TERMINAL_BACKENDS.find((b) => b.id === terminalBackend)?.label ?? terminalBackend; return ( @@ -82,38 +84,52 @@ export function SettingsPanel() { })} -
- Line spacing -
- - - {lineSpacing.toFixed(2)} - - +
+ + {/* Options specific to the selected emulator */} +
+ + + {terminalBackend === "xterm" && ( +
+ Line spacing +
+ + + {lineSpacing.toFixed(2)} + + +
-
+ )} + + {terminalBackend === "ghostty" && ( +

No settings for libghostty yet.

+ )}
-- 2.54.0