Repository navigation
fix(doctor): stop the plugin check from holding back later checks - #889
Merged
Merged
Conversation
The dashboard's Doctor page streams checks as doctor finds them, but the plugin check asks each Agent's native CLI what is installed and can take many seconds. Checks run in order, so backups, trash and the version checks waited behind it while the page showed only an unlabeled skeleton row, with nothing saying which check was still running. When doctor streams, the plugin check now runs in the background. It is streamed first as a "pending" row in its place, the checks after it stream as soon as they finish, and its result follows. The full result keeps the check in its original place. Text output and plain --json run it inline as before. The dashboard shows a pending row as the check's name with a spinner and "Checking", replaces it in place when the result arrives, keeps it visible under every filter, and drops the unlabeled skeleton while it is shown. The /api/doctor/stream reference documents the pending row.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Doctor scans the skill source before it streams its first check, and runs git status on the source inline. On a large source either can take seconds, and the dashboard showed only an unlabeled skeleton meanwhile. A streamed doctor now sends a pending "source" row before the scan, and runs the Git check in the background like the plugin check, so the checks after it no longer wait. A finished background check is recorded at the next check instead of at the end, so its row does not stay pending after its result is known. The pending row now holds the check's place in the result while it runs.
Owner
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
6 of 9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type
proposals/only — see CONTRIBUTING.md)approvedlabel)Linked Issue
Follow-up to #870 (Doctor page streams checks as they finish). No separate issue.
What changed
_SKILLSHARE_DOCTOR_STREAM=1, used by/api/doctor/stream), the plugin check runs in the background through a newdoctorResult.later. It streams apendingrow in its place right away, backups, trash and the version checks stream as soon as they finish, and the plugin result follows. The full result keeps the check between hooks and backups. Text output and plain--jsonrun it inline with a spinner, as before.sourcerow before it scans the skill source, and runs the Git check in the background the same way, so the checks after it do not wait. A finished background check is recorded at the next check, not at the end, so its row does not stay pending after its result is known. The pending row holds the check's place in the result until then.update.check.checkingkey, translated in all locales). The result replaces it in place (withStreamedCheck). It stays visible under every filter, and the unlabeled skeleton row is hidden while it shows./api/doctor/streamrow inui.mdand its four translations describe the pending row.Why
The plugin check asks each Agent's native CLI what is installed and can take many seconds. Checks ran in order, so the page stopped at an unlabeled skeleton row after Hooks and showed nothing below it until plugins finished.
Verification
make checkin the devcontainer passed: Go unit and integration tests, and the Herdr node tests.go test -race ./cmd/skillshare/passed.vitestforsrc/lib/doctorUpdates.test.ts, plustsc -band eslint on the changed files, were clean.python3 scripts/ai-context.py checkpassed.TestDoctorLaterStreamsPendingAndKeepsItsPlace: a check added while the plugin check is still blocked streams before its result, and the result keeps its slot.TestDoctor_JSON_StreamDefersPluginCheck: the CLI path with a plugin package configured.withStreamedCheckvitest: a pending row is replaced in place.TestDoctorLaterRecordsAFinishedCheckAtTheNextCheck: a finished background check streams right after the next check.go test -raceon the doctor tests, repeated 10 times.gitthat sleeps 3 s per call, running the built binary directly:sourcepending at 14 ms, every other check by 35 ms, and the Git result at 3 s.claudeCLI that sleeps 2 s per call (first commit):pluginspending at 987 ms, then backup, trash and both versions by 989 ms, and the plugin result at 15 s. The final JSON order washooks, plugins, backup.Not run: the full UI test suite, the website build, Windows, E2E runbooks. The new tests were not run against the old code first.
Not covered
Checklist
make check) — for code changes