Skip to content

[codex] stabilize Prompt Optimize UI and transport - #74

Open
weiadou wants to merge 2 commits into
BigPizzaV3:mainfrom
weiadou:codex/fix-prompt-optimize-ui-stability
Open

[codex] stabilize Prompt Optimize UI and transport#74
weiadou wants to merge 2 commits into
BigPizzaV3:mainfrom
weiadou:codex/fix-prompt-optimize-ui-stability

Conversation

@weiadou

@weiadou weiadou commented Aug 12, 2026

Copy link
Copy Markdown

Summary

  • release Prompt Optimize 1.0.3 with revision-owned DOM selectors so legacy instances cannot remove the current button, style, settings panel, toast, or host;
  • keep the sparkle button externally anchored before the model selector instead of participating in the action-row flex layout, and recompute that anchor on resize;
  • retain native Electron fetch as the preferred transport, LLM Bridge compatibility fallback, cancellation, and redacted upstream errors.

Root cause

Repeated user-script injection and an inline flex insertion allowed stale Prompt Optimize instances to compete for shared DOM nodes and styles. That produced flicker, layout compression, cancelled-looking states, and an unreliable right-click surface.

Validation

  • node --check scripts/prompt-optimize.js
  • node --test tests/prompt-optimize-prosemirror-writer.test.js (10/10)
  • git diff --check
  • live Codex++ reload: 1.0.3 / v1-0-3-anchor
  • live right-click opens the centered settings panel without a request
  • live resize event retains ✨ → model → send with no loading state or request

No API configuration, Key, or real optimization request is included in this change.

@weiadou
weiadou marked this pull request as ready for review August 12, 2026 10:43
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