Skip to content

fix terminal theme timing - #3403

Draft
Pyasma wants to merge 1 commit into
Untrivial-ai:mainfrom
Pyasma:ao/dev/agent-orchestrator-14/issue-3398-theme-layout
Draft

fix terminal theme timing#3403
Pyasma wants to merge 1 commit into
Untrivial-ai:mainfrom
Pyasma:ao/dev/agent-orchestrator-14/issue-3398-theme-layout

Conversation

@Pyasma

@Pyasma Pyasma commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

What changed

  • Moved shell theme application from useEffect to useLayoutEffect so the document theme is applied before terminal descendants read CSS variables.

Why

  • The terminal theme was one render behind because xterm-derived theme values were computed after the DOM theme class/data attribute update.

Impact

  • Terminal colors now track the active app theme without the stale-frame mismatch described in issue 3398.

Validation

  • cd frontend && npm run typecheck
  • cd frontend && npm test -- --run src/renderer/components/XtermTerminal.test.tsx

Fixes #3398

@Pyasma
Pyasma force-pushed the ao/dev/agent-orchestrator-14/issue-3398-theme-layout branch from 57fdce4 to 2ae9e41 Compare July 31, 2026 14:14
@i-trytoohard i-trytoohard added bug Something isn't working comp/desktop Electron main process and React renderer. labels Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working comp/desktop Electron main process and React renderer.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Terminal theme desyncs on toggle — xterm colors lag behind app shell

2 participants