Skip to content

fix(install): copy missing rename action module - #7

Open
maciborka wants to merge 1 commit into
Leuconoe:mainfrom
maciborka:fix/install-missing-rename-action
Open

fix(install): copy missing rename action module#7
maciborka wants to merge 1 commit into
Leuconoe:mainfrom
maciborka:fix/install-missing-rename-action

Conversation

@maciborka

@maciborka maciborka commented Jul 15, 2026

Copy link
Copy Markdown

Problem

cc-switch crashes immediately on launch after install:

Error: Cannot find module './lib/actions/rename.cjs'
Require stack:
- ~/.claude/multi-account-switch/bin/cc-switch.cjs
    at Object.<anonymous> (.../bin/cc-switch.cjs:17:22)

Root cause

cc-switch.cjs requires the rename action:

const renameAction = require('./lib/actions/rename.cjs'); // line 17

but install.cjs never copied lib/actions/rename.cjs into the install dir (~/.claude/multi-account-switch/bin/lib/actions/). Every other action module (sync, usage, remove, list, switch) is copied, only rename is missing — looks like it was overlooked when the rename feature was added.

Fix

Add actionRenameSource and copy it into bin/lib/actions/, matching how the other action modules are handled.

Verified locally: node install.cjs now installs rename.cjs, and cc-switch runs and lists accounts instead of crashing.

Summary by CodeRabbit

  • Bug Fixes
    • Improved installation reliability by ensuring the rename action is included in the installed action library.

cc-switch.cjs requires ./lib/actions/rename.cjs, but install.cjs never copied it, so cc-switch crashed on launch with 'Cannot find module ./lib/actions/rename.cjs'. Add the actionRenameSource definition and copy it into bin/lib/actions.
@Leuconoe Leuconoe self-assigned this Aug 8, 2026
@Leuconoe

Leuconoe commented Aug 8, 2026

Copy link
Copy Markdown
Owner

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 0a4ba5c9-5afc-464e-977f-6e70d6a7c708

📥 Commits

Reviewing files that changed from the base of the PR and between 8c3dc67 and 1908892.

📒 Files selected for processing (1)
  • install.cjs

📝 Walkthrough

Walkthrough

The installer now registers lib/actions/rename.cjs and copies it into the installed action library.

Changes

Rename action installation

Layer / File(s) Summary
Installer action source wiring
install.cjs
The installer includes lib/actions/rename.cjs in its source configuration and copies rename.cjs into the installed action library.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related issues

  • Issue 2 — The changes address the missing rename.cjs module during installation.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the fix: copying the missing rename action module during installation.
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.
✨ Finishing Touches 💡 1
⚔️ Resolve merge conflicts 💡
  • Resolve merge conflict in branch fix/install-missing-rename-action
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@Leuconoe

Leuconoe commented Aug 8, 2026

Copy link
Copy Markdown
Owner

@maciborka I'm sorry. For some unknown reason, I didn't receive the PR notification. Since there have been changes, please resolve the conflicts and resubmit the PR. Thank you.

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