Skip to content

feat: migrate opencode TUI config into main opencode.json - #864

Merged
yxtay merged 5 commits into
mainfrom
feat/opencode-tui-config-migration
Jul 3, 2026
Merged

feat: migrate opencode TUI config into main opencode.json#864
yxtay merged 5 commits into
mainfrom
feat/opencode-tui-config-migration

Conversation

@yxtay

@yxtay yxtay commented Jul 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • Move TUI settings (theme, scroll_acceleration, diff_style) from separate opencode-tui.json template into the tui key of the main opencode.json, per current opencode schema
  • Remove deprecated opencode-tui.json template and modify_tui.json script
  • Drop config keys that match defaults (autoupdate: true, tui.diff_style: "auto")

Test plan

  • Run chezmoi apply and verify ~/.config/opencode/opencode.json contains tui.scroll_acceleration.enabled: true and theme: "opencode"
  • Confirm ~/.config/opencode/tui.json is no longer managed by chezmoi

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Updated the app’s default TUI settings, including a new theme and smoother scrolling behavior.
    • Simplified the available configuration by removing some legacy preset values and template handling.

yxtay and others added 2 commits July 3, 2026 17:38
Move theme, scroll_acceleration, and diff_style into the tui key
of the main config per current opencode schema. Remove deprecated
opencode-tui.json template and modify_tui.json script.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Drop autoupdate (default: true) and tui.diff_style (default: "auto").

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@yxtay, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 52 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 34ce8b00-b37e-4a2f-9b48-98102ec169e9

📥 Commits

Reviewing files that changed from the base of the PR and between 54105d3 and ba0ede5.

📒 Files selected for processing (2)
  • chezmoi/.chezmoitemplates/opencode-tui.json
  • chezmoi/.chezmoitemplates/opencode.json
📝 Walkthrough

Walkthrough

The opencode.json template now sets a theme and enables tui.scroll_acceleration, removes autoupdate, and unpins two plugin versions. The opencode-tui.json template and the merge logic in modify_tui.json that consumed it are both removed.

Changes

OpenCode Configuration Update

Layer / File(s) Summary
Configuration and plugin updates
chezmoi/.chezmoitemplates/opencode.json
Adds theme: "opencode" and tui.scroll_acceleration.enabled: true, removes autoupdate, and drops @latest suffixes from two plugin entries.
Removal of TUI template and merge logic
chezmoi/.chezmoitemplates/opencode-tui.json, chezmoi/private_dot_config/opencode/modify_tui.json
Deletes the entire opencode-tui.json configuration content and removes the chezmoi:modify-template logic that merged it into the current JSON.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

  • yxtay/dotfiles#855: Both PRs touch the OpenCode TUI theme and scroll_acceleration configuration, one removing what the other adds.
  • yxtay/dotfiles#860: This PR removes the deep-merge modify-template logic in modify_tui.json that the related PR adds back.

Poem

A theme now shines, opencode bright,
Plugins unpinned, ready for flight,
The old TUI file hops away,
Merge logic gone, simpler day,
This rabbit thumps in JSON delight! 🐇✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: moving opencode TUI configuration into the main opencode.json.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/opencode-tui-config-migration

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

⚠️MegaLinter analysis: Success with warnings

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ BASH shfmt 3 0 0 0 0.02s
⚠️ JSON prettier 8 0 1 0 0.43s
⚠️ MARKDOWN markdownlint 6 0 2 0 0.58s
✅ MARKDOWN markdown-table-formatter 6 0 0 0 0.16s
✅ YAML prettier 10 0 0 0 0.53s

Detailed Issues

