Skip to content

fix(modern): a store's window never builds the stress panel - #382

Merged
No0ne558 merged 1 commit into
mainfrom
claude/code-review-0a7fmf
Oct 16, 2026
Merged

No0ne558 merged 1 commit into
mainfrom
claude/code-review-0a7fmf

Conversation

@No0ne558

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #381, which stopped the stress panel's page tour from switching a store's screen by guarding one Timer. A code review of that change found six issues; this PR addresses all of them.

  • Root cause instead of a symptom. The stress panel (vtmodern --stress) was built in every window and only hidden, so a store's screen staying put depended on each binding remembering there was no stress test. Main.qml now loads the panel through a Loader that is active only while a stress test is attached (the same pattern as the setup guide), so a store has no panel, no hidden controls and no tour timer at all. The panel is wrapped in a plain Item because a filling Loader resizes its loaded item, which would have fought the panel's own sizing.
  • One source of truth. The Timer's duplicate stress !== null guard and the duplicate objectName on the instance are removed; the component root keeps the one name.
  • A test that can fail. The regression test uses findChild instead of a hand-rolled finder, asserts that neither the panel nor its tour timer exists in a store's window, then attaches an unstarted StressRunner as a control: the panel appears with the tour running and leaves when detached, so the names it checks are proven live. The 200 ms wait on a 15-second timer is gone, and the tag is [flow][ui] rather than a look-alike of the hidden [.stress] run.

Test plan

Built and run against Qt 6.8.3 the way modern-checks.yml does (QT_QPA_PLATFORM=offscreen):

  • Full vtm_tests suite: 556 passed, 1 pre-existing skip, 0 failures
  • vtm_tests "UI: no stress test*" passes
  • The test fails when the plain always-present StressPanel instance is put back (three CHECK_FALSE failures) and when the Timer's objectName is removed (REQUIRE(tour) fails); passes again on the committed sources
  • vtm_tests "[ui][pages]": every seed page still renders without a QML warning

🤖 Generated with Claude Code

https://claude.ai/code/session_018nW8B6ZSc3vRSbdE1Vk358


Generated by Claude Code

The stress panel (vtmodern --stress) was built in every window and only
hidden, so keeping a store's screen still depended on each of its
bindings remembering there was no stress test; the last fix guarded one
timer. Main.qml now loads the panel only while a stress test is attached
(a Loader, like the setup guide), so a store has no panel, no hidden
controls and no tour timer at all. The timer's duplicate stress check
and the duplicate objectName on the instance go.

The regression test asserts the panel and its tour timer do not exist in
a store's window, then attaches an unstarted stress runner as a control:
the panel appears with the tour running and leaves when it is detached,
so the names it checks are proven live. It no longer waits 200 ms on a
15-second timer, uses findChild instead of a hand-rolled finder, and is
tagged [flow][ui] rather than a look-alike of the hidden [.stress] run.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018nW8B6ZSc3vRSbdE1Vk358
@No0ne558
No0ne558 merged commit d9ad3d0 into main Oct 16, 2026
1 check 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.

2 participants