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

+47 -1
View File
@@ -214,11 +214,57 @@ public sealed record AddAccountsRequest(IReadOnlyList<string> Usernames, string
public sealed record AddAccountsDto(int Added, IReadOnlyList<string> Skipped, string Message);
public sealed record FollowingProfileDto(string Username, string? DisplayName, bool? IsPrivate, long? AccountId);
/// <summary>A profile for the local suggestions: one Alberto follows, or an account in Febe he does not follow.</summary>
/// <param name="InstagramId">The site's identifier, when known (to merge with the results of the search).</param>
/// <param name="Avatar">Thumbnail key of the newest profile picture in the library (<c>/api/thumbnails/{key}</c>).</param>
/// <param name="Photo">Key of a photo of the search in memory (<c>/api/ricerca/foto/{key}</c>).</param>
/// <param name="Followed">True when Alberto follows the profile (from the list of followed profiles).</param>
public sealed record FollowingProfileDto(string Username, string? DisplayName, bool? IsPrivate, long? AccountId, string? InstagramId = null, string? Avatar = null, string? Photo = null, bool Followed = true);
/// <param name="BackfillPerDay">Default «Storico, massimo al giorno» of the caution profile, for the note of the dialog.</param>
public sealed record FollowingDto(long? ReadAt, string? ReadDay, bool InProgress, int ReadSoFar, int Total, IReadOnlyList<FollowingProfileDto> Profiles, int BackfillPerDay);
// ---------------------------------------------------------------- profile search (issue #37)
/// <summary>The text of the search box of the dialog. <paramref name="Client"/> is a random id of the window (16 hex).</summary>
public sealed record ProfileSearchRequest(string Client, string? Text)
{
private bool PrintMembers(System.Text.StringBuilder builder)
{
builder.Append($"TextLength = {Text?.Length ?? 0}");
return true;
}
}
/// <summary>The dialog closed.</summary>
public sealed record ProfileSearchEndRequest(string Client);
/// <summary>
/// What the search shows. <paramref name="State"/> is one of
/// <c>idle|solo-locale|attesa|cerca|pronta|vuota|nessuna-risposta|non-possibile|fuori-fascia|ferma|non-pronto|da-configurare|rifiutata|errore</c>;
/// <paramref name="Mine"/> is true when the window that asks wrote the text.
/// </summary>
public sealed record ProfileSearchDto(long Version, bool Mine, string Text, string State, string? Message, long? RetryAfter, IReadOnlyList<ProfileSearchHitDto> Hits)
{
private bool PrintMembers(System.Text.StringBuilder builder)
{
builder.Append($"Version = {Version}, State = {State}, Hits = {Hits.Count}");
return true;
}
}
/// <summary>A profile found on the site, with what Febe knows of it (account, followed, private).</summary>
/// <param name="Photo">Key of its photo in memory, once <paramref name="PhotoReady"/>.</param>
/// <param name="Avatar">Thumbnail key of the account's newest profile picture in the library, when it is in Febe.</param>
public sealed record ProfileSearchHitDto(string InstagramId, string Username, string? DisplayName, bool? IsVerified, string? Photo, bool PhotoReady, long? AccountId, bool Followed, bool? IsPrivate, string? Avatar)
{
private bool PrintMembers(System.Text.StringBuilder builder)
{
builder.Append($"PhotoReady = {PhotoReady}, InFebe = {AccountId is not null}, Followed = {Followed}");
return true;
}
}
// ---------------------------------------------------------------- engine
/// <summary>The connected account at the bottom of the sidebar.</summary>