D1, terza parte: Dashboard come pagina iniziale ovunque, miniature anche del Giro
Richiesta di Alberto (#59, parte b): la Dashboard al posto di Attività, prima voce e
pagina iniziale, compatta, con l'anteprima del browser sempre visibile e le miniature di
ciò che è arrivato. La prima parte (d6c0ef8) aveva già pagina, rotte e anteprima; qui si
chiude ciò che mancava.
- La finestra di Febe per Windows apre /dashboard?gettone=… (non più /): tolto il
gettone l'indirizzo resta /dashboard.
- La voce Dashboard ha un'icona sua, layout-dashboard, disegnata in casa.
- Cronologia: anche le righe del Giro dei seguiti, che non hanno un account, mostrano le
miniature di ciò che è arrivato di tutti gli account; mai gli elementi importati. Indice
ix_entry_discovered nella migrazione 0002 (non ancora unita), così la domanda legge
solo le righe dei minuti della ricetta anche con 200.000 elementi.
- Anteprima ingrandita: le frecce funzionano anche con il fuoco sui pulsanti del piede,
«Apri l'account» segue l'elemento mostrato, chiudendo non si disegna più nulla.
- Al telefono il cruscotto è più basso (anteprima 196 px, miniature 40 px).
- Guida: «Attività e arresti» diventa «Dashboard e arresti», collegamenti e testi delle
altre pagine aggiornati; differenze dai mockup in docs/schermate/differenze.md; quattro
righe in docs/decisioni.md.
- Prove: DashboardApiTests (riga del Giro, importati esclusi, domande sbagliate),
DesktopCompositionTests (/dashboard), GuideTests; DashboardInterfaceTests con Chromium
(miniature, anteprima, frecce, Esc, una colonna sotto i 1000 px), solo nella CI.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0547c747c5
commit
34fe5e9073
31 files changed
+265
-78
No files matched your search
@@ -201,15 +201,22 @@ internal sealed class EntryStore(FebeDatabase db) : IEntryStore
|
||||
ct);
|
||||
}
|
||||
|
||||
public Task<ArrivedEntries> ListDiscoveredAsync(long accountId, DateTimeOffset from, DateTimeOffset to, int limit, CancellationToken ct = default) =>
|
||||
// The window of a recipe is a few minutes: the range on ix_entry_discovered (migration 0002) reads only those rows,
|
||||
// whatever the size of the library or of the account.
|
||||
private const string ArrivedWhere = """
|
||||
discovered_at >= @f AND discovered_at <= @t AND (@a IS NULL OR account_id = @a) AND provenance = @p AND state <> 'Deleted'
|
||||
""";
|
||||
|
||||
public Task<ArrivedEntries> ListDiscoveredAsync(long? accountId, DateTimeOffset from, DateTimeOffset to, int limit, CancellationToken ct = default) =>
|
||||
db.ReadAsync(
|
||||
c =>
|
||||
{
|
||||
var ids = new List<long>();
|
||||
using (var r = c.Command("""
|
||||
SELECT id FROM entry WHERE account_id = @a AND discovered_at >= @f AND discovered_at <= @t AND state <> 'Deleted'
|
||||
using (var r = c.Command($"""
|
||||
SELECT id FROM entry WHERE {ArrivedWhere}
|
||||
ORDER BY discovered_at DESC, id DESC LIMIT @l
|
||||
""").With("@a", accountId).With("@f", Sql.Time(from)).With("@t", Sql.Time(to)).With("@l", (long)Math.Clamp(limit, 1, 100)).ExecuteReader())
|
||||
""").With("@a", accountId).With("@f", Sql.Time(from)).With("@t", Sql.Time(to)).With("@p", Sql.Enum(Provenance.Downloaded))
|
||||
.With("@l", (long)Math.Clamp(limit, 1, 100)).ExecuteReader())
|
||||
{
|
||||
while (r.Read())
|
||||
{
|
||||
@@ -217,9 +224,9 @@ internal sealed class EntryStore(FebeDatabase db) : IEntryStore
|
||||
}
|
||||
}
|
||||
|
||||
var total = (int)c.Command("""
|
||||
SELECT COUNT(*) FROM entry WHERE account_id = @a AND discovered_at >= @f AND discovered_at <= @t AND state <> 'Deleted'
|
||||
""").With("@a", accountId).With("@f", Sql.Time(from)).With("@t", Sql.Time(to)).ScalarInt64();
|
||||
var total = (int)c.Command($"""
|
||||
SELECT COUNT(*) FROM entry WHERE {ArrivedWhere}
|
||||
""").With("@a", accountId).With("@f", Sql.Time(from)).With("@t", Sql.Time(to)).With("@p", Sql.Enum(Provenance.Downloaded)).ScalarInt64();
|
||||
return new ArrivedEntries(ids, total);
|
||||
},
|
||||
ct);
|
||||
|
||||
Reference in new issue
Block a user