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.
17 lines
1.1 KiB
Plaintext
17 lines
1.1 KiB
Plaintext
/* Export. The whole file is built in Rust and written by whichever door
|
|
the platform has — the desktop's save dialog, the phone's
|
|
create-document sheet — so all the command ever answers is where it
|
|
went: a path there, the document's name here. The sanitiser is the
|
|
Rust one, character for character (and written as a code-point test
|
|
rather than a range, so nothing in this file is a control byte). A
|
|
dismissed sheet (null) and a refusal are armed from the walk with
|
|
`__ssMock.answer` / `.fail`, which `weather()` answers first. */
|
|
if (cmd === "playlist_export") {
|
|
const p = plOf(args);
|
|
if (!p) return Promise.reject(new Error("Playlist not found"));
|
|
const fmt = String(args?.format ?? "");
|
|
if (!["m3u8", "xspf", "pls", "csv", "json"].includes(fmt)) return Promise.reject(new Error("Unknown export format " + fmt));
|
|
const safe = [...String(p.name)].map((c) => (/[<>:"\/\\|?*]/.test(c) || c.codePointAt(0) < 0x20 ? "_" : c)).join("");
|
|
return new Promise((r) => setTimeout(() => r(safe + "." + fmt), 120));
|
|
}
|