Ricerca dei profili con suggerimenti e foto (#37)
verifica / controlli (push) Successful in 20s
verifica / prove (push) Failing after 19m40s
verifica / installatore (push) Skipped
verifica / immagine (push) Skipped

«Aggiungi account» ha una sola casella: mentre Alberto scrive compaiono
subito i suggerimenti locali, poi i profili di Instagram con la foto, come
chiesto in #37. Il browser di Febe scrive nella casella «Cerca» di Instagram
con tasti veri da una mappa chiusa (mai Invio, Tab o Esc), controlla prima
il fuoco, legge la risposta della pagina e non clicca mai un risultato.

La ricerca ha una categoria propria nel Governatore, con tetti larghi che
non consumano quelli della raccolta, e si dà il turno con il motore
sull'unica pagina; a fine sessione la pagina torna comunque al riposo. Le
foto passano dal CDN con un permesso ciascuna e restano solo in memoria.

Le risposte di Alberto del 15 novembre (controllo del fuoco, turni, evento
requestWillBeSent, niente foto dei seguiti per ora) sono in §6.1 e in
docs/decisioni.md. Su Instagram vero la ricerca parte quando i bersagli
search-open e search-box saranno raccolti dal vivo.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-11-15 16:30:03 +01:00
1 parent 5e417c666d
commit 9941a2fa1f
98 files changed
+8021 -229

No files matched your search

+23 -6
View File
@@ -1,6 +1,23 @@
// Chooses three followed profiles in the «Aggiungi account» dialog (mockup 04).
await new Promise((r) => setTimeout(r, 800));
const boxes = [...document.querySelectorAll('.aggiungi .elenco input[type=checkbox]:not(:disabled)')];
for (const i of [0, 2, 5]) if (boxes[i]) boxes[i].click();
await new Promise((r) => setTimeout(r, 400));
return document.querySelector('.aggiungi footer .btn.primo')?.textContent;
// The «Aggiungi account» dialog (mockup 04, issue #37): «gaia» typed in the search box, the list under it with the
// followed profiles and the demo's Instagram results with their drawn photos, two of them added, the pointer on a row.
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
let box = null;
for (let i = 0; i < 50 && !box; i++) {
box = document.querySelector('.aggiungi input[role=combobox]');
if (!box) await sleep(100);
}
// Wait for the list of followed profiles, so the local suggestions are there at once.
for (let i = 0; i < 50 && !/\(\d+\)/.test(document.querySelector('.aggiungi .scelti-testa .btn.collegamento')?.textContent || ''); i++) await sleep(100);
box.focus();
box.value = 'gaia';
box.dispatchEvent(new Event('input', { bubbles: true }));
const rows = () => [...document.querySelectorAll('.suggerimenti [role=option]:not(.azione)')];
const ready = () => rows().length >= 6 && rows().every((r) => {
const img = r.querySelector('.av img');
return img && img.complete && img.naturalWidth > 0;
});
for (let i = 0; i < 80 && !ready(); i++) await sleep(100);
for (const i of [0, 3]) rows()[i]?.querySelector('button')?.click();
await sleep(300);
const r = rows()[1].getBoundingClientRect();
return { hover: [r.left + r.width / 2, r.top + r.height / 2] };