Repository navigation
[Air #1403] Filter Stream Deck Zoom Navigator dial to active workspaces - #1405
Merged
Merged
Conversation
…rkspaces The plugin store kept every registered workspace, so rotating the Zoom Navigator at the workspace altitude walked dormant entries — dead stops with no overview where every command fails (commands require the workspace active in Tower). Filter the store's workspace list to active === true at fetch time (not per-render) so the zoom cursor and selectedWorkspacePath() indices stay coherent. Clamp the cursor when the selected workspace deactivates, and let syncToWorkspace treat a dormant path like an unknown one (no-op).
Collaborator
Author
|
Domain-owner review (streamdeck architect): approach, focus-follow fall-through, and tests match #1403. One fix requested before the pr gate: the deactivation clamp ( |
… active workspace Addresses CMAP (claude) and architect PR review: - Deactivation clamp now resets builder/file, not just workspace, so the cursor can't carry a stale builder index into the fallback workspace (which would make slot/dev keys act on an unrelated builder). Matches rotate() and syncToWorkspace(). - refreshOverview() returns early when no workspace is active, instead of calling getOverview(undefined) — with the strict filter, zero active workspaces is now routine, and the undefined-path fetch made Tower serve an arbitrary dormant workspace's overview onto a dial with nothing to act on.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #1403. Rotating the Stream Deck Zoom Navigator at the workspace altitude walked every registered workspace, dormant ones included. Dormant entries are dead stops on the dial: zooming into one yields no overview, and any action from there fails because Tower commands require the workspace active. This filters the plugin store's workspace list to
active === true(strict filter, owner-ratified 2026-08-11).What changed
All in
apps/streamdeck/src/store.ts— the fix lives entirely in how the store populates its list;cursor.ts, the action layer, and the SDK are untouched.fetchActiveWorkspaces()(new private): wrapsclient.listWorkspaces()and keeps onlyactiveentries. Both fetch sites route through it —refresh()and the stale-list re-fetch insidesyncToWorkspace(). Filtering happens at fetch time, not per-render, because the zoom cursor andselectedWorkspacePath()index into the stored array; filtering per-render would desync the indices.refresh(): when a workspace deactivates while it is the current selection, the next refresh drops it and the cursor could point past the end of the shorter list.refresh()snapscursor.workspaceback to 0 soselectedWorkspacePath()stays valid.syncToWorkspace()(focus-follow): a dormant registration is filtered out, so its path stays unfound and falls through to the existing no-op — a registered-but-dormant path now behaves exactly like an unknown path (e.g. a builder-worktree window). Docstring + inline comment updated.Tests
New
describe('CodevStore active-workspace filtering')inapps/streamdeck/src/__tests__/actions.test.ts:refresh()stores only active workspaces, and the dial cycles the active ones alone (clamped, dormant skipped) — the requested regression test with a mix of active + dormant entries.syncToWorkspacetreats a dormant registration like an unknown path (no-op, no overview fetch).Existing tests that set
store.workspacesdirectly with dormant fixtures are unaffected — the filter runs only at fetch time, not on hand-assigned arrays.Verification
pnpm check-types— cleanpnpm build(esbuild) — OKpnpm test— 66/66 pass(check-types needs
@cluesmith/codev-typesand@cluesmith/codev-sdkbuilt first in a fresh worktree so theirdist/type declarations resolve.)Notes / lessons
TowerWorkspace.activefield was already delivered on every/api/workspacesresponse and simply never consulted — this wires up existing data, no API change.cursor.ts), so the regression test asserts clamp-at-end + reverse, not wrap-around.Protocol
AIR — small, fully described in the issue, no architectural decisions. ~83 LOC of source change. No spec/plan/review files (AIR produces none; this PR body is the review).