Everything written this session that has not been through the device: rounds 43 to 48 (each patch adversarially verified, 43's transient-notice expectation fixed), a partial round 49, the pipeline scripts, the Android Auto design and the icon comparison mock. Also the two harness changes that were never A/B'd — adaptive waits, which may only shorten a declared wait and never lengthen it, and a ship that runs the mock walk and the deploy at the same time. The A/B and its 255-step baseline are in handoff/tools; main stays at what the phone has actually walked.
45 lines
3.4 KiB
Plaintext
45 lines
3.4 KiB
Plaintext
/* ── the first run, on a device that has just been installed ──────
|
|
The mock is the whole backend here, so it can answer as one: no
|
|
records, no playlists, no account, no all-files permission, and the
|
|
library root still the sandbox folder Android hands a fresh
|
|
install. The flag rides in the URL fragment — a reload cannot lose
|
|
that the way a file:// document's storage might — and in
|
|
localStorage beside it, for a page opened by hand.
|
|
|
|
This block is LAST on purpose. The reload wipes every module's
|
|
state (the mock's playlists, its contacts, its one fake transfer),
|
|
so nothing the two hundred steps above built survives into it, and
|
|
it puts the walk back on a provisioned device at the end so that
|
|
nothing appended after it is quietly running against an empty one.
|
|
|
|
A reload is not a reinstall: the webview's own storage comes back
|
|
with it, so the session the walk left behind is cleared by hand —
|
|
a now-playing bar on a phone with nothing in it is the one piece
|
|
of the pretence that would show in the stills. Removing the key is
|
|
not enough on its own, and a `pagehide` listener is not either:
|
|
the player writes the session on pagehide, on visibilitychange AND
|
|
on a ten-second timer while a track plays (player.svelte.js), and a
|
|
CDP-driven reload is not obliged to fire pagehide at all — so the
|
|
first attempt at this step came back with the bar still up. The
|
|
clearing therefore shuts the door instead of chasing the writers:
|
|
setItem is taught to refuse that one key for the few hundred
|
|
milliseconds this page has left, so nothing can put it back. */
|
|
{ do: `(function () { var K = 'ss.mobile.session.v1'; var set = Storage.prototype.setItem; Storage.prototype.setItem = function (k) { if (k === K) return; return set.apply(this, arguments); }; try { localStorage.removeItem(K); } catch (e) {} localStorage.setItem('mockFresh', '1'); location.hash = 'fresh'; })(); true`, wait: 400 },
|
|
{ do: `location.reload()`, name: "fresh-boot", wait: 4500 },
|
|
/* the tour's Soulseek step navigates to the card and stops there —
|
|
nothing in the walk types a username or a password */
|
|
{ do: `__click('.halfsheet .row', 'Sign in on Community')`, name: "fresh-community", wait: 1400 },
|
|
{ do: `document.querySelectorAll('.nav button')[0].click()`, name: "fresh-home", wait: 1000 },
|
|
{ do: `document.querySelectorAll('.nav button')[2].click()`, name: "fresh-albums", wait: 900 },
|
|
/* the Artists tab had no empty state at all before this round */
|
|
{ do: `document.querySelectorAll('.segtabs button')[1].click()`, name: "fresh-artists", wait: 900 },
|
|
{ do: `document.querySelectorAll('.nav button')[1].click()`, name: "fresh-search", wait: 900 },
|
|
/* the preview door: it reads the state and writes nothing */
|
|
{ do: `document.querySelectorAll('.nav button')[4].click()`, wait: 800 },
|
|
{ do: `__click('.screen .row', 'Set up this phone again')`, name: "fresh-preview", wait: 1100 },
|
|
{ do: `__click('.halfsheet .row', 'Choose a folder')`, name: "fresh-folder", wait: 2000 },
|
|
{ do: `document.querySelector('.scrim').click()`, wait: 700 },
|
|
{ do: `document.querySelectorAll('.nav button')[0].click()`, name: "fresh-fixed", wait: 1100 },
|
|
{ do: `localStorage.removeItem('mockFresh'); location.hash = ''; true`, wait: 400 },
|
|
{ do: `location.reload()`, name: "fresh-off", wait: 4500 },
|