fix: top-bar polish — lights on the pill line, rename escape hitbox, inert phase pill, chrome carve-outs
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.
This commit is contained in:
@@ -34,12 +34,15 @@ const CHIP_LABEL: Record<Phase3, string> = {
|
||||
/** The header chip: the phase label, monochrome — label-only by design
|
||||
* (see the component note: the pill's curve suits text, not glyphs). */
|
||||
export function PhaseChip({ phase }: { phase: Phase3 }) {
|
||||
// Pure decoration (owner ask, 2026-09-17): no tooltip, not selectable,
|
||||
// not interactive in any way — no pointer events at all, so it is part
|
||||
// of the drag surface instead of a carved-out target.
|
||||
return (
|
||||
<span
|
||||
data-testid="phase-chip"
|
||||
data-phase={phase}
|
||||
title={`Session phase: ${CHIP_LABEL[phase]}`}
|
||||
className="lh-no-drag flex shrink-0 items-center rounded-full border border-border/80 px-2 py-0.5 text-xs font-medium uppercase tracking-wide text-muted-foreground"
|
||||
aria-hidden="true"
|
||||
className="pointer-events-none flex shrink-0 select-none items-center rounded-full border border-border/80 px-2 py-0.5 text-xs font-medium uppercase tracking-wide text-muted-foreground"
|
||||
>
|
||||
{CHIP_LABEL[phase]}
|
||||
</span>
|
||||
|
||||
Reference in New Issue
Block a user