Skip to content

Fix the forever-spinning boot loaders in the Tools and Bulk windows - #4

Merged
AllTerrainDeveloper merged 2 commits into
mainfrom
fix/window-loading-bars
Aug 17, 2026
Merged

AllTerrainDeveloper merged 2 commits into
mainfrom
fix/window-loading-bars

Conversation

@AllTerrainDeveloper

Copy link
Copy Markdown
Owner

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 fetch and 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:

  • panes as proper panels (subtle surface, heading rule, consistent internal rhythm)
  • list rows with hover, padding, and aligned accent-colored checkboxes
  • styled paste box (mono, focus ring, sensible min-height), file input, and fallback buttons
  • the sync path shown as an inline code chip; diff lists tidied

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

  • Vitest: 371 green (2 new)
  • PHPUnit: 195 green, including the guard asserting every template-printed class is one the stylesheet styles
  • tsc clean, bundles rebuilt, deployed to the local dev site

🤖 Generated with Claude Code

https://claude.ai/code/session_01HLZL6dY61BkPPmGyy6F9Us

AllTerrainDeveloper and others added 2 commits August 16, 2026 22:54
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
@AllTerrainDeveloper
AllTerrainDeveloper merged commit ac50b91 into main Aug 17, 2026
2 of 3 checks passed
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