fix: config save broken (relative_to→relpath), startup validation, auto-create, untrack config.yaml

- _relative_path(): replace Path.relative_to() with os.path.relpath()
  (ValueError crossing filesystems silently returned absolute paths)
- _sync_config_from_ui(): always derive relative from get_path() absolute,
  never trust stale FileSelector._relative_path after Browse
- validate_paths(): check all file paths exist on startup, clear missing
- Clear UI selectors after validation to prevent re-save of stale paths
- _load_config(): auto-create blank config.yaml when missing on disk
- .gitignore: add config.yaml (user-specific, must not be tracked)
This commit is contained in:
2026-06-12 15:02:09 +08:00
parent 9238cbc63e
commit 9502bba636
4 changed files with 84 additions and 47 deletions
+2 -1
View File
@@ -33,7 +33,8 @@ htmlcov/
# ── Opencode (internal tooling) ──────────────────────────────
.opencode/
# ── Config overrides (user-specific) ─────────────────────────
# ── Config (user-specific, auto-generated if missing) ─────────
config.yaml
config/zynq_flasher.yaml
# ── Logs ─────────────────────────────────────────────────────