Fix issue #278 identity refresh and session log autosave#281
Merged
Conversation
Owner
Author
|
@codex review |
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.
Background
Issue #278 reports two separate regressions:
Root Cause
1. Identity list not refreshing
VaultViewis wrapped inReact.memo, but its custom comparator did not include theidentitiesprop.That meant identity-only updates did not trigger a rerender for the Keychain section. The list would appear to "refresh" only after some other prop such as
keyschanged.2. Session logs not being auto-saved
There were two issues in the session-log path:
enabled,directory,format) were not synchronized across windows inuseSettingsState.In practice, users enable auto-save from the Settings window, but the main app window is the one that actually captures terminal output and triggers auto-save. The main window kept stale session-log settings, so auto-save continued running with outdated values.
What Changed
identitiesto theVaultViewmemo comparison so identity create/update/delete operations rerender the Keychain view immediately.sessionId.sessionIdon every newly createdConnectionLog.ConnectionLog.sessionIdinstead of relying on the still-being-mounted session state.sessionId-backed log matching.sessionLogsEnabledsessionLogsDirsessionLogsFormatthrough both IPC-based settings change notifications and storage event handling.
User-visible Behavior
Before
After
Functional Test Plan
Identity rendering
Vault > Keychain.Vault > Hosts, create/edit a host, and verify both identities are available in the credential picker.Expected result after fix:
Expected result before fix:
Session log auto-save
Settings > System > Session Logsfrom the settings window.txtfor easiest verification.rawandhtmlformats.Expected result after fix:
<configured dir>/<host label>/....Expected result before fix:
Testing
npx eslint App.tsx application/state/useSessionState.ts components/VaultView.tsx application/state/useSettingsState.tsnpm run buildCloses #278