e2e: show a URL bar in browser session recordings#1216
Conversation
Playwright records the page viewport only, so the recording is chromeless and a shared session.mp4 gives no hint of which page each moment was on. The runs viewer reconstructs a URL bar from the nav timeline, but the raw video that people actually pass around had none. Inject a synthetic URL bar at the top of every top-level page so it shows up in the video and the step screenshots, fed by location.href and updated across SPA route changes. It renders inside a closed shadow root (invisible to Playwright locators and the accessibility tree) and is pointer-events none, so it never perturbs a scenario. Skipped under E2E_DESK, where the headed browser already shows real chrome.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-marketing | c6b20b8 | Commit Preview URL Branch Preview URL |
Jun 29 2026, 07:35 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-cloud | c6b20b8 | Jun 29 2026, 07:36 PM |
Cloudflare previewTorn down — the PR is closed. |
| const url = document.createElement("span"); | ||
| url.style.cssText = "overflow:hidden;text-overflow:ellipsis"; |
There was a problem hiding this comment.
The
url span is missing flex:1;min-width:0, which are required for text-overflow:ellipsis to fire on a flex item. Without min-width:0, a flex item's minimum size defaults to min-content (the full un-broken text width), so the item never shrinks below the URL's length. The bar's own overflow:hidden still clips the text, but clipping is silent — you get a hard cut instead of the trailing … that signals truncation. Any URL longer than the available space after the traffic lights and lock icon will be silently clipped rather than ellipsis-terminated.
| const url = document.createElement("span"); | |
| url.style.cssText = "overflow:hidden;text-overflow:ellipsis"; | |
| const url = document.createElement("span"); | |
| url.style.cssText = "flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis"; |
What
Browser e2e recordings are chromeless (Playwright records the page viewport only), so a shared
session.mp4gives no hint of which page each moment was on. The runs viewer reconstructs a URL bar from the nav timeline, but the raw video that actually gets passed around had none.This injects a synthetic browser URL bar at the top of every top-level page, so it shows up in the recording and the step/failure screenshots. It's wired into the shared
browser.sessionpath, so every browser scenario gets it with no opt-in.How it stays invisible to scenarios
getByTexton the bar's URL returns 0 matches).pointer-events: none, so it never intercepts a click.pushState/replaceState/popstate, plus a 250ms catch-all (covers redirect-back flows like checkout).drawtextbuild.E2E_DESK(headed browser already shows real chrome). The desktop-VM targets film the real app window via a different path and are unaffected.Verification
tsc,oxlint,oxfmtclean.connect-panel) passed unchanged and produced the bar in its screenshots andsession.mp4.pushStatewith no reload, and that locators cannot see the bar.Follow-up (not in this PR)
The runs viewer still draws its own synthetic URL bar above the video, so in-viewer playback now shows the URL twice (the standalone mp4 is correct). Worth trimming the viewer's
.urlbartext since the video now carries it. Happy to do that here or separately.