Repository navigation
Conversation
| resilientRead( | ||
| async (signal) => { | ||
| const response = await fetch( | ||
| `/api${creationPath(this.id)}/assets/${assetId}/${representation}`, |
| resilientRead( | ||
| async (signal) => { | ||
| const response = await fetch( | ||
| `/api${creationPath(this.id)}/assets/${assetId}/thumbnail`, |
Redivesue
force-pushed
the
feat/446-stage-1-structure-first
branch
from
November 24, 2026 04:53
9b50c44 to
68b0103
Compare
Redivesue
force-pushed
the
feat/446-stage-2-node-media
branch
from
November 24, 2026 04:53
417582c to
3c95a2d
Compare
Redivesue
force-pushed
the
feat/446-stage-1-structure-first
branch
from
November 24, 2026 05:01
68b0103 to
d369be5
Compare
Redivesue
force-pushed
the
feat/446-stage-2-node-media
branch
from
November 24, 2026 05:01
3c95a2d to
3a9ee03
Compare
) * [feat] desktop: show install guidance in the macOS DMG Signed-off-by: Weiming Liao <liaowm5@gmail.com> * [chore] desktop: keep the install guide off the homepage Signed-off-by: Weiming Liao <liaowm5@gmail.com> * [bugfix] desktop: complete the welcome flow in release smoke Signed-off-by: Weiming Liao <liaowm5@gmail.com> --------- Signed-off-by: Weiming Liao <liaowm5@gmail.com>
Opening or switching a canvas waited for every node's media, including hidden nodes, before the workspace became interactive. Project the canvas from the opened snapshot and keep a stable asset source in node media fields. Object URLs are resolved only where media is displayed or read, so they no longer enter the document, undo history or save baseline. Saving compares asset identity, so a late media read cannot change a binding. Return text with open-canvas, show loading and failed states per node, and check reference-catalog files against its one snapshot. Refs ThinkFlowLab#446
Once the structure is interactive, every mounted node still started its media read at once and waited behind the catalog lock. Share a bounded priority queue across media reads, start on-screen nodes only when they reach the viewport, and cancel a display read once no on-screen consumer needs it. Explicit actions keep priority and are never cancelled by a display consumer leaving. Reuse the validated head for repeated media reads. An unproven chain still runs the full validation first, so a damaged ancestor keeps being rejected. Refs ThinkFlowLab#446
Redivesue
force-pushed
the
feat/446-stage-2-node-media
branch
from
November 24, 2026 09:34
3a9ee03 to
7f70818
Compare
Owner
Author
|
Superseded by ThinkFlowLab#485, which merged both stages. |
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.
Summary
Stage 2 of 2 for progressive canvas loading (ThinkFlowLab#446). This branch contains the stage 1 commit from #1. Review only the second commit,
[feat] canvas: load node media independently by priority, until stage 1 merges; the diff then reduces to stage 2.IntersectionObserver. There is no off-screen preload.Linked issue
Labels
type:feat,area:canvas,area:performance.Test plan
Local, on this commit (stage 2 on stage 1, rebased onto
8258d4b0):tsc --noEmit,check:i18n,check:browser-locale,check:browser-manifest,generate_contracts.py --checkandpre-commit run --from-ref mainpass.-m cpu): 2902 passed, 118 skipped (Windows-only).scripts/run-browser-suite.mjs, Vite dev server and isolated API as in CI): 30 of 30, includingcanvas_progressive_loadin both languages.Not run or not passing:
A dialog obscures the canvas. It fails the same way onmain.Left to CI: the repository's pull request checks.
Evidence that it works
Recording, browser runtime on a warm server, the same fixtures: left
main(8258d4b0), right this branch (stage 1 and 2). The overlay, injected by the recording script, shows the time since the project click and when the canvas became usable: 9.26 s onmain, 0.27 s here, with media filling in afterwards.Node states on this branch, in English and Chinese:
Same benchmark as #1: fixtures A image-heavy (180 nodes, 0.67 GiB), B video-heavy (89 nodes, 2.05 GiB), C mixed with editors (116 nodes, 0.97 GiB). Apple M2, 16 GiB, macOS 26.5; Chrome 158 headless against the source server, and the packaged Electron 45 app. Per direction: 4 warm-up switches excluded, then 10 measured switches; median / P90 in ms, nearest-rank. "Usable" means the target title is shown, the workspace is not busy or inert, and every visible node is mounted. "Content" means every in-viewport image is decoded, video has
readyState >= 2, audio>= 1, and text is rendered. The driver uses CDP without the Network domain.Measured on
52102ed0(base),9b50c442(stage 1) and417582ca(stage 2), before the rebase. The rebase adds three upstream commits that do not touch canvas open or media reads.¹ The stage 1 desktop C↔B run stopped at switch 9 of 24 on a
storage_busylock timeout, so these rows have 3 and 2 samples. Stage 2 completed 24 of 24 in every run.With stage 2, usable median is within 500 ms and usable P90 within 1000 ms in every direction (worst P90: 508 ms, desktop B→A). Click feedback P90 is at most 32 ms. Stage 2 logged no failed requests in any run; base logged 409s on
assistant/draftand timed-outtool-tasksreads in every run.Stage 2 is not uniformly faster than stage 1 to full content. Content median improves in 5 of 6 browser directions and 3 of 6 desktop directions. It regresses most on desktop A→B (2904 → 4713 ms), where B's large in-view videos now share 3 read slots, and on browser A→C (2878 → 4330 ms). This benchmark uses the fit-all view, which puts every node in the viewport, so it does not exercise viewport gating.
Cold open after a server restart, usable median, stage 1 → stage 2: browser A 2066 → 1812, B 1269 → 1363, C 1481 → 1753 ms; desktop A 1418 → 1384, B 719 → 701, C 878 → 900 ms (base: browser 15339 / 7289 / 4033, desktop 8250 / 3630 / 3487 ms).
Peak Blob storage per run: base 1.0–2.8 GiB, stage 1 0.7–1.4 GiB, stage 2 0.5–1.3 GiB.
Known limitations
storage_busylock timeout (see [feat] canvas: show project structure before node media #1). This stage shortens catalog lock holds, and no lock timeout occurred in its benchmark runs, but the retry gap remains. On a freshly restarted server, a media read on A did getstorage_busy(see the next item).maintoo, where the workspace stays inert until every node's media has loaded.Provider verification
Bilingual UI
canvas_progressive_load.