From fb759b7aa02655f89810658ffb007a8761b27b92 Mon Sep 17 00:00:00 2001 From: amosblomqvist Date: Thu, 17 Sep 2026 17:18:41 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20top-bar=20polish=20=E2=80=94=20lights=20?= =?UTF-8?q?on=20the=20pill=20line,=20rename=20escape=20hitbox,=20inert=20p?= =?UTF-8?q?hase=20pill,=20chrome=20carve-outs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Traffic lights (owner report: 'way too low, not aligned with the phase pill'): measured in the running app — circles centered at 30.75pt vs the pill box's 29.25pt (band 0-59.5, pill box 19-39.5, pill ink 28.75; uppercase glyphs sit high). trafficLightPosition y 24 -> 22.5 lands the circle centers at 29.25, exactly on the pill. Owner confirmed aligned after this change. Rename escape hitbox (owner report): entering rename was already width-of- title only, but the editing input spanned flex-1 so clicking the rest of the bar stayed inside the input. The input is now shrink-to-fit ([field-sizing:content], min 8ch / max 70%) and any mousedown outside the input blurs it, running the existing onBlur commit path; the header drops lh-drag while renaming so the drag region cannot eat the escape click. Verified: click-away commits (exactly one PUT), Escape discards, Enter commits. Phase pill is pure decoration (owner report: 'should not be interactable in any way'): no tooltip, pointer-events-none, select-none — part of the drag surface instead of a carved-out target. Graph chrome was unclickable in Electron (owner report): home.tsx's floating drag strip underlays the z-10 controls row, and Electron's app-region mask ignores z-index, so the region ate their clicks (plain browser unaffected — DOM hit-testing is fine). lh-no-drag carve-outs on the chrome row and the node detail card (it is placed imperatively anywhere, including the top strip). LhMark home link now mirrors the ghost toggle: same size-9 chip geometry and hover:bg-accent treatment. --- components/chat.tsx | 50 ++++++++++++++++++++++++++---------- components/graph-view.tsx | 13 +++++++--- components/phase-divider.tsx | 7 +++-- components/sidebar.tsx | 4 ++- electron/main.cjs | 9 ++++--- 5 files changed, 60 insertions(+), 23 deletions(-) diff --git a/components/chat.tsx b/components/chat.tsx index 446119c..1a110e6 100644 --- a/components/chat.tsx +++ b/components/chat.tsx @@ -637,22 +637,44 @@ export function Chat({ 60px is an ALIGNMENT, not just a size: it equals the sidebar's LH wordmark band, so the header's border-b continues that band's bottom edge as one line across the app (owner, round 6). */} -
+
{ + // Escape hitbox: any mousedown outside the input itself blurs + // it, running the existing onBlur commit path. The input is + // shrink-to-fit (field-sizing), so the rest of the bar is + // this spacer + inert chips — all click-to-exit (owner ask). + if (renaming && e.target !== titleInputRef.current) titleInputRef.current?.blur(); + }} + > {renaming ? ( - setTitleDraft(e.target.value)} - onKeyDown={(e) => { - if (e.key === "Enter") void commitRename(titleDraft); - else if (e.key === "Escape") setRenaming(false); - }} - onBlur={() => void commitRename(titleDraft)} - spellCheck={false} - aria-label="Session title" - className="lh-no-drag min-w-0 flex-1 bg-transparent font-title text-3xl tracking-tight caret-current outline-none" - /> + <> + setTitleDraft(e.target.value)} + onKeyDown={(e) => { + if (e.key === "Enter") void commitRename(titleDraft); + else if (e.key === "Escape") setRenaming(false); + }} + onBlur={() => void commitRename(titleDraft)} + spellCheck={false} + aria-label="Session title" + className="lh-no-drag min-w-[8ch] max-w-[70%] shrink-0 bg-transparent font-title text-3xl tracking-tight caret-current outline-none [field-sizing:content]" + /> + {/* flex-1 spacer during rename too, so the chips stay at + the right edge; clicks here commit via the header + mousedown handler. */} +