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: preserve audit overrides when selecting a quality category

[._.]/ Adam Eivy01cdfbef828b
diff --git a/client/src/components/apps/AppQuality.jsx b/client/src/components/apps/AppQuality.jsx
index b79dc3a88c..540547a906 100644
--- a/client/src/components/apps/AppQuality.jsx
+++ b/client/src/components/apps/AppQuality.jsx
@@ -24,7 +24,7 @@ export default function AppQuality({ app, detail = false }) {
</Link>
);
return (
- <section aria-label="App quality" className="bg-port-card border border-port-border rounded-lg p-4 space-y-3">
+ <AppQualityRunner key={app.id} app={app}>{runner => <section aria-label="App quality" className="bg-port-card border border-port-border rounded-lg p-4 space-y-3">
<h3 className="font-semibold text-white">{label}</h3>
<p className="text-xs text-gray-400">
Assessments describe the code before fixes. The overall score is the equal-weight mean of broad, medium/high-confidence assessments from the last 30 days.
@@ -48,7 +48,7 @@ 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} />}
+ {!selectedCategory && runner}
<AppQualityHistory appId={app.id} categories={quality?.categories} />
</div>
{!!quality?.categories?.length && (
@@ -72,7 +72,7 @@ export default function AppQuality({ app, detail = false }) {
</td>
</tr>
{selectedCategory?.id === category.id && <tr><td colSpan={3} className="pb-3">
- <AppQualityRunner key={app.id} app={app} />
+ {runner}
</td></tr>}
</Fragment>
))}</tbody>
@@ -81,6 +81,6 @@ export default function AppQuality({ app, detail = false }) {
</section>
)}
</div>
- </section>
+ </section>}</AppQualityRunner>
);
}
diff --git a/client/src/components/apps/AppQuality.test.jsx b/client/src/components/apps/AppQuality.test.jsx
index d61bc5a87c..fc15774a65 100644
--- a/client/src/components/apps/AppQuality.test.jsx
+++ b/client/src/components/apps/AppQuality.test.jsx
@@ -2,7 +2,7 @@ import { fireEvent, render, screen, within } from '@testing-library/react';
import { MemoryRouter } from 'react-router';
import { it, expect, vi } from 'vitest';
import AppQuality from './AppQuality';
-vi.mock('./AppQualityRunner', () => ({ default: () => <div>Runner</div> }));
+vi.mock('./AppQualityRunner', () => ({ default: ({ children }) => children(<div>Runner</div>) }));
vi.mock('../../services/apiApps', () => ({ getAppQualityHistory: vi.fn().mockResolvedValue({ points: [], totalCategories: 25 }) }));
it('shows zero as a real score and explains excluded categories in the breakdown', async () => {
diff --git a/client/src/components/apps/AppQualityRunner.jsx b/client/src/components/apps/AppQualityRunner.jsx
index 2f3b0131f6..b6827b811c 100644
--- a/client/src/components/apps/AppQualityRunner.jsx
+++ b/client/src/components/apps/AppQualityRunner.jsx
@@ -11,7 +11,7 @@ import { getMaintenanceRuns, startMaintenanceRun, stopMaintenanceRun } from '../
const eligibleProvider = provider => provider.enabled && isProcessProvider(provider) && familyForProvider(provider);
const needsCheck = category => category.score == null || category.stale || category.coverage !== 'broad' || category.confidence === 'low';
-export default function AppQualityRunner({ app }) {
+export default function AppQualityRunner({ app, children }) {
const categories = app.quality?.categories || [];
const [params, setParams] = useSearchParams();
const requested = params.get('qualityCheck');
@@ -55,7 +55,7 @@ export default function AppQualityRunner({ app }) {
if (response) setRun(response.run);
setBusy(false);
};
- return <section id="quality-runner" aria-label="Run quality checks" className="border-t border-port-border pt-3 space-y-3">
+ const controls = <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
@@ -86,4 +86,5 @@ export default function AppQualityRunner({ app }) {
{run.status === 'running' && <button type="button" className="text-xs text-port-accent" disabled={busy} onClick={stop}>Stop remaining checks</button>}
</div>}
</section>;
+ return children ? children(controls) : controls;
}
diff --git a/client/src/components/apps/AppQualityRunner.test.jsx b/client/src/components/apps/AppQualityRunner.test.jsx
index abfca97a28..8a44ef446c 100644
--- a/client/src/components/apps/AppQualityRunner.test.jsx
+++ b/client/src/components/apps/AppQualityRunner.test.jsx
@@ -2,6 +2,8 @@ import { fireEvent, render, screen, waitFor } from '@testing-library/react';
import { MemoryRouter } from 'react-router';
import { beforeEach, expect, it, vi } from 'vitest';
import AppQualityRunner from './AppQualityRunner';
+import AppQuality from './AppQuality';
+vi.mock('./AppQualityHistory', () => ({ default: () => null }));
import { getMaintenanceRuns, startMaintenanceRun } from '../../services/apiAgents';
vi.mock('../../services/apiAgents', () => ({ getMaintenanceRuns: vi.fn(), startMaintenanceRun: vi.fn(), stopMaintenanceRun: vi.fn() }));
vi.mock('../../hooks/useProviderModels', () => ({ default: () => ({ providers: [], selectedProviderId: 'codex', selectedModel: 'gpt-5', availableModels: [], loading: false }) }));
@@ -35,3 +37,19 @@ it('allows one category and recovers from launch failure without reporting a run
expect(button).toBeEnabled();
expect(startMaintenanceRun.mock.calls[0][0]).toMatchObject({ mode: 'file-issues', taskTypes: ['performance'] });
});
+
+it('preserves run overrides when moving controls into a category row', async () => {
+ startMaintenanceRun.mockResolvedValue({ run: { id: 'run-2', status: 'running', steps: [] } });
+ render(<MemoryRouter><AppQuality app={app} detail /></MemoryRouter>);
+ await waitFor(() => expect(screen.getByRole('button', { name: 'Run 2 checks now' })).toBeEnabled());
+ fireEvent.change(screen.getByLabelText('Mode'), { target: { value: 'fix' } });
+ fireEvent.click(screen.getByText('Use high effort'));
+ fireEvent.click(screen.getByRole('link', { name: 'Configure and run Security' }));
+ expect(screen.getByLabelText('Checks')).toHaveValue('security');
+ expect(screen.getByLabelText('Mode')).toHaveValue('fix');
+ fireEvent.click(screen.getByRole('button', { name: 'Run now' }));
+ await waitFor(() => expect(startMaintenanceRun).toHaveBeenCalledWith(
+ { appId: 'app-1', providerId: 'codex', model: 'gpt-5', effort: 'high', mode: 'fix', claimBetweenAudits: false, taskTypes: ['security'] },
+ { silent: true }
+ ));
+});