Skip to content

fix(skills): repair stale path#1662

Merged
zerob13 merged 1 commit into
devfrom
codex/skills-path-cross-platform-repair
May 22, 2026
Merged

fix(skills): repair stale path#1662
zerob13 merged 1 commit into
devfrom
codex/skills-path-cross-platform-repair

Conversation

@zerob13
Copy link
Copy Markdown
Collaborator

@zerob13 zerob13 commented May 22, 2026

Summary

  • Repair stale default skills paths from another OS or user profile during SkillPresenter startup.
  • Preserve custom skills paths and existing malformed .deepchat path repair.
  • Add focused unit coverage plus SDD issue docs.

Verification

  • pnpm vitest --config vitest.config.ts test/main/presenter/skillPresenter/skillPresenter.test.ts
  • pnpm run format
  • pnpm run i18n
  • pnpm run lint
  • pnpm run typecheck:node
  • git diff --check

Summary by CodeRabbit

  • Bug Fixes
    • Resolved startup failures caused by stale default skills paths that persist after upgrading, switching operating systems, or changing user profiles. The app now automatically detects and repairs these paths on startup.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 22, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b4df5fdf-d759-4da7-a2b9-f1ff1eb16baf

📥 Commits

Reviewing files that changed from the base of the PR and between 07f4cc1 and 148ae61.

📒 Files selected for processing (5)
  • docs/issues/skills-path-cross-platform-repair/plan.md
  • docs/issues/skills-path-cross-platform-repair/spec.md
  • docs/issues/skills-path-cross-platform-repair/tasks.md
  • src/main/presenter/skillPresenter/index.ts
  • test/main/presenter/skillPresenter/skillPresenter.test.ts

📝 Walkthrough

Walkthrough

This PR implements cross-platform repair of stale DeepChat default skills paths that persist after OS or user profile changes. It extends SkillPresenter.resolveSkillsDir() with detection and repair logic for POSIX and Windows home-based paths, rewrites them to the current home directory, and validates the repair via constructor-level unit tests.

Changes

Skills Path Cross-Platform Repair

Layer / File(s) Summary
Specification and planning documentation
docs/issues/skills-path-cross-platform-repair/spec.md, docs/issues/skills-path-cross-platform-repair/plan.md, docs/issues/skills-path-cross-platform-repair/tasks.md
Specification of the repair behavior for stale POSIX and Windows default-profile skills paths, implementation plan for extending SkillPresenter.resolveSkillsDir(), and task checklist for scope documentation, logic updates, unit tests, and verification.
Portable skills path repair implementation
src/main/presenter/skillPresenter/index.ts
resolveSkillsDir() now calls a new repairPortableDefaultSkillsPath() helper that regex-matches stale default path patterns for POSIX and Windows, extracts nested suffixes, and reconstructs paths under the current home directory while preserving intentional custom paths.
Test coverage for path repair
test/main/presenter/skillPresenter/skillPresenter.test.ts
Constructor tests verify that configured custom paths resolve correctly and that stale POSIX and Windows default-profile skills directories are repaired to the current home-based location with preserved path suffixes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

A rabbit hops through paths both old and new,
Cross-platform repair—what clever things we do!
POSIX and Windows, no matter the home,
Stale skills paths find their way back from the foam. 🐰✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the core change: repairing stale skills paths that become invalid when users switch OS profiles or machines.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/skills-path-cross-platform-repair

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@zerob13 zerob13 merged commit a30fb89 into dev May 22, 2026
3 checks passed
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