fix(vscode): fix Open in Editor button in Documents viewer - #14631
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge The incremental commit collapses Files Reviewed (3 files)
Previous Review Summary (commit 029802e)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 029802e)Status: No Issues Found | Recommendation: Merge The fix correctly restores the Files Reviewed (3 files)
Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0 Review guidance: REVIEW.md from base branch |
Open in Editor button in Documents viewer
Open in Editor button in Documents viewerOpen in Editor button in Documents viewer
What changed
openRelativeFilesilently did nothing when the file path was absolute (or whenrootwas unset), becauseresolveInsidereturnsundefinedfor any absolute input. The Documents viewer'sgo-to-fileaction sends the document's path as-is, which is often absolute, so clicking the button had no effect.openRelativeFilenow opens absolute paths directly viaopenFileInEditor, instead of requiring the path to resolve inside a workspace root.Why
Fixes #14597. Users clicking the "Open file in editor" icon in the Kilo Documents webview panel saw no editor tab open and no error.
Testing
packages/kilo-vscode/tests/unit/review-utils.test.tscovering absolute paths with and without a root.bun run typecheck,bun run lint, and the targetedbun test tests/unit/review-utils.test.tsall pass.