Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 18, 2025

Standardize desktop config format from desktop.yaml to desktop.json, aligning with projects.json and eliminating format inconsistency across LeanSpec config files.

Changes

config.rs

  • Changed CONFIG_FILE from "desktop.yaml" to "desktop.json"
  • Switched serialization from serde_yaml to serde_json
  • Added automatic migration: detects legacy YAML → converts to JSON → backs up as .bak
  • Added logging for migration and backup operations
// Migration flow
const CONFIG_FILE: &str = "desktop.json";
const LEGACY_CONFIG_FILE: &str = "desktop.yaml";

// Try JSON first, fall back to YAML migration
if let Some(legacy_config) = load_legacy_yaml() {
    legacy_config.persist();  // Save as JSON
    backup_legacy_yaml();     // Rename to desktop.yaml.bak
    return legacy_config;
}

Documentation

  • Updated packages/desktop/README.md with correct config paths
  • Updated spec 148 config examples from YAML to JSON
  • Updated spec 168 desktop config section from YAML to JSON

Notes

serde_yaml retained in Cargo.toml for migration support and spec frontmatter parsing in frontmatter.rs/projects.rs.

Original prompt

implement spec 162


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits December 18, 2025 09:56
- Change CONFIG_FILE from desktop.yaml to desktop.json
- Add LEGACY_CONFIG_FILE constant for desktop.yaml migration
- Update serialization from serde_yaml to serde_json
- Add load_legacy_yaml() for automatic migration
- Add backup_legacy_yaml() to preserve old config as .bak
- Update documentation in specs 148 and 168
- Fix desktop README.md config file references

Co-authored-by: tikazyq <[email protected]>
Address code review feedback:
- Log when JSON parsing fails and migration is attempted
- Log migration progress messages
- Log backup success/failure status

Co-authored-by: tikazyq <[email protected]>
Copilot AI changed the title [WIP] Implement specification 162 feat(desktop): migrate config from YAML to JSON format (spec 162) Dec 18, 2025
Copilot AI requested a review from tikazyq December 18, 2025 10:02
@tikazyq tikazyq marked this pull request as ready for review December 18, 2025 11:49
Copilot AI review requested due to automatic review settings December 18, 2025 11:49
@tikazyq tikazyq merged commit 3ce6e9a into main Dec 18, 2025
3 of 7 checks passed
@tikazyq tikazyq deleted the copilot/implement-spec-162 branch December 18, 2025 11:49
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.

2 participants