Skip to content

test(ui): fix the flaky connections context-menu click on Windows - #710

Merged
giswqs merged 1 commit into
mainfrom
fix/connections-test-windows
Oct 22, 2026
Merged

giswqs merged 1 commit into
mainfrom
fix/connections-test-windows

Conversation

@giswqs

@giswqs giswqs commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Fixes the Windows failure of connections_section_and_dialog on main (https://github.com/opengeos/RustGIS/actions/runs/39827643917/job/119995129618).

The connection row's context menu lays out again on its second frame: "Remove" moved from y 575–597 to 588–610. The test clicked after a single step, so on font setups where the shift is large enough (Windows CI, and reproducible locally) the click landed between menu items and nothing was removed. The test now steps four frames before clicking, as the tab rename test already does. Test-only change.

Summary by CodeRabbit

  • Tests
    • Updated the connection removal smoke test to wait for the interface to settle before selecting “Remove.”

The menu lays out again on its second frame, moving Remove down; a
click aimed at the first layout lands between items on some font
setups (Windows CI), so step a few frames first.
@giswqs giswqs added the ci:windows Run the Windows CI jobs on this pull request label Oct 22, 2026
@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: f1436682-922a-4e44-811a-b3d2ebce2706
📥 Commits

Reviewing files that changed from the base of the PR and between f1daf6a and 29aaadf.

📒 Files selected for processing: 1
  • crates/ui-egui/tests/smoke.rs

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

📝 Walkthrough

The connection-removal smoke test now advances the UI four frames after opening the connection context menu and before clicking “Remove.”

Changes: Connection removal test

Layer / File(s) Summary
Wait before selecting Remove
crates/ui-egui/tests/smoke.rs
The test advances four UI frames before clicking “Remove,” replacing the previous single-frame wait.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Other

Possibly related issues

  • opengeos/RustGIS#699: The test now waits before selecting the connection’s “Remove” action, but it does not implement the connection manager feature described by the issue.

Suggested reviewers: deniial00

Merge Risk: ⚪ Minimal · up to 29aaa

No merge-blocking risk was identified in this test-only timing adjustment.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly identifies the test change and the Windows-specific flaky context-menu click it fixes.
Description check Passed The description explains the failure, identifies the frame-layout cause, describes the four-frame fix, references the failing CI run, and states that the change is test-only. It does not use the templ…
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the failure, identifies the frame-layout cause, describes the four-frame fix, references the failing CI run, and states that the change is test-only. It does not use the template headings or provide a separate Testing section, but the required information is mostly present.

✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • 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

A rabbit taps the frame counter four,
Then hops to “Remove” by the door.
The menu waits; the click lands right,
Four quiet frames make timing bright.
One test now finishes its flight.

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

Code review

I found nothing worth raising in this PR. It changes one test file, crates/ui-egui/tests/smoke.rs, and nothing outside tests.

What the change does: it replaces a single h.step() with four before get_by_label("Remove").click() in connections_section_and_dialog. The comment explains why. The context menu lays out again on its second frame, so a click after one step can land between items. The PR description says the tab rename test already uses the same four-step pattern.

Checked:

  • Bugs: the fix targets the stated cause, which is a frame-timing race in the menu layout. Four frames is a fixed count, not a wait for the layout to settle. It matches the existing tab rename test, so I'm treating it as an accepted convention. I didn't run the test, so I haven't confirmed the fix on Windows.
  • Security and performance: nothing applies. Four extra headless frames cost nothing noticeable.
  • Quality: the comment is short and states the reason, in line with the surrounding code.
  • AGENTS.md: this is test code, so the no-unwrap rule and the wasm and i18n rules don't apply. No new dependencies or assets.

Change size

Compared: the whole PR against main (merge base f1daf6a to PR head 29aaadf)

Metric Value
Files changed 1 (added 0, modified 1, removed 0, renamed 0)
Size before 122.0 KB
Size after 122.1 KB
Total size change +118 B
File Before After Change
crates/ui-egui/tests/smoke.rs 122.0 KB 122.1 KB +118 B

@github-actions

Copy link
Copy Markdown

📖 Docs preview

Item Value
Preview https://preview.rustgis.app/pr-710/
Web app https://preview.rustgis.app/pr-710/app/
Commit 29aaadf

GitHub Pages takes a minute or two to publish a new commit.

@deniial00

Copy link
Copy Markdown
Member

Thanks for checking on windows - will merge main in #708 and #711 once this lands

@giswqs
giswqs merged commit 247fe24 into main Oct 22, 2026
29 checks passed
@giswqs
giswqs deleted the fix/connections-test-windows branch October 22, 2026 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:windows Run the Windows CI jobs on this pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants