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

@@ -5,6 +5,7 @@ using Febe.Core.Collection.Downloads;
using Febe.Core.Collection.Privacy;
using Febe.Core.Collection.Readers;
using Febe.Core.Collection.Recipes;
using Febe.Core.Collection.Search;
using Febe.Core.Domain;
using Febe.Core.Engine;
@@ -265,6 +266,17 @@ public sealed partial class CollectionDiagnostics : IResponseObserver, IDisposab
b.Queued[key] = (current.Saves + 1, current.Files + Math.Max(0, files), current.Skipped + Math.Max(0, skipped));
});
/// <summary>Fates of a photo of a search result: downloaded, refused by the CDN or the budget, skipped.</summary>
public static readonly IReadOnlySet<string> SearchPhotoOutcomes = new HashSet<string>(StringComparer.Ordinal) { "scaricata", "rifiutata", "saltata" };
/// <summary>One step of the profile search ended (issue #37): only its outcome, never the text or the profiles.</summary>
public void SearchStepEnded(SearchOutcome outcome) =>
Record(null, (b, _) => Bump(b.SearchSteps, outcome));
/// <summary>A photo of a search result was downloaded, refused or skipped.</summary>
public void SearchPhotoSettled(string outcome) =>
Record(null, (b, _) => Bump(b.SearchPhotos, SearchPhotoOutcomes.Contains(outcome) ? outcome : Other));
/// <summary>The Governor refused an action (its event <c>Denied</c>).</summary>
public void PermitDenied(long? session, ActionKind kind, DenialReason reason) =>
Record(session, (b, _) => Bump(b.Denials, (kind, reason)));
@@ -1104,6 +1116,10 @@ public sealed partial class CollectionDiagnostics : IResponseObserver, IDisposab
public long DownloadedBytes { get; set; }
public Dictionary<SearchOutcome, int> SearchSteps { get; } = [];
public Dictionary<string, int> SearchPhotos { get; } = new(StringComparer.Ordinal);
public OverflowCounter Overflow { get; } = new();
public void Touch(DateTimeOffset now)
@@ -1181,6 +1197,8 @@ public sealed partial class CollectionDiagnostics : IResponseObserver, IDisposab
FilesQueued = [.. Queued.Select(q => new QueuedFiles(q.Key.Kind, q.Key.Outcome, q.Value.Saves, q.Value.Files, q.Value.Skipped)).OrderBy(q => q.Kind).ThenBy(q => q.Outcome, StringComparer.Ordinal)],
Downloads = [.. Downloads.Select(d => new DownloadGroup(d.Key.Kind, d.Key.Step, d.Value.Count, d.Value.Bytes) { Cause = d.Key.Cause }).OrderBy(d => d.Kind).ThenBy(d => d.Step).ThenBy(d => d.Cause, StringComparer.Ordinal)],
DownloadedBytes = DownloadedBytes,
SearchSteps = [.. SearchSteps.Select(s => new SearchStepCount(s.Key, s.Value)).OrderBy(s => s.Outcome)],
SearchPhotos = [.. SearchPhotos.Select(s => new SearchPhotoCount(s.Key, s.Value)).OrderBy(s => s.Outcome, StringComparer.Ordinal)],
Overflow = new TraceOverflow
{
Pages = Overflow.Pages,
@@ -1,4 +1,5 @@
using System.Text.Json.Serialization;
using Febe.Core.Collection.Search;
using Febe.Core.Abstractions;
using Febe.Core.Collection.Downloads;
using Febe.Core.Collection.Recipes;
@@ -69,6 +70,12 @@ public sealed record SessionTrace
/// <summary>Bytes of the files downloaded (what crossed the network), when the queue said.</summary>
public long DownloadedBytes { get; init; }
/// <summary>Steps of the profile search on the site (issue #37), by how they ended: never a typed text or a name.</summary>
public IReadOnlyList<SearchStepCount> SearchSteps { get; init; } = [];
/// <summary>Photos of search results, by what happened to them («scaricata», «rifiutata», «saltata»).</summary>
public IReadOnlyList<SearchPhotoCount> SearchPhotos { get; init; } = [];
/// <summary>Items not kept because a list was full: counted, never dropped silently.</summary>
public TraceOverflow Overflow { get; init; } = new();
}
@@ -130,6 +137,12 @@ public sealed record SignalLine(DateTimeOffset At, SignalLevel Level, string Cod
public sealed record DenialCount(ActionKind Action, DenialReason Reason, int Count);
/// <summary>Search steps that ended the same way (a name of the closed list <see cref="SearchOutcome"/>).</summary>
public sealed record SearchStepCount(SearchOutcome Outcome, int Count);
/// <summary>Photos of search results with the same fate.</summary>
public sealed record SearchPhotoCount(string Outcome, int Count);
/// <summary>Saves of contents read by the recipes: how many, and how many files they put in the download queue.</summary>
/// <param name="Outcome">A <see cref="SaveOutcome"/> name, or «Completed» for a «Post singolo» completion.</param>
public sealed record QueuedFiles(EntryKind Kind, string Outcome, int Saves, int Files, int Skipped);