Skip to content

DeepTutor: Lifelong Personalized Tutoring. https://deeptutor.info/.

fix: restore lighter page styling with subtle navigation refinements

Bingxi Zhao (Frank)fd8f10817800
diff --git a/artifacts/dito-preview/dt-exp-light-home.png b/artifacts/dito-preview/dt-exp-light-home.png
new file mode 100644
index 000000000..7fec59663
Binary files /dev/null and b/artifacts/dito-preview/dt-exp-light-home.png differ
diff --git a/artifacts/dito-preview/dt-exp-light-learning.png b/artifacts/dito-preview/dt-exp-light-learning.png
new file mode 100644
index 000000000..20fabee54
Binary files /dev/null and b/artifacts/dito-preview/dt-exp-light-learning.png differ
diff --git a/artifacts/dito-preview/dt-exp-qa.md b/artifacts/dito-preview/dt-exp-qa.md
index e583ce3b5..de420480c 100644
--- a/artifacts/dito-preview/dt-exp-qa.md
+++ b/artifacts/dito-preview/dt-exp-qa.md
@@ -75,3 +75,11 @@ Model-backed generation, external channels and integrations require their normal
- Browser QA: 1280 × 720 desktop and 1280 × 600 with a 220px sidebar. All four category labels fit; partner, group and session sections remain visible. Learning creation opens its original modal; notebook creation opens its original form; existing partner transcript and saved writing document display correctly; Settings retains its sections. Resource-page toolbar stays at y=0 / height=52 while content scrolls. A fresh tab against the final production build has no console errors.
- Validation: 153 Vitest files / 672 tests; 1,303 Node tests; production build/type checking, i18n checks, dependency architecture and existing route budgets pass. Targeted ESLint reports no errors; five pre-existing warnings remain. Regression coverage checks that moved page actions keep their providers/state and unmount cleanly during page changes.
- Evidence: dt-exp-page-chrome-home.png, dt-exp-page-chrome-learning.png, dt-exp-page-chrome-writer.png. Three empty projects were added only to the isolated /tmp runtime to exercise the section heading. No storage format, backend contract or real user records changed.
+
+## Restore the lighter visual baseline, 2026-10-13
+
+- Supersedes the shared page chrome and colored category treatment above, following visual feedback. Restored the pre-chrome page titles, whitespace, native workspace toolbars and single-row neutral category navigation from `2358b8d40`. Removed the extra fixed header/portal layer, added dividers and separate partner tab row.
+- Kept the Projects heading and translations. The only other visual differences from that baseline are 10px category corners and 19px icons. Partner/group limits, retained navigation, learning search and timestamp ordering remain unchanged.
+- Browser verification on the production preview: learning records and original four-option creation dialog render correctly; Home shows Projects and Recent; partner/group/session sections remain visible together, and the existing partner transcript opens with its original toolbar. No console errors were captured in the fresh preview tab.
+- Validation: 152 Vitest files / 671 tests and 1,303 Node tests pass. Production build including TypeScript and all existing route budgets pass. Targeted ESLint reports no errors, with six existing warnings. No backend or data changes.
+- Current evidence: `dt-exp-light-learning.png` and `dt-exp-light-home.png`. The earlier page-chrome images document the superseded design.
diff --git a/web/app/(workspace)/learning/books/BooksRoute.tsx b/web/app/(workspace)/learning/books/BooksRoute.tsx
index 9b2ecc07b..37ac603c2 100644
--- a/web/app/(workspace)/learning/books/BooksRoute.tsx
+++ b/web/app/(workspace)/learning/books/BooksRoute.tsx
@@ -1,6 +1,5 @@
'use client'
-import { PageToolbar } from '@/components/layout/PageToolbar'
import { Suspense, useCallback, useEffect, useMemo, useReducer, useRef, useState } from 'react'
import { useParams, useRouter } from 'next/navigation'
import { ArrowLeft, Loader2, MessageSquare } from 'lucide-react'
@@ -1008,26 +1007,7 @@ function BookPageInner() {
? 'opening' : view
return (
- <div className="flex h-full min-h-0 w-full flex-col">
- {!['list', 'creator'].includes(displayView) && (
- <PageToolbar>
- <div className="dt-toolbar-identity">
- <button type="button" onClick={() => void handleSelectBook(null)} className="inline-flex shrink-0 items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground">
- <ArrowLeft size={14} />{t('All books')}
- </button>
- <span className="dt-toolbar-separator" aria-hidden>/</span>
- <span className="dt-toolbar-title">{detail?.book.title || pendingBook?.title || t('Books')}</span>
- </div>
- {displayView === 'reader' && (
- <div className="dt-toolbar-actions">
- <button type="button" aria-pressed={chatOpen} onClick={() => setChatOpen(value => !value)} className="inline-flex items-center gap-1.5 px-2 text-xs text-muted-foreground hover:bg-muted hover:text-foreground">
- <MessageSquare size={16} />{t('Chat')}
- </button>
- </div>
- )}
- </PageToolbar>
- )}
- <div className="flex min-h-0 flex-1">
+ <div className="flex h-full w-full">
{displayView !== 'list' && displayView !== 'creator' && displayView !== 'opening' && (
<BookSidebar
book={detail?.book || pendingBook || null}
@@ -1242,6 +1222,16 @@ function BookPageInner() {
</div>
</div>
+ {displayView === 'reader' && !chatOpen && (
+ <button
+ onClick={() => setChatOpen(true)}
+ className="absolute bottom-4 right-4 inline-flex items-center gap-2 rounded-full bg-[var(--primary)] px-4 py-2 text-sm font-medium text-[var(--primary-foreground)] shadow-lg hover:opacity-90"
+ >
+ <MessageSquare className="h-4 w-4" />
+ {t('Chat')}
+ </button>
+ )}
+
{displayView === 'reader' && chatOpen && (
<BookChatPanel
book={detail?.book || null}
@@ -1253,7 +1243,6 @@ function BookPageInner() {
/>
)}
</main>
- </div>
</div>
)
}
diff --git a/web/app/(workspace)/learning/books/components/BookCreator.tsx b/web/app/(workspace)/learning/books/components/BookCreator.tsx
index 9346196a8..58d90cd3b 100644
--- a/web/app/(workspace)/learning/books/components/BookCreator.tsx
+++ b/web/app/(workspace)/learning/books/components/BookCreator.tsx
@@ -1,6 +1,6 @@
'use client'
-import { FeaturePage, PageHeader } from '@/components/layout/FeaturePage'
+import { PageContainer, PageHeader } from '@/components/layout/FeaturePage'
import { useEffect, useRef, useState, type ReactNode } from 'react'
import { ChevronUp, Database, Loader2, Pencil, Sparkles } from 'lucide-react'
import { useTranslation } from 'react-i18next'
@@ -161,7 +161,8 @@ export default function BookCreator({
: []
return (
- <FeaturePage breadcrumb={back}>
+ <PageContainer>
+ {back && <div className="mb-5">{back}</div>}
<PageHeader title={t('Create a new book')} description={t('Describe what you want to learn, then pick the knowledge sources to fuse into a structured, interactive book.')} />
<div className="space-y-5">
@@ -334,7 +335,7 @@ export default function BookCreator({
</div>
)}
</div>
- </FeaturePage>
+ </PageContainer>
)
}
diff --git a/web/app/(workspace)/learning/mastery/[pathId]/page.tsx b/web/app/(workspace)/learning/mastery/[pathId]/page.tsx
index 5e07f9c1a..5b4336758 100644
--- a/web/app/(workspace)/learning/mastery/[pathId]/page.tsx
+++ b/web/app/(workspace)/learning/mastery/[pathId]/page.tsx
@@ -1,6 +1,5 @@
"use client";
-import { PageToolbar } from '@/components/layout/PageToolbar'
import { PageContainer, PAGE_DESCRIPTION_CLASS } from '@/components/layout/FeaturePage'
import { scopedUrl } from "@/lib/workspace-scope";
import { MASTERY_HOME, masterySessionRoute as existingMasterySessionRoute, masterySessionsRoute } from "@/lib/learning-routes";
@@ -320,9 +319,8 @@ export default function MasteryTopicPage() {
// no second column to balance, and a fixed-height stack there would just
// be three tiny scrollers.
<main className="mastery-shell flex h-full flex-col overflow-y-auto [scrollbar-gutter:stable]">
-
- <PageToolbar className="sticky top-0 z-20">
- <div className="dt-toolbar-identity">
+ <PageContainer className="flex min-h-0 flex-1 flex-col pb-40 sm:pb-10">
+ <div className="flex items-center justify-between gap-3">
<Link
href={scopedUrl(MASTERY_HOME)}
className="inline-flex items-center gap-1.5 text-xs font-medium text-[var(--muted-foreground)] hover:text-[var(--foreground)]"
@@ -330,10 +328,7 @@ export default function MasteryTopicPage() {
<ArrowLeft className="h-3.5 w-3.5" />
{t("Learning topics")}
</Link>
- <span className="dt-toolbar-separator" aria-hidden>/</span>
- <span className="dt-toolbar-title">{displayName}</span>
- </div>
- <div className="dt-toolbar-actions">
+ <div className="flex items-center gap-2">
<button
type="button"
onClick={(event) => openEditor(event.currentTarget)}
@@ -369,9 +364,8 @@ export default function MasteryTopicPage() {
</div>
</details>
</div>
- </PageToolbar>
+ </div>
- <PageContainer className="flex min-h-0 flex-1 flex-col pb-40 sm:pb-10">
<header className="dt-page-header mt-5 mb-6 flex flex-col gap-4">
<div className="min-w-0">
<div className="flex items-center gap-3">
diff --git a/web/app/(workspace)/partners/[partnerId]/page.tsx b/web/app/(workspace)/partners/[partnerId]/page.tsx
index ceba825ce..6b9292ec9 100644
--- a/web/app/(workspace)/partners/[partnerId]/page.tsx
+++ b/web/app/(workspace)/partners/[partnerId]/page.tsx
@@ -5,7 +5,6 @@
* Header carries identity + run state; everything else lives in the tabs.
*/
-import { PageToolbar } from '@/components/layout/PageToolbar'
import { Suspense, useCallback, useEffect, useMemo, useRef, useState } from "react";
import Link from "next/link";
import { useParams, useRouter, useSearchParams } from "next/navigation";
@@ -502,8 +501,8 @@ function PartnerDetail() {
return (
<div className="flex h-full flex-col">
{/* Header */}
- <PageToolbar>
- <div className="dt-toolbar-identity">
+ <div className="grid min-h-[64px] grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center gap-3 border-b border-[var(--border)] px-5 py-3">
+ <div className="flex min-w-0 items-center gap-3">
<Link
href="/partners"
aria-label={t("Back to Partners")}
@@ -541,9 +540,25 @@ function PartnerDetail() {
</div>
</div>
+ <nav className="flex justify-self-center gap-0.5 rounded-lg bg-[var(--muted)] p-0.5">
+ {tabs.map(({ key, label, icon: Icon }) => (
+ <button
+ key={key}
+ type="button"
+ onClick={() => setTab(key)}
+ className={`inline-flex items-center gap-1.5 rounded-md px-2.5 py-1 text-[12px] transition-colors ${
+ activeTab === key
+ ? "bg-[var(--background)] font-medium text-[var(--foreground)] shadow-sm"
+ : "text-[var(--muted-foreground)] hover:text-[var(--foreground)]"
+ }`}
+ >
+ <Icon className="h-3.5 w-3.5" />
+ {label}
+ </button>
+ ))}
+ </nav>
-
- <div className="dt-toolbar-actions">
+ <div className="flex min-w-0 items-center justify-end gap-0.5">
<Tooltip label={t("Share this conversation across browsers")}>
<label className="mr-1 inline-flex cursor-pointer items-center gap-1.5 text-[11px] text-[var(--muted-foreground)]">
<input
@@ -644,24 +659,7 @@ function PartnerDetail() {
</>
) : null}
</div>
- </PageToolbar>
- <nav className="dt-page-view-tabs">
- {tabs.map(({ key, label, icon: Icon }) => (
- <button
- key={key}
- type="button"
- onClick={() => setTab(key)}
- className={`inline-flex items-center gap-1.5 rounded-md px-2.5 py-1 text-[12px] transition-colors ${
- activeTab === key
- ? "bg-[var(--background)] font-medium text-[var(--foreground)] shadow-sm"
- : "text-[var(--muted-foreground)] hover:text-[var(--foreground)]"
- }`}
- >
- <Icon className="h-3.5 w-3.5" />
- {label}
- </button>
- ))}
- </nav>
+ </div>
{showLinkModal ? (
<PartnerLinkModal
diff --git a/web/app/(workspace)/partners/groups/[groupId]/page.tsx b/web/app/(workspace)/partners/groups/[groupId]/page.tsx
index 98caa22ff..26a069de0 100644
--- a/web/app/(workspace)/partners/groups/[groupId]/page.tsx
+++ b/web/app/(workspace)/partners/groups/[groupId]/page.tsx
@@ -1,6 +1,5 @@
"use client";
-import { PageToolbar } from '@/components/layout/PageToolbar'
import { useCallback, useEffect, useMemo, useState } from "react";
import Link from "next/link";
import { useParams, useRouter, useSearchParams } from "next/navigation";
@@ -125,7 +124,7 @@ export default function PartnerGroupPage() {
return (
<div className="flex h-full min-h-0 flex-col">
{selectionError && <div role="alert" className="border-b border-border px-6 py-2 text-xs text-destructive">{selectionError}</div>}
- <PageToolbar>
+ <header className="flex shrink-0 items-center justify-between gap-4 border-b border-[var(--border)] px-4 py-3 sm:px-6">
<div className="flex min-w-0 items-center gap-3">
<Link
href="/partners"
@@ -167,7 +166,7 @@ export default function PartnerGroupPage() {
</div>
</div>
- <div className="dt-toolbar-actions">
+ <div className="flex shrink-0 items-center gap-1.5">
{sessionKey ? (
<GroupSessionPicker
groupId={groupId}
@@ -217,7 +216,7 @@ export default function PartnerGroupPage() {
{t("Manage")}
</button>
</div>
- </PageToolbar>
+ </header>
<PartnerGroupChat
group={group}
diff --git a/web/app/(workspace)/partners/groups/new/page.tsx b/web/app/(workspace)/partners/groups/new/page.tsx
index 7ca594f49..84082a7c6 100644
--- a/web/app/(workspace)/partners/groups/new/page.tsx
+++ b/web/app/(workspace)/partners/groups/new/page.tsx
@@ -74,13 +74,14 @@ export default function NewPartnerGroupPage() {
};
return (
- <FeaturePage breadcrumb={
+ <FeaturePage>
<Link
href="/partners"
- className="inline-flex items-center gap-1.5 text-[12px] text-[var(--muted-foreground)] transition-colors hover:text-[var(--foreground)]"
+ className="mb-5 inline-flex items-center gap-1.5 text-[12px] text-[var(--muted-foreground)] transition-colors hover:text-[var(--foreground)]"
>
<ArrowLeft size={14} /> {t("Partners")}
- </Link>}>
+ </Link>
+
<PageHeader title={t("Create a Partner Group")} description={t("Choose at least two Partners, then how they should discuss.")} />
{/* A live card of the thing being made: emoji, colour and name only mean
diff --git a/web/app/(workspace)/whisper/page.tsx b/web/app/(workspace)/whisper/page.tsx
index 172df42d0..2eeb19230 100644
--- a/web/app/(workspace)/whisper/page.tsx
+++ b/web/app/(workspace)/whisper/page.tsx
@@ -1,6 +1,5 @@
"use client";
-import { PageToolbar } from '@/components/layout/PageToolbar'
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
import { useTranslation } from "react-i18next";
import { Ear, Loader2 } from "lucide-react";
@@ -311,7 +310,7 @@ export default function WhisperPage() {
return (
<div className="flex h-full min-h-0 flex-col">
- <PageToolbar>
+ <header className="flex flex-wrap items-center justify-between gap-3 border-b border-[var(--border)] px-4 py-3">
<div className="min-w-0">
<div className="flex items-center gap-2 text-sm font-medium text-[var(--foreground)]">
<Ear className="h-4 w-4 text-[var(--primary)]" aria-hidden />
@@ -369,7 +368,7 @@ export default function WhisperPage() {
</span>
)}
</div>
- </PageToolbar>
+ </header>
{(crisisHit || roomClosed) && (
<div
diff --git a/web/app/globals.css b/web/app/globals.css
index 9157b29cb..0f3e09938 100644
--- a/web/app/globals.css
+++ b/web/app/globals.css
@@ -1457,23 +1457,21 @@ a[href^="#dt-locator-"]:hover {
/* dt-exp: the same application, with four contextual navigation shelves. */
.dt-product-sidebar { container-type: inline-size; border-right: 1px solid var(--border); }
-/* Stable, labelled destinations with a theme-colored position marker. */
-.dt-product-sidebar .dt-category-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 3px 10px 9px; flex-shrink: 0; }
-.dt-category-bar [role="tablist"] { display: flex; flex: 1; align-items: center; min-width: 0; gap: 3px; }
-.dt-category-tab-wrap { flex: 1; min-width: 0; }
-.dt-category-bar [role="tab"] { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; min-width: 0; height: 54px; gap: 5px; padding: 6px 2px 8px; color: var(--muted-foreground); border-radius: 8px; transition: color 140ms, background-color 140ms; }
-.dt-category-label { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: 11px; line-height: 15px; font-weight: 500; white-space: nowrap; }
-.dt-category-bar [role="tab"].is-active { color: var(--primary); background: color-mix(in srgb, var(--primary) 7%, transparent); }
-.dt-category-bar [role="tab"].is-active .dt-category-label { font-weight: 600; }
-.dt-category-indicator { position: absolute; bottom: 0; left: calc(50% - 10px); width: 20px; height: 2px; border-radius: 2px; background: var(--primary); }
+.dt-product-sidebar .dt-category-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 4px 10px 10px; flex-shrink: 0; }
+.dt-category-bar [role="tablist"] { display: flex; flex: 1; align-items: center; min-width: 0; gap: 1px; }
+.dt-category-bar [role="tab"] { position: relative; display: flex; align-items: center; justify-content: center; flex: 1; min-width: 30px; height: 36px; gap: 7px; padding: 0 7px; color: var(--muted-foreground); border-radius: 10px; transition: color 140ms, background-color 140ms; }
+.dt-category-bar [role="tab"] > svg, .dt-category-bar [role="tab"] > span:not(.dt-category-pill) { position: relative; z-index: 1; flex-shrink: 0; }
+.dt-category-bar [role="tab"] > span:not(.dt-category-pill) { display: none; font-size: 13px; font-weight: 600; white-space: nowrap; }
+.dt-category-bar [role="tab"].is-active { flex: 1.9; color: var(--foreground); }
+.dt-category-bar [role="tab"].is-active > span:not(.dt-category-pill) { display: inline; }
+.dt-category-pill { position: absolute; inset: 0; border-radius: 10px; background: var(--accent); }
.dt-category-bar [role="tab"]:not(.is-active):hover, .dt-nav-icon:hover { background: var(--accent); color: var(--foreground); }
.dt-nav-icon { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 6px; color: var(--muted-foreground); transition: background-color 140ms, color 140ms; }
.dt-category-bar button:focus-visible, .dt-navigation-row:focus-visible, .dt-nav-icon:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.dt-product-sidebar .dt-category-bar.is-collapsed { flex-direction: column; padding: 4px; }
.dt-category-bar.is-collapsed [role="tablist"] { flex-direction: column; gap: 5px; }
-.dt-category-bar.is-collapsed [role="tab"] { width: 38px; height: 38px; padding: 0; }
-.dt-category-bar.is-collapsed .dt-category-label { display: none; }
-.dt-category-bar.is-collapsed .dt-category-indicator { top: calc(50% - 8px); bottom: auto; left: 0; width: 2px; height: 16px; }
+.dt-category-bar.is-collapsed [role="tab"] { width: 38px; height: 38px; flex: none; }
+.dt-category-bar.is-collapsed [role="tab"] > span:not(.dt-category-pill) { display: none; }
.dt-nav-search { width: 100%; margin-top: 8px; height: 32px; background: var(--background); border: 1px solid var(--border); border-radius: 7px; padding: 0 9px; font-size: 12px; outline: none; }
.dt-nav-search:focus { border-color: var(--ring); }
.dt-category-content { padding: 0 8px 16px; }
@@ -1509,7 +1507,7 @@ a[href^="#dt-locator-"]:hover {
.dt-navigation-view-all:focus-visible, .dt-partner-roster-item:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
.dt-new-conversation { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 40px; margin: 4px 3px 8px; border: 1px solid var(--border); border-radius: 22px; background: var(--background); font-size: 13px; font-weight: 500; box-shadow: 0 2px 5px rgb(0 0 0 / .025); transition: background-color 140ms, box-shadow 140ms; }
.dt-new-conversation:hover { background: var(--accent); box-shadow: 0 2px 8px rgb(0 0 0 / .045); }
-
+@container (max-width: 240px) { .dt-category-bar [role="tab"] { padding: 0 4px; gap: 4px; } .dt-category-bar [role="tab"] > span:not(.dt-category-pill) { font-size: 12px; } }
@media (prefers-reduced-motion: reduce) { .dt-category-content { animation: none; } .dt-product-sidebar * { transition-duration: 0ms !important; } }
@@ -1531,28 +1529,3 @@ a[href^="#dt-locator-"]:hover {
.dt-learning-time-group > h2 { padding: 8px 9px 5px; font-size: 11px; font-weight: 500; color: var(--muted-foreground); }
.dt-learning-time-group .dt-navigation-row { min-height: 38px; gap: 8px; }
.dt-record-time { flex-shrink: 0; max-width: 38%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 400; color: var(--muted-foreground); opacity: .75; }
-
-/* A shared, viewport-aligned page header across libraries and workspaces. */
-.dt-page-toolbar-host { min-height: 52px; flex-shrink: 0; position: relative; z-index: 20; }
-.dt-page-toolbar { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; min-width: 0; min-height: 52px; gap: 12px; padding: 7px 20px; border-bottom: 1px solid color-mix(in srgb, var(--border) 65%, transparent); background: var(--background); color: var(--foreground); font-size: 13px; }
-.dt-toolbar-identity { display: flex; align-items: center; flex: 1; min-width: 0; gap: 8px; }
-.dt-toolbar-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: inherit; font-size: 14px; line-height: 22px; font-weight: 600; letter-spacing: -.01em; }
-.dt-toolbar-breadcrumb { flex-shrink: 0; max-width: 40%; }
-.dt-toolbar-breadcrumb > a { max-width: 100%; white-space: nowrap; }
-.dt-toolbar-separator { flex-shrink: 0; color: var(--muted-foreground); opacity: .35; }
-.dt-toolbar-actions { display: flex; align-items: center; justify-content: flex-end; flex-shrink: 0; gap: 4px; }
-.dt-toolbar-actions > div { display: flex; align-items: center; gap: 4px; }
-.dt-page-toolbar [data-page-actions] > button,
-.dt-page-toolbar [data-page-actions] > a,
-.dt-page-toolbar [data-page-actions] > div > button,
-.dt-page-toolbar [data-page-actions] > div > a,
-.dt-page-toolbar .dt-page-action { min-height: 32px; padding-top: 5px; padding-bottom: 5px; }
-.dt-toolbar-actions > button,
-.dt-toolbar-actions > a,
-.dt-toolbar-actions > span > button { min-width: 32px; min-height: 32px; border-radius: 6px; }
-.dt-page-toolbar button:focus-visible, .dt-page-toolbar a:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
-@media (max-width: 767px) {
- .dt-page-toolbar { padding: 7px 12px; flex-wrap: wrap; gap: 8px; }
- .dt-toolbar-actions { flex-wrap: wrap; max-width: 100%; }
-}
-.dt-page-view-tabs { display: flex; flex-shrink: 0; align-items: center; gap: 4px; min-height: 40px; padding: 4px 20px; border-bottom: 1px solid var(--border); overflow-x: auto; }
diff --git a/web/components/knowledge/KnowledgeBaseDetail.tsx b/web/components/knowledge/KnowledgeBaseDetail.tsx
index bc7ad4e8c..8c79ae53e 100644
--- a/web/components/knowledge/KnowledgeBaseDetail.tsx
+++ b/web/components/knowledge/KnowledgeBaseDetail.tsx
@@ -1,6 +1,5 @@
"use client";
-import { PageToolbar } from '@/components/layout/PageToolbar'
import Tooltip from "@/shared/ui/Tooltip";
import { knowledgeBaseRef } from "@/lib/knowledge-helpers";
import type { EmbeddingModelSelection } from "@/features/knowledge/model/types";
@@ -207,49 +206,63 @@ export default function KnowledgeBaseDetail({
return (
<main className="flex h-full flex-1 flex-col overflow-hidden bg-[var(--background)]">
{/* Header */}
- <PageToolbar>
- <div className="dt-toolbar-identity">
+ <div className="border-b border-[var(--border)] bg-[var(--card)] px-6 py-4">
+ <div className="flex items-start justify-between gap-3">
+ <div className="flex min-w-0 flex-1 items-start gap-3">
<KnowledgeEngineIcon
engine={knowledgeSourceIconId({
provider: kbProvider(kb),
type: kb.metadata?.type,
})}
- size={20}
- className="shrink-0"
+ size={36}
+ className="mt-0.5"
/>
- <div className="dt-toolbar-identity">
+ <div className="min-w-0 flex-1">
{onBack && (
<button
type="button"
onClick={onBack}
- className="shrink-0 inline-flex items-center gap-1 text-[11.5px] font-medium text-[var(--muted-foreground)] transition-colors hover:text-[var(--foreground)]"
+ className="mb-1.5 inline-flex items-center gap-1 text-[11.5px] font-medium text-[var(--muted-foreground)] transition-colors hover:text-[var(--foreground)]"
>
<ArrowLeft className="h-3.5 w-3.5" />
- {t('Knowledge bases')}
+ {t("Knowledge bases")}
</button>
)}
- <div className="flex min-w-0 items-center gap-2">
- <h1 className="dt-toolbar-title">{kb.name}</h1>
+ <div className="flex flex-wrap items-center gap-2">
+ <h1 className="truncate font-serif text-[18px] font-semibold tracking-tight text-[var(--foreground)]">
+ {kb.name}
+ </h1>
{kb.is_default && (
<span className="inline-flex items-center gap-1 rounded-full bg-amber-100 px-2 py-0.5 text-[10px] font-medium text-amber-700 dark:bg-amber-950/30 dark:text-amber-300">
<Star className="h-3 w-3" fill="currentColor" />
- {t('Default')}
+ {t("Default")}
</span>
)}
{(kb.assigned || kb.provenance_label) && (
<span className="inline-flex items-center rounded-full bg-emerald-500/10 px-2 py-0.5 text-[10px] font-medium text-emerald-700 dark:text-emerald-300">
- {kb.provenance_label || t('Assigned by admin')}
+ {kb.provenance_label || t("Assigned by admin")}
</span>
)}
- <KbStatusBadge kb={kb} isReindexingLocally={isReindexingLocally} />
+ <KbStatusBadge
+ kb={kb}
+ isReindexingLocally={isReindexingLocally}
+ />
</div>
+ <p className="mt-1 text-[12px] text-[var(--muted-foreground)]">
+ {provider}
+ {!pageIndexProvider ? ` · ${embeddingLabel}` : ""} ·{" "}
+ {t("Updated")} {updatedLabel}
+ {lastIndexedLabel
+ ? ` · ${t("Last indexed")} ${lastIndexedLabel}`
+ : ""}
+ </p>
+ <LightRagEmbeddingWarning kb={kb} />
</div>
</div>
{canRetry && (
- <Tooltip
- label={t('Retry indexing from the documents already stored in this knowledge base.')}
- side="top"
- >
+ <Tooltip label={t(
+ "Retry indexing from the documents already stored in this knowledge base.",
+ )} side="top">
<button
type="button"
onClick={handleRetry}
@@ -262,20 +275,17 @@ export default function KnowledgeBaseDetail({
<RefreshCw className="h-3 w-3" />
)}
{retrySubmitting || isReindexingLocally
- ? t('Retrying…')
- : t(kbProvider(kb) === 'lightrag' ? 'Review rebuild' : 'Retry indexing')}
+ ? t("Retrying…")
+ : t(
+ kbProvider(kb) === "lightrag"
+ ? "Review rebuild"
+ : "Retry indexing",
+ )}
</button>
</Tooltip>
)}
- </PageToolbar>
+ </div>
- <div className="border-b border-[var(--border)] px-5 py-3">
- <p className="mt-1 text-[12px] text-[var(--muted-foreground)]">
- {provider}
- {!pageIndexProvider ? ` · ${embeddingLabel}` : ''} · {t('Updated')} {updatedLabel}
- {lastIndexedLabel ? ` · ${t('Last indexed')} ${lastIndexedLabel}` : ''}
- </p>
- <LightRagEmbeddingWarning kb={kb} />
{/* Section nav */}
<nav className="-mb-3 mt-3 flex gap-1 overflow-x-auto">
{sections.map((key) => {
diff --git a/web/components/layout/FeaturePage.tsx b/web/components/layout/FeaturePage.tsx
index c1fff4532..a4c973576 100644
--- a/web/components/layout/FeaturePage.tsx
+++ b/web/components/layout/FeaturePage.tsx
@@ -1,52 +1,13 @@
-'use client'
-
-import {
- createContext,
- useContext,
- useState,
- type ComponentPropsWithRef,
- type ReactNode,
- type Ref,
- type UIEventHandler,
-} from 'react'
-import { createPortal } from 'react-dom'
-import { PageToolbar } from './PageToolbar'
-
-const PageChromeContext = createContext<{
- host: HTMLDivElement | null
- breadcrumb?: ReactNode
-} | null>(null)
-
-/** A stable toolbar slot outside the page's scrollport. A portal preserves the
- * page's state/providers while placing its real actions at the same screen edge.
- * The reserved height also prevents a layout jump while the slot mounts. */
-export function PageFrame({
- children,
- breadcrumb,
-}: {
- children: ReactNode
- breadcrumb?: ReactNode
-}) {
- const [host, setHost] = useState<HTMLDivElement | null>(null)
- return (
- <PageChromeContext.Provider value={{ host, breadcrumb }}>
- <div className="flex h-full min-h-0 min-w-0 flex-1 flex-col">
- <div ref={setHost} className="dt-page-toolbar-host" />
- {children}
- </div>
- </PageChromeContext.Provider>
- )
-}
+import type { ComponentPropsWithRef, ReactNode, Ref, UIEventHandler } from 'react'
/** Feature page standard, based on Personalized Learning:
* - Centered 1180px outer box; horizontal gutters 24px, 36px from 768px.
* - Vertical padding 28px, 36px from 1024px; 24px from header to content.
- * - Compact 14px identity in the toolbar; standalone headings remain 27px / 30px.
+ * - Sans page title 27px / 30px at 640px of usable content; no title icon.
* - Sans description 12.5px, section label 13.5px; one h1 per page.
- * - Page actions align right; secondary section actions stay with their section.
+ * - Actions stack below the title under 640px of content and wrap in order.
* - Grids share 520 / 800 / 1040px container breakpoints and a 12px gap.
- * - Page identity/actions use the fixed toolbar slot; descriptions stay in the body.
- * - Readers, editors and chats share PageToolbar and retain their working tools.
+ * - Readers, editors and chats retain pane-specific working toolbars.
* Use FeaturePage once per scrolling page, or PageContainer inside an
* existing scroller. Child components must not add another page gutter.
*/
@@ -72,32 +33,26 @@ export function FeaturePage({
className = '',
scrollRef,
onScroll,
- breadcrumb,
}: {
children: ReactNode
className?: string
scrollRef?: Ref<HTMLElement>
onScroll?: UIEventHandler<HTMLElement>
- breadcrumb?: ReactNode
}) {
return (
- <PageFrame breadcrumb={breadcrumb}>
- <section
- ref={scrollRef}
- onScroll={onScroll}
- data-feature-page
- className={`flex-1 min-h-0 w-full min-w-0 overflow-y-auto bg-[var(--background)] text-[var(--foreground)] [scrollbar-gutter:stable] ${className}`}
- >
- <PageContainer>{children}</PageContainer>
- </section>
- </PageFrame>
+ <section
+ ref={scrollRef}
+ onScroll={onScroll}
+ data-feature-page
+ className={`h-full min-h-0 w-full min-w-0 overflow-y-auto bg-[var(--background)] text-[var(--foreground)] [scrollbar-gutter:stable] ${className}`}
+ >
+ <PageContainer>{children}</PageContainer>
+ </section>
)
}
-export const PAGE_TITLE_CLASS =
- 'dt-page-title min-w-0 break-words font-sans font-semibold leading-normal tracking-[-0.02em] text-[var(--foreground)]'
-export const PAGE_DESCRIPTION_CLASS =
- 'mt-1.5 max-w-2xl text-[12.5px] leading-relaxed text-[var(--muted-foreground)]'
+export const PAGE_TITLE_CLASS = 'dt-page-title min-w-0 break-words font-sans font-semibold leading-normal tracking-[-0.02em] text-[var(--foreground)]'
+export const PAGE_DESCRIPTION_CLASS = 'mt-1.5 max-w-2xl text-[12.5px] leading-relaxed text-[var(--muted-foreground)]'
export const PAGE_SECTION_TITLE_CLASS = 'text-[13.5px] font-semibold text-[var(--foreground)]'
/** No decorative title icon or divider. Icons belong to cards and actions.
@@ -111,7 +66,6 @@ export function PageHeader({
level = 1,
titleId,
headingTour,
- breadcrumb,
}: {
title: ReactNode
description?: ReactNode
@@ -120,66 +74,20 @@ export function PageHeader({
level?: 1 | 2
titleId?: string
headingTour?: string
- breadcrumb?: ReactNode
}) {
- const chrome = useContext(PageChromeContext)
const Heading = level === 1 ? 'h1' : 'h2'
- if (level === 1 && chrome) {
- const trail = breadcrumb ?? chrome.breadcrumb
- return (
- <>
- {chrome.host &&
- createPortal(
- <PageToolbar>
- <div className="dt-toolbar-identity">
- {trail && (
- <>
- <div className="dt-toolbar-breadcrumb">{trail}</div>
- <span aria-hidden className="dt-toolbar-separator">
- /
- </span>
- </>
- )}
- <h1 id={titleId} data-tour={headingTour} className="dt-toolbar-title">
- {title}
- </h1>
- {meta}
- </div>
- {action && (
- <div data-page-actions className="dt-toolbar-actions">
- {action}
- </div>
- )}
- </PageToolbar>,
- chrome.host
- )}
- {description && <p className={`${PAGE_DESCRIPTION_CLASS} mb-6 !mt-0`}>{description}</p>}
- </>
- )
- }
return (
<header data-page-header className="dt-page-header mb-6 flex min-w-0 flex-col gap-4">
<div className="min-w-0">
<div className="flex flex-wrap items-center gap-2.5">
- <Heading
- id={titleId}
- data-tour={headingTour}
- className={level === 1 ? PAGE_TITLE_CLASS : PAGE_SECTION_TITLE_CLASS}
- >
+ <Heading id={titleId} data-tour={headingTour} className={level === 1 ? PAGE_TITLE_CLASS : PAGE_SECTION_TITLE_CLASS}>
{title}
</Heading>
{meta}
</div>
{description && <p className={PAGE_DESCRIPTION_CLASS}>{description}</p>}
</div>
- {action && (
- <div
- data-page-actions
- className="flex max-w-full shrink-0 flex-wrap items-center gap-2 [&>div]:max-w-full [&>div]:flex-wrap"
- >
- {action}
- </div>
- )}
+ {action && <div data-page-actions className="flex max-w-full shrink-0 flex-wrap items-center gap-2 [&>div]:max-w-full [&>div]:flex-wrap">{action}</div>}
</header>
)
}
diff --git a/web/components/layout/PageToolbar.tsx b/web/components/layout/PageToolbar.tsx
deleted file mode 100644
index d82d1658b..000000000
--- a/web/components/layout/PageToolbar.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-import type { ComponentPropsWithoutRef } from 'react'
-
-/** Shared page chrome; pane-specific editing tools belong below this bar. */
-export function PageToolbar({
- children,
- className = '',
- ...props
-}: ComponentPropsWithoutRef<'header'>) {
- return (
- <header {...props} data-page-toolbar className={`dt-page-toolbar ${className}`}>
- {children}
- </header>
- )
-}
diff --git a/web/components/learning/LearningShell.tsx b/web/components/learning/LearningShell.tsx
index d994a4a5f..8d5d6c9ff 100644
--- a/web/components/learning/LearningShell.tsx
+++ b/web/components/learning/LearningShell.tsx
@@ -37,16 +37,16 @@ export function LearningShell({
scrollRef={scrollRef}
onScroll={onScroll}
className={className}
- breadcrumb={back && (
+ >
+ {back && (
<Link
href={LEARNING_HUB}
- className="inline-flex items-center gap-1.5 text-xs text-[var(--muted-foreground)] hover:text-[var(--foreground)]"
+ className="mb-5 inline-flex items-center gap-1.5 text-xs text-[var(--muted-foreground)] hover:text-[var(--foreground)]"
>
<ArrowLeft size={14} />
- {t('navigation.learning')}
+ {t('Personalized Learning')}
</Link>
)}
- >
<PageHeader title={title} description={subtitle} action={action} meta={scopeChip} />
{tabs}
<div className={tabs ? 'mt-6' : ''}>{children}</div>
diff --git a/web/components/notebook/NotebookConsole.tsx b/web/components/notebook/NotebookConsole.tsx
index 2b3a0ed24..ab7cba871 100644
--- a/web/components/notebook/NotebookConsole.tsx
+++ b/web/components/notebook/NotebookConsole.tsx
@@ -1,6 +1,5 @@
"use client";
-import { PageToolbar } from '@/components/layout/PageToolbar'
import Link from "next/link";
import { useRouter } from "next/navigation";
import { useCallback, useEffect, useMemo, useState } from "react";
@@ -250,9 +249,10 @@ export default function NotebookConsole({
}
return (
- <div className="flex h-full min-h-0 flex-col bg-[var(--background)]">
- <PageToolbar>
- <div className="dt-toolbar-identity">
+ <div className="flex h-full min-h-0 bg-[var(--background)]">
+ {/* ── Notebook rail ─────────────────────────────────── */}
+ <aside className="flex w-[250px] shrink-0 flex-col border-r border-[var(--border)]">
+ <div className="flex flex-col gap-2.5 px-3 pb-2.5 pt-3">
<Link
href="/space"
className="group inline-flex w-fit items-center gap-1.5 text-[12px] text-[var(--muted-foreground)] transition-colors hover:text-[var(--foreground)]"
@@ -262,19 +262,22 @@ export default function NotebookConsole({
strokeWidth={1.8}
className="transition-transform group-hover:-translate-x-0.5"
/>
- {t('navigation.resources')}
+ {t("Learning Space")}
</Link>
- <span className="dt-toolbar-separator" aria-hidden>
- /
+
+ <div className="flex items-center justify-between">
+ <h1 className="flex items-center gap-1.5 font-serif text-[15px] font-semibold tracking-tight text-[var(--foreground)]">
+ <NotebookPen size={14} strokeWidth={1.7} />
+ {t("Notebooks")}
+ <span className="rounded-full bg-[var(--muted)] px-1.5 py-0.5 text-[10px] font-normal tabular-nums text-[var(--muted-foreground)]">
+ {scopedNotebooks.length}
</span>
- <h1 className="dt-toolbar-title">{t('Notebooks')}</h1>
- </div>
- <div className="dt-toolbar-actions">
- <Tooltip label={t('New notebook')} side="top">
+ </h1>
+ <Tooltip label={t("New notebook")} side="top">
<button
type="button"
- onClick={() => setCreating(v => !v)}
- aria-label={t('New notebook')}
+ onClick={() => setCreating((v) => !v)}
+ aria-label={t("New notebook")}
aria-expanded={creating}
className="rounded-md p-1.5 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-[var(--foreground)]"
>
@@ -282,20 +285,6 @@ export default function NotebookConsole({
</button>
</Tooltip>
</div>
- </PageToolbar>
- <div className="flex min-h-0 flex-1">
- {/* ── Notebook rail ─────────────────────────────────── */}
- <aside className="flex w-[250px] shrink-0 flex-col border-r border-[var(--border)]">
- <div className="flex flex-col gap-2.5 px-3 pb-2.5 pt-3">
- <div className="flex items-center justify-between">
- <h2 className="flex items-center gap-1.5 font-sans text-[13px] font-semibold tracking-tight text-[var(--foreground)]">
- <NotebookPen size={14} strokeWidth={1.7} />
- {t('Notebooks')}
- <span className="rounded-full bg-[var(--muted)] px-1.5 py-0.5 text-[10px] font-normal tabular-nums text-[var(--muted-foreground)]">
- {scopedNotebooks.length}
- </span>
- </h2>
- </div>
{creating && (
<div className="flex flex-col gap-1.5 rounded-lg border border-[var(--border)] bg-[var(--card)] p-2">
@@ -680,7 +669,6 @@ export default function NotebookConsole({
)}
</section>
- </div>
<ConfirmDialog
open={confirmingDelete && Boolean(selected)}
title={t("Delete this notebook?")}
diff --git a/web/components/reading/workspace/ReadingWorkspace.tsx b/web/components/reading/workspace/ReadingWorkspace.tsx
index 6c72dd85b..7dd46348b 100644
--- a/web/components/reading/workspace/ReadingWorkspace.tsx
+++ b/web/components/reading/workspace/ReadingWorkspace.tsx
@@ -1,6 +1,5 @@
"use client";
-import { PageToolbar } from '@/components/layout/PageToolbar'
import { scopedUrl } from "@/lib/workspace-scope";
import { READING_HOME, readingFolderRoute, readingSessionIdFromPath } from "@/lib/learning-routes";
@@ -449,7 +448,7 @@ export function ReadingWorkspacePage() {
data-reading-workspace=""
className="reading-v2 flex h-full min-h-0 flex-col overflow-hidden bg-[var(--background)] text-[var(--foreground)] dark:bg-[var(--background)] dark:text-[var(--foreground)]"
>
- <PageToolbar>
+ <header className="flex h-11 shrink-0 items-center gap-1.5 border-b border-[var(--border)] bg-[var(--card)] px-2.5">
<Link
href={readingFolderRoute(workspace.workspace_id)}
className="flex size-7 shrink-0 items-center justify-center rounded-md text-[var(--muted-foreground)] transition hover:bg-[var(--muted)]"
@@ -482,7 +481,7 @@ export function ReadingWorkspacePage() {
<button
type="button"
onClick={() => setShowRename(true)}
- className="min-w-0 max-w-[240px] truncate font-sans text-[14px] font-semibold tracking-[-0.01em] transition hover:text-[var(--primary)]"
+ className="min-w-0 max-w-[240px] truncate font-serif text-[13.5px] font-semibold tracking-[-0.01em] transition hover:text-[var(--primary)]"
>
{workspace.title}
</button>
@@ -499,7 +498,7 @@ export function ReadingWorkspacePage() {
</button>
</Tooltip>
- <div className="dt-toolbar-actions ml-auto">
+ <div className="ml-auto flex shrink-0 items-center gap-0.5">
{notice && (
<span className="hidden max-w-[220px] truncate px-2 text-[10px] text-[var(--muted-foreground)] 2xl:inline">
{notice}
@@ -586,7 +585,7 @@ export function ReadingWorkspacePage() {
</Tooltip>
)}
</div>
- </PageToolbar>
+ </header>
<div
ref={gridRef}
diff --git a/web/components/settings/SettingsMain.tsx b/web/components/settings/SettingsMain.tsx
index 8c95dc1ea..f97533573 100644
--- a/web/components/settings/SettingsMain.tsx
+++ b/web/components/settings/SettingsMain.tsx
@@ -1,6 +1,6 @@
'use client'
-import { PageContainer, PageFrame } from '@/components/layout/FeaturePage'
+import { PageContainer } from '@/components/layout/FeaturePage'
import { useEffect, useRef, useState } from 'react'
import { browserStorage } from '@/shared/storage'
import { usePathname, useRouter } from 'next/navigation'
@@ -77,7 +77,6 @@ export default function SettingsMain({ children }: { children: React.ReactNode }
<Menu size={20} />
</button>
</div>
- <PageFrame>
<div
ref={scroller}
data-settings-scroll
@@ -93,7 +92,6 @@ export default function SettingsMain({ children }: { children: React.ReactNode }
</PageContainer>
</div>
<SettingsToolbar />
- </PageFrame>
</main>
<Modal
isOpen={mobileOpen}
diff --git a/web/components/sidebar/CategoryNavigation.tsx b/web/components/sidebar/CategoryNavigation.tsx
index 25ce6c761..33035bc61 100644
--- a/web/components/sidebar/CategoryNavigation.tsx
+++ b/web/components/sidebar/CategoryNavigation.tsx
@@ -93,7 +93,7 @@ export function CategoryTabs({ nav, collapsed }: { nav: Navigation; collapsed: b
aria-orientation={collapsed ? 'vertical' : 'horizontal'}
>
{nav.categories.map((item, index) => (
- <Tooltip key={item.id} label={t(item.label)} side={collapsed ? 'right' : 'bottom'} className="dt-category-tab-wrap">
+ <Tooltip key={item.id} label={t(item.label)} side={collapsed ? 'right' : 'bottom'}>
<button
id={`category-${item.id}`}
type="button"
@@ -127,14 +127,13 @@ export function CategoryTabs({ nav, collapsed }: { nav: Navigation; collapsed: b
>
{nav.category === item.id && (
<m.span
- layoutId={`category-indicator-${id}`}
- className="dt-category-indicator"
- aria-hidden="true"
+ layoutId={`category-pill-${id}`}
+ className="dt-category-pill"
transition={{ duration: reduced ? 0 : 0.22, ease: [0.22, 1, 0.36, 1] }}
/>
)}
- <item.icon size={18} strokeWidth={nav.category === item.id ? 1.9 : 1.65} aria-hidden="true" />
- <span className="dt-category-label">{t(item.label)}</span>
+ <item.icon size={19} strokeWidth={1.65} />
+ <span>{t(item.label)}</span>
</button>
</Tooltip>
))}
diff --git a/web/components/space/SpaceMain.tsx b/web/components/space/SpaceMain.tsx
index becf30b5b..fab86d471 100644
--- a/web/components/space/SpaceMain.tsx
+++ b/web/components/space/SpaceMain.tsx
@@ -34,7 +34,12 @@ export default function SpaceMain({
const isDashboard = pathname === "/space";
return (
- <FeaturePage breadcrumb={!isDashboard && <BackToHub />}>
+ <FeaturePage>
+ {!isDashboard && (
+ <div className="mb-5">
+ <BackToHub />
+ </div>
+ )}
{['/space/skills', '/space/mcp'].includes(pathname) && (
<div className="mb-5 rounded-lg border border-[var(--border)] p-3 text-sm text-[var(--muted-foreground)]">
<ResourceLibraryNote />
diff --git a/web/components/space/learning/MasteryStudy.tsx b/web/components/space/learning/MasteryStudy.tsx
index 5ea3a774e..ffdb96c57 100644
--- a/web/components/space/learning/MasteryStudy.tsx
+++ b/web/components/space/learning/MasteryStudy.tsx
@@ -1,6 +1,5 @@
"use client";
-import { PageToolbar } from '@/components/layout/PageToolbar'
import { scopedUrl } from "@/lib/workspace-scope";
import { MASTERY_HOME, masterySessionsRoute, masteryTopicRoute } from "@/lib/learning-routes";
@@ -575,7 +574,7 @@ export function MasteryStudy({
as a single "where am I" statement, and the ring + count are one
unit rather than a ring on the left and its own number on the
right saying the same thing twice. */}
- <PageToolbar>
+ <header className="flex h-[56px] shrink-0 items-center gap-1 border-b border-[var(--border)] bg-[var(--background)]/95 px-3 backdrop-blur sm:px-4">
<Tooltip label={t("Learning topics")} side="bottom">
<Link
href={masteryTopicRoute(pathId)}
@@ -614,7 +613,7 @@ export function MasteryStudy({
className="hidden shrink-0 sm:flex"
/>
- <div className="dt-toolbar-actions">
+ <div className="flex shrink-0 items-center gap-1.5 pl-2">
<Tooltip label={t("Save to Notebook")}>
<button
type="button"
@@ -645,7 +644,7 @@ export function MasteryStudy({
{completed}/{total}
</span>
</div>
- </PageToolbar>
+ </header>
<div className="flex min-h-0 flex-1">
<aside
diff --git a/web/features/chat/components/ChatWorkspace.tsx b/web/features/chat/components/ChatWorkspace.tsx
index b97882073..35f607b66 100644
--- a/web/features/chat/components/ChatWorkspace.tsx
+++ b/web/features/chat/components/ChatWorkspace.tsx
@@ -1,6 +1,5 @@
"use client";
-import { PageToolbar } from '@/components/layout/PageToolbar'
import { COMMAND_CONFIRMATION_FAILED } from "@/features/chat/transport/command-delivery";
import { ResourceReuseContext, useResourceReusePolicy } from "@/components/chat/home/ResourceReuse";
@@ -2394,7 +2393,7 @@ export default function ChatWorkspace() {
data-viewer-open={viewerPanelOpen ? "true" : "false"}
className="chat-preview-shell flex h-full flex-col overflow-hidden bg-[var(--background)]"
>
- <PageToolbar>
+ <div className="mx-auto flex w-full max-w-[960px] flex-wrap items-center justify-between gap-x-3 gap-y-1.5 px-6 pt-3 pb-0">
<div className="group/title min-w-0 flex flex-1 items-center gap-2">
{/* Where this conversation lives, ahead of its title — the same
breadcrumb the composer pill writes, so an opened
@@ -2429,7 +2428,7 @@ export default function ChatWorkspace() {
onKeyDown={handleSessionTitleKeyDown}
disabled={sessionTitleSaving}
aria-label={t("Session title")}
- className="min-w-0 flex-1 rounded-xl border border-[var(--border)] bg-[var(--background)] px-3 py-1.5 font-sans text-[14px] font-semibold tracking-[-0.01em] text-[var(--foreground)] shadow-sm outline-none transition focus:border-[var(--ring)] focus:ring-2 focus:ring-[var(--ring)]/20 disabled:opacity-60"
+ className="min-w-0 flex-1 rounded-xl border border-[var(--border)] bg-[var(--background)] px-3 py-1.5 font-serif text-[17px] font-semibold tracking-[-0.01em] text-[var(--foreground)] shadow-sm outline-none transition focus:border-[var(--ring)] focus:ring-2 focus:ring-[var(--ring)]/20 disabled:opacity-60"
maxLength={100}
/>
) : (
@@ -2443,7 +2442,7 @@ export default function ChatWorkspace() {
type="button"
onClick={startSessionTitleEdit}
disabled={!canRenameSession}
- className="inline-flex min-w-0 max-w-full items-center gap-2 rounded-xl px-2 py-1 text-left font-sans text-[14px] font-semibold tracking-[-0.01em] text-[var(--foreground)] transition hover:bg-[var(--muted)]/55 disabled:cursor-default disabled:hover:bg-transparent"
+ className="inline-flex min-w-0 max-w-full items-center gap-2 rounded-xl px-2 py-1 text-left font-serif text-[17px] font-semibold tracking-[-0.01em] text-[var(--foreground)] transition hover:bg-[var(--muted)]/55 disabled:cursor-default disabled:hover:bg-transparent"
>
<span className="truncate">{displaySessionTitle}</span>
{canRenameSession ? (
@@ -2463,7 +2462,7 @@ export default function ChatWorkspace() {
</span>
) : null}
</div>
- <div className="dt-toolbar-actions">
+ <div className="flex shrink-0 items-center gap-0.5">
<HeaderActionButton
onClick={() => setShowSaveModal(true)}
disabled={!chatSavePayload}
@@ -2491,7 +2490,7 @@ export default function ChatWorkspace() {
title={t("Session activity, attachments & previews")}
/>
</div>
- </PageToolbar>
+ </div>
<div className="flex w-full flex-1 min-h-0 flex-col">
{sessionLoading || sessionLoadFailed ? (
<div className="flex w-full flex-1 min-h-0 justify-center px-6">
diff --git a/web/features/co-writer/components/CoWriterWorkspace.tsx b/web/features/co-writer/components/CoWriterWorkspace.tsx
index 30236f76c..9fdeb93f0 100644
--- a/web/features/co-writer/components/CoWriterWorkspace.tsx
+++ b/web/features/co-writer/components/CoWriterWorkspace.tsx
@@ -1,6 +1,5 @@
"use client";
-import { PageToolbar } from '@/components/layout/PageToolbar'
import { knowledgeBaseRef } from "@/lib/knowledge-helpers";
import dynamic from "next/dynamic";
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
@@ -1702,7 +1701,7 @@ export default function CoWriterWorkspace({ docId, onBack }: CoWriterWorkspacePr
return (
<div className="flex h-full min-h-full flex-col overflow-hidden bg-[var(--background)]">
{/* ── Top bar ── */}
- <PageToolbar>
+ <header className="flex shrink-0 items-center justify-between border-b border-[var(--border)] px-4 py-1.5">
<div className="flex min-w-0 items-center gap-3 text-sm text-[var(--muted-foreground)]">
<Tooltip label={t("Back to documents")}>
<button
@@ -1773,7 +1772,7 @@ export default function CoWriterWorkspace({ docId, onBack }: CoWriterWorkspacePr
</span>
) : null}
</div>
- <div className="dt-toolbar-actions">
+ <div className="flex items-center gap-2">
<ToolbarIconBtn
title={t("Clear")}
onClick={requestClearDocument}
@@ -1828,7 +1827,7 @@ export default function CoWriterWorkspace({ docId, onBack }: CoWriterWorkspacePr
{t("Full Draft")}
</button>
</div>
- </PageToolbar>
+ </header>
{/* ── Toolbar ── */}
<div className="flex shrink-0 items-center gap-0.5 overflow-x-auto border-b border-[var(--border)] px-3 py-1">
diff --git a/web/features/settings/sections/DataMigrationSettingsSection.tsx b/web/features/settings/sections/DataMigrationSettingsSection.tsx
index b5fadbc97..d68da0a62 100644
--- a/web/features/settings/sections/DataMigrationSettingsSection.tsx
+++ b/web/features/settings/sections/DataMigrationSettingsSection.tsx
@@ -6,7 +6,6 @@ import { Download, FolderInput, RefreshCw } from 'lucide-react'
import { apiFetch, apiUrl } from '@/lib/api'
import { useChatWorkspaces } from '@/hooks/useChatWorkspaces'
import { activeWorkspaceId } from '@/lib/workspace-scope'
-import { SettingsPageHeader } from '@/components/settings/shared'
type Feature = {
feature: string
@@ -187,7 +186,7 @@ export default function DataMigrationSettingsSection() {
)
return (
<section className="space-y-5">
- <SettingsPageHeader title={text('Data migration', '数据迁移')} />
+ <h2 className="text-lg font-semibold">{text('Data migration', '数据迁移')}</h2>
<p className="text-sm leading-relaxed text-[var(--muted-foreground)]">
{text(
'Discover stored learning data, move it with its related conversations, or download an archive. Verified recovery copies are retained after migration.',
diff --git a/web/features/settings/sections/GuardianSettingsSection.tsx b/web/features/settings/sections/GuardianSettingsSection.tsx
index bc5c64f17..215a33709 100644
--- a/web/features/settings/sections/GuardianSettingsSection.tsx
+++ b/web/features/settings/sections/GuardianSettingsSection.tsx
@@ -1,6 +1,5 @@
"use client";
-import { SettingsPageHeader } from '@/components/settings/shared'
import { useStagedSettings } from "@/features/settings/store/useStagedSettings";
import { useEffect, useState } from "react";
import {
@@ -176,8 +175,11 @@ export default function GuardianSettingsPage() {
};
return (
- <main className="max-w-3xl">
- <SettingsPageHeader title={t("Guardian management")} description={t("Review authorized learners and their approved learning materials.")} />
+ <main className="mx-auto max-w-3xl px-6 py-8">
+ <h1 className="text-xl font-semibold">{t("Guardian management")}</h1>
+ <p className="mt-1 text-sm text-[var(--muted-foreground)]">
+ {t("Review authorized learners and their approved learning materials.")}
+ </p>
{error && (
<p className="mt-4 rounded-lg bg-red-500/10 px-3 py-2 text-sm text-red-600">
diff --git a/web/features/settings/sections/LearnerProfileSettingsSection.tsx b/web/features/settings/sections/LearnerProfileSettingsSection.tsx
index f4cb70465..898c1050c 100644
--- a/web/features/settings/sections/LearnerProfileSettingsSection.tsx
+++ b/web/features/settings/sections/LearnerProfileSettingsSection.tsx
@@ -1,6 +1,5 @@
"use client";
-import { SettingsPageHeader } from '@/components/settings/shared'
import { useSettings } from "@/features/settings/store/SettingsStore";
import { useStagedSettings } from "@/features/settings/store/useStagedSettings";
import { useEffect, useState } from "react";
@@ -51,8 +50,11 @@ export default function LearnerProfileSettingsPage() {
};
return (
- <main className="max-w-2xl">
- <SettingsPageHeader title={t("Learner profile")} description={t("Personalize explanations and reading support for your account.")} />
+ <main className="mx-auto max-w-2xl px-6 py-8">
+ <h1 className="text-xl font-semibold">{t("Learner profile")}</h1>
+ <p className="mt-1 text-sm text-[var(--muted-foreground)]">
+ {t("Personalize explanations and reading support for your account.")}
+ </p>
<div className="mt-6 grid gap-4 sm:grid-cols-2">
{fields.map(([key, label]) => (
<label key={key} className="grid gap-1 text-sm">
diff --git a/web/tests/page-chrome.spec.tsx b/web/tests/page-chrome.spec.tsx
deleted file mode 100644
index 758b68636..000000000
--- a/web/tests/page-chrome.spec.tsx
+++ /dev/null
@@ -1,45 +0,0 @@
-import { createContext, useContext, useState } from 'react'
-import { fireEvent, render, screen, within } from '@testing-library/react'
-import { expect, it } from 'vitest'
-import { FeaturePage, PageHeader } from '@/components/layout/FeaturePage'
-
-const DraftContext = createContext('')
-
-function DraftActions() {
- const draft = useContext(DraftContext)
- const [saved, setSaved] = useState(false)
- return <button onClick={() => setSaved(true)}>{saved ? draft : 'Save draft'}</button>
-}
-
-it('keeps live page actions and their providers in the toolbar, outside the scrollport', () => {
- const view = render(
- <FeaturePage breadcrumb={<a href="/learning">Learning</a>}>
- <DraftContext.Provider value="Draft saved">
- <PageHeader title="My book" description="A learning project" action={<DraftActions />} />
- <PageHeader level={2} title="Chapters" action={<button>Add chapter</button>} />
- </DraftContext.Provider>
- </FeaturePage>
- )
- const toolbar = screen.getByRole('heading', { name: 'My book' }).closest('header')!
- expect(within(toolbar).getByRole('heading', { name: 'My book' })).toBeVisible()
- expect(within(toolbar).getByRole('link', { name: 'Learning' })).toHaveAttribute(
- 'href',
- '/learning'
- )
- expect(toolbar.closest('[data-feature-page]')).toBeNull()
- expect(screen.getByText('A learning project').closest('[data-feature-page]')).not.toBeNull()
- expect(within(toolbar).queryByRole('button', { name: 'Add chapter' })).toBeNull()
- fireEvent.click(within(toolbar).getByRole('button', { name: 'Save draft' }))
- expect(screen.getAllByRole('button', { name: 'Draft saved' })).toHaveLength(1)
-
- // Changing pages removes the previous page's controls instead of leaving a
- // stale save/delete handler in a persistent shell.
- view.rerender(
- <FeaturePage>
- <PageHeader title="Library" action={<button>New book</button>} />
- </FeaturePage>
- )
- expect(screen.queryByRole('button', { name: 'Draft saved' })).toBeNull()
- expect(screen.getAllByRole('banner')).toHaveLength(1)
- expect(within(screen.getByRole('banner')).getByRole('button', { name: 'New book' })).toBeVisible()
-})
diff --git a/web/tests/partner-direct-chat.test.ts b/web/tests/partner-direct-chat.test.ts
index e90d5146c..c31b347ad 100644
--- a/web/tests/partner-direct-chat.test.ts
+++ b/web/tests/partner-direct-chat.test.ts
@@ -23,11 +23,12 @@ test("partner web chat waits for runtime readiness, not channel running state",
assert.doesNotMatch(chatSource, /disabled=\{!connected \|\| !running\}/);
});
-test("partner views stay separate from page actions", () => {
- const toolbarEnd = pageSource.indexOf("</PageToolbar>");
- const localViews = pageSource.indexOf('<nav className="dt-page-view-tabs">');
- assert.ok(toolbarEnd >= 0 && localViews > toolbarEnd);
- assert.match(pageSource, /className="dt-toolbar-actions"/);
+test("partner tabs use a stable centered header column", () => {
+ assert.match(
+ pageSource,
+ /grid-cols-\[minmax\(0,1fr\)_auto_minmax\(0,1fr\)\]/,
+ );
+ assert.match(pageSource, /<nav className="flex justify-self-center/);
});
test("partner chat keeps old active and archived conversations reachable", () => {