Repository navigation
Add sidecar-display extension - #29572
Conversation
- build(publish): drop swift/.build before ray publish copies - docs: point CLAUDE and CONTRIBUTING at ARCHITECTURE.md - docs: move architecture detail out of README - refactor(lib): extract shared betterdisplaycli plumbing - docs: refresh store screenshots for auto-reconnect toggle - feat(auto-reconnect): add on/off toggle and consistent HUD messaging - fix(auto-reconnect): clear sidecar mirror mode after background reconnect - build: adopt typescript 6.0.3 and tighten dependabot pin - chore: bump the dev-dependencies group across 1 directory with 3 updates (raycast#6) - chore: bump actions/setup-node from 4 to 7 (raycast#3) - chore: bump actions/cache from 4 to 6 (raycast#2) - chore: bump actions/checkout from 4 to 7 (raycast#1) - chore: bump @raycast/api from 1.104.22 to 1.104.23 (raycast#5) - ci(dependabot): ignore typescript and @types/node major bumps - test: convert the suite to TypeScript on node:test - chore: consolidate ignores, tighten tsconfig, and normalise the scripts - docs: correct the branch-protection description - chore: gate publishing on store readiness and document the release flow - docs: add a workflows runbook and correct the safety claims - refactor: align names with their user-facing features and enforce the limits - chore: add store screenshots and correct the description wording - docs: comprehensive README, contributing guide, and repo polish - refactor: compile the native engine from Swift source, not a bundled binary - test: cover the virtual-screen reconnect with a stub CLI - chore: add changelog, release workflow, and validated publish path - fix: add error handling and feedback to menu-bar actions, enforce typecheck - fix: drop the ineffective redetect method and harden the virtual-screen reconnect - feat: add a lighter "redetect displays" mirror-fix method - feat: automatic engine default, smarter mirror fix, and message polish - feat: only fix mirroring on a fresh connect, not every time - feat: fix Sidecar mirror mode by reconnecting virtual screens - feat: add an option to show the device name in the menu bar - fix: detect a mirrored Sidecar display in the native engine - fix: hold the display mode through the macOS rearrange window after connect - feat: add a native no-dependency engine (SidecarCore + CoreGraphics) - refactor: introduce a SidecarBackend interface behind the orchestration - fix: make the menu-bar item friendly to Bartender and other menu managers - feat: make auto-reconnect timing configurable and drop the toggle command - fix: keep auto-reconnect alive after sleep instead of giving up - feat: add background auto-reconnect and a menu-bar status command - fix: never touch the main display when connecting an unreachable iPad - feat: initial release of sidecar-display Raycast extension
|
Congratulations on your new Raycast extension! 🚀 We're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 15 business days. Once the PR is approved and merged, the extension will be available on our Store. |
Greptile SummaryThis PR adds a new Sidecar Display extension that connects an iPad via Apple Sidecar and forces it into extend (or mirror) mode without touching the main display. It ships a bundled Swift helper that drives
Confidence Score: 5/5
Important Files Changed
Reviews (9): Last reviewed commit: "Update CHANGELOG.md and optimise images" | Re-trigger Greptile |
- style: reflow README to printWidth 120 - style: adopt printWidth 120 per Raycast store standard - fix(swift): cancel display configuration when completion fails
- feat(auto-reconnect): gate reconnects on a silent presence probe - docs: add project TODO
0xdhrv
left a comment
There was a problem hiding this comment.
Thanks for your contribution 🔥
We already have a Sidecar extension in the Store:
The existing extension already lets users connect and disconnect an iPad as a second display from Raycast.
This PR adds more Sidecar functionality, including:
- Choosing between extend and mirror modes
- Automatically reconnecting after the connection drops
- Showing the connection status in the menu bar
- Detecting whether the iPad is nearby
- Fixing mirroring issues
- Supporting multiple Sidecar devices
Could these features be added to the existing Sidecar extension instead of introducing another extension for the same workflow?
This would keep Sidecar-related functionality in one extension while improving the existing extension with connection status, display-mode controls, and automatic reconnection.
As mentioned in our extension guidelines here ↗
|
Thanks for taking a look. The overlap is narrower than the feature list suggests — these aren't two implementations of the same thing with different polish. They're different mechanisms. The existing extension drives the System Settings UI through AppleScript. It opens the Displays pane and clicks the device popup by accessibility-tree index: set popUpButton to menu button 1 of group 1 of group 3 of splitter group 1 of group 1 of window 1
on error
set popUpButton to pop up button 1 of group 1 of group 2 of splitter group 1 of group 1 of window 1Two hardcoded paths because the hierarchy moved in Tahoe. It requires Accessibility permission, opens a window on every use, and breaks whenever Apple reshuffles that pane. This extension talks to That difference is why the features you listed can't simply be added to the existing extension. UI scripting can only issue clicks — it has no way to ask a question. Auto-reconnect needs to read whether the link is up. Presence detection needs to read whether the iPad is within reach. The menu-bar status needs both. None of those are reachable by clicking buttons in a settings pane, so they aren't features to port; they're consequences of the engine. There's also a safety dimension. macOS decides which display becomes main when Sidecar attaches, and it can pick the iPad. This extension refuses to write or relocate the main display on every path, and that invariant is enforced by tests. An earlier iteration of mine got it wrong: it scrambled every window and caused a logout. That's documented in So I don't think folding these together produces one better extension — it would mean discarding the existing implementation and replacing it wholesale with this one, which is a different proposition from what you're asking. |
- fix(auto-reconnect): reconnect promptly when the cable goes back in - docs: correct the TODO status and record what is outstanding
- Remove redundant contributor, architecture, workflow, security, and TODO documents - Simplify the README around setup, commands, preferences, and limitations - Add extension keywords and clarify user-facing configuration descriptions - Reduce background refresh intervals to once per minute - Rename the lint autofix script and add a preference placeholder - Remove outdated metadata screenshots and normalize test compiler formatting
|
Published to the Raycast Store: |
|
🎉 🎉 🎉 Such a great contribution deserves a reward, but unfortunately we couldn't find your Raycast account based on your GitHub username (@chiptoma). Please link your GitHub account to your Raycast account to receive your credits and soon be able to exchange them for some swag. |
The extension shipped with raycast/extensions#29572. Replace the "not yet published" note with the Store link and the deep link, and tick off the merge-gated TODO items.
Description
Sidecar Display connects an iPad over Sidecar and forces it to extend
instead of mirror — from a hotkey or the menu bar — without ever writing or
relocating the Mac's main display.
Two interchangeable engines sit behind one interface, auto-selected:
betterdisplayclibinary (needs theBetterDisplay app). Proven and low-maintenance.
via the private
SidecarCoreframework loaded at runtime withdlopen(the binary links nothing private), and controls mirror state through
public CoreGraphics.
Features
menu bar with a one-click Auto-Reconnect toggle.
(e.g. waking from sleep), with configurable backoff and a heartbeat that never
abandons a wanted link.
to every display API — by reconnecting the main BetterDisplay virtual screen.
Safety
The extension never writes or power-cycles the main display; mirroring always
keeps the current main as master, and both mode writes are refused when the iPad
is itself main. These invariants are enforced on every path and proven by
headless unit tests (no hardware needed).
Note for reviewers (private framework)
The native engine uses the private
SidecarCoreframework via runtimedlopen/selectors and public CoreGraphics — no opaque binary is committed;the Swift ships as auditable source, compiled by
extensions-swift-tools.If the private-API use is a concern, the BetterDisplay engine is a full-featured,
dependency-free-of-private-APIs fallback and can ship on its own.
Tested on macOS 26 with an iPad over Sidecar, both engines.
Screencast
Checklist
npm run buildand tested this distribution build in Raycastassetsfolder are used by the extension itselfREADMEare placed outside of themetadatafolder