Repository navigation
fix(inject): 图片覆盖层避让媒体并修复滚动抖动 - #2387
Closed
Yuimi-chaya wants to merge 3 commits into
Closed
Yuimi-chaya wants to merge 3 commits into
Yuimi-chaya wants to merge 3 commits into
Conversation
Yuimi-chaya
marked this pull request as draft
October 4, 2026 11:32
Contributor
Author
|
经过多轮实现与真人验证,图片/媒体保持原生不透明这一点已基本成立,但全局透明覆盖层仍存在明显的黑色过渡、图层覆盖、页面适配和性能/交互问题。继续修复的成本已经不值得,因此先关闭此 PR,保留代码与实验记录,未来有更合适的实现路径时再重新评估。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
启用图片覆盖层后,覆盖层会同时影响普通界面和媒体内容。线程内的图片、GIF、透明图片、Canvas、视频,以及点击打开的图片预览都会被背景覆盖层染色,透明图片的显示尤其明显。
这个 PR 保留完整图片覆盖层及其配置的透明度,让实际媒体内容通过独立前景层显示。输入框、App 外框、左侧任务栏、设置、Markdown 和审查等普通界面继续使用原来的覆盖层效果。
实现
验证
已在 Windows Codex App 安装实测通过:媒体显示正常,线程内图片、GIF、透明图片、Canvas 和普通视频在鼠标连续滚动时不再上下抖动,其他已验收的覆盖层效果保持正常。
针对本 PR 提交完成的本地验证:
新增的 scripts/test-image-overlay.cjs 为可选浏览器回归,使用已有的 Playwright、sharp、pngjs 和本地 Edge。可通过 NODE_PATH 提供依赖,通过 CODEX_OVERLAY_NATIVE_CSS_DIR 加载本地 App 样式;未将 App 样式、媒体文件或测试安装包加入仓库。
兼容边界
本 PR 仅涉及注入源码、对应生成产物和两份测试文件。