⚠️ MARKDOWN / markdownlint - 2 errors
chezmoi/private_dot_claude/modify_CLAUDE.md:1 error MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "{{- /*chezmoi:modify-template*..."]
chezmoi/private_dot_config/opencode/modify_AGENTS.md:1 error MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "{{- /*chezmoi:modify-template*..."]
⚠️ JSON / prettier - 1 error
chezmoi/.chezmoitemplates/claude-settings.json 77ms (unchanged)
chezmoi/.chezmoitemplates/opencode-tui.json 5ms (unchanged)
chezmoi/.chezmoitemplates/opencode.json 8ms (unchanged)
[error] chezmoi/private_dot_claude/modify_settings.json: SyntaxError: Unexpected token (1:2)
[error] > 1 | {{- /* chezmoi:modify-template */ -}}
[error]     |  ^
[error]   2 | {{- $current := dict -}}
[error]   3 | {{- if .chezmoi.stdin | trim -}}
[error]   4 | {{-   $current = fromJson .chezmoi.stdin -}}
chezmoi/private_dot_config/mcp/mcp_servers.json 3ms (unchanged)
[error] chezmoi/private_dot_config/opencode/modify_opencode.json: SyntaxError: Unexpected token (1:2)
[error] > 1 | {{- /* chezmoi:modify-template */ -}}
[error]     |  ^
[error]   2 | {{- $current := dict -}}
[error]   3 | {{- if .chezmoi.stdin | trim -}}
[error]   4 | {{-   $current = fromJson .chezmoi.stdin -}}
[error] chezmoi/private_dot_config/opencode/modify_tui.json: SyntaxError: Unexpected token (1:2)
[error] > 1 | {{- /* chezmoi:modify-template */ -}}
[error]     |  ^
[error]   2 | {{- $current := dict -}}
[error]   3 | {{- if .chezmoi.stdin | trim -}}
[error]   4 | {{-   $current = fromJson .chezmoi.stdin -}}
renovate.json 3ms (unchanged)

Notices

📣 MegaLinter 9.5.0 is out! Discover the new features and security recommendations in the release announcement. (Skip this info by defining SECURITY_SUGGESTIONS: false)

See detailed reports in MegaLinter artifacts

Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)

  • Documentation: Custom Flavors
  • Command: npx mega-linter-runner@9.5.0 --custom-flavor-setup --custom-flavor-linters BASH_SHFMT,JSON_PRETTIER,MARKDOWN_MARKDOWNLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER,YAML_PRETTIER

MegaLinter is graciously provided by OX Security
Show us your support by starring ⭐ the repository

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request consolidates OpenCode configuration by migrating TUI settings into chezmoi/.chezmoitemplates/opencode.json and removing obsolete template files. It also disables autoupdate and removes the @latest tag from certain plugins. The review feedback notes that the "attention.enabled": true setting was omitted during the migration and suggests restoring it under the "tui" block.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread chezmoi/.chezmoitemplates/opencode.json Outdated
Comment on lines +8 to +12
"tui": {
"scroll_acceleration": {
"enabled": true
}
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

During the migration of TUI settings from opencode-tui.json to opencode.json, the "attention.enabled": true setting was omitted. Since this setting defaults to false in OpenCode, you will no longer receive desktop notifications or sounds when the agent requires attention.\n\nPlease restore this setting under the "tui" block.

  "tui": {\n    "scroll_acceleration": {\n      "enabled": true\n    },\n    "attention": {\n      "enabled": true\n    }\n  },

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

⚠️MegaLinter analysis: Success with warnings

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ BASH bash-exec 3 0 0 0.01s
✅ BASH shellcheck 3 0 0 0.16s
✅ REPOSITORY checkov yes no no 25.15s
✅ REPOSITORY devskim yes no no 1.75s
✅ REPOSITORY dustilock yes no no 0.02s
✅ REPOSITORY gitleaks yes no no 1.56s
✅ REPOSITORY grype yes no no 53.37s
✅ REPOSITORY kingfisher yes no no 9.85s
⚠️ REPOSITORY osv-scanner yes 1 no 0.11s
✅ REPOSITORY secretlint yes no no 1.5s
✅ REPOSITORY syft yes no no 1.94s
✅ REPOSITORY trivy yes no no 11.59s
✅ REPOSITORY trivy-sbom yes no no 0.12s
✅ REPOSITORY trufflehog yes no no 4.81s

Detailed Issues

⚠️ REPOSITORY / osv-scanner - 1 error
Scanning dir .
Starting filesystem walk for root: /
End status: 41 dirs visited, 139 inodes visited, 0 Extract calls, 2.094588ms elapsed, 2.094964ms wall time
No package sources found, --help for usage information.

Notices

📣 MegaLinter 9.5.0 is out! Discover the new features and security recommendations in the release announcement. (Skip this info by defining SECURITY_SUGGESTIONS: false)

See detailed reports in MegaLinter artifacts

Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)

  • Documentation: Custom Flavors
  • Command: npx mega-linter-runner@9.5.0 --custom-flavor-setup --custom-flavor-linters BASH_EXEC,BASH_SHELLCHECK,REPOSITORY_CHECKOV,REPOSITORY_DEVSKIM,REPOSITORY_DUSTILOCK,REPOSITORY_GITLEAKS,REPOSITORY_GRYPE,REPOSITORY_OSV_SCANNER,REPOSITORY_SECRETLINT,REPOSITORY_SYFT,REPOSITORY_TRIVY,REPOSITORY_TRIVY_SBOM,REPOSITORY_TRUFFLEHOG,REPOSITORY_KINGFISHER

