Repository navigation
chore(deps): bump the web-minor-and-patch group in /web with 10 updates #527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Qiyuanqiii
merged 5 commits into
main
from
dependabot/npm_and_yarn/web/web-minor-and-patch-4d05a64829
Nov 6, 2026
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
f0a9119
chore(deps): bump the web-minor-and-patch group in /web with 10 updates
dependabot[bot] 939ddfe
Merge remote-tracking branch 'origin/main' into Qiyuanqiii/pr527-revi…
Qiyuanqiii 19a01a3
fix(ci): keep Python 3.9 checks on Ubuntu 24.04
Qiyuanqiii 0d11adb
docs(review): verify frontend dependency upgrade UI
Qiyuanqiii 1aad068
docs(web): specify editor verification working directory
Qiyuanqiii File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| # #527 frontend dependency verification | ||
|
|
||
| The images render the production `V2Composer`, `MarkdownInput`, styles, and Lucide icons in Microsoft Edge. A local React harness supplies draft state and a local submit callback; no API server or model is invoked. Clipboard checks use the browser's system clipboard through `navigator.clipboard.writeText` and actual Ctrl+V / Ctrl+Shift+V keyboard gestures. | ||
|
|
||
| | Stage | Product revision | Dependencies | | ||
| | --- | --- | --- | | ||
| | Before | `964ce97ce640610dab79f5d339f7f14c9e6dea8a` (current main) | Tiptap 3.32.0, React Query 5.104.5, Lucide 1.61.0 | | ||
| | After | `19a01a39` (#527 + main + shared CI repair) | Tiptap 3.32.1, React Query 5.105.0, Lucide 1.64.0 | | ||
|
|
||
| The production composer/editor files are identical in both checkouts. Each checkout uses its own `npm ci` dependency installation. The upgrade also changes `@types/node` 26.6.5 → 26.6.6; React remains 19.3.1 and jsdom remains 29.1.1. | ||
|
|
||
| ## Images and interactions | ||
|
|
||
| Compare `before-desktop-rich-composer.png` with `after-desktop-rich-composer.png` for the initial Markdown table, local image, and icons. Compare `*-desktop-pasted-composer.png` for the real clipboard paste and edited table cell. `*-narrow-rich-composer.png` shows the same source at a 390px window width; the mode switch is accessed from the attachment menu at that width, matching the production layout. `*-desktop-dark-*` repeats the workflow in dark theme. | ||
|
|
||
| `*-viewport.png` images are unaltered full-window captures (1024×600 desktop, 390×800 narrow). `*-composer.png` images are unscaled crops of the full composer at its native width (738px desktop, 358px narrow). Device scale is 1. Every before/after pair uses the same theme, content, and window size. | ||
|
|
||
| `metrics.json` records six completed workflows: initial image decode, Markdown/source round trip without rewriting the source, system clipboard Markdown paste with bold/code/table/image, typing into a table cell, local submission preserving serialized Markdown, and Ctrl+Shift+V preserving literal punctuation. The layouts have no horizontal overflow; the add/send icons remain visible. At 390px the mode icon is intentionally inside the attachment menu. | ||
|
|
||
| ## Existing image-paste issue | ||
|
|
||
| An image that forms the final, standalone Markdown paragraph is dropped during paste in both old and upgraded dependencies. An image preceded by text in the same paragraph is retained in both. Restoring a draft containing a standalone image renders it correctly in both. `pasted-image-check.json` and `check-pasted-image.js` retain the four-case reproduction; this existing issue was reported separately and no editor source change was added to this dependency PR. | ||
|
|
||
| ## Checks | ||
|
|
||
| Windows, Node 24.22.1 (official SHA256-verified toolchain), npm 11.19.1: | ||
|
|
||
| ```powershell | ||
| cd web | ||
| npm ci --no-audit --no-fund | ||
| npm test -- --maxWorkers=2 | ||
| npm run build | ||
| git diff --check | ||
| ``` | ||
|
|
||
| All 288 test files and 2,932 tests passed. The production build (including TypeScript checking) and whitespace check exited successfully. Raw test/build logs are included. The logs contain jsdom canvas/navigation warnings and the existing large-bundle warning. | ||
|
|
||
| ## Reproduce | ||
|
|
||
| Copy the HTML/TSX/SVG fixture files into `web/.tmp/` in both checkouts. Start their Vite servers at ports 5270 (before) and 5271 (after), then open the chosen fixture URL with Playwright CLI using Edge. Run `capture-editor.js` with `playwright-cli run-code --filename`; its `phase=before` or `phase=after` URL selects the checkout. Run `check-pasted-image.js` to repeat the independent image-paste comparison. | ||
Binary file added
BIN
+35.2 KB
output/playwright/pr527-upgrade/after-desktop-dark-pasted-viewport.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+35.3 KB
output/playwright/pr527-upgrade/before-desktop-dark-pasted-viewport.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+28.4 KB
output/playwright/pr527-upgrade/before-desktop-dark-rich-composer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+33.8 KB
output/playwright/pr527-upgrade/before-desktop-dark-rich-viewport.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| async (page) => { | ||
| const phase = new URL(page.url()).searchParams.get("phase") || "after"; | ||
| const port = phase === "before" ? 5270 : 5271; | ||
| await page.context().grantPermissions(["clipboard-read", "clipboard-write"]); | ||
| const checks = []; | ||
| for (const [size, viewport, theme] of [ | ||
| ["desktop", {width:1024,height:600}, "light"], | ||
| ["narrow", {width:390,height:800}, "light"], | ||
| ["desktop-dark", {width:1024,height:600}, "dark"], | ||
| ]) { | ||
| await page.setViewportSize(viewport); | ||
| await page.goto(`http://127.0.0.1:${port}/.tmp/pr527-editor-evidence.html?phase=${phase}&theme=${theme}`); | ||
| const input = page.getByRole("textbox", {name:"开始新对话"}); | ||
| await page.getByRole("heading", {name:"发布检查",exact:true}).waitFor(); | ||
| await page.evaluate(() => document.fonts.ready); | ||
| const image = input.getByRole("img", {name:"编辑器图像"}); | ||
| await image.evaluate(async img => {await img.decode(); if (!img.naturalWidth) throw new Error("Image failed to load");}); | ||
| if (await input.getByRole("row").count() !== 3) throw new Error("Initial table missing"); | ||
| const prefix = `output/playwright/pr527-upgrade/${phase}-${size}`; | ||
| await page.screenshot({path:prefix+"-rich-viewport.png"}); | ||
| await page.locator(".v2-composer").screenshot({path:prefix+"-rich-composer.png"}); | ||
| const metrics = await page.evaluate(() => { | ||
| const input=document.querySelector(".v2-markdown-input"); | ||
| const form=document.querySelector(".v2-composer"); | ||
| const icons=Array.from(form.querySelectorAll("svg")).map(svg => ({name:svg.getAttribute("class"),width:svg.getBoundingClientRect().width,height:svg.getBoundingClientRect().height})); | ||
| return {viewport:{width:innerWidth,height:innerHeight}, theme:document.documentElement.dataset.prayuTheme, | ||
| documentScrollWidth:document.documentElement.scrollWidth,inputWidth:input.clientWidth,inputScrollWidth:input.scrollWidth, | ||
| image:{width:input.querySelector("img").naturalWidth,height:input.querySelector("img").naturalHeight},icons}; | ||
| }); | ||
| if (metrics.documentScrollWidth > viewport.width || metrics.inputScrollWidth > metrics.inputWidth) throw new Error("Horizontal overflow"); | ||
| const requiredIcons=await page.locator(".v2-send-button svg,.v2-composer-add-trigger svg").evaluateAll(icons=>icons.map(svg=>({width:svg.getBoundingClientRect().width,height:svg.getBoundingClientRect().height}))); | ||
| if(requiredIcons.length!==2 || requiredIcons.some(icon=>icon.width<=0 || icon.height<=0)) throw new Error("Primary control icon invisible"); | ||
| const toggleMode = async label => { | ||
| const direct=page.getByRole("button",{name:label,exact:true}); | ||
| if(await direct.count()) {await direct.click();return;} | ||
| await page.getByRole("button",{name:"添加附件",exact:true}).click(); | ||
| await page.getByRole("menuitem",{name:label,exact:true}).click(); | ||
| }; | ||
| await toggleMode("切换为纯文本编辑"); | ||
| const source=await input.inputValue(); | ||
| const initial=await page.evaluate(()=>window.reviewFixture.initial); | ||
| if (source!==initial) throw new Error("Mode switch rewrote source"); | ||
| if (size==="desktop") await page.screenshot({path:prefix+"-source-viewport.png"}); | ||
| await toggleMode("切换为 Markdown 编辑"); | ||
| await input.click(); | ||
| await page.keyboard.press("Control+a"); | ||
| const pasted="## 粘贴草稿\n\n**保留格式**与 `inline`\n\n| 项 | 值 |\n| --- | --- |\n| 中文 | 1 |\n\n预览:"; | ||
| await page.evaluate(text=>navigator.clipboard.writeText(text),pasted); | ||
| await page.keyboard.press("Control+v"); | ||
| await input.getByRole("heading",{name:"粘贴草稿",exact:true}).waitFor(); | ||
| if(await input.locator("strong").textContent()!=="保留格式") throw new Error("Markdown paste lost bold"); | ||
| if(await input.locator("code").textContent()!=="inline") throw new Error("Markdown paste lost code"); | ||
| await input.getByRole("img",{name:"编辑器图像"}).evaluate(img=>img.decode()); | ||
| await input.getByRole("cell",{name:"中文",exact:true}).click(); | ||
| await page.keyboard.press("End"); | ||
| await page.keyboard.type("输入"); | ||
| if(await input.getByRole("cell",{name:"中文输入",exact:true}).count()!==1) throw new Error("Table edit failed"); | ||
| await input.evaluate(el=>{el.scrollTop=0;}); | ||
| await page.screenshot({path:prefix+"-pasted-viewport.png"}); | ||
| if(size==="desktop") await page.locator(".v2-composer").screenshot({path:prefix+"-pasted-composer.png"}); | ||
| await page.keyboard.press("Control+Enter"); | ||
| await page.waitForFunction(()=>window.reviewFixture.submitted.length===1); | ||
| const submitted=await page.evaluate(()=>window.reviewFixture.submitted[0]); | ||
| if(!submitted.includes("**保留格式**") || !submitted.includes("中文输入") || !submitted.includes("![编辑器图像]")) throw new Error("Submitted Markdown lost content"); | ||
| await input.click(); | ||
| await page.evaluate(()=>navigator.clipboard.writeText("**literal**")); | ||
| await page.keyboard.press("Control+Shift+v"); | ||
| if(await input.textContent()!=="**literal**" || await input.locator("strong").count()) throw new Error("Plain paste interpreted Markdown"); | ||
| checks.push({phase,size,...metrics,modeRoundTrip:"source preserved",paste:"system clipboard Ctrl+V",tableEdit:"中文输入",submitted,plainPaste:"literal punctuation preserved"}); | ||
| } | ||
| return checks; | ||
| } | ||
|
|
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| async page => { | ||
| const checks=[]; | ||
| await page.context().grantPermissions(["clipboard-read","clipboard-write"]); | ||
| for(const [phase,port] of [["before",5270],["after",5271]]) { | ||
| for(const standalone of [true,false]) { | ||
| await page.goto(`http://127.0.0.1:${port}/.tmp/pr527-editor-evidence.html?phase=${phase}`); | ||
| const input=page.getByRole("textbox",{name:"开始新对话"}); | ||
| await input.waitFor(); | ||
| await input.click(); await page.keyboard.press("Control+a"); | ||
| const text="## 粘贴草稿\n\n**保留格式**与 `inline`\n\n| 项 | 值 |\n| --- | --- |\n| 中文 | 1 |\n\n"+(standalone?"":"预览:")+""; | ||
| await page.evaluate(text=>navigator.clipboard.writeText(text),text); | ||
| await page.keyboard.press("Control+v"); | ||
| await input.getByRole("heading",{name:"粘贴草稿",exact:true}).waitFor(); | ||
| checks.push({phase,standalone,imageCount:await input.getByRole("img").count(),draft:await page.evaluate(()=>window.reviewFixture.current)}); | ||
| } | ||
| } | ||
| return checks; | ||
| } |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.