Skip to content

Fix IPC sender validation error when toggling the Agentic UI feature flag - #4200

Merged
katinthehatsite merged 1 commit into
trunkfrom
fix-agentic-ui-toggle-ipc-validation
Jul 15, 2026
Merged

Fix IPC sender validation error when toggling the Agentic UI feature flag#4200
katinthehatsite merged 1 commit into
trunkfrom
fix-agentic-ui-toggle-ipc-validation

Conversation

@bcotrim

@bcotrim bcotrim commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Related issues

  • N/A

How AI was used in this PR

Claude Code traced the console error to its root cause and authored the fix; the change was reviewed and verified locally (lint, typecheck, unit tests).

Proposed Changes

Toggling the "Enable Agentic UI" feature flag logged a Failed IPC sender validation check error (surfacing as Error occurred in handler for 'getAppGlobals') on every toggle.

When a UI-mode flag flips, the main window reloads into the other renderer and the allowed IPC origin switches immediately — but we also sent refresh-app-globals to the outgoing renderer, whose resulting getAppGlobals call then failed sender validation. The refresh is pointless for a page that's being replaced (the new renderer fetches fresh globals on boot), so we now skip it when the toggle triggers a renderer reload. Other feature-flag toggles still refresh app globals as before.

The error was benign (it came from the renderer being torn down), so this is a log-noise fix with no user-facing behavior change beyond cleaner consoles.

Testing Instructions

  1. Run npm start.
  2. In the app menu, toggle Enable Agentic UI under the feature flags menu.
  3. Watch the main process console: before this change it logged Error: Failed IPC sender validation check: http://localhost:5173/ on each toggle; now it doesn't.
  4. Confirm the window still swaps between the default and agentic renderers in both directions, and that app globals still refresh when toggling a non-UI-mode flag.

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

🤖 Generated with Claude Code

@bcotrim bcotrim self-assigned this Jul 15, 2026
@bcotrim
bcotrim requested review from a team and katinthehatsite July 15, 2026 09:24
@wpmobilebot

Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing c7e5368 vs trunk

app-size

Metric trunk c7e5368 Diff Change
App Size (Mac) 1350.65 MB 1350.65 MB +0.00 MB ⚪ 0.0%

site-editor

Metric trunk c7e5368 Diff Change
load 1070 ms 1083 ms +13 ms ⚪ 0.0%

site-startup

Metric trunk c7e5368 Diff Change
siteCreation 7020 ms 6995 ms 25 ms ⚪ 0.0%
siteStartup 2354 ms 2358 ms +4 ms ⚪ 0.0%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff)

@katinthehatsite katinthehatsite left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, I don't see the error anymore 👍

@katinthehatsite
katinthehatsite merged commit bbef051 into trunk Jul 15, 2026
12 checks passed
@katinthehatsite
katinthehatsite deleted the fix-agentic-ui-toggle-ipc-validation branch July 15, 2026 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants