Skip to content

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

fix: stop page headings skipping from h1 to h3; EmptyState defaults to h2 (#9167)

Adam Eivy0ac8f7ef3237
diff --git a/client/src/components/EmptyState.jsx b/client/src/components/EmptyState.jsx
index ac0645433a..8e834029bf 100644
--- a/client/src/components/EmptyState.jsx
+++ b/client/src/components/EmptyState.jsx
@@ -11,6 +11,8 @@ import { Info } from 'lucide-react';
* Props:
* icon — Lucide component for the centered glyph (default: Info)
* title — optional bold heading (the "what's missing")
+ * headingLevel — heading level for the title, 2–6 (default 2); pass 3 when
+ * the empty state sits under an existing h2 section
* message — the teaching hint that names the next action
* actionTo — internal route for the call-to-action Link
* actionLabel — text for the call-to-action
@@ -20,6 +22,7 @@ import { Info } from 'lucide-react';
export default function EmptyState({
icon: Icon = Info,
title,
+ headingLevel = 2,
message,
actionTo,
actionLabel,
@@ -29,10 +32,12 @@ export default function EmptyState({
const actionClass =
'mt-4 px-4 py-2 rounded-lg text-sm font-medium bg-port-accent/10 text-port-accent hover:bg-port-accent/20 transition-colors';
+ const Heading = `h${Math.min(6, Math.max(2, headingLevel))}`;
+
return (
<div className="flex flex-col items-center justify-center py-16 text-center">
{Icon && <Icon size={32} className="text-gray-600 mb-3" />}
- {title && <h3 className="text-white font-semibold mb-1">{title}</h3>}
+ {title && <Heading className="text-white font-semibold mb-1">{title}</Heading>}
{message && <p className="text-gray-400 text-sm max-w-xs">{message}</p>}
{actionLabel && (onAction ? (
<button
diff --git a/client/src/components/EmptyState.test.jsx b/client/src/components/EmptyState.test.jsx
index 54acef857f..ab6e951ede 100644
--- a/client/src/components/EmptyState.test.jsx
+++ b/client/src/components/EmptyState.test.jsx
@@ -61,4 +61,12 @@ describe('EmptyState', () => {
expect(container.querySelector('a')).toBeNull();
expect(container.querySelector('button')).toBeNull();
});
+
+ it('renders the title as an h2 by default and honours headingLevel', () => {
+ const { unmount } = renderWithRouter(<EmptyState title="Nothing yet" />);
+ expect(screen.getByRole('heading', { level: 2, name: 'Nothing yet' })).toBeTruthy();
+ unmount();
+ renderWithRouter(<EmptyState title="Nothing yet" headingLevel={3} />);
+ expect(screen.getByRole('heading', { level: 3, name: 'Nothing yet' })).toBeTruthy();
+ });
});
diff --git a/client/src/components/agents/AgentList.jsx b/client/src/components/agents/AgentList.jsx
index 6759e9893b..86e4c1a18e 100644
--- a/client/src/components/agents/AgentList.jsx
+++ b/client/src/components/agents/AgentList.jsx
@@ -390,7 +390,7 @@ export default function AgentList() {
{agent.avatar?.emoji || '🤖'}
</div>
<div className="min-w-0">
- <h3 className="font-semibold text-white truncate">{agent.name}</h3>
+ <h2 className="font-semibold text-white truncate">{agent.name}</h2>
<p className="text-sm text-gray-400 truncate">{agent.description || 'No description'}</p>
</div>
</div>
diff --git a/client/src/components/cos/tabs/TasksTab.jsx b/client/src/components/cos/tabs/TasksTab.jsx
index b6645ad6cf..233bf558d8 100644
--- a/client/src/components/cos/tabs/TasksTab.jsx
+++ b/client/src/components/cos/tabs/TasksTab.jsx
@@ -242,7 +242,7 @@ export default function TasksTab({ completedRevision = 0, tasks, agents = [], li
{/* User Tasks */}
<div>
<div className="mb-3">
- <h3 className="text-lg font-semibold text-white">Task queue</h3>
+ <h2 className="text-lg font-semibold text-white">Task queue</h2>
</div>
<p className="mb-3 text-sm text-gray-400" aria-label="Queue status">
diff --git a/client/src/components/integrations/IntegrationInstancesPage.jsx b/client/src/components/integrations/IntegrationInstancesPage.jsx
index ea0fddc6ef..23b4b1b684 100644
--- a/client/src/components/integrations/IntegrationInstancesPage.jsx
+++ b/client/src/components/integrations/IntegrationInstancesPage.jsx
@@ -196,7 +196,7 @@ export default function IntegrationInstancesPage({
const result = testResults[instance.id];
return <div key={instance.id} className="bg-gray-800 rounded-lg p-4 sm:p-6">
<div className="flex flex-col gap-4">
- <div className="flex-1 min-w-0"><h3 className="text-lg font-bold text-white truncate">{instance.name}</h3>{summarize(instance)}</div>
+ <div className="flex-1 min-w-0"><h2 className="text-lg font-bold text-white truncate">{instance.name}</h2>{summarize(instance)}</div>
<div className="flex flex-wrap gap-2">
<button onClick={() => handleTest(instance.id)} disabled={testingInstance === instance.id} className="flex-1 sm:flex-none px-3 py-2 sm:py-1 bg-port-accent hover:bg-port-accent/80 text-white text-sm rounded disabled:opacity-50">{testingInstance === instance.id ? 'Testing...' : 'Test'}</button>
<button onClick={() => handleEdit(instance)} className="flex-1 sm:flex-none px-3 py-2 sm:py-1 bg-port-warning hover:bg-port-warning/80 text-white text-sm rounded">Edit</button>
diff --git a/client/src/components/messages/ContactsTab.jsx b/client/src/components/messages/ContactsTab.jsx
index bf0fa765d6..008a54b5e6 100644
--- a/client/src/components/messages/ContactsTab.jsx
+++ b/client/src/components/messages/ContactsTab.jsx
@@ -113,7 +113,7 @@ export default function ContactsTab() {
<div className="bg-port-card border border-port-border rounded-lg p-4 sm:p-6">
<div className="flex items-center gap-2 mb-2">
<Contact size={16} className="text-port-accent" />
- <h3 className="text-lg font-semibold text-white">macOS Contacts</h3>
+ <h2 className="text-lg font-semibold text-white">macOS Contacts</h2>
</div>
<p className="text-sm text-gray-400 mb-4">
Reads your local AddressBook databases read-only into a machine-local cache.
diff --git a/client/src/components/providers/ProviderCard.jsx b/client/src/components/providers/ProviderCard.jsx
index 223cedf647..e80a6abb8e 100644
--- a/client/src/components/providers/ProviderCard.jsx
+++ b/client/src/components/providers/ProviderCard.jsx
@@ -187,7 +187,7 @@ export default function ProviderCard({
to split, and it is narrower than the viewport by the sidebar. */}
<div className="flex flex-col @2xl:flex-row @2xl:items-start justify-between gap-3">
<div className="flex flex-wrap items-center gap-2 min-w-0">
- <h3 className="text-lg font-semibold text-white">{displayName}</h3>
+ <h2 className="text-lg font-semibold text-white">{displayName}</h2>
<span className={`text-xs px-2 py-0.5 rounded ${providerTypeClass(provider.type)}`}>
{unified ? 'CLI / TUI' : provider.type.toUpperCase()}
</span>
diff --git a/client/src/components/wiki/tabs/OverviewTab.jsx b/client/src/components/wiki/tabs/OverviewTab.jsx
index f86ef4b15a..36e3f3f135 100644
--- a/client/src/components/wiki/tabs/OverviewTab.jsx
+++ b/client/src/components/wiki/tabs/OverviewTab.jsx
@@ -58,7 +58,7 @@ export default function OverviewTab({ vaultId, stats, notes, allNotes, onRefresh
{/* Recent activity */}
<div className="bg-port-card border border-port-border rounded-lg">
<div className="px-4 py-3 border-b border-port-border flex items-center justify-between">
- <h3 className="text-sm font-medium text-white">Recent Activity</h3>
+ <h2 className="text-sm font-medium text-white">Recent Activity</h2>
<button onClick={onRefresh} aria-label="Refresh" className="text-gray-500 hover:text-white">
<RefreshCw size={14} />
</button>
diff --git a/client/src/pages/Loops.jsx b/client/src/pages/Loops.jsx
index 488392d53b..4d826bb908 100644
--- a/client/src/pages/Loops.jsx
+++ b/client/src/pages/Loops.jsx
@@ -82,7 +82,7 @@ function CreateLoopForm({ providers, onCreated, promptRef }) {
<form onSubmit={handleSubmit} className="bg-port-card border border-port-border rounded-lg p-4 space-y-3">
<div className="flex items-center gap-2 mb-2">
<Plus size={16} className="text-port-accent" />
- <h3 className="text-sm font-medium text-gray-200">New Loop</h3>
+ <h2 className="text-sm font-medium text-gray-200">New Loop</h2>
</div>
<textarea
diff --git a/client/src/pages/PromptManager.jsx b/client/src/pages/PromptManager.jsx
index f05f2791e4..a5340d98c1 100644
--- a/client/src/pages/PromptManager.jsx
+++ b/client/src/pages/PromptManager.jsx
@@ -691,7 +691,7 @@ export default function PromptManager() {
{/* Stage List */}
<div className="bg-port-card border border-port-border rounded-xl p-4">
<div className="flex items-center justify-between mb-3">
- <h3 className="text-sm font-medium text-gray-400">Prompt Stages</h3>
+ <h2 className="text-sm font-medium text-gray-400">Prompt Stages</h2>
<button
onClick={() => setCreatingStage(true)}
className="min-h-[44px] min-w-[44px] inline-flex items-center justify-center p-1 text-port-accent hover:text-port-accent/80"
diff --git a/client/src/pages/Review.jsx b/client/src/pages/Review.jsx
index 5212abed30..df1f7b7652 100644
--- a/client/src/pages/Review.jsx
+++ b/client/src/pages/Review.jsx
@@ -491,10 +491,10 @@ export default function Review() {
{(queueItems.length > 0 || queueSourceErrors.length > 0 || queue?.partial) && (
<section className="bg-port-card border border-port-border rounded-xl p-4 space-y-3">
<div className="flex items-center justify-between gap-3">
- <h3 className="text-sm font-semibold text-white flex items-center gap-2">
+ <h2 className="text-sm font-semibold text-white flex items-center gap-2">
<Inbox size={16} className="text-port-accent" />
Actions
- </h3>
+ </h2>
{queueItems.length > 0 && (
<span className="text-xs rounded-full px-2 py-0.5 bg-port-accent/10 text-port-accent border border-port-accent/20">
{formatCount(queueItems.length)} across domains
@@ -556,10 +556,10 @@ export default function Review() {
{showLegacyReviewSurface && topActionItems.length > 0 && (
<section className="bg-port-card border border-port-border rounded-xl p-4 space-y-3">
<div className="flex items-center justify-between gap-3">
- <h3 className="text-sm font-semibold text-white flex items-center gap-2">
+ <h2 className="text-sm font-semibold text-white flex items-center gap-2">
<Eye size={16} className="text-port-warning" />
Action Queue
- </h3>
+ </h2>
<span className="text-xs rounded-full px-2 py-0.5 bg-port-warning/10 text-port-warning border border-port-warning/20">
{formatCount(actionableItems.length)} actionable
</span>
@@ -599,10 +599,10 @@ export default function Review() {
aria-label={briefingFullscreen ? 'Daily Briefing' : undefined}
className={`bg-port-card border border-port-border rounded-xl p-4 ${briefingFullscreen ? 'fixed inset-0 z-50 overflow-y-auto m-0 rounded-none' : ''}`}>
<div className="flex items-center justify-between gap-2 mb-2">
- <h3 className="text-sm font-semibold text-white flex items-center gap-2">
+ <h2 className="text-sm font-semibold text-white flex items-center gap-2">
<FileText size={16} className="text-gray-400" />
Daily Briefing
- </h3>
+ </h2>
<div className="flex items-center gap-2">
<span className="text-[11px] text-gray-400">
{briefing.source} &middot; {formatDateTime(briefing.generatedAt)}
@@ -633,11 +633,11 @@ export default function Review() {
return (
<section key={type} className="space-y-2">
- <h3 className={`text-sm font-semibold uppercase tracking-wide ${config.color} flex items-center gap-2`}>
+ <h2 className={`text-sm font-semibold uppercase tracking-wide ${config.color} flex items-center gap-2`}>
<TypeIcon size={16} />
{config.label}
<span className="text-gray-600">({formatCount(typeItems.length)})</span>
- </h3>
+ </h2>
<div className="space-y-1">
{typeItems.map(item => (
<ReviewItem
diff --git a/client/src/pages/Templates.jsx b/client/src/pages/Templates.jsx
index 8e9e6789b6..4a58370849 100644
--- a/client/src/pages/Templates.jsx
+++ b/client/src/pages/Templates.jsx
@@ -180,9 +180,9 @@ export default function Templates() {
</div>
<div className="flex-1">
<div className="flex items-center gap-2">
- <h3 className="font-semibold text-white group-hover:text-port-accent transition-colors">
+ <h2 className="font-semibold text-white group-hover:text-port-accent transition-colors">
{template.name}
- </h3>
+ </h2>
{template.builtIn && (
<span className="text-xs px-2 py-0.5 bg-port-accent/20 text-port-accent rounded">
Built-in
diff --git a/client/src/pages/Tribe.jsx b/client/src/pages/Tribe.jsx
index 657ce8ee79..bb7289676f 100644
--- a/client/src/pages/Tribe.jsx
+++ b/client/src/pages/Tribe.jsx
@@ -181,7 +181,7 @@ function ContactCard({ contact, active, onSelect, onLogTouch, cardRef }) {
<div className="min-w-0">
<div className="flex items-center gap-2 min-w-0">
<UserRound size={16} className="shrink-0 text-gray-500" aria-hidden="true" />
- <h3 className="font-semibold text-white truncate">{contact.name || 'Unnamed person'}</h3>
+ <h2 className="font-semibold text-white truncate">{contact.name || 'Unnamed person'}</h2>
</div>
<p className="mt-1 text-sm text-gray-400 truncate">{contact.relationship || 'Relationship'}</p>
</div>