Skip to content

Stabilize Proto Fleet E2E toast handling - #882

Open
edgars-avotins wants to merge 3 commits into
mainfrom
codex/toast-validation-stabilization
Open

Stabilize Proto Fleet E2E toast handling#882
edgars-avotins wants to merge 3 commits into
mainfrom
codex/toast-validation-stabilization

Conversation

@edgars-avotins

Copy link
Copy Markdown
Contributor

Reviewable diff: +25/-8 across 2 files (excludes generated, test, and story files).

Summary

This updates the shared Proto Fleet E2E toast assertions so they handle both the standard toast stack and the grouped toaster UI that newer flows render. It also removes a brittle rack-cleanup dependency on the transient Rack deleted toast and instead waits for the rack row itself to disappear.

How it works

The shared validateTextInToast() helper now normalizes text and checks the grouped toaster header, grouped toaster container, and the standard toast stack before failing. Rack deletion cleanup no longer treats a toast as the source of truth; after clicking delete, it validates that the rack is no longer present in the list.

Diagrams

flowchart TD
  A["Test action"] --> B["Toast or state change"]
  B --> C["Shared toast matcher checks grouped + standard toasts"]
  B --> D["Rack cleanup waits for row disappearance"]
  C --> E["Assertion passes when user-visible message is present"]
  D --> F["Cleanup passes when durable UI state is updated"]
Loading

Areas of the code involved

Area / package / file What changed Why it matters for review
client/e2eTests/protoFleet/pages/base.ts Broadened the shared toast matcher to understand grouped toaster markup. This affects many existing E2E assertions that rely on toast content.
client/e2eTests/protoFleet/pages/racks.ts Rack cleanup now waits for the deleted rack to disappear instead of waiting for a toast. This removes the flaky dependency that was breaking teardown paths.

Key technical decisions & trade-offs

  • Prefer durable state for cleanup validation over transient toast text, instead of increasing timeouts around the existing toast assertion.
  • Keep the shared toast assertion flexible enough for both toaster variants, instead of forking separate helpers per page.

Testing & validation

  • ./node_modules/.bin/eslint e2eTests/protoFleet/pages/base.ts e2eTests/protoFleet/pages/racks.ts
  • npx playwright test spec/racksCreation.spec.ts --project=desktop --no-deps -g "Create rack with miners assigned by name"
  • npx playwright test spec/buildingDetail.spec.ts --project=mobile --no-deps

Copilot AI lite review requested due to automatic review settings August 5, 2026 10:18
@edgars-avotins
edgars-avotins requested a review from a team as a code owner August 5, 2026 10:18
@github-actions github-actions Bot added javascript Pull requests that update javascript code client labels Aug 5, 2026
@github-actions github-actions Bot added the review-policy: needs-review Managed by the Review Policy workflow. label Aug 5, 2026
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

🔐 Codex Security Review

Note: This is an automated security-focused code review generated by Codex.
It should be used as a supplementary check alongside human review.
False positives are possible - use your judgment.

Scope summary

  • Reviewed pull request diff only (7cef8985e99c202c5d82125a49071a6f8266ab9e...ea3c2e71ff6c7f948f295724e22aa8c88b4b8d84, exact PR three-dot diff)
  • Model: gpt-5.6-sol

💡 Click "edited" above to see previous reviews for this PR.


Review Summary

Overall Risk: NONE

Findings

No security, correctness, or reliability findings.

Notes

The diff only changes ProtoFleet E2E test helpers and rack-management tests. It does not modify production authentication, database, network, plugin, mining-pool, or protocol code. Review was static; E2E tests were not executed.


Generated by Codex Security Review |
Triggered by: @edgars-avotins |
Review workflow run

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ef488a5a85

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread client/e2eTests/protoFleet/pages/racks.ts

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR stabilizes Proto Fleet Playwright E2E assertions around toast notifications and rack-deletion cleanup by supporting both the standard toast stack and the newer grouped-toaster UI, and by shifting rack deletion teardown validation from transient toasts to durable UI state.

Changes:

  • Expanded validateTextInToast() to search grouped-toaster header/container text in addition to the standard toast stack.
  • Updated rack deletion cleanup to wait for the rack row to disappear instead of relying on a “Rack deleted” toast.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
client/e2eTests/protoFleet/pages/base.ts Broadens toast matching to cover grouped-toaster UI and standard toasts.
client/e2eTests/protoFleet/pages/racks.ts Makes rack deletion cleanup validate via rack-row disappearance instead of a toast.

Comment thread client/e2eTests/protoFleet/pages/base.ts Outdated
Comment thread client/e2eTests/protoFleet/pages/racks.ts
@github-actions github-actions Bot added review-policy: low-risk Managed by the Review Policy workflow. and removed review-policy: needs-review Managed by the Review Policy workflow. labels Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

client javascript Pull requests that update javascript code review-policy: low-risk Managed by the Review Policy workflow.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants