fix(tabs): dont ask user in reload prompt if data in tabs is not lost#3784
fix(tabs): dont ask user in reload prompt if data in tabs is not lost#3784
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f195f88f3b
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
Updates Query Editor page-leave guarding so the native beforeunload prompt is shown only when there are running queries (not merely “dirty” tabs), aligning with the goal of avoiding unnecessary reload/close confirmation when tab contents are preserved.
Changes:
- Adjusted
getQueryPageLeaveStateto prompt only when at least one tab has a running query. - Updated unit tests to reflect the new prompt behavior for dirty tabs without running queries.
- Updated Playwright e2e coverage to assert no
beforeunloaddialog on reload/close when only dirty tabs are present, while keeping coverage for running-query prompts.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
tests/suites/tenant/queryEditor/queryPageLeave.test.ts |
Updates e2e expectations around beforeunload dialogs for dirty-vs-running tab scenarios. |
src/containers/Tenant/Query/QueryEditor/hooks/useQueryPageLeaveGuard.ts |
Changes prompt condition to depend only on running tabs. |
src/containers/Tenant/Query/QueryEditor/hooks/__test__/useQueryPageLeaveGuard.test.ts |
Updates unit test expectation for dirty tabs when no running tabs exist. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f195f88f3b
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 20e1f587e6
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e08930a384
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Will implement only after #3791 |
Stand
Closes #3770
CI Results
Test Status:⚠️ FLAKY
📊 Full Report
Test Changes Summary ✨3 🗑️2
✨ New Tests (3)
🗑️ Deleted Tests (2)
Bundle Size: ✅
Current: 63.39 MB | Main: 63.39 MB
Diff: 0.03 KB (-0.00%)
✅ Bundle size unchanged.
ℹ️ CI Information