Skip to content

fix: update Codex compatibility and renderer performance - #2050

Open
szguicheng wants to merge 6 commits into
BigPizzaV3:mainfrom
szguicheng:codex/modern-codex-skin-compat
Open

fix: update Codex compatibility and renderer performance#2050
szguicheng wants to merge 6 commits into
BigPizzaV3:mainfrom
szguicheng:codex/modern-codex-skin-compat

Conversation

@szguicheng

@szguicheng szguicheng commented Aug 29, 2026

Copy link
Copy Markdown

Summary

This PR focuses on two areas:

1. Update compatibility with the latest Codex UI

Codex has changed its main UI structure, native field names, and theme/runtime surface contracts. This PR updates Codex++ to recognize and work with the latest Codex UI, including:

  • Modern main-surface, thread, header, message, composer, and scrolling structures.
  • The current Codex theme variables and Dream Skin API mapping.
  • Modern composer and thread lifecycle behavior.
  • Correct native field matching and state mapping, so existing theme behavior follows the right Codex UI state.
  • Safe cleanup and idempotent marker reconciliation when Codex changes or remounts UI sections.

2. Significantly improve Codex renderer performance

Previously, enabling the Codex++ renderer could make the entire Codex page feel noticeably sluggish. This PR substantially reduces renderer overhead by:

  • Coalescing repeated DOM scans and deferred work.
  • Avoiding redundant inline-style, attribute, text, and dataset writes.
  • Reducing unnecessary layout reads and repeated alignment work.
  • Throttling retry paths and preventing duplicate event-listener installation.
  • Making conversation alignment incremental and stable instead of repeatedly resetting layout.
  • Narrowing mutation observation to changes that can actually affect layout or behavior.

The result is a much lower renderer workload and a substantially smoother Codex UI when Codex++ is enabled.

No visual style is hard-coded into the application by this PR; theme appearance remains controlled by the theme layer.

Validation

  • npm test: 121 passed
  • cargo test -p codex-plus-core --test dream_skin_package --test dream_skin_runtime --test cdp_bridge: 131 passed, 1 ignored
  • node --check assets/inject/renderer-inject.js
  • npm run vite:build
  • cargo build --release --target aarch64-apple-darwin
  • Local validation against Codex 26.825.32147

Related historical context: #1755 and #1881.

@szguicheng szguicheng changed the title fix: adapt Dream Skin to modern Codex surfaces fix: update Codex compatibility and renderer performance Aug 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant