fix: apply wizard personality picker and identity persistence#30
Merged
cpaczek merged 1 commit intoApr 3, 2026
Merged
Conversation
Two bugs in the apply flow: 1. Personality picker read `activeSelect.selectedIndex` (setter-only, returns undefined) instead of `getSelectedIndex()`. Selection was silently ignored. 2. `apply --silent` (SessionStart hook) re-patched the binary after Claude Code updates but never restored the companion's custom name and personality from the saved profile. They reverted to defaults. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Owner
|
@escapables thank you for PR merged |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Bug 1: Personality picker ignores selection
src/tui/apply/index.ts:589readactiveSelect.selectedIndex— a setter-only property on OpenTUI'sSelectRenderablewith no corresponding getter. Reading it returnsundefined, not the current index.Since
values[undefined]isundefined, the choice never matched'keep'or'default', falling through to the custom-input prompt. Pressing Enter without typing left personality unchanged.Fix
Bug 2: Name/personality lost after re-patch
After a Claude Code update resets the binary, the SessionStart hook (
apply --silent) re-patches the salt but never restores the companion's custom name and personality from the saved profile. Claude Code regenerates the companion with defaults, and the user's choices are lost.Fix
Added
restoreProfileIdentity()insrc/tui/commands/apply.ts— after every successful patch or salt verification, reads the active profile and writes name/personality back to the Claude config. Fails silently if the companion hasn't been hatched yet.Test plan
pnpm run typecheck— passpnpm run lint— passpnpm run test— 203/203 pass🤖 Generated with Claude Code