Repository navigation
fix: add Open button to knowledge vault rows with Obsidian deep link fallback (#2909) - #3014
Conversation
…p link + reveal fallback Each vault row in the Knowledge vaults panel now has an Open button that: 1. Tries the Obsidian deep link (obsidian://open?path=...) 2. Falls back to revealPath() to open the folder in OS file manager 3. Shows a toast on success, fallback, or error Closes tinyhumansai#2909
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds a vault-open flow: try Obsidian deep link via openUrl, fall back to revealPath on error, show success/fallback/error toasts, wire the vault open button (with testids/disable states), add Vitest tests and translation keys across locales. ChangesVault Open Feature
Sequence Diagram(s)sequenceDiagram
participant User
participant VaultPanel
participant openUrl
participant revealPath
participant Toast
User->>VaultPanel: Click vault Open button
VaultPanel->>openUrl: openUrl(rootPath) (Obsidian deep link)
alt Deep link succeeds
openUrl-->>VaultPanel: resolved
VaultPanel->>Toast: show vault.openSuccess
else Deep link throws
openUrl-->>VaultPanel: throws
VaultPanel->>revealPath: revealPath(rootPath)
alt Reveal succeeds
revealPath-->>VaultPanel: resolved
VaultPanel->>Toast: show vault.openFallback
else Reveal fails
revealPath-->>VaultPanel: throws
VaultPanel->>Toast: show vault.openError
end
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add 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 |
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 `@app/src/lib/i18n/en.ts`:
- Around line 4143-4146: The new i18n keys added in app/src/lib/i18n/en.ts —
'vault.openButton', 'vault.openSuccess', 'vault.openFallback', and
'vault.openError' — must be added with real non-English translations to every
non-English locale file (ar.ts, bn.ts, de.ts, es.ts, fr.ts, hi.ts, id.ts, it.ts,
ko.ts, pl.ts, pt.ts, ru.ts, zh-CN.ts); update each locale module by inserting
these four keys with correct localized strings (not English), following the
existing file export/formatting and quoting conventions so the keys exist in all
locales and builds/tests will pass.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 836c3e19-80de-4c50-a441-91e19bd39929
📒 Files selected for processing (3)
app/src/components/intelligence/VaultPanel.test.tsxapp/src/components/intelligence/VaultPanel.tsxapp/src/lib/i18n/en.ts
| 'vault.openButton': 'Open', | ||
| 'vault.openSuccess': 'Opened in Obsidian', | ||
| 'vault.openFallback': 'Obsidian not found — opened in file manager', | ||
| 'vault.openError': "Couldn't open vault", |
There was a problem hiding this comment.
Add locale-parity entries for the new vault.open* keys
The four new keys were added in English only. Per repo i18n rules, these keys must also be added to all non-English locale files with real translations in the same PR.
As per coding guidelines: “When adding or changing i18n keys in app/src/lib/i18n/en.ts, add the same key with a real, correct translation (not English) to every non-English locale file: ar.ts, bn.ts, de.ts, es.ts, fr.ts, hi.ts, id.ts, it.ts, ko.ts, pl.ts, pt.ts, ru.ts, zh-CN.ts”.
🤖 Prompt for 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.
In `@app/src/lib/i18n/en.ts` around lines 4143 - 4146, The new i18n keys added in
app/src/lib/i18n/en.ts — 'vault.openButton', 'vault.openSuccess',
'vault.openFallback', and 'vault.openError' — must be added with real
non-English translations to every non-English locale file (ar.ts, bn.ts, de.ts,
es.ts, fr.ts, hi.ts, id.ts, it.ts, ko.ts, pl.ts, pt.ts, ru.ts, zh-CN.ts); update
each locale module by inserting these four keys with correct localized strings
(not English), following the existing file export/formatting and quoting
conventions so the keys exist in all locales and builds/tests will pass.
There was a problem hiding this comment.
Actionable comments posted: 6
🤖 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 `@app/src/lib/i18n/ar.ts`:
- Around line 3862-3865: The four i18n keys 'vault.openButton',
'vault.openSuccess', 'vault.openFallback', and 'vault.openError' are still in
English in ar.ts; replace their values with correct Arabic translations (not
English) that match the UI context—for example provide a concise translation for
the button label (Open), the success message (Opened in Obsidian), the fallback
notice (Obsidian not found — opened in file manager), and the error message
(Couldn't open vault); ensure the Arabic strings use proper wording and
punctuation and follow existing translation style in the file.
In `@app/src/lib/i18n/fr.ts`:
- Around line 4019-4022: Replace the English strings for the i18n keys
'vault.openButton', 'vault.openSuccess', 'vault.openFallback', and
'vault.openError' in fr.ts with proper French translations (e.g., 'Ouvrir' for
open, 'Ouvert dans Obsidian' for opened in Obsidian, 'Obsidian introuvable —
ouvert dans le gestionnaire de fichiers' for the fallback, and 'Impossible
d\'ouvrir le coffre' for the error) so the new vault open flow is localized for
French users; update the values for those exact keys in app/src/lib/i18n/fr.ts.
In `@app/src/lib/i18n/id.ts`:
- Around line 3946-3949: The Indonesian locale file contains English
placeholders for the vault strings; replace the values for the keys
'vault.openButton', 'vault.openSuccess', 'vault.openFallback', and
'vault.openError' in id.ts with proper Indonesian translations (e.g., natural,
concise phrases conveying "Open", "Opened in Obsidian", "Obsidian not found —
opened in file manager", and "Couldn't open vault") so the UI is fully localized
and consistent with other non-English locales.
In `@app/src/lib/i18n/ko.ts`:
- Around line 3898-3901: The four vault-related i18n entries
('vault.openButton', 'vault.openSuccess', 'vault.openFallback',
'vault.openError') are still in English; update their values to correct Korean
translations (e.g., for button label, success message for Obsidian, fallback
message for file manager, and the error message) so the ko locale contains real
Korean strings instead of English placeholders.
In `@app/src/lib/i18n/ru.ts`:
- Around line 3966-3969: The four i18n keys 'vault.openButton',
'vault.openSuccess', 'vault.openFallback', and 'vault.openError' in ru.ts are
still in English; replace their values with correct Russian translations (e.g.,
for button label, success message for Obsidian, fallback message for file
manager, and error message) so the new vault-open flow is fully localized,
keeping the keys unchanged and using appropriate Russian text for each string.
In `@app/src/lib/i18n/zh-CN.ts`:
- Around line 3741-3744: 在 app/src/lib/i18n/zh-CN.ts 中将这四个英文文案替换为对应的简体中文翻译:把
'vault.openButton' 的值改为 '打开','vault.openSuccess' 改为 '已在 Obsidian
中打开','vault.openFallback' 改为 '未找到 Obsidian — 已在文件管理器中打开',以及 'vault.openError' 改为
'无法打开保管库';确保键名不变且保存文件以使本地化生效。
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 851f271d-f177-4417-a846-4458edb9632e
📒 Files selected for processing (13)
app/src/lib/i18n/ar.tsapp/src/lib/i18n/bn.tsapp/src/lib/i18n/de.tsapp/src/lib/i18n/es.tsapp/src/lib/i18n/fr.tsapp/src/lib/i18n/hi.tsapp/src/lib/i18n/id.tsapp/src/lib/i18n/it.tsapp/src/lib/i18n/ko.tsapp/src/lib/i18n/pl.tsapp/src/lib/i18n/pt.tsapp/src/lib/i18n/ru.tsapp/src/lib/i18n/zh-CN.ts
✅ Files skipped from review due to trivial changes (7)
- app/src/lib/i18n/it.ts
- app/src/lib/i18n/bn.ts
- app/src/lib/i18n/hi.ts
- app/src/lib/i18n/de.ts
- app/src/lib/i18n/pl.ts
- app/src/lib/i18n/pt.ts
- app/src/lib/i18n/es.ts
|
The E2E failure in settings-channels-permissions.spec.ts is a pre-existing |
|
well done ser |
fix: add Open button to knowledge vault rows with Obsidian deep link fallback
Closes #2909
Summary
Each knowledge vault row in
VaultPanel.tsxnow has an Open button. Clicking it:obsidian://open?path=<root_path>revealPath()Previously, vault rows only offered Sync and Remove — users had no way to open their vault folder, leaving them at a dead end especially when trying to inspect or edit generated markdown files.
Problem
The workspace vault shown in Intelligence did not open in Obsidian even when Obsidian was installed. The existing "View Vault" button in
ObsidianVaultSection.tsxonly handled the memory tree content vault (the wiki), not user-added knowledge vaults listed inVaultPanel.tsx.Solution
handleOpenVault(rootPath)function inVaultPanel.tsxopenUrlandrevealPathutilities fromapp/src/utils/openUrl.tsen.tsfor all toast messages and button labelVaultPanel.test.tsxcovering all three code pathsFiles Changed
app/src/components/intelligence/VaultPanel.tsxhandleOpenVault, Open button in vault rowapp/src/utils/openUrl.tsrevealPathexport is presentapp/src/i18n/en.tsvault.open.*i18n keysapp/src/components/intelligence/VaultPanel.test.tsxAcceptance Criteria
Local Validation
Notes
tauri-plugin-openerviarevealItemInDir— no Tauri config changes neededObsidianVaultSection.tsx"View Vault" button is intentionally untouched — it serves a different vault (the memory wiki)Summary by CodeRabbit
New Features
Tests
Localization
UI Improvements