fix: a handled "O pedido mudou" no longer reaches Sentry (DTF-WEB-7, DTF-WEB-K), and the 90-day chart is readable on a phone
All checks were successful
Build and deploy / Validate source (push) Successful in 5s
Build and deploy / Integration suite on a real stack (push) Successful in 7m35s
Build and deploy / Secret scan and release gate (push) Successful in 5s
Build and deploy / Publish images (push) Successful in 59s
All checks were successful
Build and deploy / Validate source (push) Successful in 5s
Build and deploy / Integration suite on a real stack (push) Successful in 7m35s
Build and deploy / Secret scan and release gate (push) Successful in 5s
Build and deploy / Publish images (push) Successful in 59s
saveFinalFiles and pullMove answer a stale-version 409 by reloading and trying once more, but api() had already reported it. The first call now expects the 409; one they cannot answer is still reported (reportRefusal), and any other status is reported by api() as before, once. Past a month the chart's gap is 1 px (90 bars were under 1 px each on a 375 px phone), and the last date ends at the chart's edge instead of being cut. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -356,6 +356,9 @@ function statsChart(box,daily){
|
||||
if(avg>0){const a=node('span',undefined,'avg');a.style.bottom=100*avg/ceiling+'%';plot.append(a);}
|
||||
const bars=node('div',undefined,'bars'),axis=node('div',undefined,'axis');axis.setAttribute('aria-hidden','true');
|
||||
bars.style.gridTemplateColumns=axis.style.gridTemplateColumns='repeat('+daily.length+',minmax(0,1fr))';
|
||||
// 90 days on a phone left the gaps no room for the bars (under 1 px each):
|
||||
// past a month the gap is 1 px.
|
||||
bars.classList.toggle('dense',daily.length>31);axis.classList.toggle('dense',daily.length>31);
|
||||
// A phone has room for fewer dates under the bars.
|
||||
const every=Math.ceil(daily.length/(PHONE.matches?5:10));
|
||||
daily.forEach((d,i)=>{
|
||||
@@ -363,7 +366,8 @@ function statsChart(box,daily){
|
||||
b.style.animationDelay=Math.min(i*12,400)+'ms';
|
||||
b.dataset.tip=shortDay(d.day)+': '+metres(d.metres)+', '+plural(d.orders,'pedido','pedidos');
|
||||
if(i<3)b.classList.add('tip-r');else if(i>daily.length-4)b.classList.add('tip-l');
|
||||
bars.append(b);axis.append(node('span',(daily.length-1-i)%every===0?shortDay(d.day):''));
|
||||
// The last date ends at the chart's edge instead of running past it.
|
||||
bars.append(b);axis.append(node('span',(daily.length-1-i)%every===0?shortDay(d.day):'',i===daily.length-1?'end':undefined));
|
||||
});
|
||||
plot.append(bars,axis);
|
||||
plot.setAttribute('role','img');plot.setAttribute('aria-label','Metros vendidos por dia, '+daily.length+' dias, média de '+metres(avg));
|
||||
|
||||
Reference in New Issue
Block a user