MegaLinter is graciously provided by OX Security
Show us your support by starring ⭐ the repository

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

⚠️MegaLinter analysis: Success with warnings

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ ACTION actionlint 5 0 0 0.31s
✅ ACTION zizmor 5 0 0 0 0.53s
✅ BASH bash-exec 3 0 0 0.01s
✅ BASH shellcheck 3 0 0 0.16s
✅ BASH shfmt 3 0 0 0 0.01s
✅ COPYPASTE jscpd yes no no 0.94s
✅ EDITORCONFIG editorconfig-checker 67 0 0 0.13s
⚠️ JSON prettier 8 0 1 0 0.58s
✅ JSON v8r 8 0 0 3.63s
⚠️ MARKDOWN markdownlint 6 0 2 0 0.71s
✅ MARKDOWN markdown-table-formatter 6 0 0 0 0.26s
✅ REPOSITORY checkov yes no no 24.88s
✅ REPOSITORY gitleaks yes no no 1.45s
✅ REPOSITORY git_diff yes no no 0.01s
✅ REPOSITORY grype yes no no 49.51s
⚠️ REPOSITORY osv-scanner yes 1 no 0.18s
✅ REPOSITORY secretlint yes no no 1.31s
✅ REPOSITORY syft yes no no 2.31s
✅ REPOSITORY trivy yes no no 11.69s
✅ REPOSITORY trivy-sbom yes no no 0.28s
✅ REPOSITORY trufflehog yes no no 4.79s
⚠️ SPELL lychee 24 2 0 0.88s
✅ YAML prettier 10 0 0 0 0.61s
✅ YAML v8r 10 0 0 7.6s
✅ YAML yamllint 10 0 0 0.63s

Detailed Issues

⚠️ SPELL / lychee - 2 errors
📝 Summary
---------------------
🔍 Total...........21
🔗 Unique..........16
✅ Successful......19
⏳ Timeouts.........0
🔀 Redirected.......4
👻 Excluded.........0
❓ Unknown..........0
🚫 Errors...........2
⛔ Unsupported......2

Errors in chezmoi/.chezmoitemplates/opencode.json
[406] https://mcp.deepwiki.com/mcp (at 25:15) | Rejected status code: 406 Not Acceptable

Errors in chezmoi/private_dot_config/mcp/mcp_servers.json
[406] https://mcp.deepwiki.com/mcp (at 11:15) | Rejected status code: 406 Not Acceptable

Hint: Followed 4 redirects. You might want to consider replacing redirecting URLs with the resolved URLs. Use verbose mode (`-v`/`-vv`) to see redirection details.
Hint: You can configure accepted/rejected response codes with `-a` or `--accept`
⚠️ MARKDOWN / markdownlint - 2 errors
chezmoi/private_dot_claude/modify_CLAUDE.md:1 error MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "{{- /*chezmoi:modify-template*..."]
chezmoi/private_dot_config/opencode/modify_AGENTS.md:1 error MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "{{- /*chezmoi:modify-template*..."]
⚠️ REPOSITORY / osv-scanner - 1 error
Scanning dir .
Starting filesystem walk for root: /
End status: 41 dirs visited, 139 inodes visited, 0 Extract calls, 3.107782ms elapsed, 3.107972ms wall time
No package sources found, --help for usage information.
⚠️ JSON / prettier - 1 error
chezmoi/.chezmoitemplates/claude-settings.json 99ms (unchanged)
chezmoi/.chezmoitemplates/opencode-tui.json 5ms (unchanged)
chezmoi/.chezmoitemplates/opencode.json 11ms (unchanged)
[error] chezmoi/private_dot_claude/modify_settings.json: SyntaxError: Unexpected token (1:2)
[error] > 1 | {{- /* chezmoi:modify-template */ -}}
[error]     |  ^
[error]   2 | {{- $current := dict -}}
[error]   3 | {{- if .chezmoi.stdin | trim -}}
[error]   4 | {{-   $current = fromJson .chezmoi.stdin -}}
chezmoi/private_dot_config/mcp/mcp_servers.json 6ms (unchanged)
[error] chezmoi/private_dot_config/opencode/modify_opencode.json: SyntaxError: Unexpected token (1:2)
[error] > 1 | {{- /* chezmoi:modify-template */ -}}
[error]     |  ^
[error]   2 | {{- $current := dict -}}
[error]   3 | {{- if .chezmoi.stdin | trim -}}
[error]   4 | {{-   $current = fromJson .chezmoi.stdin -}}
[error] chezmoi/private_dot_config/opencode/modify_tui.json: SyntaxError: Unexpected token (1:2)
[error] > 1 | {{- /* chezmoi:modify-template */ -}}
[error]     |  ^
[error]   2 | {{- $current := dict -}}
[error]   3 | {{- if .chezmoi.stdin | trim -}}
[error]   4 | {{-   $current = fromJson .chezmoi.stdin -}}
renovate.json 6ms (unchanged)

