Repository navigation
Closed
Labels
difficulty:2Half a day - 1 dayHalf a day - 1 dayenhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
Problem
Settings → Diagnostics adds little that users can't already get elsewhere:
- Report a problem in the sidebar already collects the recent errors and exports the diagnostics bundle (
desktop/src/components/layout/ReportProblemDialog.tsx). - Doctor already appears where it's needed, on the crash screen (
desktop/src/components/ErrorBoundary.tsx) and on the startup error screen (desktop/src/components/layout/StartupErrorView.tsx). Its server half only does a dry run:DoctorService.repairinsrc/server/services/doctorService.tsreturnsdryRun: true, mutated: falseand changes nothing. - The warning count on the page is mostly noise. Every API request that fails because the server isn't reachable (
Failed to fetch) is recorded as a diagnostic event (reportApiFailureindesktop/src/api/client.ts). The scheduled task notification poller (desktop/src/hooks/useScheduledTaskDesktopNotifications.ts) produces two such events on every poll while the server is starting or restarting. In one local log, 546 of 588 events were these.
What to do
Remove
- The Diagnostics settings page:
desktop/src/pages/DiagnosticsSettings.tsx, its tab indesktop/src/pages/Settings.tsxand'diagnostics'in the settings tab type indesktop/src/stores/uiStore.ts. - The
/doctorslash command, which only opens that page (SETTINGS_SLASH_COMMANDSindesktop/src/components/chat/composerUtils.ts). - The diagnostics endpoints only that page uses, on both sides:
- server,
src/server/api/diagnostics.ts:GET status,GET events,POST open-log-dir,DELETE /api/diagnostics; - service,
src/server/services/diagnosticsService.ts:getStatus,openLogDir,clearand anything only they use; - client,
desktop/src/api/diagnostics.ts:getStatus,getEvents,openLogDir,clearand their types.
- server,
- The Doctor server half:
src/server/api/doctor.ts,src/server/services/doctorService.ts, thedoctorcase insrc/server/router.ts,desktop/src/api/doctor.ts, and the server part ofrunDoctorRepairindesktop/src/lib/doctorRepair.ts.DoctorPanelthen shows only the local result. - i18n keys that no longer have a user, in both
en.tsandzh.ts, and the tests for removed code.
Change
- Don't record a diagnostic event when an API request fails because the server can't be reached (
Failed to fetch). Keep recording failures where the server answered with an error.
Keep
- The diagnostics event log,
buildProblemReport(src/server/services/problemReport.ts) and the export bundle withreveal-export: Report a problem uses them. POST /api/diagnostics/events: clients still record real errors there.- The local Doctor repair (clearing a few
localStoragekeys) on the crash and startup error screens. - Unrelated things with similar names:
/api/status/diagnostics(config directories for Settings) and the Computer Use doctor (/api/computer-use/doctor).
Done when
- No Diagnostics tab in Settings, no
/doctorcommand, no/api/doctorroute, and no dead exports, types or i18n keys left behind. - Report a problem still shows recent errors and exports a bundle; the crash and startup error screens still offer Doctor.
- A failed request with no server response is not recorded, and a request the server rejects still is, with a test for each.
- The checks in AGENTS.md pass, and the CHANGELOG has an entry under
[Unreleased]→ Removed.
Comment here if you'd like to take it.
Metadata
Metadata
Assignees
Labels
difficulty:2Half a day - 1 dayHalf a day - 1 dayenhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Activity
iruzen-dono commentedon Nov 13, 2026
I'd like to take this one.
Plan, matching the "What to do" order:
en.tsandzh.ts), and the tests for the removed code./doctorcommand and the/api/doctorroute, withDoctorService.repair's dry-run half — keeping the local repair the crash and startup error screens call.[Unreleased]→ Removed.I will start on Windows 11 with Bun 1.3.14. If anyone is already on it, say so and I'll pick another one instead.
iruzen-dono commentedon Nov 13, 2026
Opened #250 for this: #250
What it removes: the Diagnostics tab and its page, the
/doctorcommand (both the CLI command and the composer one that opened the tab),/api/doctorwithDoctorService, and 28 i18n keys fromen.tsandzh.ts. What it keeps: the local Doctor repair on the crash and startup error screens, the diagnostics event log,buildProblemReportand the export bundle, plus/api/status/diagnostics.On the behaviour change: a request now goes unrecorded only when
fetchitself rejects with aTypeError, i.e. the server was never reached. Timeouts are still recorded, because the server was reachable and slow andmcpDiagnostics.test.tslocks the redaction of MCP environment values on that path.bun run lint,bun run test -- --runandbun testall pass on the changed areas; the remaining red tests in this Windows checkout are red onmaintoo (artifact symlinks,prepare-ripgrep, twoActiveSessioncontext tests,LocalSlashCommandPanel,MessageList,UpdateChecker) and I listed them in the PR body with the comparison.CI on the PR is showing
action_required, which is the fork approval gate rather than a failed job. Nothing else is pending on my side.refactor(settings): finish the Diagnostics removal the review asked for
refactor(settings): remove the Diagnostics page and the dry-run serve…