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
fix: announce expanded state on the list-enrichment analysis section toggles (#3922)
[._.]/ Adam Eivy4b22289b2071
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.mdindex 8a1fb0d973..e4845ce021 100644--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@ -38,6 +38,8 @@## Changed+- The three collapsible result sections in the digital-twin list enrichment view — Item-by-Item Analysis, Patterns Detected and Personality Insights — now announce whether they are open. Their headers were plain `<button>`s whose only expanded/collapsed signal was the chevron glyph swapping between down and right, so a screen reader read the same label before and after activation with no state to report. Each header now carries `aria-expanded` bound to its own visibility flag and `aria-controls` pointing at the panel it toggles, and the panels carry the matching ids.+- A federated catalog bundle whose live rows sit outside `ingredients` no longer bypasses the peer-sync schema-version gate. `applyIncomingPush` decided whether to gate the `catalog` category by looking at `catalogBundle.ingredients` alone, but the exporter already ships ingredient-free bundles (`refs` only), and catalog schema v4–v8 added `relations`, `tags`, `media` and `catalogTypes` blocks — so a peer on a newer catalog schema could push forward-shaped rows straight into an older receiver, which then tried to apply structures it can't interpret. The gate now counts a live row in ANY block of the bundle, including one added by a catalog version newer than the receiver knows about, and such a push is rejected with the usual 409 `PEER_SYNC_SCHEMA_VERSION_AHEAD`. Tombstone-only bundles stay exempt, so federated catalog deletes still converge across a version gap.- Adding an app no longer writes a PM2 config into the project on its own. Importing a directory ran the PM2 standardizer the instant detection finished — dropping an `ecosystem.config.cjs` into the repo, commenting the ports out of its `.env` and Vite config, and cutting a git backup branch — before you had even saved the app. Only iOS/macOS/Swift/Xcode projects were exempt, so Docker stacks, Python services, static sites, and anything else you start another way all got a PM2 config they will never use, plus an LLM call nobody asked for. Standardizing is now a button in the Add App wizard that says what it will rewrite, and it is still available later from the Apps list. The wizard also shows the standardizer's live per-step detail while it runs (including the "no git repository, backup skipped" case) instead of one undifferentiated row.diff --git a/client/src/components/digital-twin/ListEnrichment.jsx b/client/src/components/digital-twin/ListEnrichment.jsxindex 76764e0c82..715163a48f 100644--- a/client/src/components/digital-twin/ListEnrichment.jsx+++ b/client/src/components/digital-twin/ListEnrichment.jsx@@ -297,6 +297,9 @@ export default function ListEnrichment({{analysis.itemAnalysis?.length > 0 && (<div className="bg-port-card rounded-lg border border-port-border overflow-hidden"><button+ type="button"+ aria-expanded={showItemAnalysis}+ aria-controls="item-analysis-panel"onClick={() => setShowItemAnalysis(!showItemAnalysis)}className="w-full p-4 flex items-center justify-between hover:bg-port-border/30 transition-colors">@@ -308,7 +311,7 @@ export default function ListEnrichment({</button>{showItemAnalysis && (- <div className="p-4 pt-0 space-y-3">+ <div id="item-analysis-panel" className="p-4 pt-0 space-y-3">{analysis.itemAnalysis.map((item, i) => (<div key={i} className="p-3 bg-port-bg rounded-lg"><div className="font-medium text-white mb-1">{item.title}</div>@@ -324,6 +327,9 @@ export default function ListEnrichment({{analysis.patterns?.length > 0 && (<div className="bg-port-card rounded-lg border border-port-border overflow-hidden"><button+ type="button"+ aria-expanded={showPatterns}+ aria-controls="patterns-panel"onClick={() => setShowPatterns(!showPatterns)}className="w-full p-4 flex items-center justify-between hover:bg-port-border/30 transition-colors">@@ -335,7 +341,7 @@ export default function ListEnrichment({</button>{showPatterns && (- <div className="p-4 pt-0">+ <div id="patterns-panel" className="p-4 pt-0"><ul className="space-y-2">{analysis.patterns.map((pattern, i) => (<li key={i} className="flex items-start gap-2 text-gray-300">@@ -353,6 +359,9 @@ export default function ListEnrichment({{analysis.personalityInsights && (<div className="bg-port-card rounded-lg border border-port-border overflow-hidden"><button+ type="button"+ aria-expanded={showInsights}+ aria-controls="insights-panel"onClick={() => setShowInsights(!showInsights)}className="w-full p-4 flex items-center justify-between hover:bg-port-border/30 transition-colors">@@ -364,7 +373,7 @@ export default function ListEnrichment({</button>{showInsights && (- <div className="p-4 pt-0 space-y-3">+ <div id="insights-panel" className="p-4 pt-0 space-y-3">{Object.entries(analysis.personalityInsights).map(([key, value]) => (<div key={key} className="p-3 bg-port-bg rounded-lg"><div className="text-xs text-gray-500 uppercase tracking-wider mb-1">diff --git a/client/src/components/digital-twin/ListEnrichment.test.jsx b/client/src/components/digital-twin/ListEnrichment.test.jsxnew file mode 100644index 0000000000..4055bcca04--- /dev/null+++ b/client/src/components/digital-twin/ListEnrichment.test.jsx@@ -0,0 +1,72 @@+import { describe, it, expect, vi, beforeEach } from 'vitest';+import { render, screen, fireEvent, waitFor } from '@testing-library/react';++vi.mock('../../services/api', () => ({+ getEnrichmentListItems: vi.fn(),+ analyzeEnrichmentList: vi.fn(),+ saveEnrichmentList: vi.fn(),+}));++vi.mock('../ui/Toast', () => ({+ default: { success: vi.fn(), error: vi.fn(), info: vi.fn() },+}));++import * as api from '../../services/api';+import ListEnrichment from './ListEnrichment';++const ANALYSIS = {+ itemAnalysis: [{ title: 'Example Book', insights: 'Example insight' }],+ patterns: ['Example pattern'],+ personalityInsights: { exampleTrait: 'Example value' },+ targetDoc: 'example-doc',+ suggestedDocument: 'Example document body',+};++const renderAnalyzed = async () => {+ api.getEnrichmentListItems.mockResolvedValue([{ title: 'Example Book', note: '' }]);+ api.analyzeEnrichmentList.mockResolvedValue(ANALYSIS);+ render(+ <ListEnrichment+ categoryId="favorite_books"+ onBack={() => {}}+ onRefresh={() => {}}+ providers={[{ id: 'example', name: 'Example', models: ['example-model'] }]}+ selectedProvider={{ providerId: 'example', model: 'example-model' }}+ setSelectedProvider={() => {}}+ />+ );+ fireEvent.click(await screen.findByRole('button', { name: /Analyze & Generate/i }));+ await screen.findByRole('button', { name: /Patterns Detected/i });+};++describe('ListEnrichment analysis disclosures', () => {+ beforeEach(() => vi.clearAllMocks());++ // Each collapsible header must announce its state (#3922) — the chevron icon+ // alone leaves screen-reader users with no expanded/collapsed feedback.+ it.each([+ ['Item-by-Item Analysis', 'item-analysis-panel', false],+ ['Patterns Detected', 'patterns-panel', true],+ ['Personality Insights', 'insights-panel', true],+ ])('exposes %s as a disclosure wired to its panel', async (label, panelId, defaultOpen) => {+ await renderAnalyzed();+ const button = screen.getByRole('button', { name: new RegExp(label, 'i') });+ expect(button).toHaveAttribute('aria-expanded', String(defaultOpen));+ expect(button).toHaveAttribute('aria-controls', panelId);+ if (defaultOpen) expect(document.getElementById(panelId)).toBeTruthy();+ });++ it('flips aria-expanded when a section is toggled', async () => {+ await renderAnalyzed();+ const button = screen.getByRole('button', { name: /Item-by-Item Analysis/i });+ expect(document.getElementById('item-analysis-panel')).toBeNull();++ fireEvent.click(button);+ await waitFor(() => expect(button).toHaveAttribute('aria-expanded', 'true'));+ expect(document.getElementById('item-analysis-panel')).toBeTruthy();++ fireEvent.click(button);+ await waitFor(() => expect(button).toHaveAttribute('aria-expanded', 'false'));+ expect(document.getElementById('item-analysis-panel')).toBeNull();+ });+});