fix(plugins): restore ChatGPT formula copy in Edge - #910
Conversation
Fixes Nagi-ovo#909 Co-authored-by: Codex <codex@users.noreply.github.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe formula-copy service now supports current ChatGPT KaTeX markup. Plugin permission flows now request explicit background content-script synchronization and verify the resulting runtime message handling. ChangesFormula copy support
Plugin content-script synchronization
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant PluginManager
participant BackgroundRuntimeMessageListener
participant syncPluginContentScripts
PluginManager->>BackgroundRuntimeMessageListener: send gv.plugins.syncContentScripts
BackgroundRuntimeMessageListener->>syncPluginContentScripts: await synchronization
syncPluginContentScripts-->>BackgroundRuntimeMessageListener: synchronization complete
BackgroundRuntimeMessageListener-->>PluginManager: return { ok: true }
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration. Comment |
|
@codex review |
Co-authored-by: Codex <codex@users.noreply.github.com>
|
Updated the branch with the latest Current tested head: Post-merge verification:
The merge keeps the feature code from |
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
|
@coderabbitai review |
✅ Action performedReview finished.
|
Co-authored-by: Codex <codex@users.noreply.github.com>
|
Addressed CodeRabbit's Current tested head: Verification:
|
|
@codex review |
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
Co-authored-by: Codex <codex@users.noreply.github.com>
|
Follow-up: CodeRabbit's docstring gate evaluates the modified exported component, not the private reconciliation helper. Added a responsibility-focused JSDoc directly to Current tested head: Verification:
|
|
@codex review |
|
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
|
@coderabbitai review |
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
Superseded by #911, which contains the same fix as one clean commit on the current main and has started a fresh full-diff review. |
Fixes #909
Description / 描述
Formula Copy had two independent failures on ChatGPT/Edge:
permissions.onAddedas the Chrome popup-close fallback.data-math-sourcevalue and recognizes.katex-displayas block math, while preserving the legacy annotation paths used by Claude, older ChatGPT markup, Gemini, and AI Studio.The PR adds realistic ChatGPT inline/block DOM regression coverage, permission-registration routing tests, and a regression note.
Related Issue / 相关 Issue
Fixes #909
community-only, I was assigned after maintainer approval before starting. / 如果 Issue 带有community-only标签,我已在开始前获得维护者确认并被分配。(N/A: [Bug] Formula Copy does not work on ChatGPT in Microsoft Edge #909 is labeledcontribution, notcommunity-only.)Visual Proof / 可视化证据
The contributor manually verified the rebuilt
dist_chrome_devpackage on the real ChatGPT formula from #909: hover styling appeared and clicking the formula copied the expected LaTeX successfully.visual-prove.mp4
Browser Testing / 浏览器测试
Tested commit / 测试提交:
0788f16181e33ca77346eef5787c0d204a4f8278dist_chrome_dev, refreshed the real ChatGPT conversation, and clicked currentdata-math-sourceKaTeX. Copy succeeded with the configured LaTeX delimiters.Missing checks and owner, or N/A reason / 缺失检查与负责人,或不适用理由:
Commands run / 已运行命令:
bun run typecheckbun run lint:check— 0 errors; 209 existing warningsbun run i18n:check— all 10 localesbunx vitest run --exclude scripts/__tests__/verify-release-privacy.test.ts --testTimeout 20000 --hookTimeout 30000 --silent— 273 files, 2537 testsbun run build:chrome$env:__DEV__='true'; bunx vite build --config vite.config.chrome.ts --mode developmentbun run build:firefoxbun run build:safaribun run docs:buildgit diff --check origin/main...HEADCommands not run and reason / 未运行命令及原因:
bun run verify:prcannot complete on this Windows checkout because Prettier treats the repository'sAGENTS.mdsymlink representation as changed. Its individual applicable gates were run separately.scripts/__tests__/verify-release-privacy.test.tsrequires repository symlinks that are unavailable in this Windows checkout, so the full test run excluded only that file.bun run build:edgecompleted the Edge code build, but its final zip step failed because the externalzipexecutable is unavailable on Windows. CI's Edge build remains required.gh auth statusand CLI-side PR verification were unavailable because GitHub CLI is not installed. The branch was pushed with Git and this draft PR was created through the authenticated GitHub web UI as @shallowaria.Checklist / 检查清单
bun run format,bun run lint, then the standard localbun run verify:pr, or listed every omitted command and reason above. / 我已依次运行格式化、自动修复及标准本地bun run verify:pr验证,或在上方逐项说明未运行命令及原因。Summary by CodeRabbit
Summary by CodeRabbit
Bug Fixes
$...$and$$...$$formatting.Documentation