Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
ux: address review — per-page skeleton labels, hand-rolled bar/body padding, tab clamp (#2843)
[._.]/ Adam Eivy4c41bf924a28
diff --git a/client/src/components/ui/PageSkeleton.jsx b/client/src/components/ui/PageSkeleton.jsxindex 66e9af57d2..ac718b6382 100644--- a/client/src/components/ui/PageSkeleton.jsx+++ b/client/src/components/ui/PageSkeleton.jsx@@ -7,10 +7,11 @@//// header 'inline' — the page renders its own `<h2>` + action row inside the// padded scrolling main (Apps, DataDog, Jira, GitHub, …).-// 'bar' — the page renders the shared `PageHeader` bar: icon +-// title (+ subtitle) with a `border-b` (Brain, Calendar,-// Messages, Wiki, …). Matches PageHeader's compact-// `px-3 py-2 sm:px-4 sm:py-3` padding.+// 'bar' — the page renders a bordered title bar above a scrolling+// body (Brain, Calendar, Messages, Wiki, …). Defaults to+// the shared `PageHeader`'s compact+// `px-3 py-2 sm:px-4 sm:py-3`; pages with a hand-rolled+// bar pass their own via `barClassName`.// 'none' — the page already rendered its own header and only the// body region is loading (Goals).// layout 'stack' — vertically stacked cards, optional right sidebar.@@ -21,11 +22,16 @@// Container flags:// padded — add page padding. Leave FALSE on routes that render inside// Layout's default `overflow-auto p-4 md:p-6` main (padding-// twice is itself a layout pop); pass TRUE on `isFullWidth`-// routes, whose main is a bare `relative overflow-hidden`.+// twice is itself a layout pop) and on full-bleed tabs that+// render edge to edge; pass TRUE on `isFullWidth` routes, whose+// main is a bare `relative overflow-hidden`.// fullHeight — fill the height and own the scroll, for `isFullWidth` routes.+//+// `label` is the screen-reader announcement — keep it specific ("Loading apps",+// not the bare default) so a page's busy state says WHAT is loading.export default function PageSkeleton({header = 'inline',+ label = 'Loading',titleWidthClass = 'w-48',showSubtitle = false,showAction = true,@@ -36,8 +42,14 @@ export default function PageSkeleton({gridColsClass = 'sm:grid-cols-2 xl:grid-cols-3',padded = false,fullHeight = false,+ barClassName = 'px-3 py-2 sm:px-4 sm:py-3',+ bodyClassName = 'p-3 sm:p-4',}) {- const cardBlocks = Array.from({ length: Math.max(0, cards) }).map((_, i) => (+ // Callers derive counts from live data (`TABS.length`, a config value), so+ // clamp rather than trusting them: `Array.from({ length: -1 })` throws.+ const repeat = (n) => Array.from({ length: Math.max(0, Math.floor(n) || 0) });++ const cardBlocks = repeat(cards).map((_, i) => (<divkey={i}className="rounded-lg border border-port-border bg-port-card p-4 sm:p-6 animate-pulse"@@ -66,9 +78,10 @@ export default function PageSkeleton({</div>);- const tabStrip = tabs > 0 ? (+ const tabRows = repeat(tabs);+ const tabStrip = tabRows.length > 0 ? (<div className="shrink-0 flex gap-1 border-b border-port-border overflow-hidden">- {Array.from({ length: tabs }).map((_, i) => (+ {tabRows.map((_, i) => (<div key={i} className="h-[44px] sm:h-[40px] w-20 sm:w-24 flex items-center px-2"><div className="h-4 w-full rounded bg-port-card animate-pulse" /></div>@@ -84,9 +97,9 @@ export default function PageSkeleton({className={`flex flex-col min-h-0 ${fullHeight ? 'h-full' : ''}`}role="status"aria-busy="true"- aria-label="Loading"+ aria-label={label}>- <div className="shrink-0 px-3 py-2 sm:px-4 sm:py-3 border-b border-port-border">+ <div className={`shrink-0 border-b border-port-border ${barClassName}`}><div className="flex items-center gap-2 sm:gap-3"><div className="w-6 h-6 sm:w-7 sm:h-7 shrink-0 rounded bg-port-card animate-pulse" /><div className="min-w-0 flex-1">@@ -99,7 +112,7 @@ export default function PageSkeleton({</div></div>{tabStrip}- <div className={`flex-1 min-h-0 ${fullHeight ? 'overflow-y-auto' : ''} ${padded ? 'p-3 sm:p-4' : ''}`}>+ <div className={`flex-1 min-h-0 ${fullHeight ? 'overflow-y-auto' : ''} ${padded ? bodyClassName : ''}`}>{body}</div></div>@@ -111,7 +124,7 @@ export default function PageSkeleton({className={`${padded ? 'p-4 md:p-6' : ''} ${fullHeight ? 'h-full overflow-y-auto' : ''}`}role="status"aria-busy="true"- aria-label="Loading"+ aria-label={label}>{header !== 'none' && (<div className="flex flex-col sm:flex-row sm:justify-between sm:items-center gap-4 mb-6">diff --git a/client/src/components/ui/PageSkeleton.test.jsx b/client/src/components/ui/PageSkeleton.test.jsxindex 1dea942023..abad1f7dbc 100644--- a/client/src/components/ui/PageSkeleton.test.jsx+++ b/client/src/components/ui/PageSkeleton.test.jsx@@ -16,6 +16,16 @@ describe('PageSkeleton', () => {expect(status()).toHaveAttribute('aria-label', 'Loading');});+ it('announces the caller-supplied label so the busy state names what is loading', () => {+ render(<PageSkeleton label="Loading apps" />);+ expect(status()).toHaveAttribute('aria-label', 'Loading apps');+ });++ it('passes the label through in bar-header mode too', () => {+ render(<PageSkeleton header="bar" label="Loading brain" />);+ expect(status()).toHaveAttribute('aria-label', 'Loading brain');+ });+it('defaults to an unpadded inline header so it does not double-pad Layout main', () => {render(<PageSkeleton />);expect(status().className).not.toContain('p-4');@@ -67,6 +77,21 @@ describe('PageSkeleton', () => {expect(container.innerHTML).toContain('border-b border-port-border');});+ it('lets a hand-rolled header override the bar and body padding', () => {+ const { container } = render(+ <PageSkeleton header="bar" padded barClassName="px-6 py-4 bg-port-card" bodyClassName="p-6" />+ );+ expect(container.innerHTML).toContain('px-6 py-4 bg-port-card');+ expect(container.innerHTML).toContain('p-6');+ expect(container.innerHTML).not.toContain('px-3 py-2 sm:px-4 sm:py-3');+ });++ it('omits body padding on a full-bleed tab even in bar mode', () => {+ const { container } = render(<PageSkeleton header="bar" padded={false} bodyClassName="p-4" />);+ const bodyRegion = container.querySelector('.flex-1.min-h-0');+ expect(bodyRegion.className).not.toContain('p-4');+ });+it('reserves one strip row per tab, matching TabPills touch-target height', () => {const { container } = render(<PageSkeleton header="bar" tabs={5} />);const tabRows = container.querySelectorAll('.h-\\[44px\\]');@@ -88,4 +113,13 @@ describe('PageSkeleton', () => {const { container } = render(<PageSkeleton cards={-3} sidebar={false} />);expect(cardCount(container)).toBe(0);});++ it('clamps a negative or fractional tab count instead of throwing on Array.from', () => {+ const negative = render(<PageSkeleton header="bar" tabs={-2} />);+ expect(negative.container.querySelectorAll('.h-\\[44px\\]')).toHaveLength(0);+ negative.unmount();++ const fractional = render(<PageSkeleton header="bar" tabs={3.7} />);+ expect(fractional.container.querySelectorAll('.h-\\[44px\\]')).toHaveLength(3);+ });});diff --git a/client/src/pages/Apps.jsx b/client/src/pages/Apps.jsxindex e881b9e71b..e80ed3cb36 100644--- a/client/src/pages/Apps.jsx+++ b/client/src/pages/Apps.jsx@@ -137,7 +137,7 @@ export default function Apps() {.slice().sort((a, b) => a.name.localeCompare(b.name));if (loading) {- return <PageSkeleton titleWidthClass="w-24" showSubtitle cards={4} sidebar={false} />;+ return <PageSkeleton label="Loading apps" titleWidthClass="w-24" showSubtitle cards={4} sidebar={false} />;}return (diff --git a/client/src/pages/Brain.jsx b/client/src/pages/Brain.jsxindex 10b460f7c7..12f84b2619 100644--- a/client/src/pages/Brain.jsx+++ b/client/src/pages/Brain.jsx@@ -89,8 +89,10 @@ export default function Brain() {return (<PageSkeletonheader="bar"+ label="Loading brain"fullHeight- padded+ // Full-bleed tabs render edge to edge; padding them shifts the body on load.+ padded={!fullBleed}titleWidthClass="w-28"showSubtitletabs={TABS.length}diff --git a/client/src/pages/Calendar.jsx b/client/src/pages/Calendar.jsxindex a3e8668bdb..ffbb5b3e41 100644--- a/client/src/pages/Calendar.jsx+++ b/client/src/pages/Calendar.jsx@@ -76,8 +76,10 @@ export default function Calendar() {return (<PageSkeletonheader="bar"+ label="Loading calendar"fullHeightpadded+ bodyClassName="p-4"titleWidthClass="w-32"showSubtitletabs={TABS.length}diff --git a/client/src/pages/CapabilityMap.jsx b/client/src/pages/CapabilityMap.jsxindex 0dee15f592..93ca01c79a 100644--- a/client/src/pages/CapabilityMap.jsx+++ b/client/src/pages/CapabilityMap.jsx@@ -51,7 +51,7 @@ export default function CapabilityMap() {);if (loading) {- return <PageSkeleton titleWidthClass="w-40" showSubtitle cards={5} sidebar={false} />;+ return <PageSkeleton label="Loading capabilities" titleWidthClass="w-40" showSubtitle cards={5} sidebar={false} />;}if (!data) {diff --git a/client/src/pages/CharacterSheet.jsx b/client/src/pages/CharacterSheet.jsxindex 054eca5807..eeb24cc4a4 100644--- a/client/src/pages/CharacterSheet.jsx+++ b/client/src/pages/CharacterSheet.jsx@@ -387,8 +387,12 @@ export default function CharacterSheet() {return (<PageSkeletonheader="bar"+ label="Loading character sheet"fullHeightpadded+ // The Character bar is hand-rolled (not PageHeader): taller and card-tinted.+ barClassName="px-6 py-4 bg-port-card"+ bodyClassName="p-4 md:p-6"titleWidthClass="w-32"cards={4}sidebar={false}diff --git a/client/src/pages/Dashboard.jsx b/client/src/pages/Dashboard.jsxindex 0f03cd98ae..f7ddd352df 100644--- a/client/src/pages/Dashboard.jsx+++ b/client/src/pages/Dashboard.jsx@@ -330,7 +330,7 @@ export default function Dashboard() {<div className="mb-3"><SchematicLabel module="DASH" status="BOOTING" glyph="orbit" state="active" /></div>- <PageSkeleton titleWidthClass="w-40" layout="grid" cards={6} />+ <PageSkeleton label="Loading dashboard" titleWidthClass="w-40" layout="grid" cards={6} /></div>);}diff --git a/client/src/pages/DataManager.jsx b/client/src/pages/DataManager.jsxindex ad7d576288..9542a83006 100644--- a/client/src/pages/DataManager.jsx+++ b/client/src/pages/DataManager.jsx@@ -353,8 +353,11 @@ export default function DataManager() {return (<PageSkeletonheader="bar"+ label="Loading data manager"fullHeightpadded+ barClassName="p-4"+ bodyClassName="p-4"titleWidthClass="w-40"showSubtitlelayout="grid"diff --git a/client/src/pages/DigitalTwin.jsx b/client/src/pages/DigitalTwin.jsxindex de35f5f7b6..597e7a08bb 100644--- a/client/src/pages/DigitalTwin.jsx+++ b/client/src/pages/DigitalTwin.jsx@@ -108,8 +108,11 @@ export default function DigitalTwin() {<div className="absolute inset-0"><PageSkeletonheader="bar"+ label="Loading digital twin"fullHeightpadded+ barClassName="p-4"+ bodyClassName="p-4"titleWidthClass="w-40"showSubtitletabs={TABS.length}diff --git a/client/src/pages/FeatureAgentDetail.jsx b/client/src/pages/FeatureAgentDetail.jsxindex 278845d957..d26b9d3dc8 100644--- a/client/src/pages/FeatureAgentDetail.jsx+++ b/client/src/pages/FeatureAgentDetail.jsx@@ -89,11 +89,16 @@ export default function FeatureAgentDetail() {return (<PageSkeletonheader="bar"+ label="Loading agent"fullHeightpadded+ // Hand-rolled header block (not PageHeader) with the tab row inside it.+ barClassName="px-6 pt-6 pb-4"+ bodyClassName="p-6"titleWidthClass="w-56"showSubtitleshowAction={false}+ tabs={isCreate ? 0 : TABS.length}cards={3}sidebar={false}/>diff --git a/client/src/pages/FeatureAgentDetail.test.jsx b/client/src/pages/FeatureAgentDetail.test.jsxindex f6055667e0..e9c290d182 100644--- a/client/src/pages/FeatureAgentDetail.test.jsx+++ b/client/src/pages/FeatureAgentDetail.test.jsx@@ -65,7 +65,7 @@ describe('FeatureAgentDetail load race', () => {// A's fetch is in flight; the loading skeleton is up.expect(api.getFeatureAgent).toHaveBeenCalledWith('agent-a');- expect(screen.getByRole('status', { name: 'Loading' })).toBeInTheDocument();+ expect(screen.getByRole('status', { name: 'Loading agent' })).toBeInTheDocument();// Navigate A→B before A resolves.await act(async () => {@@ -103,7 +103,7 @@ describe('FeatureAgentDetail load race', () => {});// B is still loading — the old agent name must be gone, skeleton up.expect(screen.queryByText('Agent Alpha')).not.toBeInTheDocument();- expect(screen.getByRole('status', { name: 'Loading' })).toBeInTheDocument();+ expect(screen.getByRole('status', { name: 'Loading agent' })).toBeInTheDocument();});it('still renders the agent under StrictMode (mount→cleanup→remount must not strand the mounted guard)', async () => {diff --git a/client/src/pages/FeatureAgents.jsx b/client/src/pages/FeatureAgents.jsxindex b2d0202fa8..d12eb23170 100644--- a/client/src/pages/FeatureAgents.jsx+++ b/client/src/pages/FeatureAgents.jsx@@ -103,6 +103,7 @@ export default function FeatureAgents() {{loading ? (<PageSkeletonheader="none"+ label="Loading agents"layout="grid"gridColsClass="lg:grid-cols-2 xl:grid-cols-3"cards={3}diff --git a/client/src/pages/Goals.jsx b/client/src/pages/Goals.jsxindex 61d8eeb68e..842bc33693 100644--- a/client/src/pages/Goals.jsx+++ b/client/src/pages/Goals.jsx@@ -74,7 +74,7 @@ export default function Goals() {{/* Content */}<div className="flex-1 overflow-hidden">{loading ? (- <PageSkeleton header="none" fullHeight padded cards={4} sidebar={false} />+ <PageSkeleton header="none" label="Loading goals" fullHeight padded cards={4} sidebar={false} />) : tab === 'list' ? (<GoalsListView data={data} onRefresh={loadData} />) : (diff --git a/client/src/pages/HistoryPage.jsx b/client/src/pages/HistoryPage.jsxindex ebb1ef7d7d..1f0a879abc 100644--- a/client/src/pages/HistoryPage.jsx+++ b/client/src/pages/HistoryPage.jsx@@ -70,6 +70,7 @@ export function HistoryPage() {if (loading) {return (<PageSkeleton+ label="Loading history"titleWidthClass="w-48"showAction={false}layout="grid"diff --git a/client/src/pages/Messages.jsx b/client/src/pages/Messages.jsxindex aedc136c87..aef3fc9aa3 100644--- a/client/src/pages/Messages.jsx+++ b/client/src/pages/Messages.jsx@@ -76,8 +76,11 @@ export default function Messages() {return (<PageSkeletonheader="bar"+ label="Loading messages"fullHeight- padded+ // Full-bleed tabs (iMessage) render edge to edge — no body padding.+ padded={!fullBleed}+ bodyClassName="p-4"titleWidthClass="w-36"showSubtitletabs={TABS.length}diff --git a/client/src/pages/Review.jsx b/client/src/pages/Review.jsxindex 5198ef162d..8a674ef4fd 100644--- a/client/src/pages/Review.jsx+++ b/client/src/pages/Review.jsx@@ -263,7 +263,7 @@ export default function Review() {}), [pendingItems]);if (loading) {- return <PageSkeleton padded fullHeight titleWidthClass="w-40" cards={4} sidebar={false} />;+ return <PageSkeleton label="Loading review hub" padded fullHeight titleWidthClass="w-40" cards={4} sidebar={false} />;}// Cheap derivations off the memoized `pendingItems`/`actionableItems` — plaindiff --git a/client/src/pages/RunsHistoryPage.jsx b/client/src/pages/RunsHistoryPage.jsxindex 328ec67c41..8492dd22e0 100644--- a/client/src/pages/RunsHistoryPage.jsx+++ b/client/src/pages/RunsHistoryPage.jsx@@ -145,7 +145,7 @@ export function RunsHistoryPage() {};if (loading) {- return <PageSkeleton titleWidthClass="w-48" showAction={false} cards={4} sidebar={false} />;+ return <PageSkeleton label="Loading runs history" titleWidthClass="w-48" showAction={false} cards={4} sidebar={false} />;}const failedCount = runs.filter(r => r.success === false).length;diff --git a/client/src/pages/Submodules.jsx b/client/src/pages/Submodules.jsxindex 4c36e1fdd4..ea9092b567 100644--- a/client/src/pages/Submodules.jsx+++ b/client/src/pages/Submodules.jsx@@ -53,7 +53,7 @@ export default function Submodules() {};if (loading) {- return <PageSkeleton titleWidthClass="w-40" cards={3} sidebar={false} />;+ return <PageSkeleton label="Loading submodules" titleWidthClass="w-40" cards={3} sidebar={false} />;}const hasUpdates = submodules.some(s => s.behind > 0 || s.outOfSync || !s.initialized);diff --git a/client/src/pages/SystemHealthPage.jsx b/client/src/pages/SystemHealthPage.jsxindex b2d5f86f3f..3a62447580 100644--- a/client/src/pages/SystemHealthPage.jsx+++ b/client/src/pages/SystemHealthPage.jsx@@ -67,7 +67,7 @@ export default function SystemHealthPage() {if (loading) {return (<div className="max-w-5xl mx-auto">- <PageSkeleton titleWidthClass="w-48" cards={4} sidebar={false} />+ <PageSkeleton label="Loading system health" titleWidthClass="w-48" cards={4} sidebar={false} /></div>);}diff --git a/client/src/pages/Uploads.jsx b/client/src/pages/Uploads.jsxindex fb83d84b26..3a5f4de1a7 100644--- a/client/src/pages/Uploads.jsx+++ b/client/src/pages/Uploads.jsx@@ -142,7 +142,7 @@ export default function Uploads() {};if (loading) {- return <PageSkeleton titleWidthClass="w-44" showSubtitle cards={4} sidebar={false} />;+ return <PageSkeleton label="Loading uploads" titleWidthClass="w-44" showSubtitle cards={4} sidebar={false} />;}return (diff --git a/client/src/pages/UsagePage.jsx b/client/src/pages/UsagePage.jsxindex bcda6f050c..1bdeb2d74c 100644--- a/client/src/pages/UsagePage.jsx+++ b/client/src/pages/UsagePage.jsx@@ -344,6 +344,7 @@ function InternalUsageMetrics() {if (loading && !usage) {return (<PageSkeleton+ label="Loading usage data"titleWidthClass="w-44"showAction={false}layout="grid"diff --git a/client/src/pages/Wiki.jsx b/client/src/pages/Wiki.jsxindex b2a4e0b3e8..2f3eaf35d2 100644--- a/client/src/pages/Wiki.jsx+++ b/client/src/pages/Wiki.jsx@@ -111,8 +111,11 @@ export default function Wiki() {return (<PageSkeletonheader="bar"+ label="Loading wiki"fullHeight- padded+ // Browse owns its own list/detail scroll and takes no body padding.+ padded={activeTab !== 'browse'}+ bodyClassName="p-4"titleWidthClass="w-24"showSubtitletabs={TABS.length}