Skip to content

vscode: command-relay workspace-guard comment says 'no-op until a controller populates it' — the deck populates it now #1454

Open

Description

@amrmelsayed

apps/vscode/src/command-relay.ts:78 describes the relay's workspace-scope guard as inert:

// Workspace scope: a single Tower may serve several workspaces, so drop a
// command addressed to a different one. Only enforced when the command carries
// a workspace AND this window knows its own (mirrors builder-spawn-handler);
// absent today, so this is a no-op until a controller populates it.

That last clause is no longer true. Verified against the current tree:

  • TowerClient.sendCommand(verb, args, workspace) sets body.workspace whenever a workspace is passed (packages/sdk/src/tower-client.ts:919-923).
  • Every Stream Deck call site passes one: actions.ts:57, :149, :235, :277 all call sendCommand(..., this.store.selectedWorkspacePath()).

So the guard is live — in a multi-workspace Tower it is actively dropping relayed commands addressed elsewhere, which is exactly the behavior it was written for.

Why this is worth a one-line fix rather than nothing: the comment tells a future reader that the branch beneath it does nothing, which is an invitation to simplify away a working safety check. A stale "this is a no-op" is more dangerous than no comment at all.

Scope is one comment, no behavior change, no test change. Too small for its own lane — it should ride the next PR that touches command-relay.ts (the relay-verb work in that file is active, so one should come along shortly). Filed only so it is not lost.

Found by the streamdeck architect while source-verifying documentation claims for #1390 / PR #1452, and passed to this lane rather than folded into a docs-only PR.

Activity

  1. added
    area/vscode
    on Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/vscode

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions