You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test(webapp): wait for a navigation before asking which one the viewport draws - #364
After the five webapp restructuring PRs (#359–#363) merged, I ran the full suite on main. Everything passes except one Playwright test, library-cache.spec.ts › "takes the current tab back to its plain address" (mobile). It timed out on a click once in that run, and passed 16/16 when run alone.
Cause
The test chooses its navigation with isVisible(), which answers immediately and never waits. The run's call log shows what went wrong on the phone:
When the test asked, the shell was still mounting, and neither navigation was on screen yet.
isVisible() therefore reported no phone navigation.
The test then waited for the "Now playing" link in the sidebar, which a phone never draws, until the timeout.
The same pattern appears in five library-cache tests and in both copies of navigateWithin, in fixtures/radio.ts and smart-playlists-and-podcasts.spec.ts. Those two copies test .sidebar the same way, so they could fail the opposite way: a desktop whose sidebar wasn't drawn yet would be treated as a phone.
Fix
A new e2e/fixtures/navigation.ts exports onPhoneNavigation(page). It waits for whichever navigation the viewport draws (.mobile-navigation:visible, .primary-navigation:visible), then asks whether it is the phone's. All seven call sites use it. Each test's logic is otherwise unchanged.
Checks
Specs that use the helpers (library-cache, radio, smart-playlists-and-podcasts): 60 passed, 6 skipped.
Biome: clean on e2e/.
Rest of main, before this change:
Playwright: 476 passed, 31 skipped; the 1 failure was the test fixed here.
vitest: 327 tests.
Typecheck and build pass.
Rust: fmt, the layout gate, clippy, cargo doc -D warnings and 666 tests all pass.
No inversion: the race only shows under load and could not be reproduced on demand. The reasoning above rests on the run's call log.
Summary by CodeRabbit
Tests
Les scénarios automatisés vérifient plus uniformément la navigation sur téléphone, notamment lors du chargement et du changement d’onglet.
Les tests tiennent compte de la navigation mobile ou principale visible pour choisir le parcours à valider.
…ort draws
Five library-cache tests and both navigateWithin helpers chose between the phone's bottom bar and the sidebar with isVisible(), which answers at once. Asked while the shell was still mounting, it saw neither: on a phone the tests then looked for their links in the sidebar until they timed out, which is how 'takes the current tab back to its plain address' failed once in a full run on merged main (16/16 alone). onPhoneNavigation waits for whichever navigation is drawn, then asks.
Signed-off-by: InstaZDLL <github.105mh@8shield.net>
Reviewing files that changed from the base of the PR and between 575e3b8 and 28307ee.
Files selected for processing: 4
webapp/e2e/fixtures/navigation.ts
webapp/e2e/fixtures/radio.ts
webapp/e2e/library-cache.spec.ts
webapp/e2e/smart-playlists-and-podcasts.spec.ts
Limit details: You’ve used the included review currently available. Your 85 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.
Walkthrough
Les tests E2E disposent d’un helper qui attend l’affichage d’une navigation mobile ou principale. Les parcours de navigation dans les fixtures et les tests utilisent ce helper pour déterminer si la page suit le parcours mobile.
Changes: Détection de la navigation mobile
Layer / File(s)
Summary
Helper de détection de la navigation webapp/e2e/fixtures/navigation.ts
onPhoneNavigation(page) attend l’affichage de .mobile-navigation ou .primary-navigation, puis renvoie si .mobile-navigation est visible.
Mise à jour des parcours E2E webapp/e2e/fixtures/radio.ts, webapp/e2e/library-cache.spec.ts, webapp/e2e/smart-playlists-and-podcasts.spec.ts
Les parcours remplacent le contrôle direct de la barre mobile ou latérale par onPhoneNavigation(page) pour choisir la navigation mobile ou principale.
InstaZDLL/waveflow-server#363 extrait navigateWithin vers une fixture et sépare les tests concernés. Cette PR met à jour ces mêmes helpers et tests pour attendre une navigation visible.
Suggested labels:scope: web
Merge Risk: Minimal · up to 28307
No actionable merge-blocking risk was identified.
Pre-merge checks: 5
Check name
Status
Explanation
Title check
Le titre décrit clairement le changement principal : attendre qu’une navigation soit rendue avant de déterminer celle utilisée par le viewport.
Description check
La description explique le problème, sa cause, la correction et les résultats des validations. Elle ne reprend pas les rubriques exactes du modèle ni les cases du plan de test, mais les informations e…
Docstring Coverage
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 3 functions across 4 files.
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Description check
Explanation
La description explique le problème, sa cause, la correction et les résultats des validations. Elle ne reprend pas les rubriques exactes du modèle ni les cases du plan de test, mais les informations essentielles sont présentes.
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
Warning
Some tools did not complete. Review the errors below.
Biome (2.5.15)
webapp/e2e/fixtures/navigation.ts
Biome could not lint this file: nested root configuration. Check the repository's Biome configuration and plugins.
webapp/e2e/fixtures/radio.ts
Biome could not lint this file: nested root configuration. Check the repository's Biome configuration and plugins.
webapp/e2e/library-cache.spec.ts
Biome could not lint this file: nested root configuration. Check the repository's Biome configuration and plugins.
This review was completed with usage-based billing: files reviewed beyond your plan's included limits are billed at $0.25/file. View usage-based billing.
Comment @coderabbitai help to get the list of available commands.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After the five webapp restructuring PRs (#359–#363) merged, I ran the full suite on
main. Everything passes except one Playwright test,library-cache.spec.ts› "takes the current tab back to its plain address" (mobile). It timed out on a click once in that run, and passed 16/16 when run alone.Cause
The test chooses its navigation with
isVisible(), which answers immediately and never waits. The run's call log shows what went wrong on the phone:isVisible()therefore reported no phone navigation.The same pattern appears in five
library-cachetests and in both copies ofnavigateWithin, infixtures/radio.tsandsmart-playlists-and-podcasts.spec.ts. Those two copies test.sidebarthe same way, so they could fail the opposite way: a desktop whose sidebar wasn't drawn yet would be treated as a phone.Fix
A new
e2e/fixtures/navigation.tsexportsonPhoneNavigation(page). It waits for whichever navigation the viewport draws (.mobile-navigation:visible, .primary-navigation:visible), then asks whether it is the phone's. All seven call sites use it. Each test's logic is otherwise unchanged.Checks
library-cache,radio,smart-playlists-and-podcasts): 60 passed, 6 skipped.e2e/.main, before this change:cargo doc -D warningsand 666 tests all pass.No inversion: the race only shows under load and could not be reproduced on demand. The reasoning above rests on the run's call log.
Summary by CodeRabbit