android: the handoff — the pending rounds, the pipeline, and what is unverified
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.
This commit is contained in:
1 parent
867fd42972
commit
9f0601027c
400 files changed
+26401
-3
No files matched your search
@@ -0,0 +1,62 @@
|
||||
// Round nine: the hub's browse-by-name on the phone — Community → Buddies
|
||||
// has "Look up a user": a name typed opens the peer sheet (browse their
|
||||
// files, message, add buddy).
|
||||
const fs = require('fs');
|
||||
const root = 'F:/Coding/SoulStream/';
|
||||
let p, s;
|
||||
const load = (file) => { p = file; s = fs.readFileSync(root + p, 'utf8'); };
|
||||
const save = () => fs.writeFileSync(root + p, s);
|
||||
const once = (a) => {
|
||||
const i = s.indexOf(a);
|
||||
if (i < 0) throw new Error('missing in ' + p + ': ' + a.slice(0, 90));
|
||||
if (s.indexOf(a, i + 1) >= 0) throw new Error('ambiguous in ' + p + ': ' + a.slice(0, 90));
|
||||
return i;
|
||||
};
|
||||
const rep = (a, b) => { once(a); s = s.replace(a, () => b); };
|
||||
const NL = String.fromCharCode(10);
|
||||
const afterLine = (anchor, text) => { const i = once(anchor); const nl = s.indexOf(NL, i); s = s.slice(0, nl + 1) + text + s.slice(nl + 1); };
|
||||
|
||||
load('src/mobile/screens/Community.svelte');
|
||||
rep(` {:else if tab === "buddies"}
|
||||
{#if !buddies.length}
|
||||
<div class="stub"><b>No buddies on this account yet.</b>Hold a name in a room to add one.</div>
|
||||
{/if}`,
|
||||
` {:else if tab === "buddies"}
|
||||
<button class="row" onclick={lookUp}>
|
||||
<span class="lead"><Icon name="search" size={20} /></span>
|
||||
<span class="b"><span class="t">Look up a user</span><span class="m">a Soulseek name: browse their files, message them, add them</span></span>
|
||||
<span class="r"><Icon name="chevron-right" size={17} /></span>
|
||||
</button>
|
||||
{#if !buddies.length}
|
||||
<div class="stub"><b>No buddies on this account yet.</b>Hold a name in a room to add one, or look one up above.</div>
|
||||
{/if}`);
|
||||
rep(` const buddies = $derived(slsk.buddies.map((u) => ({ u, st: slsk.buddyState[u] || {} })));`,
|
||||
` const buddies = $derived(slsk.buddies.map((u) => ({ u, st: slsk.buddyState[u] || {} })));
|
||||
/* the hub's browse-by-name: a typed name opens the peer sheet */
|
||||
function lookUp() {
|
||||
openHalf("prompt", { title: "Look up a user", placeholder: "Soulseek username", ok: "Open", onsubmit: (v) => { const u = v.trim(); if (u) openHalf("peer", { username: u }); } });
|
||||
}`);
|
||||
save();
|
||||
|
||||
load('tests/mobile/smoke.mjs');
|
||||
rep(` { do: \`document.querySelector('.screen button.row').dispatchEvent(new MouseEvent('contextmenu', { bubbles: true, cancelable: true }))\`, name: "buddy-sheet", wait: 600 },
|
||||
{ do: \`document.querySelector('.scrim').click()\`, wait: 500 },`,
|
||||
` { do: \`document.querySelectorAll('.screen button.row')[1].dispatchEvent(new MouseEvent('contextmenu', { bubbles: true, cancelable: true }))\`, name: "buddy-sheet", wait: 600 },
|
||||
{ do: \`document.querySelector('.scrim').click()\`, wait: 500 },
|
||||
/* a user looked up by name: the peer sheet */
|
||||
{ do: \`__click('.screen .row', 'Look up a user')\`, wait: 600 },
|
||||
{ do: \`(function () { var i = document.querySelector('.halfsheet .prompt .field'); i.value = 'dusty_crates'; i.dispatchEvent(new Event('input', { bubbles: true })); })()\`, wait: 300 },
|
||||
{ do: \`__click('.halfsheet .prompt-acts .btn-fill', 'Open')\`, name: "user-lookup", wait: 700 },
|
||||
{ do: \`document.querySelector('.scrim').click()\`, wait: 500 },`);
|
||||
rep(` "buddy-sheet": (i) => i.half.includes("up") && /Browse their files/.test(i.halfText) && /Remove buddy/.test(i.halfText),`,
|
||||
` "buddy-sheet": (i) => i.half.includes("up") && /Browse their files/.test(i.halfText) && /Remove buddy/.test(i.halfText),
|
||||
"user-lookup": (i) => i.half.includes("up") && /dusty_crates/.test(i.halfText) && /Browse their files/.test(i.halfText) && /Add buddy/.test(i.halfText),`);
|
||||
save();
|
||||
|
||||
load('ANDROID.md');
|
||||
rep(`— the same sheet is a buddy's on Community → Buddies (a long press):`,
|
||||
`— the same sheet is a buddy's on Community → Buddies (a long press), and
|
||||
"Look up a user" there opens it for any name typed (the hub's browse by
|
||||
name):`);
|
||||
save();
|
||||
console.log('round nine wired');
|
||||
Reference in new issue
Block a user