Skip to content

fix(vscode): fix Open in Editor button in Documents viewer - #14631

Merged
brunoagatao merged 3 commits into
mainfrom
fix/documents-open-in-editor
Sep 28, 2026
Merged

brunoagatao merged 3 commits into
mainfrom
fix/documents-open-in-editor

Conversation

@brunoagatao

@brunoagatao brunoagatao commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

What changed

openRelativeFile silently did nothing when the file path was absolute (or when root was unset), because resolveInside returns undefined for any absolute input. The Documents viewer's go-to-file action sends the document's path as-is, which is often absolute, so clicking the button had no effect.

openRelativeFile now opens absolute paths directly via openFileInEditor, 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

  • Added unit tests in packages/kilo-vscode/tests/unit/review-utils.test.ts covering absolute paths with and without a root.
  • bun run typecheck, bun run lint, and the targeted bun test tests/unit/review-utils.test.ts all pass.
document-viewer

@kilo-code-bot

kilo-code-bot Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

The incremental commit collapses openRelativeFile's absolute-path early return into a single ternary (path.isAbsolute(...) ? relativePath : root && resolveInside(...)). Behavior is unchanged for every input — absolute path, unset root, empty root, and paths inside/outside the selected repository — so the original fix still holds and no new issues were introduced. Memory-leak/shared-state check: the function only forwards a one-shot vscode.open command and retains nothing.

Files Reviewed (3 files)
  • .changeset/documents-open-in-editor.md
  • packages/kilo-vscode/src/review-utils.ts
  • packages/kilo-vscode/tests/unit/review-utils.test.ts
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 go-to-file action: openRelativeFile previously returned early via resolveInside for any absolute input, so the Documents viewer silently did nothing. Opening absolute paths directly matches the existing openFileInEditor contract, and the new unit tests cover both the unset-root and outside-root cases. No memory-leak or shared-state concerns: the added branch only forwards a one-shot vscode.open command.

Files Reviewed (3 files)
  • .changeset/documents-open-in-editor.md
  • packages/kilo-vscode/src/review-utils.ts
  • packages/kilo-vscode/tests/unit/review-utils.test.ts

Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0

Review guidance: REVIEW.md from base branch main

@brunoagatao brunoagatao changed the title fix(vscode): fix Open in Editor button in Documents viewer fix(vscode): fix Open in Editor button in Documents viewer Sep 28, 2026
@brunoagatao brunoagatao self-assigned this Sep 28, 2026
@brunoagatao
brunoagatao merged commit 7bb060f into main Sep 28, 2026
24 of 25 checks passed
@brunoagatao
brunoagatao deleted the fix/documents-open-in-editor branch September 28, 2026 14:00
@brunoagatao brunoagatao changed the title fix(vscode): fix Open in Editor button in Documents viewer fix(vscode): fix Open in Editor button in Documents viewer Sep 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clicking "Open in Editor" icon does nothing in Kilo Documents viewer

2 participants