fix(ui): titlebar tabs connect into the page + unify desk tint#117
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
… into it The earlier approach squared the sheet's top corners and dropped its whole top border under the desktop titlebar, which flattened the sheet and left the active tab reading as detached. Instead: the desk pulls up 1px under the titlebar (margin-top: -1px) and the active tab takes relative z-[1], so its fill paints over the sheet's top border only in the 1px strip where they meet — the border opens under the connecting tab and nowhere else, and the sheet stays a fully rounded, bordered card on both platforms. Also aligns the ?shell=desktop preview seam with the real Tauri shell (--ob-inset-top: 0px); the preview's leftover 6px web inset was the gap that made the tab float in the earlier captures. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KFk2T9k3p7ghCjdzMfkA5w
…r survives The 1px titlebar-merge pull-up lived on `.ob-desk`, which clips its children (`overflow-hidden`): the negative margin pushed the sheet's top-border strip outside that clip box and erased the top border, so the active tab still read as a detached pill (the "still-detached" look flagged in review). Move the pull-up onto the desk's `overflow-hidden` row wrapper (`.ob-desk-row[data-titlebar]`) and carry `data-titlebar` there in DefaultLayout: the row's clip box travels with the border, so the border stays visible and is interrupted only under the active tab — the page extrudes up into its tab as intended, on both light and dark themes. Purely presentational; ui typecheck + lint clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KFk2T9k3p7ghCjdzMfkA5w
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On the desktop, the in-window titlebar tabs (Chrome/Arc style) read as small, shadowed floating cards that sat above the page, disconnected from the content below. The active tab looked no more anchored to its page than the inactive ones. At the same time the "desk" the page sheets sit on used a distinct neutral tint (
--desk), so the warm chrome tint of the sidebar/titlebar broke at the sheet's corners instead of running continuously around the window.An earlier revision of this PR tried to connect the tab by squaring the sheet's top corners and dropping its whole top border on desktop — that flattened the sheet into a slab, so the tab still read as detached (review feedback). For the "tab extruded from the page" metaphor to work, the sheet needs to keep both its rounded corners and its full top border, with the border opening only where the active tab connects.
Solution
The sheet stays a fully rounded, bordered card on both platforms; the desktop connects the active tab into it with a 1px overlap:
index.css— the desk (.ob-desk) carries the same tint as the sidebar/titlebar (--sheet-1instead of neutral--desk), so the chrome tint runs continuously and the sheets read as floating on one book cover. When the in-window titlebar is present, the cover row (.ob-desk-row[data-titlebar='true'], the desk'soverflow-hiddenwrapper) is pulled up 1px (margin-top: -1px), riding the sheet's top border into the titlebar's lower edge. The pull-up must sit on the row, not the desk: the row clips its children, so a desk-level negative margin pushes the border strip outside the clip box and erases the whole top border (a bug an intermediate revision had — the border must stay visible everywhere except under the tab). Moving the row moves its clip box with it. The sheet itself is untouched: rounded corners, full border, shadow — everywhere.TitlebarTabs.tsx— the active tab drops the floating gap + shadow, grows toh-8, takes the page's fill with a hairline top+side border open at the bottom (border-b-0,rounded-t-md), and getsrelative z-[1]so its fill paints over the sheet's top border in that 1px overlap. The sheet's border is thus interrupted only under the active tab — the page extrudes up into its tab. Inactive tabs float above the connection line (mb-1,h-7, fully rounded, muted).DefaultLayout.tsx— names the cover row (ob-desk-row) and wiresinWindowTabsfromuseNavigation()onto it asdata-titlebar, gating the pull-up to the desktop shell.web/src/pages/index.tsx— the?shell=desktoppreview seam now also sets--ob-inset-top: 0px, mirroring the real Tauri shell (App.tsx). Without it the preview kept the web's 6px top inset, so the tab floated a gap above the page — the source of the detached look in the earlier captures.Target design, per platform:
Purely presentational: no data, API, routing, or behavioural change.
Before / After
Live captures from the running app (
next dev, fresh workspace + sample document, two tabs: sample inactive, Home active). Desktop rendered via the?shell=desktoppreview seam; web is the plain app.Desktop — titlebar ↔ page junction
Before: the active tab is a floating rounded pill with a gap and seam line below it. After: the active tab merges flush into the page sheet; the sheet keeps its rounded top corners and its top border everywhere else. Pixel-probed on the captures: the 1px border row is present at both flanks of the active tab (light
rgb(232,230,227), darkrgb(56,56,56)) and absent directly beneath it (continuous tab→page fill).Desktop — full window
Web — no in-window tabs
On the web only the desk tint changes (
--desk→--sheet-1); the sheet was and remains a fully rounded, bordered card.Test procedure
pnpm verify— green (see counts below).pnpm --filter @book.dev/web dev, open/?shell=desktop, insert the sample document, add a second tab with "+", switch tabs. Confirm the active tab merges into the page (border open only under it), inactive tabs float, sheet corners stay rounded, and the desk tint matches the sidebar/titlebar.?shell=desktop): confirm the page sheets remain fully rounded bordered cards and only the desk background tint changed.mainon one port for Before, this branch on another for After), light + dark viacolorSchemeemulation; the script is not committed.Operational notes
packages/ui/src/components/TitlebarTabs.tsx,packages/ui/src/index.css,packages/ui/src/layouts/DefaultLayout.tsx,packages/web/src/pages/index.tsx). No migration, no config, no server change.web/src/pages/index.tsxchange only touches the?shell=desktoppreview seam (Chromatic/e2e); production web never enters that code path.--sheet-1,--backgroundand--borderare defined per-theme, so the merge renders correctly in both (see captures).--deskbackdrop.pnpm verify: green (exit 0) — build:libs + typecheck + lint clean; unit sdk 171 / ui 948 / server 645 passed; server e2e 251 checks + MCP e2e 40 checks passed. (Web Playwright suite runs separately in CI.) · gate:design(Devon) — visual change, full before/after matrix embedded above.🤖 Generated with Claude Code
https://claude.ai/code/session_01KFk2T9k3p7ghCjdzMfkA5w