feat(ui): redesign header to two rows with grouped nav (Phase B)
All checks were successful
Build & Deploy / build-and-deploy (push) Successful in 32s
All checks were successful
Build & Deploy / build-and-deploy (push) Successful in 32s
Splits the AppShell header into:
Row 1 — brand: logo + dynamic context subtitle (route-aware) +
global search + agent boards dropdown
Row 2 — nav: work group (בית · ארכיון) | knowledge group (ספריית
פסיקה · אימון · מתודולוגיה) + admin dropdown (⚙) on the left
Three changes from the previous flat 8-item nav:
1. Grouping reflects intent. Daily-driver pages are in "work", corpus
pages in "knowledge"; system pages (skills · diagnostics · settings)
move into a single ⚙ dropdown so they stop competing for attention.
2. Subtitle is now dynamic. `headerSubtitle(pathname)` resolves the
current section so the user always sees where they are without
scanning the nav row. Case routes show the case number explicitly
("ערר 1234-24" / "ערר 1234-24 · ניסוח").
3. The gold-underline active state is preserved and the admin trigger
inherits it whenever any admin route is active.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
31
web-ui/src/components/header-context.ts
Normal file
31
web-ui/src/components/header-context.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* Resolves the dynamic subtitle shown next to the brand in the AppShell
|
||||
* header. Reflects the current section so the user always sees where they
|
||||
* are without scanning the nav row.
|
||||
*
|
||||
* Special-cases case routes (`/cases/{caseNumber}` and `/compose`) so the
|
||||
* subtitle includes the case number — the most useful piece of context
|
||||
* during decision drafting.
|
||||
*/
|
||||
export function headerSubtitle(pathname: string): string {
|
||||
if (pathname === "/") return "בית";
|
||||
|
||||
if (pathname.startsWith("/cases/")) {
|
||||
const [, , slug] = pathname.split("/");
|
||||
if (!slug || slug === "new") return "תיק חדש";
|
||||
const isCompose = pathname.includes("/compose");
|
||||
const decoded = decodeURIComponent(slug);
|
||||
return isCompose ? `ערר ${decoded} · ניסוח` : `ערר ${decoded}`;
|
||||
}
|
||||
|
||||
if (pathname.startsWith("/archive")) return "ארכיון";
|
||||
if (pathname.startsWith("/training")) return "אימון סגנון";
|
||||
if (pathname.startsWith("/precedents")) return "ספריית פסיקה";
|
||||
if (pathname.startsWith("/methodology")) return "מתודולוגיה";
|
||||
if (pathname.startsWith("/skills")) return "מיומנויות";
|
||||
if (pathname.startsWith("/diagnostics")) return "אבחון";
|
||||
if (pathname.startsWith("/settings")) return "הגדרות";
|
||||
if (pathname.startsWith("/feedback")) return "הערות יו״ר";
|
||||
|
||||
return "ניהול תיקים";
|
||||
}
|
||||
Reference in New Issue
Block a user