doctor: stop planning a TUI config entry on OpenCode 2 - #368
Merged
Merged
Conversation
OpenCode 2 loads the TUI plugin from the package's own entrypoint and reads no tui.json, and ensureTuiPluginEntry already writes nothing there. The fix plan still listed "Will add ... to tui.json (TUI sidebar)" because it gated on hasTuiPluginEntry(), which is always false on V2. Let the adapter say whether a TUI config entry applies, and skip the plan item and the apply step when it does not.
Contributor
|
#367 has the |
|
Merged, thanks @coleleavitt. |
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.
Linked issue
Approved issue: #367
What changes
HarnessAdaptergains an optionaltuiPluginEntryApplies(). OpenCode answersconfigGeneration() !== "v2"; adapters that don't implement it keep today's behaviour.buildDoctorFixPlanskips the "(TUI sidebar)" item when it returnsfalse, and the--fixapply loop skips callingensureTuiPluginEntryfor the same case, so the plan and the applied changes agree.hasTuiPluginEntry()is untouched, so diagnostics still report what the file contains.How it was checked
bun testinpackages/aft-cli: 360 pass.doctor.test.ts);OpenCodeAdapter.tuiPluginEntryApplies()is true for V1 and false for V2 (opencode-generation-config.test.ts). The V2 plan test fails without thedoctor.tschange.tsc --noEmitandbiome check packages/aft-cli/srcclean.doctor --fixpreviously listed "Will add … to tui.json (TUI sidebar)"; with this change that line is gone.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Stops
doctorfrom planning a TUI sidebar entry on OpenCode 2, where the plugin is loaded from the package's own entrypoint and no tui.json is read, so the plan no longer offers a repair that writes nothing (issue #367).HarnessAdaptergains an optionaltuiPluginEntryApplies(); OpenCode returnsconfigGeneration() !== "v2", and adapters that don't implement it keep today's behavior.buildDoctorFixPlanand the--fixapply loop skip the TUI entry when it returns false, so the plan and applied changes agree.hasTuiPluginEntry()is untouched, so diagnostics still report what the file contains.Written for commit 5d4cd1a. Summary will update on new commits.