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
feat: expose app quality audit controls beside category evidence
[._.]/ Adam Eivyf76abaf1898a
diff --git a/client/src/components/apps/AppQuality.jsx b/client/src/components/apps/AppQuality.jsxindex 79d527ee9e..b79dc3a88c 100644--- a/client/src/components/apps/AppQuality.jsx+++ b/client/src/components/apps/AppQuality.jsx@@ -1,10 +1,18 @@import AppQualityRunner from './AppQualityRunner';import AppQualityHistory from './AppQualityHistory';-import { Link } from 'react-router';+import { Fragment } from 'react';+import { Link, useSearchParams } from 'react-router';import { formatDateShort } from '../../utils/formatters';export default function AppQuality({ app, detail = false }) {+ const [params] = useSearchParams();const quality = app.quality;+ const selectedCategory = quality?.categories?.find(category => category.id === params.get('qualityCheck'));+ const runnerLink = categoryId => {+ const next = new URLSearchParams(params);+ next.set('qualityCheck', categoryId);+ return { search: next.toString(), hash: '#quality-runner' };+ };const score = quality?.score;const hasAssessments = quality?.categories?.some(category => category.assessedAt);const unscoredLabel = hasAssessments ? 'Quality: no qualifying score' : 'Quality: not assessed';@@ -40,8 +48,8 @@ export default function AppQuality({ app, detail = false }) {<div className="flex flex-wrap gap-4 text-sm text-port-accent"><Link to="/cos/schedule" className="hover:underline">Scheduled audit runners</Link><Link to="/cos/agents" className="hover:underline">View agents</Link></div><div className="grid grid-cols-1 xl:grid-cols-2 gap-5 items-start"><div className="min-w-0 space-y-4">+ {!selectedCategory && <AppQualityRunner key={app.id} app={app} />}<AppQualityHistory appId={app.id} categories={quality?.categories} />- <AppQualityRunner key={app.id} app={app} /></div>{!!quality?.categories?.length && (<section aria-label="Category breakdown" className="min-w-0">@@ -50,18 +58,23 @@ export default function AppQuality({ app, detail = false }) {<table className="w-full text-sm text-left"><thead className="text-gray-400 sticky top-0 bg-port-card"><tr><th className="py-2 pr-3">Category</th><th className="pr-3">Score</th><th>Evidence</th></tr></thead><tbody>{quality.categories.map(category => (- <tr key={category.id} className="border-t border-port-border align-top">+ <Fragment key={category.id}><tr className="border-t border-port-border align-top"><th scope="row" className="py-2 pr-3 font-medium">{category.label}<Link className="block text-xs font-normal text-port-accent hover:underline" to={`/cos/schedule?task=${encodeURIComponent(category.id)}`} aria-label={`${category.label} runner`}>Runner settings</Link></th><td className="py-2 pr-3 whitespace-nowrap">{category.score == null ? '—' : `${category.score}/100`}</td><td className="py-2 text-xs text-gray-400"><div>{category.stale ? 'Stale · ' : ''}{category.coverage}{category.confidence && ` · ${category.confidence} confidence`}{category.assessedAt && ` · ${formatDateShort(category.assessedAt)}`}</div>+ <Link to={runnerLink(category.id)} aria-label={`Configure and run ${category.label}`} className="block mt-1 text-port-accent hover:underline">Configure and run</Link>{category.summary && <details className="mt-1"><summary className="cursor-pointer text-port-accent">Assessment details</summary><p className="break-words">{category.summary}</p></details>}{category.totalFiles > 0 && <div>{category.scannedFiles}/{category.totalFiles} files scanned · Worst severity: {category.worstSeverity}/10</div>}{category.sourcePeerId && <div>Source: {category.sourcePeerName || 'federated peer'} · <Link className="text-port-accent hover:underline" to="/instances">View instances</Link></div>}{!category.sourcePeerId && category.agentId && <Link className="text-port-accent hover:underline" to={`/cos/agents/${category.agentId}`}>Audit run</Link>}</td></tr>+ {selectedCategory?.id === category.id && <tr><td colSpan={3} className="pb-3">+ <AppQualityRunner key={app.id} app={app} />+ </td></tr>}+ </Fragment>))}</tbody></table></div>diff --git a/client/src/components/apps/AppQuality.test.jsx b/client/src/components/apps/AppQuality.test.jsxindex c981f680fd..d61bc5a87c 100644--- a/client/src/components/apps/AppQuality.test.jsx+++ b/client/src/components/apps/AppQuality.test.jsx@@ -1,4 +1,4 @@-import { render, screen } from '@testing-library/react';+import { fireEvent, render, screen, within } from '@testing-library/react';import { MemoryRouter } from 'react-router';import { it, expect, vi } from 'vitest';import AppQuality from './AppQuality';@@ -52,3 +52,19 @@ it('identifies federated evidence and incomplete scores without linking to a locexpect(screen.getByRole('link', { name: 'View instances' })).toHaveAttribute('href', '/instances');expect(screen.queryByRole('link', { name: 'Audit run' })).not.toBeInTheDocument();});++it('opens the shared runner beside unavailable category evidence while preserving URL filters', async () => {+ const app = { id: 'example', quality: { categories: [+ { id: 'security', label: 'Security', score: null, coverage: 'unavailable' },+ { id: 'ux', label: 'UX', score: null, coverage: 'unavailable' },+ ] } };+ render(<MemoryRouter initialEntries={['/apps/example/quality?period=30']}><AppQuality app={app} detail /></MemoryRouter>);+ await screen.findByText(/No scored assessments/);+ const link = screen.getByRole('link', { name: 'Configure and run Security' });+ expect(link).toHaveAttribute('href', '/apps/example/quality?period=30&qualityCheck=security#quality-runner');+ fireEvent.click(link);+ const table = screen.getByRole('table');+ expect(within(table).getByText('Runner')).toBeInTheDocument();+ expect(screen.getAllByText('Runner')).toHaveLength(1);+ expect(screen.getAllByText('unavailable')).toHaveLength(2);+});diff --git a/client/src/components/apps/AppQualityRunner.jsx b/client/src/components/apps/AppQualityRunner.jsxindex 8a2937a435..2f3b0131f6 100644--- a/client/src/components/apps/AppQualityRunner.jsx+++ b/client/src/components/apps/AppQualityRunner.jsx@@ -55,7 +55,7 @@ export default function AppQualityRunner({ app }) {if (response) setRun(response.run);setBusy(false);};- return <section aria-label="Run quality checks" className="border-t border-port-border pt-3 space-y-3">+ return <section id="quality-runner" aria-label="Run quality checks" className="border-t border-port-border pt-3 space-y-3"><h4 className="font-medium">Run quality checks</h4><div className="grid grid-cols-1 sm:grid-cols-2 gap-3 text-sm"><label htmlFor="quality-checks">Checks@@ -77,7 +77,7 @@ export default function AppQualityRunner({ app }) {<p className="text-xs text-gray-400">{taskTypes.length} scheduled agents, run sequentially with these overrides. {mode === 'fix' ? 'Each selected audit can change code and open a PR.' : 'Findings become issues; no fixes or backlog claim jobs.'} Existing task enablement and Improve settings apply.</p><details className="text-xs"><summary className="cursor-pointer text-port-accent">Selected checks ({taskTypes.length})</summary><p className="mt-1">{categories.filter(category => taskTypes.includes(category.id)).map(category => category.label).join(', ') || 'All categories have qualifying evidence.'}</p></details><button type="button" onClick={start} disabled={busy || !loaded || picker.loading || !picker.selectedProviderId || !picker.selectedModel || !taskTypes.length || run?.status === 'running' || app.quality?.unavailable}- className="px-3 py-2 rounded bg-port-accent text-port-bg text-sm font-medium disabled:opacity-50">Run {taskTypes.length} checks now</button>+ className="px-3 py-2 rounded bg-port-accent text-port-bg text-sm font-medium disabled:opacity-50">{taskTypes.length === 1 ? 'Run now' : `Run ${taskTypes.length} checks now`}</button>{!loaded && <p className="text-xs" role="status">Loading runner status… <button type="button" className="text-port-accent" onClick={loadRuns}>Retry</button></p>}{error && <p role="alert" className="text-sm text-port-error">{error}</p>}{run && <div className="space-y-2">diff --git a/client/src/components/apps/AppQualityRunner.test.jsx b/client/src/components/apps/AppQualityRunner.test.jsxindex 324f958d53..abfca97a28 100644--- a/client/src/components/apps/AppQualityRunner.test.jsx+++ b/client/src/components/apps/AppQualityRunner.test.jsx@@ -28,7 +28,7 @@ it('allows one category and recovers from launch failure without reporting a runstartMaintenanceRun.mockRejectedValue(new Error('Provider unavailable'));render(<MemoryRouter><AppQualityRunner app={app} /></MemoryRouter>);fireEvent.change(screen.getByLabelText('Checks'), { target: { value: 'performance' } });- const button = screen.getByRole('button', { name: 'Run 1 checks now' });+ const button = screen.getByRole('button', { name: 'Run now' });await waitFor(() => expect(button).toBeEnabled());fireEvent.click(button);expect(await screen.findByRole('alert')).toHaveTextContent('Provider unavailable');