Notices

📣 MegaLinter 9.5.0 is out! Discover the new features and security recommendations in the release announcement. (Skip this info by defining SECURITY_SUGGESTIONS: false)

See detailed reports in MegaLinter artifacts

Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)

  • Documentation: Custom Flavors
  • Command: npx mega-linter-runner@9.5.0 --custom-flavor-setup --custom-flavor-linters ACTION_ACTIONLINT,ACTION_ZIZMOR,BASH_EXEC,BASH_SHELLCHECK,BASH_SHFMT,COPYPASTE_JSCPD,EDITORCONFIG_EDITORCONFIG_CHECKER,JSON_V8R,JSON_PRETTIER,MARKDOWN_MARKDOWNLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER,REPOSITORY_CHECKOV,REPOSITORY_GIT_DIFF,REPOSITORY_GITLEAKS,REPOSITORY_GRYPE,REPOSITORY_OSV_SCANNER,REPOSITORY_SECRETLINT,REPOSITORY_SYFT,REPOSITORY_TRIVY,REPOSITORY_TRIVY_SBOM,REPOSITORY_TRUFFLEHOG,SPELL_LYCHEE,YAML_PRETTIER,YAML_YAMLLINT,YAML_V8R

MegaLinter is graciously provided by OX Security
Show us your support by starring ⭐ the repository

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@chezmoi/.chezmoitemplates/opencode.json`:
- Around line 6-12: The OpenCode template still uses legacy theme and tui
settings in opencode.json, but these belong in tui.json or tui.jsonc now. Update
the template so opencode.json only keeps non-TUI settings like small_model, and
move the TUI-related configuration from the opencode.json template into the
tui.json template. Use the existing opencode.json and tui.json template entries
to keep the configuration split aligned with the current OpenCode layout.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 228dafbc-3b7f-4dd4-a51c-31e2ea29c31d

📥 Commits

Reviewing files that changed from the base of the PR and between 48a1341 and 54105d3.

📒 Files selected for processing (3)
  • chezmoi/.chezmoitemplates/opencode-tui.json
  • chezmoi/.chezmoitemplates/opencode.json
  • chezmoi/private_dot_config/opencode/modify_tui.json
💤 Files with no reviewable changes (2)
  • chezmoi/private_dot_config/opencode/modify_tui.json
  • chezmoi/.chezmoitemplates/opencode-tui.json

Comment thread chezmoi/.chezmoitemplates/opencode.json
yxtay and others added 3 commits July 3, 2026 17:46
opencode uses a separate tui.json file, not a tui key in opencode.json.
Restore modify_tui.json and opencode-tui.json template with proper
nested object format (scroll_acceleration.enabled was a flat dotted
key before; now correctly nested).

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
- tui.json: enable mouse input and attention (desktop) notifications
- opencode.json: enable compaction.prune to remove old tool outputs
- opencode.json: drop small_model (redundant with flash model as primary)

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@yxtay
yxtay merged commit 57dcfbe into main Jul 3, 2026
31 checks passed
@yxtay
yxtay deleted the feat/opencode-tui-config-migration branch July 3, 2026 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant