GeezerVison is showing github.com — [codex] Fix desktop preview event delivery errors by juliusmarminge · Pull Request #3435 · pingdotgg/t3code
Conversation
juliusmarminge
commented
Jun 20, 2026
•
edited by macroscopeapp
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Summary
- route preview event broadcasts through
ElectronWindow.sendAll so list, inspection, and send failures keep structured window/channel diagnostics and their true causes
- make preview subscriptions effectful and isolate/log non-interruption listener failures without blocking later listeners
- preserve interruption and add behavioral coverage for continued delivery, structured logging, and interruption
Validation
vp test run apps/desktop/src/preview/Manager.test.ts
vp run --filter @t3tools/desktop test (40 files, 218 tests)
vp check
vp run typecheck
Note Medium Risk
Touches main-process preview→renderer event plumbing; behavior changes around listener errors could affect UI updates if misconfigured, though failures are now contained and better logged.
Overview
Preview IPC no longer loops BrowserWindow directly; state, recording, and pointer events are broadcast via ElectronWindow.sendAll, so send failures surface as structured ElectronWindowOperationError diagnostics (window id, channel, cause).
PreviewManager preview subscriptions are now effectful (Effect<void>). A shared deliverEvent path logs and isolates non-interruption listener failures so one bad subscriber does not block others, while interruptions still propagate. Tests cover continued delivery after a failing listener, structured logging, and non-swallowed interruption.
Reviewed by Cursor Bugbot for commit 9bc6ab9. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Fix desktop preview event delivery errors by making listeners effectful in PreviewManager
- Changes the
Listener, RecordingFrameListener, and PointerEventListener type aliases in Manager.ts to return Effect.Effect<void> instead of void, making all event delivery effectful.
- Adds a
deliverEvent helper that catches listener failures: non-interrupt failures are logged as warnings while delivery continues; interrupt causes are re-propagated.
- Replaces direct
BrowserWindow broadcasting in preview.ts with ElectronWindow.sendAll via the Effect environment.
- Behavioral Change: event delivery no longer silently ignores listener failures — errors are now logged and interrupts propagate up.
Macroscope summarized 9bc6ab9.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Important
Review skipped
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: e267d100-98a2-45ae-b18a-81d4a87fc315
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
- Commit unit tests in branch
codex/desktop-preview-event-errors
Comment @coderabbitai help to get the list of available commands and usage tips.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Approvability
Verdict: Approved
This is a self-contained bug fix that improves error isolation for preview event delivery. The changes replace a local broadcast implementation with an existing centralized method, add proper Effect error handling, and include comprehensive tests for the new behavior.
You can customize Macroscope's approvability policy. Learn more.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
size:M
30-99 changed lines (additions + deletions).
vouch:trusted
Author is trusted by repo permissions or the VOUCHED list.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|