Repository navigation
Mate 4.15.2 — A charge's chart comes as its row opens
Mate 4.15.2 — A charge's chart comes as its row opens
Two changes by @arekm, #417 and
#418, and a fix to the diagnostic bundle
(#338).
What changes
The chart of a charge appears when its row opens, and draws no more readings than it has pixels (#417, @arekm)
The chart under an opened charge on the Charges page was asked for only when its place scrolled into
view. On a phone the opened row runs past the bottom edge with the chart at its end, so nothing was
asked for until a scroll. And the chart drew every reading: a night's charge has two thousand and more,
and drawing them took over a second.
Now:
- the chart is asked for as the row opens, wherever its body lands. A row nobody opens still asks for
nothing, a row opened and closed asks once, and a link to a charge still opens its row and loads its
chart; - the chart draws at most one reading per pixel of its width: every K-th one, the last, and the
readings on either side of a pause. Each point drawn is a real reading at its own time, and the hover
box shows it as read, never an average. A pause still breaks the line where it did; - a charge with no more slots than the chart has pixels (up to about eight hours on a desktop) draws
every reading, as before; - the same chart on the Wallbox page and in the panel of the running charge is thinned the same way.
An opened charge row comes into view with its chart (#418, @arekm)
A charge row opened in the lower part of the screen grew below the bottom edge, and its chart had to be
scrolled to by hand. Now, once its chart is drawn, the page scrolls as little as shows the whole row, or
brings the row's top to the top of the screen, below any banner there, when the row is taller than the
screen. A row already whole on the screen does not move; rows opened by Expand all, by a link to a
charge or after a merge or a split stay where they are; a row closed before its chart comes is not
scrolled to.
Diagnostics: "SoC by day" counts a day's own kilometres (#338)
The SoC by day section of the diagnostic bundle took a day's highest odometer minus its lowest. A
reading without an odometer is stored as 0, and before 4.14.1 a reading of the other car on an account
could be filed under this one, so in a bundle on #338 a T03's days read "drove 9228 km", and another
"drove 8573 km" with the other car's 96.8 %. Now a reading without an odometer does not count for the
km, and one more than 1,500 km from the day's median odometer is left out of the day's km and SoC and
counted apart on that day's line ("⚠ 1 reading(s) over 1500 km off the day's odometer, left out
(another car's?)"). Only the bundle changes: no page reads this section.
Also
- Manuals: the 4.15.0 section says a charge under 3 A is a home charge under about 2.2 kW on a C10, at
about 720 V, where it said "on an 800 V car". - Tests: the test of the running charge's chart took its plug-in time once, at import, and the LIVE
badge needs a reading under five minutes old, so a run that reached it more than four minutes in
failed. The time is now taken as each test starts.
Upgrade impact
- Nothing is migrated: no table, column or setting changes.
- A long charge's chart draws fewer points than before, each a real reading; the lines look the same.
- A row opened by hand near the bottom of the screen moves the page once its chart is drawn.
Verification
- CI green on the tag: 5,639 passed, 1 skipped, plus 48 passed and 2 skipped on the Windows job;
the check that the released desktop shell still runs this Mate is green. - Locally, in the CI's image with Node.js and a MateDesktop checkout added: 5,639 passed, 1 skipped
(a local-only reference file the clone does not carry). - On 4.15.1, 8 of the new or adapted browser tests of #417 and #418 fail, and here they pass; the 3 new
tests of the diagnostics fix failed before it. The test of the running charge's chart failed on
4.15.1 with the run held 250 s after collecting, and passes with the same hold. - Measured on Mate's demo data in Chromium, on a 19-hour charge of 2,280 readings: at 1280 px,
1,943 ms → 440 ms from the click to the chart, with 761 readings drawn instead of 2,280 and the same
lines; at 390 px the chart comes without a scroll, in 194 ms, with 286 readings. A row opened at the
bottom edge of the screen: at 1280×800 it ran to 945 px and now ends on the edge, at 800; at 390×844
it ran to 989 px and now ends on the edge, at 844, chart in view. No page errors. - The Docker image, built from this release, ran on the test instance (one car) with a real database
before the tag: every page answers as on 4.15.1; the six latest charges' charts are served with the
thinning, and the day drawer asks for its chart on the opening; SoC by day reads as on 4.15.1 on
this car's data, which has no reading of another car; the log has no errors. - Not tried: Firefox, a real phone, the add-on behind Home Assistant.
Italiano
Mate 4.15.2 — Il grafico di una ricarica arriva quando si apre la riga
Due modifiche di @arekm, la #417 e la
#418, e una correzione del pacchetto di
diagnostica (#338).
Cosa cambia
Il grafico di una ricarica arriva quando si apre la riga, e non disegna più letture dei pixel che ha (#417, @arekm)
Il grafico sotto una ricarica aperta nella pagina Ricariche veniva chiesto solo quando il suo posto
entrava nello schermo. Sul telefono la riga aperta va oltre il bordo in basso, con il grafico alla fine,
quindi non veniva chiesto niente finché non si scorreva. E il grafico disegnava ogni lettura: una
ricarica notturna ne ha duemila e più, e disegnarle richiedeva più di un secondo.
Ora:
- il grafico viene chiesto quando si apre la riga, ovunque finisca il suo contenuto. Una riga che
nessuno apre continua a non chiedere niente, una riga aperta e chiusa chiede una volta sola, e un
link a una ricarica apre ancora la sua riga e carica il suo grafico; - il grafico disegna al massimo una lettura per ogni pixel di larghezza: una ogni K, l'ultima, e le
letture subito prima e subito dopo una pausa. Ogni punto disegnato è una lettura vera alla sua ora, e
il riquadro al passaggio del mouse la mostra com'è stata letta, mai una media. Una pausa interrompe
ancora la linea dove la interrompeva; - una ricarica che non ha più posizioni dei pixel del grafico (fino a circa otto ore sul computer)
disegna ogni lettura, come prima; - lo stesso grafico nella pagina Wallbox e nel pannello della ricarica in corso viene sfoltito allo
stesso modo.
Una riga di ricarica aperta si mette in vista con il suo grafico (#418, @arekm)
Una riga di ricarica aperta nella parte bassa dello schermo cresceva sotto il bordo in basso, e il suo
grafico andava raggiunto scorrendo a mano. Ora, quando il suo grafico è disegnato, la pagina scorre
quanto basta a mostrare la riga intera, o porta l'inizio della riga in cima allo schermo, sotto
l'eventuale banner, quando la riga è più alta dello schermo. Una riga già tutta sullo schermo non si
muove; le righe aperte con Espandi tutto, da un link a una ricarica o dopo un'unione o una divisione
restano dove sono; una riga chiusa prima che arrivi il suo grafico non viene raggiunta.
Diagnostica: «SoC by day» conta i chilometri del giorno stesso (#338)
La sezione SoC by day del pacchetto di diagnostica prendeva il contachilometri più alto del giorno
meno il più basso. Una lettura senza contachilometri è salvata come 0, e prima della 4.14.1 una lettura
dell'altra auto di un account poteva finire sotto questa, quindi in un pacchetto della #338 i giorni di
una T03 dicevano «drove 9228 km», e un altro «drove 8573 km» con il 96,8 % dell'altra auto. Ora una
lettura senza contachilometri non conta per i km, e una che dista più di 1.500 km dal contachilometri
mediano del giorno viene tolta dai km e dal SoC del giorno e contata a parte sulla riga di quel giorno
(«⚠ 1 reading(s) over 1500 km off the day's odometer, left out (another car's?)»). Cambia solo il
pacchetto: nessuna pagina legge questa sezione.
Inoltre
- Manuali: la sezione della 4.15.0 dice che una ricarica sotto i 3 A è, su una C10, a circa 720 V, una
ricarica di casa sotto i 2,2 kW circa, dove diceva «su un'auto a 800 V». - Test: il test del grafico della ricarica in corso prendeva l'ora di collegamento una volta sola,
all'import, e il badge LIVE vuole una lettura con meno di cinque minuti, quindi una suite che arrivava
a quel test dopo più di quattro minuti falliva. Ora l'ora si prende all'inizio di ogni test.
Impatto dell'aggiornamento
- Niente viene migrato: nessuna tabella, colonna o impostazione cambia.
- Il grafico di una ricarica lunga disegna meno punti di prima, ognuno una lettura vera; le linee
sembrano le stesse. - Una riga aperta a mano in fondo allo schermo fa scorrere la pagina quando il suo grafico è disegnato.
Verifica
- CI verde sul tag: 5.639 passati, 1 saltato, più 48 passati e 2 saltati sul job Windows; il
controllo che il guscio desktop pubblicato faccia ancora girare questa Mate è verde. - In locale, nell'immagine della CI con Node.js e una copia di MateDesktop aggiunti: 5.639 passati,
1 saltato (un file di riferimento solo locale che la copia non porta). - Sulla 4.15.1 falliscono 8 test nuovi o adattati, nel browser, della #417 e della #418, e qui passano;
i 3 test nuovi della correzione della diagnostica fallivano prima della correzione. Il test del
grafico della ricarica in corso falliva sulla 4.15.1 con la suite fermata 250 secondi dopo la
raccolta dei test, e passa con la stessa attesa. - Misurato sui dati dimostrativi di Mate in Chromium, su una ricarica di 19 ore da 2.280 letture: a
1280 px, dal clic al grafico 1.943 ms → 440 ms, con 761 letture disegnate invece di 2.280 e le stesse
linee; a 390 px il grafico arriva senza scorrere, in 194 ms, con 286 letture. Una riga aperta sul
bordo in basso dello schermo: a 1280×800 arrivava a 945 px e ora finisce sul bordo, a 800; a 390×844
arrivava a 989 px e ora finisce sul bordo, a 844, con il grafico in vista. Nessun errore nella pagina. - L'immagine Docker, costruita da questa versione, ha girato sull'istanza di prova (una sola auto) con
un database vero prima del tag: ogni pagina risponde come sulla 4.15.1; i grafici delle sei ricariche
più recenti arrivano con lo sfoltimento, e il pannello del giorno chiede il grafico all'apertura;
SoC by day si legge come sulla 4.15.1 sui dati di quest'auto, che non hanno letture di un'altra
auto; nel log non ci sono errori. - Non provati: Firefox, un telefono vero, l'add-on dentro Home Assistant.