Security Patch - #87
Conversation
Hide vault host addresses when the privacy toggle is off, stop partial AI settings from falling back to Ollama, keep Agent mode from flipping to Ask on greetings, and surface missing API keys in-chat with a Settings deep link. Bump to 2.22.2 and document in CHANGELOG.
Reference 5dd0c07 on the 2.22.2 changelog bullets for consistency with prior releases.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis release updates AI configuration recovery, provider setup errors, agent submission routing, settings deep links, AI persistence rollback, and privacy-aware vault labels. It also adds related tests and bumps the application version to 2.22.2. ChangesAI configuration and setup flows
Vault privacy-aware labels
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant AiSidebar
participant ProviderKeyStore
participant AiSetupErrorCard
participant SettingsModal
AiSidebar->>ProviderKeyStore: Load saved provider key
ProviderKeyStore-->>AiSidebar: Return key or missing-key result
AiSidebar->>AiSetupErrorCard: Render setup error
AiSetupErrorCard->>SettingsModal: Open AI settings tab
Possibly related PRs
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
PR Summary by QodoFix vault privacy, AI settings parsing, and missing-key UX (2.22.2)
AI Description
Diagram
High-Level Assessment
Files changed (28)
|
Use neutral product language for the vault privacy changelog entry.
Code Review by Qodo
1.
|
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/features/connections/domain/connectionDisplay.ts`:
- Around line 182-184: Update buildDefaultKeyVaultLabel so bracketed IPv6 hosts
are normalized by removing their surrounding brackets before calling
isLikelyIpAddress. Ensure bracketed IP addresses are treated like unbracketed
IPs and do not become the label stem, while preserving existing behavior for
hostnames and other host formats.
In `@src/store/settingsSlice.ts`:
- Around line 452-462: Update the rollback logic in the AI settings persistence
catch block to revert each changed key only when the current value still equals
this call’s optimistic nextAi value. Build rollbackPatch from that per-key
comparison, preserving newer concurrent values while retaining the existing
state update flow.
In `@tests/sidebarSubmit.test.mjs`:
- Line 17: Update runTest to await the callback before logging PASS, keeping the
await inside its existing try/catch so rejected promises are handled and
reported as failures. Ensure both asynchronous test callbacks complete before
runTest returns.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: b118b700-469b-4bed-8110-4c6f4dcc2da4
⛔ Files ignored due to path filters (1)
src-tauri/Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (28)
CHANGELOG.mdpackage.jsonsrc-tauri/Cargo.tomlsrc-tauri/src/ai/config.rssrc-tauri/src/ai/types.rssrc-tauri/tauri.conf.jsonsrc/components/ai/AiChatMessage.tsxsrc/components/ai/AiSetupErrorCard.tsxsrc/components/ai/AiSidebar.tsxsrc/components/ai/ConversationThread.tsxsrc/components/ai/aiSetupErrors.tssrc/components/ai/sidebarSubmit.tssrc/components/modals/useAutoVault.tssrc/components/settings/SettingsModal.tsxsrc/components/settings/tabs/vault/CredentialHistoryModal.tsxsrc/components/settings/tabs/vault/ManageAssignmentsModal.tsxsrc/components/settings/tabs/vault/RestoreConflictModal.tsxsrc/components/settings/tabs/vault/RotateCredentialModal.tsxsrc/components/settings/tabs/vault/VaultCredentialDetailModal.tsxsrc/components/settings/tabs/vault/VaultItemsPanel.tsxsrc/components/settings/tabs/vault/hooks/useAssignCredentialModal.tssrc/components/settings/tabs/vault/hooks/useHistoryModal.tssrc/components/settings/tabs/vault/hooks/useVaultPanelActions.tssrc/components/settings/tabs/vault/privacyLabel.tssrc/features/connections/domain/connectionDisplay.tssrc/store/settingsSlice.tstests/connectionDisplay.test.mjstests/sidebarSubmit.test.mjs
💤 Files with no reviewable changes (1)
- src/components/ai/sidebarSubmit.ts
Strip bracketed IPv6 from privacy labels and default vault label stems, only roll back AI keys still owned after failed persist, and await async sidebar-submit tests so failures surface reliably.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/features/connections/domain/connectionDisplay.ts`:
- Around line 140-141: Update IPV6_BRACKETED_IN_TEXT_RE to require at least two
colons within bracketed hosts while retaining the existing hexadecimal, dot, and
bracket matching. Preserve redaction of valid bracketed IPv6 forms and stop
matching ordinary labels such as [1], [db], or [0].
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: fc434907-08f4-4092-ab26-e3ae1d6c5c78
📒 Files selected for processing (5)
CHANGELOG.mdsrc/features/connections/domain/connectionDisplay.tssrc/store/settingsSlice.tstests/connectionDisplay.test.mjstests/sidebarSubmit.test.mjs
🚧 Files skipped from review as they are similar to previous changes (4)
- CHANGELOG.md
- tests/connectionDisplay.test.mjs
- tests/sidebarSubmit.test.mjs
- src/store/settingsSlice.ts
Avoid treating short bracket labels like [1] or [db] as IPv6 while still redacting real bracketed addresses such as [fe80::1].
Summary by CodeRabbit
New Features
Bug Fixes
Chores