Skip to content

feat(vscode): Stream Deck controller support (follow-focus + relay verbs)#1105

Open
amrmelsayed wants to merge 1 commit into
mainfrom
streamdeck-vscode-support
Open

feat(vscode): Stream Deck controller support (follow-focus + relay verbs)#1105
amrmelsayed wants to merge 1 commit into
mainfrom
streamdeck-vscode-support

Conversation

@amrmelsayed

Copy link
Copy Markdown
Collaborator

What

The extension-side changes that let the Codev Stream Deck plugin work. The command-relay substrate landed earlier (#1091); this PR is the consumer half that lives in the VS Code extension. The plugin package itself lands separately.

~178 lines, 5 files, all in packages/vscode. No core/types/Tower changes, no new dependencies, no lockfile churn.

Why it's safe to land on its own

Every bit is inert without a Stream Deck:

  • the follow-focus code is gated behind codev.streamdeck.followFocus (default off), so it never fires a streamdeck:// URL unless you opt in;
  • the relay verbs only run when a controller sends them over the existing command relay.

Non-Stream-Deck users see zero behavior change.

Changes

File What
src/streamdeck-focus-sync.ts (new) Passive deep link (streamdeck=hidden, never foregrounds the app) announcing the focused workspace and the active builder; gives up + warns once if there's no handler.
src/extension.ts Hooks (into existing subscriptions): announce on window focus, and the active builder from a focused diff / terminal / sidebar row; plus the codev.focusWorkspaceWindow command (vscode.openFolder(uri,{forceNewWindow:true}) to focus a workspace's existing window — fork-agnostic).
src/terminal-manager.ts getActiveBuilderId() — maps the focused builder terminal to its builder id.
src/command-relay.ts Allowlist: focus-workspace -> codev.focusWorkspaceWindow, scroll -> editorScroll.
package.json The codev.streamdeck.followFocus setting (default false).

Feature groups

  1. Workspace follow-focus — the controller follows the focused VS Code window.
  2. Controller -> VS Code window focus — selecting a workspace on the controller reveals its existing window.
  3. Scroll dial — the scroll verb maps to the built-in editorScroll.
  4. Builder follow — the controller follows the active builder (diff / terminal / sidebar), keyed on the builder id.

Verification

  • check-types + lint pass (identical files were verified on the source branch; main is undiverged in packages/vscode).
  • Behavior verified on hardware (Stream Deck +): workspace + builder follow both directions, opt-in gating, no focus-stealing (passive deep link).

…rbs)

The extension-side changes that let the Codev Stream Deck plugin work. Everything
here is inert without a Stream Deck: the follow-focus code is gated behind
codev.streamdeck.followFocus (default off), and the relay verbs only run when a
controller sends them. No new dependencies; the plugin package lands separately.

- Command relay allowlist (command-relay.ts): add 'focus-workspace' ->
  codev.focusWorkspaceWindow and 'scroll' -> editorScroll.
- focus-workspace command (extension.ts): vscode.openFolder(uri,{forceNewWindow:true})
  focuses the workspace's existing window (controller -> VSCode), fork-agnostic.
- Follow-focus module (streamdeck-focus-sync.ts, new): a PASSIVE deep link
  (streamdeck=hidden, never foregrounds the app) announcing the focused workspace
  and the active builder; gives up + warns once if there's no handler. Opt-in
  setting added to package.json.
- Builder follow (extension.ts + terminal-manager.ts): announce the active builder
  from a focused builder diff, the builder terminal (getActiveBuilderId), or a
  Codev-sidebar row selection — keyed on the builder id.
@amrmelsayed amrmelsayed added the area/vscode Area: VS Code extension label Jun 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/vscode Area: VS Code extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant