Skip to content

qtgui: consolidate workspace panels and global progress - #230

Merged
janhubicka merged 8 commits into
mainfrom
agent/qtgui-mdi-shell-cleanup
Aug 30, 2026
Merged

qtgui: consolidate workspace panels and global progress#230
janhubicka merged 8 commits into
mainfrom
agent/qtgui-mdi-shell-cleanup

Conversation

@janhubicka

@janhubicka janhubicka commented Aug 29, 2026

Copy link
Copy Markdown
Owner

Summary

  • make transient progress presentation a WorkspaceWindow concern so running work remains visible independently of the selected tab/view
  • keep progress operation state document-owned while routing workspace Stop/Cancel without changing the active MDI child
  • consolidate detachable panel sections behind one ParameterPanel lifecycle instead of separate document/reference-view dock implementations
  • simplify MainWindow, ImageViewWindow, and WorkspaceWindow ownership after the multiple-document/multiple-view extension
  • preserve specialized-view boundaries while ordinary New Views continue to share document editing/panel state
  • restore the complete source-document File menu in secondary views (Open, recent files/parameters, Save Parameters, Render, Exit), substituting only Close View for Close Window
  • update .agents/qtgui.md and extend Qt GUI smoke coverage for progress across tab switches, File-menu parity, and detachable sections

Design

WorkspaceWindow owns top-level application chrome and progress presentation. MainWindow remains the owner of one logical document, processing state, undo and operations. Ordinary secondary views are presentations of that document; specialized/reference views remain constrained to their own compatible image operations.

Detachable sections use one reusable ParameterPanel lifecycle: detach, reattach-on-close, repeated detach, host migration, and teardown. A section always follows the actual top-level QMainWindow currently presenting its inspector. Thus an embedded document or reference view detaches into the workspace shell, while a detached presentation uses its own top-level window. Nested QMainWindow instances are never used as dock hosts.

CI follow-ups

The first ARM64 checking failure exposed the slanted-reference MTF ownership path. Qt 6.11 also rejected typed QObject::findChildren<DetachableSection *>() because the implementation-only helper intentionally has no Q_OBJECT; the intermediate fix removed that meta-object dependency, and detachable sections were made independent of QObject-child discovery.

A later ARM64 failure exposed the actual nested-host issue: the slanted-reference Sharpness panel had been pinned to an embedded ImageViewWindow. That pin was removed; reference diagnostics use the same actual-top-level-window rule as all other detachable sections.

The subsequent ARM64 ASan failure was in the smoke harness itself. The generic smoke cleanup timer could fire while the slower structured reference test was inside processEvents(), destroy the reference panel, and leave stale raw widget pointers in the test. Reference-panel objects crossing an event-loop turn are now guarded with QPointer.

The final review cleanup removes the remaining intermediate host-pinning API entirely, keeps progress-signal subscriptions tied to logical-document lifetime so detach/reattach cannot accumulate duplicate callbacks, and makes New View / slanted-reference smoke tests completion-driven. Their duration is now only a failure watchdog: successful structured checks quit immediately, and a watchdog expiry reports a timeout instead of destroying test widgets underneath active assertions. No sanitizer or behavioral assertions were removed.

Commits

  • fc6aded0091e4014ef113b89f9d74a3262a908bc — workspace/global-progress and uniform detachable-section cleanup
  • 134e8622b4bf6813d96d996a4e98066bab10fc77 — reference-detachment sanitizer fix and secondary File-menu parity
  • b9908f5f03c92a60ad2f3bda0c87053837dea655 — avoid Qt meta-object casts for implementation-only detachable sections
  • 82a7fcb90fedcedc67ea9900d28a1bc110fb9e18 — track detachable sections independently of layout parenting
  • 9a53b02eca8aeed2498a114ac851d5322a24a25b — host detachable sections in the actual top-level window
  • 4a42f3384f5765b9b536117ceeae18c58a57cb5b — guard reference smoke widget lifetimes across event-loop turns
  • 166315d8e38d96169cc6487a440de30e08f1cae7 — initial sanitizer-smoke lifetime follow-up
  • dabc1083f4ace1d3660b6197881220d94afdbb79 — tighten workspace ownership lifetimes and make structured smoke completion-driven

@github-actions
github-actions Bot force-pushed the agent/qtgui-mdi-shell-cleanup branch 2 times, most recently from 92a88d6 to f6eb6b6 Compare August 29, 2026 08:23
Keep the unified ParameterPanel detachable-section lifecycle while allowing specialized inspectors to pin their logical QMainWindow host. Pin slanted-edge Sharpness diagnostics to the reference ImageViewWindow so tiled reference MTF detachment remains stable.

Mirror the source document File menu in secondary views while substituting Close View for Close Window, restoring Open, Save Parameters, Render, and Exit without duplicating document state.

Extend GUI smoke coverage for File-menu parity and reference-owned generic MTF docks, and document the specialized-host rule.
@janhubicka
janhubicka force-pushed the agent/qtgui-mdi-shell-cleanup branch from f6eb6b6 to 134e862 Compare August 29, 2026 08:24
@janhubicka
janhubicka force-pushed the agent/qtgui-mdi-shell-cleanup branch from d79db9c to 82a7fcb Compare August 29, 2026 16:40
@janhubicka
janhubicka force-pushed the agent/qtgui-mdi-shell-cleanup branch from 51bdd8c to 9a53b02 Compare August 29, 2026 17:02
codex and others added 2 commits August 29, 2026 17:30
Guard reference-panel smoke objects with QPointer across event-loop turns so a slow sanitizer run cannot dereference widgets after teardown. Give the deliberately serial New View + slanted-reference smoke a 60-second minimum lifetime, preventing the cleanup timer from racing ARM64 ASan while preserving the full test sequence.
@janhubicka
janhubicka force-pushed the agent/qtgui-mdi-shell-cleanup branch from 849572b to 166315d Compare August 29, 2026 17:33
Remove the obsolete detachable-host pinning API now that sections always follow their actual top-level presentation. Keep workspace progress signal subscriptions document-lifetime so detach/reattach cannot accumulate duplicate callbacks. Make structured GUI smoke tests completion-driven and use the duration only as a failure watchdog, preserving QPointer guards across event-loop turns.
@janhubicka
janhubicka force-pushed the agent/qtgui-mdi-shell-cleanup branch from 30ee530 to dabc108 Compare August 29, 2026 18:22
@janhubicka
janhubicka merged commit b69ccde into main Aug 30, 2026
14 of 16 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.

2 participants