Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

MUL-8777 fix(layout): one left edge per column, one header band across columns (#10140)

Jiayuan Zhang9d9ac9f7c72e
diff --git a/apps/desktop/src/renderer/src/components/desktop-layout.tsx b/apps/desktop/src/renderer/src/components/desktop-layout.tsx
index c725778e30..48083ee646 100644
--- a/apps/desktop/src/renderer/src/components/desktop-layout.tsx
+++ b/apps/desktop/src/renderer/src/components/desktop-layout.tsx
@@ -295,7 +295,9 @@ export function DesktopShell() {
<AppRail
topSlot={<RailTopSpacer />}
globalActions={false}
- className="hidden pt-0 md:flex"
+ // The card starts right under the top bar; the 7px
+ // centres the workspace tile on its header band.
+ className="hidden pt-[7px] md:flex"
/>
)}
{slug && <CompactNavSheet globalActions={false} />}
diff --git a/packages/views/chat/components/chat-thread-list.tsx b/packages/views/chat/components/chat-thread-list.tsx
index b5558436d3..b9aa9b4b3b 100644
--- a/packages/views/chat/components/chat-thread-list.tsx
+++ b/packages/views/chat/components/chat-thread-list.tsx
@@ -521,7 +521,7 @@ export function ChatThreadList({
if (historySessions.length === 0) {
return (
<>
- <div className="px-2 py-1.5 text-caption text-muted-foreground">
+ <div className="px-3 py-1.5 text-caption text-muted-foreground">
{t(($) => $.window.no_previous)}
</div>
{archivedEntry}
diff --git a/packages/views/inbox/components/inbox-list.tsx b/packages/views/inbox/components/inbox-list.tsx
index 69a69625bd..3c74ee7d44 100644
--- a/packages/views/inbox/components/inbox-list.tsx
+++ b/packages/views/inbox/components/inbox-list.tsx
@@ -9,7 +9,6 @@ import {
type ReactNode,
} from "react";
import { Virtuoso, type VirtuosoHandle } from "react-virtuoso";
-import { Inbox } from "@multica/ui/icons";
import { isEditableShortcutTarget } from "@multica/core/shortcuts";
import { isImeComposing } from "@multica/core/utils";
import type { InboxItem } from "@multica/core/types";
@@ -181,9 +180,10 @@ export function InboxList({
if (items.length === 0) {
return (
<div className="flex-1 min-h-0 overflow-y-auto">
- {!onLoadMore && <div className="flex flex-col items-center justify-center py-16 text-muted-foreground">
- <Inbox className="mb-3 h-8 w-8 text-faint-foreground" />
- <p className="text-body">
+ {/* On the column title's edge, like Chat's empty list. The detail
+ pane beside it carries the large empty state. */}
+ {!onLoadMore && <div className="px-5 pt-2.5 pb-1.5 text-caption text-muted-foreground">
+ <p>
{emptyLabel ??
(isArchivedView
? t(($) => $.list.archived_empty)
diff --git a/packages/views/inbox/components/inbox-page.tsx b/packages/views/inbox/components/inbox-page.tsx
index 44fd8ef0eb..183dc3cb42 100644
--- a/packages/views/inbox/components/inbox-page.tsx
+++ b/packages/views/inbox/components/inbox-page.tsx
@@ -987,7 +987,7 @@ export function InboxPage() {
if (viewLoading) {
return (
<div className="flex flex-1 flex-col min-h-0">
- <div className="flex h-12 shrink-0 items-center pl-5 pr-2">
+ <div className="flex h-12 shrink-0 items-center pl-5 pr-2.5">
<Skeleton className="h-5 w-16" />
</div>
<div className="flex-1 min-h-0 overflow-y-auto space-y-1 p-2">
@@ -1042,7 +1042,7 @@ export function InboxPage() {
return (
<div className="flex min-h-0 flex-1">
<ListColumn collapsed={listCollapsed} width="list">
- <div className="flex h-12 shrink-0 items-center pl-5 pr-2">
+ <div className="flex h-12 shrink-0 items-center pl-5 pr-2.5">
<Skeleton className="h-5 w-16" />
</div>
<div className="flex-1 min-h-0 overflow-y-auto space-y-1 p-2">
diff --git a/packages/views/layout/app-rail.tsx b/packages/views/layout/app-rail.tsx
index 5d5f198b2a..ea1f7d2e1d 100644
--- a/packages/views/layout/app-rail.tsx
+++ b/packages/views/layout/app-rail.tsx
@@ -270,12 +270,16 @@ export function AppRail({
},
};
+ // The 34px workspace tile is centred on the card's 48px header band, so it
+ // shares a centre line with the column and page titles: the card starts
+ // 8px down, plus (48 - 34) / 2. Desktop's card starts below its title bar,
+ // so it passes its own top inset with the same 7px.
return (
<nav
aria-label={t(($) => $.rail.label)}
data-slot="app-rail"
className={cn(
- "flex h-full w-14 shrink-0 flex-col items-center overflow-y-auto overflow-x-hidden pt-3 pb-2.5 [scrollbar-width:none]",
+ "flex h-full w-14 shrink-0 flex-col items-center overflow-y-auto overflow-x-hidden pt-[15px] pb-2.5 [scrollbar-width:none]",
className,
)}
>
diff --git a/packages/views/layout/panel-nav.tsx b/packages/views/layout/panel-nav.tsx
index 07c0161923..fc5f7cd039 100644
--- a/packages/views/layout/panel-nav.tsx
+++ b/packages/views/layout/panel-nav.tsx
@@ -38,8 +38,11 @@ export function PanelHeader({
/** Trailing actions (icon buttons). */
children?: React.ReactNode;
}) {
+ // `pr-2.5` centres a 28px action on the same line as a section's 24px
+ // action (`PanelBody px-2` + `PanelSection pr-1`), so the trailing column
+ // does not step between the header and the sections under it.
return (
- <div className="flex h-12 shrink-0 items-center gap-1 pl-5 pr-2">
+ <div className="flex h-12 shrink-0 items-center gap-1 pl-5 pr-2.5">
{leading}
<div className="flex min-w-0 flex-1 items-center gap-2">
{/* A control passed as the title truncates its own label; clipping
diff --git a/packages/views/layout/panels/sidebar-tree.tsx b/packages/views/layout/panels/sidebar-tree.tsx
index 8fd3450163..0cca8755ad 100644
--- a/packages/views/layout/panels/sidebar-tree.tsx
+++ b/packages/views/layout/panels/sidebar-tree.tsx
@@ -271,8 +271,11 @@ export function SidebarIssueList({
const tailClass = cn(TREE_CHILD_ROW_CLASS, panelRowStateClass(false), "gap-1.5 min-h-6 text-caption text-faint-foreground");
+ // The connector sits on the parent icon's centre line (`ml-5`), and the
+ // child icons on the parent's label column: 1px border + 9px + the child
+ // row's 8px reaches the parent row's 12px + 16px icon + 10px gap.
return (
- <ul id={id} data-sidebar-list={source} className="mb-2 ml-5 border-l border-surface-border pl-1.5">
+ <ul id={id} data-sidebar-list={source} className="mb-2 ml-5 border-l border-surface-border pl-[9px]">
{params === undefined && paramsError ? (
<li className="flex h-[26px] items-center gap-2 px-2 text-caption text-faint-foreground">
<span className="min-w-0 truncate">{t(($) => $.panels.work.project_issues_error)}</span>
diff --git a/packages/views/settings/components/settings-page.tsx b/packages/views/settings/components/settings-page.tsx
index e80bf23145..559d18ba23 100644
--- a/packages/views/settings/components/settings-page.tsx
+++ b/packages/views/settings/components/settings-page.tsx
@@ -99,6 +99,24 @@ interface SettingsScopeGroup {
subgroups: SettingsSubgroup[];
}
+/**
+ * The header's title and actions sit on the body's centred column
+ * (`--settings-column`, padded `md:px-10`), not on the page gutter: on a
+ * window wider than the column they would otherwise not share an edge.
+ *
+ * `50%` is half the header's content box, which is the page minus
+ * `PAGE_GUTTER` on each side, so `50% - column / 2` is the column's offset
+ * inside it. The title's `h2` adds `px-2`, so `+ 2rem` lands its icon on the
+ * body's 40px inset. A collapsed-nav trigger before the rail takes 36px of
+ * that offset. Below `md` the page stacks and the header keeps the gutter.
+ */
+const SETTINGS_HEADER_RAIL = cn(
+ "flex min-w-0 flex-1 items-center gap-2",
+ "md:pl-[max(1rem,calc(50%-var(--settings-column)/2+2rem))]",
+ "md:group-has-[[data-slot=sidebar-trigger]]/settings-header:pl-[max(0px,calc(50%-var(--settings-column)/2-0.25rem))]",
+ "md:pr-[max(1.5rem,calc(50%-var(--settings-column)/2+2.5rem))]",
+);
+
const FLASH_MS = 1600;
const ANCHOR_WAIT_MS = 1500;
@@ -455,10 +473,12 @@ export function SettingsPage({ extraDeviceTabs = [] }: SettingsPageProps = {}) {
)}
</select>
</div>
- <div className="relative mx-3 mb-3 hidden shrink-0 md:block">
+ {/* Same insets as a nav row: the border on the row highlight's edge,
+ the glyph on the icon column, the text on the label column. */}
+ <div className="relative mx-2 mb-3 hidden shrink-0 md:block">
<Search
aria-hidden="true"
- className="pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground"
+ className="pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-muted-foreground"
/>
<input
type="search"
@@ -488,7 +508,7 @@ export function SettingsPage({ extraDeviceTabs = [] }: SettingsPageProps = {}) {
placeholder={t(($) => $.page.search)}
aria-label={t(($) => $.page.search)}
aria-controls={query ? "settings-search-results" : undefined}
- className="h-8 w-full rounded-lg border border-input bg-transparent pl-8 pr-8 text-body outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 dark:bg-input/30 [&::-webkit-search-cancel-button]:hidden"
+ className="h-8 w-full rounded-lg border border-input bg-transparent pl-[37px] pr-8 text-body outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 dark:bg-input/30 [&::-webkit-search-cancel-button]:hidden"
/>
{query ? (
<TooltipHint label={t(($) => $.page.search_clear)}>
@@ -505,7 +525,7 @@ export function SettingsPage({ extraDeviceTabs = [] }: SettingsPageProps = {}) {
</div>
<nav
aria-label={t(($) => $.page.title)}
- className="hidden min-h-0 overflow-y-auto px-3 pb-6 md:block"
+ className="hidden min-h-0 overflow-y-auto px-2 pb-6 md:block"
>
{query ? (
searchResults
@@ -533,26 +553,34 @@ export function SettingsPage({ extraDeviceTabs = [] }: SettingsPageProps = {}) {
)}
</nav>
</ListColumn>
- <div className="flex min-h-0 min-w-0 flex-1 flex-col">
- <PageHeader leading={listCollapsed ? <CollapsedNavTrigger /> : false}>
- <div className="flex min-w-0 flex-1 items-center gap-2">
- <h2 className="flex min-w-0 items-center gap-2 px-2 text-body font-medium">
- <ActiveIcon className="size-4 shrink-0 text-muted-foreground" aria-hidden="true" />
- {detailOpen ? (
- <AppLink
- href={href(active.value)}
- className="shrink-0 text-muted-foreground transition-colors hover:text-foreground"
- >
- {active.label}
- </AppLink>
- ) : (
- <span className="truncate">{active.label}</span>
- )}
- <span ref={setHeaderTrail} className="contents" />
- </h2>
- <span ref={setHeaderMeta} className="contents" />
+ <div
+ className="flex min-h-0 min-w-0 flex-1 flex-col"
+ style={{ "--settings-column": active.wide ? "64rem" : "56rem" } as React.CSSProperties}
+ >
+ <PageHeader
+ className="group/settings-header"
+ leading={listCollapsed ? <CollapsedNavTrigger /> : false}
+ >
+ <div className={SETTINGS_HEADER_RAIL}>
+ <div className="flex min-w-0 flex-1 items-center gap-2">
+ <h2 className="flex min-w-0 items-center gap-2 px-2 text-body font-medium">
+ <ActiveIcon className="size-4 shrink-0 text-muted-foreground" aria-hidden="true" />
+ {detailOpen ? (
+ <AppLink
+ href={href(active.value)}
+ className="shrink-0 text-muted-foreground transition-colors hover:text-foreground"
+ >
+ {active.label}
+ </AppLink>
+ ) : (
+ <span className="truncate">{active.label}</span>
+ )}
+ <span ref={setHeaderTrail} className="contents" />
+ </h2>
+ <span ref={setHeaderMeta} className="contents" />
+ </div>
+ <div ref={setHeaderActions} className="flex shrink-0 items-center gap-2 empty:hidden" />
</div>
- <div ref={setHeaderActions} className="flex shrink-0 items-center gap-2 empty:hidden" />
</PageHeader>
<SettingsHeaderContext.Provider value={headerSlots}>
<div
@@ -560,12 +588,7 @@ export function SettingsPage({ extraDeviceTabs = [] }: SettingsPageProps = {}) {
key={`${active.value}:${location.integration ?? ""}`}
className="min-h-0 min-w-0 flex-1 overflow-y-auto overscroll-contain"
>
- <div
- className={cn(
- "mx-auto w-full px-4 py-6 sm:px-6 md:px-10 md:py-8",
- active.wide ? "max-w-5xl" : "max-w-4xl",
- )}
- >
+ <div className="mx-auto w-full max-w-(--settings-column) px-4 py-6 sm:px-6 md:px-10 md:py-8">
{active.content}
</div>
</div>