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
refactor([issue-716]): simplify EmptyState to one action API
[._.]/ Adam Eivy57f212e1587b
diff --git a/client/src/components/EmptyState.jsx b/client/src/components/EmptyState.jsxindex e444ad8a5e..ee8867cc47 100644--- a/client/src/components/EmptyState.jsx+++ b/client/src/components/EmptyState.jsx@@ -15,9 +15,6 @@ import { Info } from 'lucide-react';* actionTo — internal route for the call-to-action Link* actionLabel — text for the call-to-action* onAction — render a <button> instead of a Link (in-page action)- *- * Back-compat: the original `{ message, linkTo, linkLabel }` API still works —- * `actionTo`/`actionLabel` are preferred, `linkTo`/`linkLabel` are aliases.*/export default function EmptyState({icon: Icon = Info,@@ -26,11 +23,7 @@ export default function EmptyState({actionTo,actionLabel,onAction,- linkTo,- linkLabel,}) {- const to = actionTo ?? linkTo;- const label = actionLabel ?? linkLabel;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';@@ -39,16 +32,15 @@ export default function EmptyState({{Icon && <Icon size={32} className="text-gray-600 mb-3" />}{title && <h3 className="text-white font-semibold mb-1">{title}</h3>}{message && <p className="text-gray-400 text-sm max-w-xs">{message}</p>}- {label && onAction && (+ {actionLabel && (onAction ? (<button type="button" onClick={onAction} className={actionClass}>- {label}+ {actionLabel}</button>- )}- {label && !onAction && to && (- <Link to={to} className={actionClass}>- {label}+ ) : actionTo ? (+ <Link to={actionTo} className={actionClass}>+ {actionLabel}</Link>- )}+ ) : null)}</div>);}diff --git a/client/src/components/EmptyState.test.jsx b/client/src/components/EmptyState.test.jsxindex ee8fd4b005..39bb219eea 100644--- a/client/src/components/EmptyState.test.jsx+++ b/client/src/components/EmptyState.test.jsx@@ -34,12 +34,6 @@ describe('EmptyState', () => {expect(onAction).toHaveBeenCalledTimes(1);});- it('supports the legacy { linkTo, linkLabel } API', () => {- renderWithRouter(<EmptyState message="msg" linkTo="/meatspace/genome" linkLabel="Upload Genome" />);- const link = screen.getByText('Upload Genome').closest('a');- expect(link.getAttribute('href')).toBe('/meatspace/genome');- });-it('renders no action element when only a label is given', () => {const { container } = renderWithRouter(<EmptyState message="msg" actionLabel="Nowhere" />);expect(container.querySelector('a')).toBeNull();diff --git a/client/src/components/insights/TasteIdentityTab.jsx b/client/src/components/insights/TasteIdentityTab.jsxindex e3f6e66614..f6a4694101 100644--- a/client/src/components/insights/TasteIdentityTab.jsx+++ b/client/src/components/insights/TasteIdentityTab.jsx@@ -101,8 +101,8 @@ export default function TasteIdentityTab() {return (<EmptyStatemessage="No taste profile completed yet. Complete the taste questionnaire to generate identity themes."- linkTo="/digital-twin/taste"- linkLabel="Complete Taste Profile"+ actionTo="/digital-twin/taste"+ actionLabel="Complete Taste Profile"/>);}