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

@@ -150,6 +150,40 @@ public sealed record PageKeys
public VocabularyKeys Cursor { get; init; } = VocabularyKeys.None;
}
/// <summary>
/// Keys of the answer of the site's own search box (issue #37). The search carries its own profile keys, so a site
/// whose other concepts use other keys can still serve the search in its own shape. Only profiles are read: hashtags
/// and places are ignored.
/// </summary>
public sealed record SearchKeys
{
/// <summary>The key of the search answer: found anywhere in the tree, its value holds <see cref="Items"/>.</summary>
public VocabularyKeys Root { get; init; } = VocabularyKeys.None;
/// <summary>The list of profile results under the root.</summary>
public VocabularyKeys Items { get; init; } = VocabularyKeys.None;
/// <summary>Order of an item in the list (array order when missing).</summary>
public VocabularyKeys Position { get; init; } = VocabularyKeys.None;
/// <summary>The profile node of an item.</summary>
public VocabularyKeys Profile { get; init; } = VocabularyKeys.None;
public VocabularyKeys Id { get; init; } = VocabularyKeys.None;
public VocabularyKeys Username { get; init; } = VocabularyKeys.None;
public VocabularyKeys DisplayName { get; init; } = VocabularyKeys.None;
/// <summary>The profile picture: the first key present wins (the small one is enough for a suggestion).</summary>
public VocabularyKeys Picture { get; init; } = VocabularyKeys.None;
public VocabularyKeys Verified { get; init; } = VocabularyKeys.None;
/// <summary>True when the reader can recognize a search answer.</summary>
public bool IsSet => Root.IsSet && Items.IsSet && Id.IsSet && Username.IsSet;
}
/// <summary>Whether the vocabulary is confirmed on real samples or still a hypothesis (spec §6.4, rule 10).</summary>
public enum VocabularyStatus
{
@@ -185,6 +219,12 @@ public sealed record ReaderVocabulary
public PageKeys Page { get; init; } = new();
/// <summary>
/// The answer of the site's search box (issue #37). Not among <see cref="MissingConcepts"/>: the collection does not
/// depend on it, and without it the search on the site is «da configurare».
/// </summary>
public SearchKeys Search { get; init; } = new();
/// <summary>The key under which the response describes the connected account (H10).</summary>
public VocabularyKeys Viewer { get; init; } = VocabularyKeys.None;
@@ -295,6 +335,7 @@ public sealed record ReaderVocabulary
var p = file.Profile ?? new ProfileDto();
var h = file.Highlight ?? new HighlightDto();
var g = file.Page ?? new PageDto();
var s = file.Search ?? new SearchDto();
return new ReaderVocabulary
{
Site = file.Site.Trim(),
@@ -330,6 +371,18 @@ public sealed record ReaderVocabulary
},
Highlight = new HighlightKeys { Id = K(h.Id), Title = K(h.Title), Owner = K(h.Owner), Items = K(h.Items), Cover = K(h.Cover) },
Page = new PageKeys { HasMore = K(g.HasMore), Cursor = K(g.Cursor) },
Search = new SearchKeys
{
Root = K(s.Root),
Items = K(s.Items),
Position = K(s.Position),
Profile = K(s.Profile),
Id = K(s.Id),
Username = K(s.Username),
DisplayName = K(s.DisplayName),
Picture = K(s.Picture),
Verified = K(s.Verified),
},
Viewer = K(file.Viewer),
Relevance = [.. (file.Relevance?.Keys ?? []).Where(k => !string.IsNullOrWhiteSpace(k)).Select(k => k.Trim()).Distinct(StringComparer.Ordinal)],
};
@@ -354,6 +407,8 @@ internal sealed class VocabularyFile
public PageDto? Page { get; set; }
public SearchDto? Search { get; set; }
public List<string>? Viewer { get; set; }
public RelevanceDto? Relevance { get; set; }
@@ -453,6 +508,29 @@ internal sealed class PageDto
public List<string>? Cursor { get; set; }
}
internal sealed class SearchDto
{
public string? Note { get; set; }
public List<string>? Root { get; set; }
public List<string>? Items { get; set; }
public List<string>? Position { get; set; }
public List<string>? Profile { get; set; }
public List<string>? Id { get; set; }
public List<string>? Username { get; set; }
public List<string>? DisplayName { get; set; }
public List<string>? Picture { get; set; }
public List<string>? Verified { get; set; }
}
[JsonSourceGenerationOptions(
PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase,
ReadCommentHandling = JsonCommentHandling.Skip,