feat: merged title bar — drag bands, owner's mark, title-width rename hit-box
The system title bar disappears (titleBarStyle hiddenInset +
trafficLightPosition {16,24}): the app's own 60px header bands become the
window's drag surface, and the traffic lights float over the sidebar's
mark band, vertically centered on the same line as the chat header's
phase pill (pixel-verified: circle centers y 24–36.5pt, pill box center
30pt).
- electron/main.cjs: hiddenInset chrome; dev shell (LH_DEV_URL) gets its
own userData (-dev suffix) so it never fights the packaged app's
single-instance lock — verified: the lock silently killed the dev
shell while the packaged app was open (that also proved the lock works
across separately-launched builds).
- app/globals.css: .lh-electron-gated utilities — drag/no-drag bands,
92px traffic-light gutter (.lh-lights-gutter / .lh-closed-toggle:
lights end ~75pt + the lights' own 16px edge inset as the gap),
home's floating strip becomes a drag surface only in the shell.
Everything is inert in the plain browser.
- sidebar.tsx: SidebarProvider sets <html class=lh-electron> post-mount
(UA detection; no hydration mismatch, absent in browser); LH wordmark
text replaced by the owner's mark (components/lh-mark.tsx, inlined
icon-no-padding.svg, 24px, home link kept); SidebarToggle gains the
92px margin when closed so it never slides under the static lights.
- chat.tsx: the rename hit-box shrinks to the title text itself —
flex-1 spanned the whole bar, so every click started a rename and the
window lost its grip. Shrink-to-fit + a flex-1 drag spacer (chips stay
right) + hover:bg-accent affordance (clear when hover renames vs
drags; -mx/px cancel for zero shift). The renaming input keeps flex-1
for edit room.
- home.tsx / new-session.tsx / phase-divider.tsx: drag bands + carve-outs.
Live-verified in the dev shell (pixel analysis) and headless browser:
lights/pill/mark centered, 17pt lights→mark gap, rename click→select-all
→Escape roundtrip, browser layout untouched.
Gates: typecheck, eslint, 500/500 tests, build.
This commit is contained in:
@@ -42,6 +42,14 @@ function serverEntry() {
|
||||
}
|
||||
|
||||
// ─── Single instance: two instances would fight over the data dir ─────────
|
||||
// Dev shell (LH_DEV_URL) runs BESIDE the packaged app, not instead of it:
|
||||
// its own userData so (a) the single-instance lock — checked below — doesn't
|
||||
// silently kill it, and (b) it never reads/writes the real app's
|
||||
// localStorage, auth.json, or logs. Must run before the lock check.
|
||||
if (process.env.LH_DEV_URL) {
|
||||
app.setPath("userData", `${app.getPath("userData")}-dev`);
|
||||
}
|
||||
|
||||
if (!app.requestSingleInstanceLock()) {
|
||||
app.quit();
|
||||
} else {
|
||||
@@ -176,6 +184,14 @@ function createWindow(url) {
|
||||
width: 1440,
|
||||
height: 900,
|
||||
title: PRODUCT_NAME,
|
||||
// Merged chrome (owner, 2026-09-17): the system title bar is gone;
|
||||
// the app's own 60px header bands ARE the title bar. The traffic
|
||||
// lights float over the sidebar's LH wordmark band, vertically
|
||||
// centered on its 60px line (12px circles: y 24–36), with the LH
|
||||
// wordmark starting at x≈80 (components/sidebar.tsx gutter).
|
||||
// Dragging comes from the renderer's .lh-drag bands (app/globals.css).
|
||||
titleBarStyle: "hiddenInset",
|
||||
trafficLightPosition: { x: 16, y: 24 },
|
||||
webPreferences: {
|
||||
contextIsolation: true,
|
||||
sandbox: true,
|
||||
|
||||
Reference in New Issue
Block a user