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: match skeleton dimensions to each page's real loaded layout (#2843)
[._.]/ Adam Eivy98dda185b539
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.mdindex b0a7f99054..587cbbd15b 100644--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@ -39,7 +39,7 @@- **[issue-2833] Decompose the ~1000-line `spawnTuiAgent()`** — extract the output buffering/spooling pipeline into `agentTuiSpawning/outputSpooler.js` and the failure-analysis + worktree-inspection helpers into `agentTuiSpawning/finalizeHelpers.js`, leaving `spawnTuiAgent` as a thinner orchestrator. No behavior change to spawn/timeout/completion semantics; adds unit coverage for both extracted modules.- Route client `localStorage` access through the `safeStorage` helpers (Layout, MorseTrainer, calendar persisted-state, MoodBoard reference strip, VoiceWidget, WorkEditor, Tribe) — several sites previously threw uncaught in Safari private mode instead of degrading gracefully.- Replace inline `new Promise(r => setTimeout(r, …))` delays with the shared `sleep(ms)` helper across nine server modules.-- **[issue-2843] Dimension-reserving loading skeletons on 20 primary pages** — Dashboard, Apps, Brain, Calendar, Messages, Wiki, Goals, Review, Character, Digital Twin, Data Manager, Capabilities, Feature Agents (index + detail), Uploads, System Health, Submodules, Action History, AI Runs History, and AI Usage now render `PageSkeleton` instead of a centered spinner, so the first paint reserves the header/tab/card dimensions the loaded page occupies and content no longer pops in above the fold. `PageSkeleton` grew `header` (`inline`/`bar`/`none`), `layout` (`stack`/`grid`), `tabs`, `showSubtitle`, `padded`, and `fullHeight` to cover both padded and full-width route shells; padding is now opt-in, which also fixes the double padding the DataDog/Jira/GitHub skeletons had inside Layout's already-padded main.+- **[issue-2843] Dimension-reserving loading skeletons on 20 primary pages** — Dashboard, Apps, Brain, Calendar, Messages, Wiki, Goals, Review, Character, Digital Twin, Data Manager, Capabilities, Feature Agents (index + detail), Uploads, System Health, Submodules, Action History, AI Runs History, and AI Usage now render `PageSkeleton` instead of a centered spinner, so the first paint reserves the header/tab/card dimensions the loaded page occupies and content no longer pops in above the fold. `PageSkeleton` grew `header` (`inline`/`bar`/`none`), `layout` (`stack`/`grid`), `tabs`/`tabsInBar`, `showSubtitle`/`subtitleOnMobile`, `label`, `padded`/`fullHeight`, and `barClassName`/`bodyClassName` so a skeleton can mirror whichever shell its page renders — Layout's padded scrolling main or an `isFullWidth` bare main with a page-owned header bar and tab strip.## Removeddiff --git a/client/src/components/ui/PageSkeleton.jsx b/client/src/components/ui/PageSkeleton.jsxindex ac718b6382..468b7da7f4 100644--- a/client/src/components/ui/PageSkeleton.jsx+++ b/client/src/components/ui/PageSkeleton.jsx@@ -17,14 +17,20 @@// layout 'stack' — vertically stacked cards, optional right sidebar.// 'grid' — responsive card grid (dashboard widgets, tiles).// tabs n > 0 — reserves a `TabPills` (underline variant) strip under-// the header, matching its `min-h-[44px] sm:min-h-[40px]`.+// the header. A default-size TabPills button is `text-sm`+// (20px line box) + `py-3`, i.e. 44px — its+// `min-h-[44px] sm:min-h-[40px]` is a floor the content+// already exceeds, so reserve a flat 44px at every width.+// `tabsInBar` moves the strip INSIDE the header block for+// pages that nest their tabs there (Feature Agent detail).//// 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) and on full-bleed tabs that-// render edge to edge; pass TRUE on `isFullWidth` routes, whose-// main is a bare `relative overflow-hidden`.+// padded — add page padding. Match whatever the LOADED page does: leave+// FALSE when the page's own root is unpadded (its padding comes+// from Layout's `overflow-auto p-4 md:p-6` main) and on+// full-bleed tabs that render edge to edge; pass TRUE when the+// page root pads itself, and 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",@@ -34,8 +40,11 @@ export default function PageSkeleton({label = 'Loading',titleWidthClass = 'w-48',showSubtitle = false,+ // PageHeader hides its subtitle below `sm`; hand-rolled bars usually don't.+ subtitleOnMobile = false,showAction = true,tabs = 0,+ tabsInBar = false,cards = 3,sidebar = true,layout = 'stack',@@ -79,10 +88,10 @@ export default function PageSkeleton({);const tabRows = repeat(tabs);- const tabStrip = tabRows.length > 0 ? (- <div className="shrink-0 flex gap-1 border-b border-port-border overflow-hidden">+ const renderTabStrip = (bordered) => tabRows.length > 0 ? (+ <div className={`shrink-0 flex gap-1 overflow-hidden ${bordered ? 'border-b border-port-border' : ''}`}>{tabRows.map((_, i) => (- <div key={i} className="h-[44px] sm:h-[40px] w-20 sm:w-24 flex items-center px-2">+ <div key={i} className="h-[44px] w-20 sm:w-24 flex items-center px-2"><div className="h-4 w-full rounded bg-port-card animate-pulse" /></div>))}@@ -105,13 +114,16 @@ export default function PageSkeleton({<div className="min-w-0 flex-1"><div className={`h-6 sm:h-7 rounded bg-port-card animate-pulse ${titleWidthClass}`} />{showSubtitle && (- <div className="hidden sm:block h-4 w-64 max-w-full rounded bg-port-card animate-pulse mt-1" />+ <div className={`${subtitleOnMobile ? '' : 'hidden sm:block'} h-4 w-64 max-w-full rounded bg-port-card animate-pulse mt-1`} />)}</div>{showAction && <div className="h-6 w-24 rounded bg-port-card animate-pulse" />}</div>+ {/* Pages that nest their tab row inside the header block (no divider+ between title and tabs) reserve it here rather than below the bar. */}+ {tabsInBar && <div className="mt-3">{renderTabStrip(false)}</div>}</div>- {tabStrip}+ {!tabsInBar && renderTabStrip(true)}<div className={`flex-1 min-h-0 ${fullHeight ? 'overflow-y-auto' : ''} ${padded ? bodyClassName : ''}`}>{body}</div>@@ -137,7 +149,7 @@ export default function PageSkeleton({{showAction && <div className="h-10 w-full sm:w-48 rounded bg-port-card animate-pulse" />}</div>)}- {tabStrip && <div className="mb-4">{tabStrip}</div>}+ {tabRows.length > 0 && <div className="mb-4">{renderTabStrip(true)}</div>}{body}</div>);diff --git a/client/src/components/ui/PageSkeleton.test.jsx b/client/src/components/ui/PageSkeleton.test.jsxindex abad1f7dbc..488b9a3143 100644--- a/client/src/components/ui/PageSkeleton.test.jsx+++ b/client/src/components/ui/PageSkeleton.test.jsx@@ -92,12 +92,29 @@ describe('PageSkeleton', () => {expect(bodyRegion.className).not.toContain('p-4');});- it('reserves one strip row per tab, matching TabPills touch-target height', () => {+ it('reserves one strip row per tab, matching a default TabPills button box', () => {const { container } = render(<PageSkeleton header="bar" tabs={5} />);const tabRows = container.querySelectorAll('.h-\\[44px\\]');expect(tabRows).toHaveLength(5);});+ it('nests the tab strip inside the header block (undivided) for tabsInBar', () => {+ const { container } = render(<PageSkeleton header="bar" tabs={3} tabsInBar />);+ const bar = container.querySelector('.border-b.border-port-border');+ // The strip lives inside the bar, and carries no divider of its own.+ expect(bar.querySelectorAll('.h-\\[44px\\]')).toHaveLength(3);+ expect(container.querySelectorAll('.border-b.border-port-border')).toHaveLength(1);+ });++ it('keeps PageHeader subtitle-hiding by default and opts out with subtitleOnMobile', () => {+ const hidden = render(<PageSkeleton header="bar" showSubtitle />);+ expect(hidden.container.innerHTML).toContain('hidden sm:block');+ hidden.unmount();++ const shown = render(<PageSkeleton header="bar" showSubtitle subtitleOnMobile />);+ expect(shown.container.innerHTML).not.toContain('hidden sm:block');+ });+it('renders no tab strip when tabs is 0', () => {const { container } = render(<PageSkeleton tabs={0} />);expect(container.querySelectorAll('.h-\\[44px\\]')).toHaveLength(0);diff --git a/client/src/pages/CapabilityMap.jsx b/client/src/pages/CapabilityMap.jsxindex 93ca01c79a..a2bf6dee1b 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 label="Loading capabilities" titleWidthClass="w-40" showSubtitle cards={5} sidebar={false} />;+ return <PageSkeleton label="Loading capabilities" titleWidthClass="w-40" showSubtitle layout="grid" gridColsClass="lg:grid-cols-2" cards={6} />;}if (!data) {diff --git a/client/src/pages/Dashboard.jsx b/client/src/pages/Dashboard.jsxindex f7ddd352df..d3c8b02b51 100644--- a/client/src/pages/Dashboard.jsx+++ b/client/src/pages/Dashboard.jsx@@ -326,12 +326,9 @@ export default function Dashboard() {if (loading) {return (- <div>- <div className="mb-3">- <SchematicLabel module="DASH" status="BOOTING" glyph="orbit" state="active" />- </div>- <PageSkeleton label="Loading dashboard" titleWidthClass="w-40" layout="grid" cards={6} />- </div>+ // No BOOTING SchematicLabel here: it exists only while loading, so its+ // height is exactly the shift this skeleton is meant to eliminate.+ <PageSkeleton label="Loading dashboard" titleWidthClass="w-40" layout="grid" cards={6} />);}diff --git a/client/src/pages/DataDog.jsx b/client/src/pages/DataDog.jsxindex 2118f4ef59..64670c7691 100644--- a/client/src/pages/DataDog.jsx+++ b/client/src/pages/DataDog.jsx@@ -184,7 +184,7 @@ export default function DataDog() {};if (loading) {- return <PageSkeleton titleWidthClass="w-56" cards={2} />;+ return <PageSkeleton label="Loading DataDog" padded titleWidthClass="w-56" cards={2} />;}return (diff --git a/client/src/pages/DataManager.jsx b/client/src/pages/DataManager.jsxindex 9542a83006..a6b5d6ffbf 100644--- a/client/src/pages/DataManager.jsx+++ b/client/src/pages/DataManager.jsx@@ -360,6 +360,7 @@ export default function DataManager() {bodyClassName="p-4"titleWidthClass="w-40"showSubtitle+ subtitleOnMobilelayout="grid"gridColsClass="grid-cols-2 sm:grid-cols-4"cards={4}diff --git a/client/src/pages/DigitalTwin.jsx b/client/src/pages/DigitalTwin.jsxindex 597e7a08bb..428c62d8f1 100644--- a/client/src/pages/DigitalTwin.jsx+++ b/client/src/pages/DigitalTwin.jsx@@ -115,6 +115,7 @@ export default function DigitalTwin() {bodyClassName="p-4"titleWidthClass="w-40"showSubtitle+ subtitleOnMobiletabs={TABS.length}cards={3}sidebar={false}diff --git a/client/src/pages/FeatureAgentDetail.jsx b/client/src/pages/FeatureAgentDetail.jsxindex d26b9d3dc8..34143684ca 100644--- a/client/src/pages/FeatureAgentDetail.jsx+++ b/client/src/pages/FeatureAgentDetail.jsx@@ -97,8 +97,10 @@ export default function FeatureAgentDetail() {bodyClassName="p-6"titleWidthClass="w-56"showSubtitle+ subtitleOnMobileshowAction={false}tabs={isCreate ? 0 : TABS.length}+ tabsInBarcards={3}sidebar={false}/>diff --git a/client/src/pages/GitHub.jsx b/client/src/pages/GitHub.jsxindex baf42c23d8..dcf73671cc 100644--- a/client/src/pages/GitHub.jsx+++ b/client/src/pages/GitHub.jsx@@ -159,7 +159,7 @@ export default function GitHub() {const secretEntries = Object.entries(secrets);if (loading) {- return <PageSkeleton titleWidthClass="w-44" showAction={false} cards={3} />;+ return <PageSkeleton label="Loading GitHub repos" padded titleWidthClass="w-44" showAction={false} cards={3} />;}return (diff --git a/client/src/pages/Goals.jsx b/client/src/pages/Goals.jsxindex 842bc33693..a1c51f1a5f 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" label="Loading goals" fullHeight padded cards={4} sidebar={false} />+ <PageSkeleton header="none" label="Loading goals" fullHeight cards={4} sidebar={false} />) : tab === 'list' ? (<GoalsListView data={data} onRefresh={loadData} />) : (diff --git a/client/src/pages/Jira.jsx b/client/src/pages/Jira.jsxindex 1ae22a24a9..750733acaf 100644--- a/client/src/pages/Jira.jsx+++ b/client/src/pages/Jira.jsx@@ -179,7 +179,7 @@ export default function Jira() {};if (loading) {- return <PageSkeleton titleWidthClass="w-52" cards={2} />;+ return <PageSkeleton label="Loading Jira" padded titleWidthClass="w-52" cards={2} />;}return (diff --git a/client/src/pages/SystemHealthPage.jsx b/client/src/pages/SystemHealthPage.jsxindex 3a62447580..dd7fdc11d2 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 label="Loading system health" titleWidthClass="w-48" cards={4} sidebar={false} />+ <PageSkeleton label="Loading system health" titleWidthClass="w-48" layout="grid" gridColsClass="md:grid-cols-3" cards={3} /></div>);}