Skip to content

fix(preview): apply viewport changes when the panel is hidden - #7303

Closed
gbarros-dev wants to merge 10 commits into
pingdotgg:mainfrom
gbarros-dev:fix/preview-hidden-viewport
Closed

gbarros-dev wants to merge 10 commits into
pingdotgg:mainfrom
gbarros-dev:fix/preview-hidden-viewport

fix(preview): keep store and guest matched on resize rollback

79fa0bd
Select commit
Loading
Failed to load commit list.
MacroscopeApp / Macroscope - Effect Service Conventions succeeded Aug 23, 2026 in 52s

All clear

All clear

Details

Note

Your check run agent prompt is: .macroscope/check-run-agents/effect-service-conventions.md
More information about how Check Run Agents work can be found in our Help Center.


🔍 Agent activity — 6 tool calls

💭 I'm scanning the diff across Manager.ts, the preview IPC methods, and the contracts file for Effect service convention violations, checking imports and existing patterns like Context.Service usage, and looking closer at how errors are handled with the attemptPromise helper.

1. browse_code — apps/web/src/components/preview/previewGuestViewport.ts

2. browse_code — apps/desktop/src/ipc/methods/preview.ts

💭 These follow conventions. Now I'm checking Manager.ts for the newly added functions to see if there's error modeling, noting the existing attemptPromise helper, and comparing the applyViewportOverride section against similar existing code like setColorScheme.

3. git_tools — setColorScheme|applyColorScheme|colorSchemeOverridesRef|replaceMap

💭 I want to check whether the new code follows the existing patterns, so I'll look at lines 2340-2530.

4. browse_code — apps/desktop/src/preview/Manager.ts

💭 I'm checking whether applyViewportOverride is used before it's declared inside restoreControlSession—since it's a const declared later in the function but only invoked when restoreControlSession actually runs, the TDZ isn't a real problem at runtime, just a code-ordering quirk worth noting. Now I'm reviewing the check's actual conventions—imports, service definitions, dependency acquisition, error shapes, file layout—and verifying attemptPromise's error shape matches existing patterns. I'm also checking the contracts ipc.ts change for proper Schema.Union usage, and looking at whether the apps/web files (which use React hooks and a Promise-based bridge rather than Effect services) introduce any ManagedRuntime or .runPromise calls that would need scrutiny. I'm also confirming the ipc.ts imports Schema correctly and checking the test file's imports are properly consolidated from "effect".

5. git_tools — ^import .*from "effect"

6. git_tools — ManagedRuntime|runPromise|Layer.succeed

💭 No violations found there. I'm checking the contracts imports and schema usage, and the new preview IPC methods look correctly namespaced. There's a minor naming nit where a schema name is reused across two different channels, but that's not a real convention issue—overall it looks clean, so I'll double-check the Manager.ts service next.


Agent Credits: 42 credits