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

+36 -12
View File
@@ -724,22 +724,34 @@ public sealed class EngineHost : IAsyncDisposable
// using the browser (spec §6.1, §7.6).
var breaker = s.Breaker.State;
var keepPage = breaker.Status is BreakerStatus.Challenge or BreakerStatus.Disconnected || s.Runtime.UserIsDriving;
if (!keepPage)
{
// This rest also serves a driving period that ended during the session.
Interlocked.Exchange(ref _restAfterDriving, 0);
try
// The rest takes the page turn (issue #37). When the profile search holds or waits for the page, the rest is
// left to it (PageTurns.RestOwed): it rests the page when it is done, no session running.
var turn = await s.PageTurns.TakeForRestAsync(ct).ConfigureAwait(false);
if (turn is not null)
{
await _runner.RestAsync(ct).ConfigureAwait(false);
}
catch (Exception ex) when (ex is not OutOfMemoryException)
{
await s.Events.WriteAsync(
EventSeverity.Warning,
EngineEventCodes.RecipeFailed,
$"Non sono riuscito a portare il browser sulla pagina vuota ({ex.GetType().Name}).",
sessionId: record.Id,
ct: ct).ConfigureAwait(false);
await using (turn.ConfigureAwait(false))
{
try
{
await _runner.RestAsync(ct).ConfigureAwait(false);
s.PageTurns.NoteRested();
}
catch (Exception ex) when (ex is not OutOfMemoryException)
{
await s.Events.WriteAsync(
EventSeverity.Warning,
EngineEventCodes.RecipeFailed,
$"Non sono riuscito a portare il browser sulla pagina vuota ({ex.GetType().Name}).",
sessionId: record.Id,
ct: ct).ConfigureAwait(false);
}
}
}
}
@@ -799,7 +811,19 @@ public sealed class EngineHost : IAsyncDisposable
try
{
await _runner.RestAsync(ct).ConfigureAwait(false);
// With the page turn (issue #37): a search step in progress is never cut by the rest. When the search holds
// or waits for the page, the rest is left to it.
var turn = await _s.PageTurns.TakeForRestAsync(ct).ConfigureAwait(false);
if (turn is null)
{
return;
}
await using (turn.ConfigureAwait(false))
{
await _runner.RestAsync(ct).ConfigureAwait(false);
_s.PageTurns.NoteRested();
}
}
catch (OperationCanceledException) when (ct.IsCancellationRequested)
{