Skip to content

feat(desktop): add "All devices" option to the Workspaces device filter - #6478

Merged
Kitenite merged 1 commit into
mainfrom
workspaces-filter-all-dev-2
Aug 14, 2026
Merged

Kitenite merged 1 commit into
mainfrom
workspaces-filter-all-dev-2

Conversation

@Kitenite

@Kitenite Kitenite commented Aug 14, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Add an All devices option to the device filter on the v2 Workspaces page. Until now the filter could only show one host at a time — this device (the default) or a single remote host.

Why / Context

With workspaces spread across several hosts (laptop, dev boxes, sandboxes), there was no way to see everything in one view; you had to flip through hosts one by one.

How It Works

  • New DEVICE_FILTER_ALL_DEVICES = "all-devices" sentinel in v2WorkspacesFilterStore, next to the existing this-device one. Default and reset() still point at This device, and the choice round-trips through the URL as ?device=all-devices like any other selection.
  • When selected, useAccessibleV2Workspaces passes undefined to useHostWorkspacesSource — that source's existing fan-out mode, which queries every known host and shares query keys with the always-running HostWorkspacesProvider, so nothing fetches twice. Offline hosts contribute their last-seen cached rows, same as the sidebar.
  • PR chips, live agent statuses, and the board's archived tombstones keep working across hosts: derivePullRequestQueryTargets already groups workspaces per host and skips offline hosts, and the archived queries iterate the same targets.
  • Header select gets the new option first (monitor-and-phone icon), and DeviceFilterTriggerLabel renders it instead of falling through to "Unknown device".

Manual QA Checklist

Verified end-to-end over CDP against the dev app built from this branch (real clicks, signed-in session, screenshots captured at each step):

  • Filter defaults to This device; dropdown shows All devices first, This device checked, remote hosts under "Other devices" with online dots
  • Selecting All devices updates the trigger label and syncs the URL to ?device=all-devices
  • List renders local rows immediately; remote hosts were offline with no cached snapshots in the dev profile, so no extra rows — expected offline-first behavior
  • "No results" empty-state logic treats All devices as an active filter (it's broader than the default)

Testing

  • bun run typecheck (apps/desktop)
  • biome check on the touched directory

Design Decisions

  • Route All devices through the scoped source's fan-out mode instead of the provider's shared result: the provider path (used by the palette) deliberately skips PR/agent-status queries and can't fetch archived tombstones; the scoped source in fan-out mode gets all three while still deduping fetches via shared query keys.

Summary by cubic

Adds an “All devices” option to the Workspaces device filter so users can view workspaces across all hosts. Previously the filter showed only one host; now “All devices” fans out across known hosts without duplicate fetching and preserves PR, agent status, and archived data.

  • Introduces DEVICE_FILTER_ALL_DEVICES in the v2 Workspaces filter store; selection round-trips as ?device=all-devices. Default and reset remain “This device.”
  • When selected, useAccessibleV2Workspaces passes undefined to useHostWorkspacesSource to invoke the existing fan-out, sharing query keys with HostWorkspacesProvider (no double fetch; offline hosts contribute cached rows).
  • PR chips, live agent statuses, and archived tombstones resolve per host via derivePullRequestQueryTargets; unscoped callers (palette/dev seeding) are unchanged.
  • UI: the header select shows “All devices” first with a monitor-and-phone icon; the trigger label renders “All devices” instead of falling back to “Unknown device.”

Written for commit 9fec14d. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • New Features
    • Added an “All devices” filter to the Workspaces dashboard.
    • View workspace items across all connected devices in a single view.
    • Added clear device-specific icons and labels for the new filter option.
    • Improved pull request target visibility when viewing workspaces across devices.

The v2-workspaces device filter could only show one host at a time
(this device or a specific remote). Add an "All devices" sentinel that
runs the existing host fan-out in useHostWorkspacesSource, sharing
query keys with HostWorkspacesProvider so nothing fetches twice, with
PR chips, agent statuses, and board tombstones intact per host.
@coderabbitai

coderabbitai Bot commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 5c752dde-9e86-4679-928f-37b4943ed739

📥 Commits

Reviewing files that changed from the base of the PR and between 8f2753b and 9fec14d.

📒 Files selected for processing (5)
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspaces/components/V2WorkspacesHeader/V2WorkspacesHeader.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspaces/components/V2WorkspacesHeader/components/DeviceFilterTriggerLabel/DeviceFilterTriggerLabel.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspaces/hooks/useAccessibleV2Workspaces/useAccessibleV2Workspaces.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspaces/stores/v2WorkspacesFilterStore/index.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspaces/stores/v2WorkspacesFilterStore/v2WorkspacesFilterStore.ts

📝 Walkthrough

Walkthrough

Adds an “All devices” filter to the workspace header and trigger label. The filter store exports its identifier. Workspace loading uses an unscoped source and creates pull-request targets per host with visible rows.

Changes

All devices workspace filter

Layer / File(s) Summary
Filter contract and header UI
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspaces/stores/v2WorkspacesFilterStore/*, apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspaces/components/V2WorkspacesHeader/...
Adds DEVICE_FILTER_ALL_DEVICES. The header and trigger label render the “All devices” option with the monitor-and-smartphone icon. Selected-host fallback logic excludes aggregate filter values.
Workspace source and pull-request targets
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspaces/hooks/useAccessibleV2Workspaces/useAccessibleV2Workspaces.ts
Uses an unscoped source for all-devices mode. Derives one pull-request target per host with visible rows.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 9fec1

This change adds an All devices filter option and its URL state while preserving the existing default behavior; no actionable merge-blocking risk remains after normal checks and review.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant V2WorkspacesHeader
  participant v2WorkspacesFilterStore
  participant useAccessibleV2Workspaces
  participant HostWorkspaces
  User->>V2WorkspacesHeader: Select All devices
  V2WorkspacesHeader->>v2WorkspacesFilterStore: Read DEVICE_FILTER_ALL_DEVICES
  V2WorkspacesHeader->>useAccessibleV2Workspaces: Apply device filter
  useAccessibleV2Workspaces->>HostWorkspaces: Load unscoped workspaces
  HostWorkspaces-->>useAccessibleV2Workspaces: Return host workspaces
  useAccessibleV2Workspaces-->>User: Show workspaces from all devices
Loading

Possibly related PRs

Suggested reviewers: saddlepaddle

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change and follows the required conventional commit format.
Description check ✅ Passed The description explains what changed, why it changed, how it works, and how it was tested, but it omits the repository checklist section.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch workspaces-filter-all-dev-2

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.

@Kitenite
Kitenite merged commit dffcada into main Aug 14, 2026
12 checks passed
@Kitenite
Kitenite deleted the workspaces-filter-all-dev-2 branch August 14, 2026 22:52
@github-actions

Copy link
Copy Markdown
Contributor

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ⚠️ Neon database branch

Thank you for your contribution! 🎉

@Kitenite Kitenite mentioned this pull request Aug 16, 2026
3 tasks done
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