fix: review of round 5 against its contracts: a hand-added stamp never joins a referenced line, an open preview reminds only in Arte recebida, previews in the history, the proof in Minha conta

Found re-reading A1-D6 with the interaction contracts: Adicionar merged
into a pasted line and printed its reference; a preview left open after
the card moved or was cancelled kept its flag and the 3 h reminder; the
reject reason said it stays in the history, which only listed moves; the
"com prova" summary (B3) was missing in Minha conta; removing every
line kept the pasted list's batch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Cauê Faleiros
2026-11-30 15:03:02 -03:00
parent 9e0d33ef47
commit 28c10aabf6
4 changed files with 14 additions and 2 deletions

View File

@@ -667,6 +667,7 @@ function montarPaintLines(){
function montarRemoveLine(line){
URL.revokeObjectURL(line.url);
MONTAR.lines=MONTAR.lines.filter(other=>other!==line);
if(!MONTAR.lines.length)MONTAR.batch=null;
montarChanged();
}
function montarClear(){
@@ -693,7 +694,9 @@ async function montarAdd(){
if(found.widthCm>56)return say('A estampa tem '+cm(found.widthCm)+' cm de largura: o máximo é 56 cm.');
const dpi=montarDpi(found);
if(dpi<MONTAR_DPI_REFUSE)return say('A estampa tem só '+Math.floor(dpi)+' DPI em '+size.letter+': pequena demais.');
const existing=MONTAR.lines.find(line=>line.code===code&&line.letter===size.letter);
// A line from a pasted list carries its reference printed under the stamp:
// a stamp added by hand never joins it.
const existing=MONTAR.lines.find(line=>line.code===code&&line.letter===size.letter&&!line.ref);
if(existing){existing.qty=Math.min(9999,existing.qty+qty);montarChanged();return;}
const url=URL.createObjectURL(found.file),picture=montarStampImage(url);
MONTAR.lines.push({id:++MONTAR.seq,code,letter:size.letter,widthCm:found.widthCm,qty,