Skip to content

docs(www): say unknown cli.json settings and keybind IDs are ignored - #57125

Open
HaseebUllahButt wants to merge 1 commit into
anomalyco:devfrom
HaseebUllahButt:docs-ignored-settings-keybinds
Open

HaseebUllahButt wants to merge 1 commit into
anomalyco:devfrom
HaseebUllahButt:docs-ignored-settings-keybinds

Conversation

@HaseebUllahButt

@HaseebUllahButt HaseebUllahButt commented Oct 19, 2026 •

Copy link
Copy Markdown

Issue for this PR

None. Docs-only change, no linked issue required.

Type of change

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

What does this PR do?

cli/config.mdx says unknown settings are rejected, and cli/keybinds.mdx says unknown command IDs are rejected. At runtime both are dropped silently, so a typo in cli.json has no effect and no message. This PR says so, and notes that the published $schema still flags unknown settings in editors.

The keybinds page also notes that true is not a valid binding value: on a known command it makes the whole cli.json decode fail, so OpenCode ignores the file.

How did you verify your code works?

Read the source at dev:

  • packages/cli/src/config/config.ts:22 decodes with Schema.decodeUnknownOption(Info), which drops excess keys. Only the generated editor schema rejects them (packages/cli/script/schema.ts:8, onExcessProperty: "error").
  • KeybindOverrides (packages/tui/src/config/keybind.ts:306-313) is a struct of the known command names, so an unknown ID is dropped during decode and never reaches the Unrecognized keybind throw in parse() (keybind.ts:339-341).
  • BindingValueSchema (keybind.ts:28-33) accepts false, "none", strings, key objects and arrays, but not true.
  • tui: one invalid cli.json field silently discards the entire config #56318 covers one invalid field discarding the whole file, and fix(tui): warn when CLI config is invalid #56335 adds a warning for that case. Both are related, not duplicates: neither changes these pages or warns about unknown keys.

Docs-only change. I checked both statements against the source paths above, and the edited Markdown keeps valid fences and line wrapping. No application code was run.

Screenshots / recordings

Not a UI change.

Checklist

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

Added by the opencode bot (AI-generated).

Related: #56318

@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Oct 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

@opencode-agent opencode-agent 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.

The new wording is accurate. I ran the actual cli.json decoder (Schema.decodeUnknownOption(Info)) against sample configs:

  • An unknown top-level setting is dropped quietly, and the other settings are kept.
  • An unknown keybind ID is dropped too. Decoding doesn't fail, so the Unrecognized keybind error in parse() is never hit.
  • Setting a known command to true makes the decode fail, so the whole file falls back to defaults. On an unknown ID it is simply dropped, which matches your "known command" wording.
  • The published $schema is generated with onExcessProperty: "error", so editors do flag unknown settings.

Public API: unchanged (docs only).

No concerns. If #56335 lands, the true sentence still holds; OpenCode would just warn instead of failing silently.

Related: #56318

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Oct 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

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.

1 participant