Skip to content

Fix "Send RangeLink" ctx menu item missing in devcontainers // fixes #679#686

Open
lourot wants to merge 1 commit into
couimet:mainfrom
lourot:fix-devcontainer
Open

Fix "Send RangeLink" ctx menu item missing in devcontainers // fixes #679#686
lourot wants to merge 1 commit into
couimet:mainfrom
lourot:fix-devcontainer

Conversation

@lourot

@lourot lourot commented Jul 11, 2026

Copy link
Copy Markdown

Summary by CodeRabbit

  • New Features

    • RangeLink context-menu commands are now available for files opened in devcontainers and other remote workspaces.
    • Remote workspace files support copying links, pasting paths, and binding paths as expected.
  • Documentation

    • Updated the extension changelog to document remote workspace support.

@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

RangeLink now recognizes vscode-remote resources as writable and displays copy, paste, and bind context-menu commands in remote workspaces. Contract tests and the changelog reflect the expanded support.

Changes

Remote workspace support

Layer / File(s) Summary
Enable remote resource writability
packages/rangelink-vscode-extension/src/utils/isWritableScheme.ts, packages/rangelink-vscode-extension/src/utils/__tests__/*
vscode-remote is added to writable schemes and covered by updated tests.
Expose remote workspace commands
packages/rangelink-vscode-extension/package.json, packages/rangelink-vscode-extension/src/__tests__/constants/packageJsonContracts.test.ts, packages/rangelink-vscode-extension/CHANGELOG.md
Editor and editor-title RangeLink context-menu conditions and contract assertions now include vscode-remote; the changelog records the fix.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • couimet/rangeLink#528: Updates related VS Code context-menu resourceScheme conditions and contract tests.

Poem

A remote bunny hops through the code,
Where links now bloom on a distant abode.
Copy and paste, bind with delight,
Devcontainers make menus shine bright!
vscode-remote joins the writable trail.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main fix: RangeLink context menu items missing in devcontainers.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
packages/rangelink-vscode-extension/src/__tests__/constants/packageJsonContracts.test.ts (1)

1047-1155: 📐 Maintainability & Code Quality | 🔵 Trivial

Potential QA test plan coverage gap for remote workspace context menus.

This PR adds user-visible behavior — RangeLink context menu items now appear in devcontainers and other remote workspaces (vscode-remote scheme). Per path instructions, when changes in packages/rangelink-vscode-extension/src/** modify user-visible behavior (new/changed context menu entries), the QA test plan YAML (packages/rangelink-vscode-extension/qa/qa-test-cases-*.yaml) should also be updated. No QA YAML changes are included in this PR.

Suggested QA test case scenarios to add:

  1. Context menu visibility in devcontainerPreconditions: VS Code connected to a devcontainer. Steps: Open a text file from the remote workspace, right-click in the editor. Expected: RangeLink copy/paste/bind context menu items appear. Automated: false

  2. Context menu visibility in SSH remote workspacePreconditions: VS Code connected via Remote-SSH. Steps: Open a text file, right-click in the editor and on the editor tab. Expected: RangeLink context menu items appear in both editor/context and editor/title/context. Automated: false

  3. Bind text editor in remote workspacePreconditions: VS Code in devcontainer, two text files open. Steps: Bind one editor, paste link into the other. Expected: Binding and paste succeed without read-only error. Automated: false

  4. Context menu items absent for read-only schemesPreconditions: Open a git: or output: document. Steps: Right-click in editor. Expected: RangeLink context menu items do NOT appear. Automated: false

As per path instructions: "When reviewing changes in the VS Code extension source code, check whether the QA test plan YAML was also updated in this PR. Flag a potential QA coverage gap if the PR modifies user-visible behavior (new commands, changed UI text, new settings, new keybindings, new context menu entries, changed error messages, or new notifications) and the PR does NOT add or modify test cases in the QA YAML and the change is not purely internal."

🤖 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
`@packages/rangelink-vscode-extension/src/__tests__/constants/packageJsonContracts.test.ts`
around lines 1047 - 1155, Add or update the relevant QA test plan YAML for the
remote workspace context-menu behavior introduced in the editor context and
editor title context contributions. Cover devcontainer and Remote-SSH
visibility, remote bind/paste behavior, and absence on read-only schemes such as
git and output, marking these scenarios as manual (automated: false).

Source: Path instructions

🤖 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.

Nitpick comments:
In
`@packages/rangelink-vscode-extension/src/__tests__/constants/packageJsonContracts.test.ts`:
- Around line 1047-1155: Add or update the relevant QA test plan YAML for the
remote workspace context-menu behavior introduced in the editor context and
editor title context contributions. Cover devcontainer and Remote-SSH
visibility, remote bind/paste behavior, and absence on read-only schemes such as
git and output, marking these scenarios as manual (automated: false).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: fd4736b1-7dbf-44d6-8628-ba27e5392d26

📥 Commits

Reviewing files that changed from the base of the PR and between bffcd5a and d9e08e4.

📒 Files selected for processing (5)
  • packages/rangelink-vscode-extension/CHANGELOG.md
  • packages/rangelink-vscode-extension/package.json
  • packages/rangelink-vscode-extension/src/__tests__/constants/packageJsonContracts.test.ts
  • packages/rangelink-vscode-extension/src/utils/__tests__/isWritableScheme.test.ts
  • packages/rangelink-vscode-extension/src/utils/isWritableScheme.ts

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.

1 participant