D1, prima parte: Dashboard al posto di Attività e «Cosa scaricare prima» generale

Richiesta di Alberto (#59): decidere cosa scaricare prima, una Dashboard compatta come
pagina iniziale da guardare mentre il motore lavora, e le miniature di ciò che è arrivato.

- Dashboard (§7.9, §10.2): /dashboard è la pagina iniziale e la prima voce della barra;
  /, /attivita, «Ho finito» del browser, il riquadro di stato e il ritorno dopo l'accesso
  portano lì. In alto l'anteprima del browser sempre visibile, chiesta ogni secondo mentre
  il motore lavora (LiveBrowserPreview cattura al più un fotogramma al secondo), accanto
  cosa sta facendo e i quattro tetti; poi la striscia più bassa, la cronologia con le
  miniature e la coda ridotta alle prime righe con «Mostra tutta». Sotto i 1000 px una
  colonna sola.
- Miniature della cronologia: /api/activity/arrived dà gli elementi che una ricetta ha
  salvato (account, inizio e fine della ricetta), chiesti solo quando la riga entra in
  vista, al più otto con «+N». Un clic apre un'anteprima leggera con foto o video senza
  audio, frecce fra i file della riga, Esc, «Apri nella Libreria» e «Apri l'account».
- «Cosa scaricare prima» (§7.2, §6.5): ordine generale dei tipi in Impostazioni → Limiti
  e comportamento (trascinare, «Su» e «Giù», nota sulle storie che scadono), predefinito
  storie, evidenza, post, reel, taggati. Dopo il giro, il lavoro dovuto si estrae con il
  peso dell'account per il peso del tipo (16, 8, 4, 2, 1): pesa, non rende fisso. La coda
  dei file segue lo stesso ordine.
- Prove: DownloadOrderTests (ordine, pesi, coda, motore con seme fisso: il primo tipo
  viene più spesso ma non sempre, il giro resta primo, un tipo senza lavoro non si
  visita), DashboardApiTests, una prova dell'interfaccia per / e /attivita.

Non ancora fatto: ordine per account e segno del reel (serve una migrazione da concordare
con E1), «Raggruppa i post» / «Tutte le foto», confronto con i mockup, revisione del
resto della guida che nomina ancora Attività.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-11-25 14:53:03 +01:00
1 parent 2068dd28f3
commit d6c0ef851d
38 files changed
+1468 -479

No files matched your search

+2 -2
View File
@@ -6,9 +6,9 @@
const SAFE = /^\/(?![\/\\])[^\\\s\u0000-\u001f\u007f-\u009f]*$/;
export const DEFAULT_PAGE = '/libreria';
export const DEFAULT_PAGE = '/dashboard';
/** The absolute address to open after the login, on <origin> only; the library when <value> is missing or unsafe. */
/** The absolute address to open after the login, on <origin> only; the Dashboard when <value> is missing or unsafe. */
export function returnAddress(value, origin) {
const fallback = new URL(DEFAULT_PAGE, origin).href;
if (typeof value !== 'string' || value.length > 2048 || !SAFE.test(value)) {
+6 -6
View File
@@ -1,5 +1,5 @@
// The frame of every page (spec §10.2): fixed 228 px sidebar with brand, Libreria, Account, Attività, Importa,
// separator, Impostazioni, and the status box always visible at the bottom; on the right the page: title row,
// The frame of every page (spec §10.2): fixed 228 px sidebar with brand, Dashboard (the start page, tappa D1), Libreria,
// Account, Importa, separator, Impostazioni, and the status box always visible at the bottom; on the right the page: title row,
// optional tools row, scrolling content, fixed bar for the actions that save. The red strip (mockup 11) appears under
// the title of every page while the engine is stopped and needs Alberto. Also the router of the addresses.
@@ -12,9 +12,9 @@ import { avatar, showError, toast, closeMenu } from './ui.js';
import { routes } from '../routes.js';
const NAV = [
{ key: 'dashboard', href: '/dashboard', icon: 'activity' },
{ key: 'libreria', href: '/libreria', icon: 'layout-grid' },
{ key: 'account', href: '/account', icon: 'users' },
{ key: 'attivita', href: '/attivita', icon: 'activity' },
{ key: 'importa', href: '/importa', icon: 'folder-input' },
'stacco',
{ key: 'impostazioni', href: '/impostazioni', icon: 'settings' },
@@ -37,13 +37,13 @@ export function buildShell(root) {
navLinks[item.key] = a;
return a;
});
statusBox = h('a.stato', { href: withCarried('/attivita'), 'aria-label': t('stato.riquadro') });
statusBox = h('a.stato', { href: withCarried('/dashboard'), 'aria-label': t('stato.riquadro') });
main = h('main.pagina', { id: 'contenuto', tabindex: '-1' });
fill(root,
h('a.salta', { href: '#contenuto' }, t('app.salta')),
h('div.app',
h('aside.barra',
h('a.marchio', { href: withCarried('/libreria') }, brand(), h('b', t('app.nome'))),
h('a.marchio', { href: withCarried('/dashboard') }, brand(), h('b', t('app.nome'))),
h('nav.nav', { 'aria-label': t('nav.principale') }, links),
h('div.molla'),
statusBox),
@@ -82,7 +82,7 @@ function renderStatus(state) {
h('div.conto', h('span', t('stato.profiliOggi')), h('span', `${meter.usedText} ${meter.limitText}`)),
who);
statusBox.title = s.details && s.details.length ? s.details.join(' ') : s.headline;
const attention = navLinks.attivita;
const attention = navLinks.dashboard;
if (attention) {
const dot = attention.querySelector('.punto');
if (s.banner && !dot) attention.append(h('span.punto', { role: 'img', 'aria-label': t('nav.fermo') }));