Repository navigation
Verify hybrid replay against PhoenixReplay 0.6.2, fix what it found; release 0.6.1 - #23
Merged
Merged
Conversation
phoenix_test_playwright 0.14 failed every assertion with a bare ArgumentError against Playwright 1.63, so the demo pinned Playwright 1.59.1. 0.18 works with it: update phoenix_test_playwright (with phoenix_test 0.12 and playwright_ex 0.14) and unpin Playwright.
…ecords inputs Checked against PhoenixReplay 0.6.1 by recording real sessions of the demo and replaying them in its player, which found: - Every step of a replay showed the session's first moment. The player renders each moment with __changed__: nil and diffs it with change tracking, where the renderer called Map.keys(nil), crashing the frame, which restarted. __changed__: nil now renders every slot, as in LiveView. - A replay on a server that didn't compile the component failed for recorded state named nowhere in Elixir code, such as useClipboard's copied: Names.existing/1 found no atom. The render spec now carries every declared name's atom as a literal of the compiled module. - A server action reached the recording before the state it was sent from; the bridge now flushes pending reports before sending one. - Reports went out once per flush interval, so one could catch a word halfway typed, disagreeing with PhoenixReplay's own record of the input. They now wait for the replayer's debounce, as it records form controls, with the flush interval as a ceiling. PhoenixReplay renders replays in full, so the replay-only translation of __changed__ is removed. The guide names PhoenixReplay 0.6, links Replay.View and replayRecorder, and covers what PhoenixReplay records on its own.
mix npm.install re-resolves to the newest versions the ranges allow (elixir-volt/npm_ex#6), so CI tested whatever the registry had that day: Playwright 1.64 appeared and the local demo run had no browser for it. CI now installs what npm.lock records, with --frozen, as npm_ex recommends.
PhoenixReplay 0.6.1 set up as its README says: the recorder on the :demo live session, the dashboard at /dev/replay behind :dev_routes, PhoenixReplay.Plug, the user agent in connect_info, and replayParams, replayMetadata and replayRecorder in app.ts. Tests record nothing except a browser test that records a session on /contacts and checks that the player's replay shows the typed search. The README says what a replay shows and what it doesn't. The demo's CI installs npm packages from the lock.
With vize_ex splitting each <option> of a <select v-model> into a model slot, the renderer marks the option whose value, bound :value or text is the select's selected, compared as Vue's looseEqual does, or each one among them for <select multiple>. vize_ex also stops rendering a static ref or key. Both match Vue's server renderer; they need the vize_ex release with the option slot.
0.6.2 replays a LiveView inside the layout its layout: option names, so the demo's navigation and flash messages now show in a replay, and shows lists of integers as numbers. Both checked by recording sessions again.
PhoenixReplay's file storage resolves a relative path against the working directory it started in, the demo's root in tests.
The client module is written while compiling, so with a build that is up to date, such as one restored from a CI cache beside a fresh checkout, it was never written again and building the assets failed. The LiveView defines __mix_recompile__?/0, true while the file is missing. The demo's assets.build compiles first, as Phoenix's does.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
PhoenixVapor's hybrid replay checked against PhoenixReplay 0.6.2 for the first time with both installed, by recording real sessions of the demo in Chromium and replaying them in PhoenixReplay's player. That found four PhoenixVapor bugs, fixed here, then a first-paint comparison with Vue's server renderer found two more. Ends with the 0.6.1 release commit.
Includes #22's commit (phoenix_test_playwright 0.18, Playwright 1.63), which PhoenixReplay 0.6.x needs through
playwright_ex ~> 0.14; merging this supersedes #22.Replay fixes
__changed__: niland diffs it with change tracking. The renderer then calledMap.keys(nil), the frame crashed and restarted at the start.__changed__: nilnow renders every slot, as in LiveView.useClipboard'scopiedis an example: its atom was made only while compiling. The render spec now carries every declared name's atom as a literal of the module. Tested in a fresh VM that never compiled the component.debounce, as it records form controls, withflushas a ceiling. Re-recorded: both report the same value at the same moment.translate_changed, the replay-only translation of__changed__, since PhoenixReplay renders replays in full.First paint, compared with
@vue/server-rendererreforkeyrendered as an attribute. vize 0.17.2 leaves both out.<select v-model>showed no option selected. With vize 0.17.2's option slot, the option whose value, bound:valueor text matches is nowselected, or each one among them formultiple.is="vue:name"isn't resolved to a component; that's upstream, is="vue:name" on a native element isn't resolved to a component ubugeeei-prod/vize#8328.Demo
:demo,/dev/replayin dev,PhoenixReplay.Plug, andreplayRecorderinapp.ts./contactsand checks that the player's replay shows the typed search.Also
__mix_recompile__?/0, true while the file is missing, and the demo'sassets.buildcompiles first, as Phoenix's does.tmp/replay_recordings, by a relative path.--frozen. Plainmix npm.installre-resolves everything (mix npm.install re-resolves and rewrites npm.lock even when package.json is unchanged npm_ex#6), and moved Playwright to 1.64 mid-check.Release
Requires vize ~> 0.17.2.
Release PhoenixVapor 0.6.1sets the version and dates the CHANGELOG section; tagging and publishing follow the merge.Checks:
mix lintclean;mix test --include e2e383 passed; demomix cilint clean, 23 passed.