Fix the forever-spinning boot loaders in the Tools and Bulk windows - #4
Merged
Merged
Conversation
The window templates print a spinner bar as a sibling of the mount root, so the window is never blank before the bundle runs — but a sibling is exactly what painting inside the root can never cover. The Model window repurposes its bar after boot; the Tools and Bulk windows never touched theirs, so "Checking what is on disk…" and "Loading values…" spun forever over windows that had finished loading. Both windows now remove the bar on every path out of loading — the successful paint, the error paint, and the bulk editor's no-groups paint — with a vitest guard that mounts the real template against a stubbed fetch and asserts the bar is gone on both the success and the failure path. The Tools window also gets the styling its platform fallback never had: panes as proper panels with a consistent rhythm, list rows with hover and aligned checkboxes, a styled paste box, file input and fallback buttons, and the sync path shown as code. Inside the shell the <os-*> components take over where they upgrade; the fallback is a documented contract, and now it doesn't look like an accident. 371 JS tests green (2 new), 195 PHP tests green including the guard that every template class is one the stylesheet styles. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HLZL6dY61BkPPmGyy6F9Us
# Conflicts: # assets/js/bulk.min.js # assets/js/tools.min.js
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.
The bug
The Tools window sat under a spinner saying "Checking what is on disk…" forever — with all three panes fully loaded and interactive right below it. The Bulk editor has the identical bug with "Loading values…".
Why: each window's PHP template prints a spinner bar as a sibling of the mount root (
[data-atcft-bar]next to[data-atcft-body]), so the window is never blank before the bundle runs. But a sibling is exactly what painting inside the root can never replace. The Model window repurposes its bar after boot (drawBar()clears[data-atcfm-bar]); Tools and Bulk never touch theirs, so the spinner outlives the loading it announced.The fix
Both windows now remove the bar on every path out of loading — the successful paint, the error paint, and the bulk editor's no-groups paint. A new vitest guard mounts the real template markup against a stubbed
fetchand asserts the bar is gone on both the success and the failure path, so the bug can't come back invisibly (it never throws — it just looks stuck).The UI
The window in the screenshot was also rendering through the platform fallback — the
<os-*>component kit hadn't upgraded, which is a supported state by design, but the fallback had almost no styling of its own: raw checkboxes, raw buttons, raw file input, flat cramped cards. The fallback is a documented contract, so it now looks like one:All within the existing
--atcfb-*design tokens, so it inherits the shell theme where present. Where<os-*>components upgrade, they still take over untouched.Verification
tscclean, bundles rebuilt, deployed to the local dev site🤖 Generated with Claude Code
https://claude.ai/code/session_01HLZL6dY61BkPPmGyy6F9Us