Skip to content

feat: migrate project config to ~/.dr-claw and harden JSON parsing#185

Closed
bbsngg wants to merge 1 commit intomainfrom
split/c-server-config-migration
Closed

feat: migrate project config to ~/.dr-claw and harden JSON parsing#185
bbsngg wants to merge 1 commit intomainfrom
split/c-server-config-migration

Conversation

@bbsngg
Copy link
Copy Markdown
Contributor

@bbsngg bbsngg commented Apr 15, 2026

Summary

  • Move project-config.json from ~/.claude to ~/.dr-claw with one-time fallback migration
  • Add BOM-aware and UTF-16 tolerant JSON parsing (parseJsonAllowBom) for cross-platform config files
  • Add resolveValidProjectOwnerUserId for safer owner resolution
  • Add Codex session file path caching and resolution helpers

Part of the session lifecycle PR split (3/6, independent). PR B (server lifecycle) depends on this.

Test plan

  • node --check server/projects.js passes
  • npx vitest run server/__tests__/project-config-path.test.mjs passes
  • Existing project-config.json under ~/.claude/ is migrated on first load

🤖 Generated with Claude Code

- Move project-config.json from ~/.claude to ~/.dr-claw with
  one-time fallback migration from the legacy path
- Add BOM-aware and UTF-16 tolerant JSON parsing (parseJsonAllowBom)
  to handle config files created on Windows or with encoding issues
- Add resolveValidProjectOwnerUserId for safer owner resolution
- Add Codex session file path caching and resolution helpers
- Update tests for new config paths and session deletion flows

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Comment thread server/projects.js
try {
return await buildPromise;
} finally {
if (codexSessionsIndexPromise === buildPromise) {
Comment thread server/projects.js
try {
return await buildPromise;
} finally {
if (codexSessionsIndexPromise === buildPromise) {
@bbsngg
Copy link
Copy Markdown
Contributor Author

bbsngg commented Apr 15, 2026

Split from #170 (3/6). Independent — can be merged immediately. #186 depends on this. See #170 for full split plan.

@bbsngg bbsngg closed this Apr 16, 2026
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