Ricerca dei profili con suggerimenti e foto (#37)
«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:
1 parent
5e417c666d
commit
9941a2fa1f
98 files changed
+8021
-229
No files matched your search
@@ -78,10 +78,20 @@ internal sealed class RecipeRun : IDisposable
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Asks the Governor for a counted action; stops in order when refused or when the session is over.</summary>
|
||||
public async Task PermitAsync(ActionKind kind, long? accountId)
|
||||
/// <summary>
|
||||
/// Asks the Governor for a counted action; stops in order when refused or when the session is over. With
|
||||
/// <paramref name="opensPage"/> (the next step opens a page), this is a turn point of the page (issue #37): when the
|
||||
/// profile search waits, it gets the page for one step first, and the checks run again after it.
|
||||
/// </summary>
|
||||
public async Task PermitAsync(ActionKind kind, long? accountId, bool opensPage = false)
|
||||
{
|
||||
ThrowIfSignal();
|
||||
if (opensPage && Env.PageTurns is { } turns && turns.EngineTurn is { } turn && await turns.YieldAsync(turn, Ct).ConfigureAwait(false))
|
||||
{
|
||||
// The page may have changed meanwhile: what follows opens a page anyway, but the state is looked at again.
|
||||
ThrowIfSignal();
|
||||
}
|
||||
|
||||
if (Env.Clock.Now > Session.PlannedEnd)
|
||||
{
|
||||
throw Stop(RecipeStatus.Denied, "La sessione è finita: la ricetta riprenderà alla prossima.");
|
||||
@@ -104,6 +114,7 @@ internal sealed class RecipeRun : IDisposable
|
||||
try
|
||||
{
|
||||
load = await Env.Driver.OpenAsync(path, Ct).ConfigureAwait(false);
|
||||
Env.PageTurns?.NoteOpened(PageUser.Engine);
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user