Skip to content

Fix/settings declarative render - #15

Merged
luoxuanzao merged 2 commits into
mainfrom
fix/settings-declarative-render
Aug 10, 2026
Merged

Fix/settings declarative render#15
luoxuanzao merged 2 commits into
mainfrom
fix/settings-declarative-render

Conversation

@luoxuanzao

Copy link
Copy Markdown
Member

Summary

  • What changed?
  • Why is it needed?

Verification

  • npm run typecheck
  • npm run lint
  • npm run test
  • npm run build
  • npm run release:check
  • npm run audit:prod
  • Tested affected qodercli behavior against a real CLI when applicable

Safety

  • No credentials, private vault content, internal URLs, or personal paths are included
  • User-visible changes are documented in CHANGELOG.md

Obsidian 1.13 renders a settings tab declaratively and skips display()
whenever getSettingDefinitions() returns a non-empty array. The previous
text-only definitions left the page without any controls on 1.13+.

Provide full declarative definitions instead: simple values bind through
getControlValue/setControlValue with the same persistence and side
effects as before, while rows needing custom validation or rich
components (CLI path, max tabs, placement, nav mappings, !bash, command/
skill, agent, MCP and plugin managers) use render callbacks sharing the
imperative builders. Content injected into group lists is deferred to a
microtask because the declarative renderer reconciles group.listEl
synchronously after each render callback. display() is kept as the
fallback for Obsidian versions older than 1.13.0.
CI rejects eslint-disable directives for obsidianmd/no-unsupported-api.
Replace the disable block with the rule's sanctioned requireApiVersion()
guards: getControlValue/setControlValue bodies and the SettingGroup.listEl
access (now centralized in deferIntoList) are wrapped in version checks.
No directive comments remain in the settings feature.
@luoxuanzao
luoxuanzao merged commit 6dd746b into main Aug 10, 2026
10 checks passed
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