Skip to content

fix(ui): curve dependency arrows + paint desktop cover tint behind the titlebar glass#154

Merged
eliotlim merged 2 commits into
mainfrom
fix/ui-glass-tint-and-dep-arrows
Jul 13, 2026
Merged

fix(ui): curve dependency arrows + paint desktop cover tint behind the titlebar glass#154
eliotlim merged 2 commits into
mainfrom
fix/ui-glass-tint-and-dep-arrows

Conversation

@eliotlim

Copy link
Copy Markdown
Owner

Two small owner-reported UI-polish fixes.

1. Database dependency arrows — square, self-looping elbows → smooth curves

packages/ui/src/components/database/databaseTimeline.tsx. The dependency edge drew an orthogonal elbow M x1 y1 H midX V y2 H x2 with midX = Math.max(x1+8, x2-8) — square corners, and when the successor starts before the predecessor ends (x2 < x1) it juts right then doubles back left (an ugly self-hook).

Now a cubic Bézier with horizontal end tangents:

const dx = Math.max(16, Math.abs(x2 - x1) * 0.5);
d = `M x1 y1 C x1+dx y1, x2-dx y2, x2 y2`

The backward case reads as a clean curve instead of a square double-back. Arrowhead marker/orient="auto" unchanged — the endpoint tangent stays horizontal, so it still points cleanly into the successor's start.

2. Desktop cover tint behind the titlebar glass — no white leak

.ob-desk (the book cover) paints the sidebar tint --sheet-1, but body paints white --background. On the macOS desktop app (titleBarStyle: Overlay + hiddenTitle), WKWebView content extends under the titlebar, so the white leaked behind the traffic-light "glass" and at window edges — breaking the continuous notebook-cover feel.

Fix: the 100vh app root (DefaultLayout.tsx) gets .ob-app-root + the existing data-titlebar desktop signal, and:

.ob-app-root[data-titlebar='true'] { background-color: hsl(var(--sheet-1)); }

Scoped to the desktop shell (web leaves the attr unset → root stays transparent, framed-sheets look unchanged). Value tracks --sheet-1 so it runs continuously into .ob-desk.

Verification

  • Timeline e2e (database-timeline.spec.ts) — 10/10 pass, incl. all 3 dependency specs (link, drag-to-link, dependency graph).
  • @book.dev/ui build + tsc --noEmit clean.
  • Fix 1 visual before/after (forward + backward) captured; backward hook → smooth curve.
  • Fix 2 computed-style proof from the built style.css: .ob-app-root[data-titlebar] background == .ob-desk exactly — light rgb(250,249,248), dark rgb(40,40,40); web root transparent.
  • Final pixel sign-off behind the actual macOS traffic-light glass needs the running Tauri app (deterministic CSS change; owner to confirm on the desktop build).

Board: two "Editor & UX" polish issues.

🤖 Generated with Claude Code

eliotlim and others added 2 commits July 13, 2026 23:31
…ing elbows

Replace the orthogonal elbow dependency connector with a smooth cubic Bézier
that has horizontal end tangents. The old `H midX V y2 H x2` path drew ugly
right-angle corners, and for backward dependencies (successor starts before the
predecessor ends, x2 < x1) `midX` clamped to x1+8, so the path juts right then
doubles back left as a square self-hook. The Bézier leaves the predecessor's
end going right and enters the successor's start going right, so the backward
case reads as a clean loop. Arrowhead (markerEnd, orient=auto) still enters the
bar horizontally; stroke class/width unchanged; unused midX removed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KFk2T9k3p7ghCjdzMfkA5w
…hite leak)

On the macOS desktop app the window is overlay-titlebar + hidden title, so the
WKWebView content extends under the titlebar / traffic-lights. The white `body`
(`--background`) then leaked behind that glass and at the window edges, breaking
the continuous notebook-cover feel. Paint the app root with the cover tint
(`--sheet-1`, the same value `.ob-desk` uses) so any region not covered by a
page sheet shows the cover tint instead of white. Scoped to the desktop
in-window-titlebar shell via `data-titlebar` on `.ob-app-root` (set by
DefaultLayout); the web root stays transparent so the web framing is unchanged.
Tracks --sheet-1 exactly, verified in both light and dark.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KFk2T9k3p7ghCjdzMfkA5w
@vercel

vercel Bot commented Jul 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
app.book.pub Ready Ready Preview, Comment Jul 13, 2026 3:35pm

Request Review

@eliotlim eliotlim merged commit 43e7397 into main Jul 13, 2026
10 checks passed
@eliotlim eliotlim deleted the fix/ui-glass-tint-and-dep-arrows branch July 13, 2026 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant