Skip to content

fix(browser): scope Stop dialogs and handle response timeouts safely - #26

Merged
devnoname120 merged 4 commits into
devnoname120:mainfrom
AKzar1el:fix/browser-ignore-nonmodal-stop-popovers-20261114
Nov 15, 2026
Merged

devnoname120 merged 4 commits into
devnoname120:mainfrom
AKzar1el:fix/browser-ignore-nonmodal-stop-popovers-20261114

Conversation

@AKzar1el

@AKzar1el AKzar1el commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Two independent ChatGPT browser states can interrupt valid Codexify goal turns:

  1. Non-modal popovers during Stop recovery. A finished conversation may retain a suggestion or tool popover with role="dialog", even though it is not a modal Stop confirmation. Treating it as a Stop dialog can prevent the next legitimate goal turn.
  2. Response-delivery timeouts. A visible app-owned message-delivery timeout is a failure of the prior response, not evidence that the previously accepted user message should be sent again. Blindly clicking ChatGPT's regeneration button would create duplicate or ambiguous work.

Focused changes

  • Inspect only visible aria-modal="true" Stop dialogs (including modal alertdialog); ignore non-modal suggestion/tool popovers.
  • Recognize English and Slovene delivery-timeout notices on scoped, visible ChatGPT-owned error alerts and adjacent regeneration cards. Exclude quoted user/assistant content, hidden surfaces, unrelated errors, and other origins.
  • Leave the original regeneration button untouched. Existing Codexify goal recovery remains responsible for idempotent continuation; no new direct Send/retry action is introduced.
  • Add the isolated Chrome timeout regression to the CI browser stage, covering positive and negative cases.
  • Fix a WebKit test hydration race by waiting for the mobile Back-to-chats control before reopening New chat.
  • Retain the prior tiny Clippy simplification to the existing goal-retry eligibility expression.

Validation

  • Native headless Chrome timeout fixture: 5/5 passing on Windows, including the quoted-text and no-ARIA variants.
  • Browser companion TypeScript typecheck, Bun build, and git diff --check: passing.
  • Non-native local Windows Bun suite: 176 pass / 150 skip / 1 existing POSIX file-mode assertion that is not portable to Windows; Linux CI provides the authoritative check.
  • Four GitHub Actions CI jobs are triggered automatically on this PR head: check, Diff widget layout (Chromium and WebKit), Service integration (macos-15), and Service integration (windows-latest). Review their current status below; do not infer success from this description.

Scope and maintainer integration

This PR is limited to browser response/Stop safety, the relevant fixtures, and a UI-test synchronization fix. No payment integration, additional browser pool, permission grant, credentials, or production rollout is included. The owner can review/merge it independently of the broader browser companion work in #22 or selectively incorporate the small changes there if it is preferable.

Deployment note: source and fixture testing do not mean the user's installed Windows companion has been updated. A separate guarded local updater encountered a packaging exception and should be verified or repaired before claiming a runtime rollout.

Copy link
Copy Markdown
Contributor Author

CI update after fixing the shared baseline Clippy lint in src/agent_automation/store.rs:

  • New run: check (including Clippy) passed; macOS and Windows service integration passed.
  • The remaining failed job is the Diff widget layout / WebKit UI test WebKit: new chats discover models and preserve workspace choices. It timed out waiting for the New chat button in scripts/test-owner-chat.mjs:1493. That UI test does not touch either changed Stop-recovery file; it passed in PR fix(goal): keep goal_finish summary/reason fields visible to MCP adapters #25's parallel run.
  • I tried rerunning the single failed job but GitHub denied the operation with 403 Resource not accessible by integration. This needs a maintainer rerun or a subsequent code update; I am not claiming green CI or bypassing the check.

The patch remains in draft pending the native fixture regression and the unrelated WebKit job rerun.

Recognize localized timeout notices on application-owned error surfaces while leaving ambiguous or accepted messages unresent. Cover alert and plain-card variants plus quoted-text and unrelated-error negatives in isolated Chromium CI.

Wait for the mobile back navigation control to appear in the new-chat WebKit fixture before reopening the sidebar, preventing a hydration race.
@AKzar1el AKzar1el changed the title fix(browser): ignore non-modal popovers during Stop recovery fix(browser): scope Stop dialogs and handle response timeouts safely Nov 14, 2026
@AKzar1el
AKzar1el marked this pull request as ready for review November 14, 2026 19:45

@devnoname120 devnoname120 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 3cbed09. This is the first review on this PR. Restricting Stop recovery to modal dialogs fixes the stated popover case: all 8 selected native Stop/popup/iframe regressions pass. All 5 native response-timeout tests and typecheck also pass, and all 4 hosted checks are green.

The new timeout exception is page-wide rather than scoped to the matching failure surface. I reproduced a separate visible terminal error being ignored whenever another visible timeout alert is present: the same terminal card returns failed without the old timeout and is allowed with it. The exception should only exempt the matching delivery-timeout card and leave other terminal errors blocking. The inline finding identifies the condition.

Keep open for that correction and mixed-error coverage. No production browser session was used.

@devnoname120 devnoname120 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implemented the timeout-scoping finding directly on this branch. Each visible regeneration/terminal-error surface is checked independently; a timeout exempts only its own app-owned card/control and never another error elsewhere on the page. Validation: 177 offline tests and all nine native timeout cases pass, including both card orders, shared wrappers, non-ARIA cards and quoted content; typecheck/build pass. Hosted Linux check plus Windows/macOS service integration are already green; the layout job is still running. No remaining blocking finding in the reviewed changes.

@devnoname120
devnoname120 merged commit f04891b into devnoname120:main Nov 15, 2026
4 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