Support JSONC Dock configs

Closed
MA
3mo ago
+359-39

Summary

  • Parse Dock config files with the shared JSONC parser before decoding controls.
  • Keep Dock parsing in a dedicated DockConfigParser source 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 --check
  • python3 -m json.tool Resources/Localizable.xcstrings
  • CMUX_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.

Review Change Stack