Skip to content

VSCode command provider + diff-nav / forward-to-builder commands #1089

Closed

Description

@amrmelsayed

Summary

The VSCode side of the command relay: implement the command provider role and
add the diff-review commands a controller drives. The new diff-navigation commands
also complete the cross-file diff review (#1060) for keyboard users, independent of
any controller.

Depends on #1087 (wire contracts). Pairs with #1088 (Tower relay) at runtime.

Functionality

  • wireCommandProvider: subscribes to the relay's command SSE event and runs the
    mapped action:
    • a verb → codev.* command map that implements each canonical verb; the map IS
      the security allowlist (an unmapped verb is ignored, so a stray broadcast cannot
      drive an arbitrary VSCode command).
    • focus self-gating: only the OS-focused window runs a relayed verb, so
      multiple windows on one workspace execute it exactly once (a single active
      provider). Never pulls focus.
    • arg hardening: verb operands arrive as unknown[]; a non-array is coerced
      to an empty list so a stray payload can't crash the SSE handler.
  • New commands (also useful from the palette / keyboard):

Acceptance

  • Only mapped verbs run; an unmapped verb and an unfocused window are both no-ops;
    a non-array args does not crash.
  • The diff-first and forward-current commands work from both the palette and the
    relay.
  • check-types + lint + tests green.

Note

This is command-only: the provider does not scroll the editor or report editor
position/context. Scrolling is handled by native controller keystrokes
(PageUp/PageDown); a context feed (to gray out / relabel controller buttons) is
deferred — the verbs self-guard and no-op on a mispress in the meantime.

Activity

  1. added
    area/vscode
    on Jun 21, 2026
  2. self-assigned this
    on Jun 21, 2026
  3. changed the title [-]VSCode editor provider + diff-nav / forward-to-builder commands[/-] [+]VSCode command provider + diff-nav / forward-to-builder commands[/+] on Jun 21, 2026
  4. amrmelsayed commented on Jun 21, 2026

    @amrmelsayed
    CollaboratorAuthor

    Merged in #1091 (commit fd01505).

  5. added a commit that references this issue on Jun 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/vscode

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions