Skip to content

Review remarks on secondary native windows (#616) - #655

Closed
ambroise-leclerc wants to merge 1 commit into
developfrom
616-secondary-window-review
Closed

ambroise-leclerc wants to merge 1 commit into
developfrom
616-secondary-window-review

Conversation

@ambroise-leclerc

Copy link
Copy Markdown
Collaborator

Refs #616 (follow-up to #646, already merged).

Summary

  • invokeOnUIThreadWhenReady gives up after a limit (one minute by default) with std::logic_error; unit test for retries, limit and interface-thread refusal.
  • WebView2 refuses reopening a page once the first window closed, before the table lookup, as WebKitGTK and WKWebView do.
  • Comments: WebKitGTK has no hidden mode; WebView2's start check only sees synchronous failures; the delete self of UIInvocation.
  • Docs: the secondary-window contract moves from the contract table to its own section in docs/FRONTENDS.md; the ui.nativeWindow() limit is added to docs/PROJECT_STATUS.md; changelog entry.

Validation

  • Windows MSVC, WebView2 on: ctest -L fast 600/600; WebView2Lifecycle|FrontendLifecycle|UIExecutor 33/33.
  • Not run: WebKitGTK (Linux) and WKWebView (macOS); the only change there is a comment.

…ening (#616)

invokeOnUIThreadWhenReady gives up after a limit (one minute by default),
WebView2 refuses a page once the first window closed before looking it up,
and the secondary-window documentation moves to its own section.
@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

Walkthrough

La PR ajoute une limite d’attente aux nouvelles tentatives de l’exécuteur UI. Elle modifie aussi l’ordre du contrôle de fermeture dans WebView2 et met à jour la documentation sur les fenêtres secondaires et les handles natifs.

Changes: Fenêtres secondaires et attente UI

Layer / File(s) Summary
Limite des nouvelles tentatives UI
include/webfront/frontend/UIExecutor.hpp, test/unit/UIExecutorTests.cpp, docs/CHANGELOG.md
invokeOnUIThreadWhenReady accepte une limite d’attente d’une minute par défaut. Après WindowNotReady, la fonction réessaie toutes les 10 ms hors du thread UI et lève std::logic_error à l’expiration. Les tests vérifient ces comportements et la propagation immédiate de WindowNotReady depuis le thread UI.
Contrôle de fermeture et contrat des fenêtres secondaires
include/webfront/frontend/WebView2.hpp, include/webfront/frontend/WebKitGTK.hpp, docs/FRONTENDS.md, docs/PROJECT_STATUS.md
WebView2 vérifie si la fenêtre principale est fermée avant de rechercher une fenêtre secondaire existante. La documentation précise les règles de refus, de nouvelle tentative et d’échec WebView2. Elle indique aussi que ui.nativeWindow() et les dialogues associés désignent la fenêtre principale.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related issues

Possibly related PRs

Suggested reviewers: am-l

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

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