Support JSONC Dock configs
Closed
MA
3mo ago+359+359+012345678901234567890123456789-39-39-01234567890123456789
Summary
- Parse Dock config files with the shared JSONC parser before decoding controls.
- Keep Dock parsing in a dedicated
DockConfigParsersource file and surface stable, user-facing parse errors with recovery guidance. - Add focused coverage for comments, trailing commas, comment-like text inside strings, and JSONC parse failures.
- Update Dock docs and the empty-state setup prompt to describe JSONC support.
Validation
git diff --checkpython3 -m json.tool Resources/Localizable.xcstringsCMUX_SKIP_ZIG_BUILD=1 ./scripts/reload.sh --tag dock-jsonc
Tests were not run locally per repository policy; the new behavior is covered by DockConfigParserTests for CI.
Summary by CodeRabbit
-
New Features
- Dock configuration now supports JSONC (comments and trailing commas); both dock.json and dock.jsonc are recognized, with dock.json preferred when both exist.
-
Documentation
- Updated docs and in-app guidance/agent prompts to describe JSONC, filename behavior, control ordering, and validation guidance.
-
Bug Fixes / UX
- Improved localized parse error messages with specific failure reasons and recovery suggestions for JSONC parse failures.
-
Tests
- Added tests covering JSONC preprocessing, error reporting, and config file selection.