Repository navigation
feat(frames): forward-port frame culling, stored preview and first-paint signal (CHE-8976) [squash] - #108
Merged
congvc-bot-x99[bot] merged 3 commits intoNov 22, 2026
Conversation
added 2 commits
November 22, 2026 00:59
…int signal (CHE-8976) Re-implements fork main's culling chain (PR 8), stored preview and measure-lag (PR 65) and the doop-load first-paint marks on the cheese/main FrameView and Stage. Adds playwright-core as a devDependency for the perf scripts.
Two tests that exist only on cheese/main used frames under 160 px on screen. The ported culling rule shows those as a stored preview with no iframe, so the tests could not find the iframe they click or measure. frameEdgeBrowser: the dark frame is 1700 wide, so it is still 160 px at 10%. standalonePanelBrowser: the shapes are 200 and 240 wide at the page's 100% zoom. The culling rule and its tests are unchanged. Refs CHE-8976
measure-lag.ts imported import-canvas-export, measure-local and measure-canvas-load, which the first port left out, so the command could not start. Port the three from fork main with their tests (importCanvasExport, measureCanvasLoad) and add measureLag.test.ts, which imports the script and so fails when a helper is missing again. importCanvasExport compares frames page by page: cheese/main lists a canvas's frames stacked per page, so the export order is not kept across pages. Run for real on this head: 80 frames, 0 iframes mounted at fit-all, exit 0. Refs CHE-8976
congvc-bot-x99
Bot
deleted the
agent/x99-claude-sonnet-200k/che-8976-aef4dfceaed0
branch
November 22, 2026 09:48
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.
Iframe-count check (first)
v0.15.0 /
cheese/mainbefore this PR: one unconditional<iframe>per frame inFrameView.tsx, no culling, no stored preview, no paint marks. The port was needed. After this PR a frame holds an iframe only whenframesToMountkeeps it (near the camera, at least 160 px wide on screen, among the 24 nearest the stage centre, or selected, or ever edited). Other frames keep their box and show the stored/i/<id>.jpg?preview.Refs CHE-8976 (sub-issue of CHE-7328).
What was ported (re-implemented, not cherry-picked)
maincommitscheese/maina8a60099579d46a37188353e93ce94154626f1d988ff188d(culling chain)src/lib/frameCulling.ts,src/components/useCulledFrames.ts,mountedprop onFrameView, wired inStage.tsxFrameStack;everEditedkeeps an edited frame's iframe92d48c050e7aa14e46bdf3d2(PR 65: stored preview, measure-lag)FrameView(FramePreviewgetsquietFail),scripts/perf/measure-lag.ts+paintValidation.ts,referenceRender.ts,throttle-proxy.tsb2bb1b0316cf33d626749817c6dc1c254a01393a99e1fea4(first-paint signal)doop:paintfromframeRuntime.ts,performance.markinFrameViewandws.ts(doop:ws-open,doop:init-*,doop:html-result)Adapted for the
cheese/mainstructure thatmainlacks: on cull theruntimeReady,runtimeDocument,bleed,localHtmland the keyMessagePortare reset so the next document starts clean.Tests ported:
frameCulling,frameCullEditBrowser(fixtureelementPanel.htmlgetssetMounted/unselectFrame),framePaintSignal,paintValidation,throttleProxy.Tests
Also green on this head:
bun run typecheck,bun run lint,bun run build, prettier check on touched files. Regression run of 14 FrameView-related browser files: 175 passed, 10 failed, all 10 intests/elementPanelBrowser.test.ts("aligns children to the physical bottom right ..." and one flex-direction case, 5 s timeouts). The same 10 fail on the untouched base1784adf9(verified in a clean worktree), so they are not caused by this PR.Notes
cheese/maindirectly and does not touch its files.playwright-core1.65.0 (exact), used only byscripts/perf/referenceRender.tsandtests/paintValidation.test.ts.bun.lockupdated.CI follow-up on head
00f15fefCI on
8d27539ffailed 2 tests in shard 4, bothcheese/main-only browser tests that use frames under 160 px on screen. The ported rule culls those frames, so no iframe exists to find:tests/frameEdgeBrowser.test.ts: the dark frame is now 1700 wide (160 px at the lowest zoom, 10%); the plain frame moved to x=3400.tests/standalonePanelBrowser.test.ts: shapes are 200 and 240 wide (were 120 and 160); widths asserted to match.The culling rule and the kept
frameCullingcases are unchanged. Local: both files plusframeCullEditBrowserpass (7 tests); shard 4 (bun run test -- --shard=4/4) 954 of 955 pass, the one miss isimageDescriptionsMigration(PGlite 5 s timeout under load; passes alone; file untouched).bun run lint,format:checkandtypecheckpass. CI on the new head is pending.Follow-up risk: a standalone shape under 160 px on screen now shows a stored preview until selected. That follows the ported rule; say if canvas elements should be exempt.
Head
e1f17850: measure-lag helpers (review P2)Review of
00f15feffound thatscripts/perf/measure-lag.tsimports three helpers the first port left out, so the script could not start. Ported from fork main:scripts/perf/import-canvas-export.ts,scripts/perf/measure-local.ts,scripts/perf/measure-canvas-load.tstests/importCanvasExport.test.ts,tests/measureCanvasLoad.test.ts: the export-order assertion now compares frames page by page, becausecheese/mainstacks frames per page.tests/measureLag.test.ts(new): imports the script, so a missing helper fails the test run.Real run of the script (
bun run build, thennpx tsx scripts/perf/measure-lag.ts --erus-likewith 80 frames, 1 run): exit 0,iframesAtFitAll: 0(limit 24). longTasks 51, frameP50 33 ms, frameP95 67 ms, paintedMs 1154.Also green locally: typecheck, lint, format check. CI on
e1f17850is pending; not awaited here.