Skip to content

fix(tui): preserve explicit config during migration - #50846

Open
sdivyanshu90 wants to merge 1 commit into
anomalyco:devfrom
sdivyanshu90:preserve-custom-config
Open

sdivyanshu90 wants to merge 1 commit into
anomalyco:devfrom
sdivyanshu90:preserve-custom-config

Conversation

@sdivyanshu90

Copy link
Copy Markdown

Issue for this PR

Closes #50842

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

TUI migration included the file selected by OPENCODE_CONFIG, wrote its TUI settings to an adjacent tui.json, and stripped the original file even though the TUI loader intentionally does not read that adjacent path. This limits migration to the normal config search paths, preserving arbitrary explicit config files for users to migrate with OPENCODE_TUI_CONFIG.

How did you verify your code works?

  • Added a regression that preserves theme and keybinds and creates neither tui.json nor a migration backup for an external OPENCODE_CONFIG file.
  • packages/opencode: bun test test/config/tui.test.ts — 34 passed, 3 Windows-only skipped, 0 failed on Bun 1.3.14.
  • packages/opencode: bun typecheck produced no diagnostics but did not complete after several minutes in this environment and was stopped.
  • The repository-wide pre-push typecheck failed in unrelated packages/console/function/src/auth-redirect.test.ts because bun:test types could not be resolved; the push was completed with Husky skipped.

Screenshots / recordings

Not applicable; this is configuration migration logic.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@sdivyanshu90

Copy link
Copy Markdown
Author

Hi @thdxr @jlongster, could you please review this PR whenever you have some time. Thanks!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TUI migration strips settings from OPENCODE_CONFIG into an ignored file

1 participant