Skip to content

fix(vc-blade): keep skeletons up when a second load starts before a paint - #352

Merged
maksimzinchuk merged 1 commit into
mainfrom
fix/blade-skeleton-two-loads
Sep 4, 2026
Merged

fix(vc-blade): keep skeletons up when a second load starts before a paint#352
maksimzinchuk merged 1 commit into
mainfrom
fix/blade-skeleton-two-loads

Conversation

@maksimzinchuk

Copy link
Copy Markdown
Collaborator

Reported from the 2.6.0-rc.0 test deployment: in Orders the skeletons switch off before the real load finishes.

What actually happens

VcBlade closes its "content has rendered" latch on the falling edge of loading. A page that loads in two steps drops the flag between them, and nothing has rendered at that point — so the second, real fetch shows a busy overlay over an empty blade instead of skeletons.

The order details blade does exactly that on mount: await searchStateMachines(...) and then await loadOrder(...), both feeding the same useLoading(...) OR.

Traced live against the running app, sampling the blade's own markers:

skeletons overlay over an empty blade content
before 70–657ms 657–1015ms — the entire order request 1038ms
after 70–1000ms — the whole load none 1028ms

Fix

Confirm the latch across a frame. If a new load starts before the browser paints, the user never saw content, so the latch stays open and the next load still gets skeletons. The gap between the two loads measures under 8ms — comfortably inside one frame.

VcDataTable latches on items.length > 0 — content actually arriving — which is why it never had this. VcBlade's comment claims the "same two-state treatment", but it substituted a loading-edge proxy for the content check. A blade cannot see content generically, so a painted frame is the closest honest proxy for "the user saw something".

Tests

First tests for this latch at all — #330 shipped it stating "No test covers the overlay or the latch reset. Verified in the browser only", which is why this reached a release candidate.

Three cases: an overlay for a load that follows a completed one, skeletons kept when a second load starts before a paint, and the reset when the blade switches to a different entity. Reverting the frame confirmation fails exactly the middle one.

Verification

vue-tsc clean · vitest run 4126 passed, exit 0 · lint:check, prettier, stylelint and madge clean. Behaviour A/B'd in Chrome against the running Vendor Portal, table above.

Committed with --no-verify: the pre-commit hook lints only the staged files, and that narrow invocation reports a false import/no-unresolved the full lint:check does not.

…aint

The blade closes its "content has rendered" latch on the falling edge of
`loading`. A page that loads in two steps drops the flag between them, and
nothing has rendered at that point — so the real fetch ran with a busy
overlay over an empty blade instead of skeletons.

Measured on the order details blade, which fetches its state machines and
then the order: skeletons covered 70-657ms, then the blade sat empty under
an overlay for the whole order request until 1015ms. The gap between the two
loads is under 8ms.

Confirm the latch across a frame instead. If a new load starts before the
browser paints, the user never saw content, so the latch stays open and the
next load still gets skeletons. Same live trace after: skeletons for the
whole 1000ms, no overlay.

VcDataTable latches on its items arriving rather than on a loading edge,
which is why it never had this. VcBlade cannot see content generically; a
frame is the closest honest proxy for "the user saw something".

Adds the first tests for the latch — #330 shipped it noting there were none.
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

📦 Preview published for commit 1cb28d1

Install the preview with dist-tag:

npm install @vc-shell/framework@pr-352

Or pin to the exact commit:

npm install @vc-shell/framework@2.6.0-rc.0-pr352.1cb28d1

Published packages (dist-tag pr-352, version 2.6.0-rc.0-pr352.1cb28d1):

  • @vc-shell/framework
  • @vc-shell/api-client-generator
  • @vc-shell/create-vc-app
  • @vc-shell/config-generator
  • @vc-shell/migrate
  • @vc-shell/ts-config
  • @vc-shell/mf-config
  • @vc-shell/mf-host
  • @vc-shell/mf-module
  • @vc-shell/vc-app-skill

@maksimzinchuk
maksimzinchuk merged commit bf43467 into main Sep 4, 2026
11 checks passed
@maksimzinchuk
maksimzinchuk deleted the fix/blade-skeleton-two-loads branch September 4, 2026 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant