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: reoffer stale unavailable quality assessments

Adam Eivy64b6f507ed5b
diff --git a/client/src/components/apps/AppQualityRunner.jsx b/client/src/components/apps/AppQualityRunner.jsx
index 8e24f117e3..a85f647c86 100644
--- a/client/src/components/apps/AppQualityRunner.jsx
+++ b/client/src/components/apps/AppQualityRunner.jsx
@@ -16,8 +16,8 @@ const isApplicable = category => category.applicable !== false;
const BELOW_COMPOSITE = 'below-composite';
const needsCheck = category => {
if (!isApplicable(category)) return false;
- // A stale not-applicable ruling has expired (the repo may have gained a UI), so it is re-offered.
- if ((category.coverage === 'not-applicable' && !category.stale) || (category.coverage === 'unavailable' && category.assessedAt)) return false;
+ // Expired assessments can be retried; current applicability still gates the batch above.
+ if (!category.stale && (category.coverage === 'not-applicable' || (category.coverage === 'unavailable' && category.assessedAt))) return false;
return category.score == null || category.stale || category.coverage !== 'broad' || category.confidence === 'low';
};
@@ -60,7 +60,7 @@ export default function AppQualityRunner({ app, children }) {
: `No applicable checks currently score below the overall composite score of ${compositeScore}/100.`
: selection === 'all'
? 'No applicable checks are available.'
- : 'No checks need evidence. Unavailable assessments and categories that do not apply to this repository are excluded.';
+ : 'No checks need evidence. Recent unavailable assessments and categories that do not apply to this repository are excluded.';
const { data, loading, error: loadError, refetch: loadRuns, updateData: setRuns } = useSocketResource(
() => getMaintenanceRuns({ silent: true }).then(response => response.runs.filter(entry => entry.appId === app.id)),
{ namespace: 'cos', events: RUN_EVENTS, resourceKey: app.id, matchesEvent: run => run?.appId === app.id },
diff --git a/client/src/components/apps/AppQualityRunner.test.jsx b/client/src/components/apps/AppQualityRunner.test.jsx
index 8684e26f6e..9f8058ad59 100644
--- a/client/src/components/apps/AppQualityRunner.test.jsx
+++ b/client/src/components/apps/AppQualityRunner.test.jsx
@@ -152,12 +152,16 @@ it('excludes known unavailable and N/A assessments from suggestions while allowi
await waitFor(() => expect(startMaintenanceRun).toHaveBeenLastCalledWith(expect.objectContaining({ taskTypes: ['typing', 'console-errors', 'security'] }), { silent: true }));
});
-it('re-offers a category whose not-applicable ruling has expired', async () => {
+it.each(['not-applicable', 'unavailable'])('re-offers stale %s evidence without forcing inapplicable checks', async coverage => {
startMaintenanceRun.mockResolvedValue({ run: { id: 'run-5', status: 'running', steps: [] } });
- const categories = [{ id: 'accessibility', label: 'Accessibility', score: null, coverage: 'not-applicable', stale: true, assessedAt: '2026-07-01T00:00:00Z' }];
+ const categories = [
+ { id: 'accessibility', label: 'Accessibility', score: null, coverage, stale: true, assessedAt: '2026-07-01T00:00:00Z' },
+ { id: 'mobile-responsive', label: 'Mobile', score: null, coverage, stale: true, applicable: false, assessedAt: '2026-07-01T00:00:00Z' },
+ ];
render(<MemoryRouter><AppQualityRunner app={{ ...app, quality: { categories } }} /></MemoryRouter>);
fireEvent.click(await findEnabledByRole('button', { name: 'Run now' }));
await waitFor(() => expect(startMaintenanceRun).toHaveBeenLastCalledWith(expect.objectContaining({ taskTypes: ['accessibility'] }), { silent: true }));
+ expect(startMaintenanceRun.mock.lastCall[0]).not.toHaveProperty('explicitCheck');
});
it('leaves audits that cannot apply to this repository out of batch runs, but runs one on request', async () => {