Commit Graph

453 Commits

Author SHA1 Message Date
Cauê Faleiros
52b8bb368f test: the test client waits out the gateway's rate limit instead of failing
All checks were successful
Build and deploy / Validate source (push) Successful in 4s
Build and deploy / Integration suite on a real stack (push) Successful in 6m32s
Build and deploy / Secret scan and release gate (push) Successful in 9s
Build and deploy / Publish images (push) Successful in 1m17s
upload_limits_test sends about 300 requests in a few seconds (70 upload starts
and deletes, a 30-upload burst, 66 sheets), past nginx's 20 r/s with a burst
of 100 per address. On a busy runner the gateway answered 429 and the suite
failed (runs 298, 301, 302, and 303 twice). The shared client now waits a
second and retries when the 429 is nginx's HTML page; the API's own 429s, which
the suites check with expected=429, are unchanged, and so is the production
limit.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-16 12:53:30 -03:00
Cauê Faleiros
08b822104c Merge new layout phases E, F step 2 and G (order panel, Ficha, Números, phone)
Some checks failed
Build and deploy / Validate source (push) Successful in 6s
Build and deploy / Integration suite on a real stack (push) Failing after 1m27s
Build and deploy / Secret scan and release gate (push) Successful in 5s
Build and deploy / Publish images (push) Has been skipped
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-16 12:45:21 -03:00
Cauê Faleiros
3d01b81a31 feat: new layout phase G, the phone as on the canvas
The bottom bar keeps Produção, Cotações, Pagamentos and Números; Mais opens
a sheet with the other sections (Montar, Site, Integrações, Usuários, as the
role allows, with the rail's icons) and the account (theme, password, Sair)
under their own headings, as in Ph1 and Ph2. Stage chips drop their icons and
keep the fade at the edge; the contraction fields take the full width in the
order page (Ph3). Números on the phone names each stage's limit, overruns and
waiting orders, and Por origem fits its five columns.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-16 12:45:21 -03:00
Cauê Faleiros
b3daed649a fix: new layout phase E review, the art preview stays and the live camera is not covered
The item keeps its Arte / Montagem preview, folded under the facts as
"Prévia da arte", so an item without a picture still has no empty column.
The Prumo, preview and Originais disclosures share one row style with a
turning chevron; Originais is hidden when there are none. In Revisão the
camera label no longer sits over the live video, a live camera takes the
whole row, and the no-camera line is a plain note as in D2.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-16 12:33:45 -03:00
Cauê Faleiros
ccdd72c4ce Merge new layout phase F step 2 (Ficha, Números) 2026-11-16 11:52:56 -03:00
Cauê Faleiros
9a0efb3b41 Merge new layout phase E (order panel) 2026-11-16 11:52:55 -03:00
Cauê Faleiros
fb23b63090 feat: new layout phase E, the order panel and Revisão as on the canvas
Roadmap Novo Layout, phase E (canvas P2, D2, Ph3): the panel without the
empty column (the item preview stays in Cotações and Abrir e conferir),
Próximo passo with its actions together and the primary last, the item
facts in a four-column grid (the secondary facts kept in a second row),
the Cliente, Entrega and Máquina blocks, and the Revisão dialog with the
camera card and the drop area. Every nextBox branch, action and
permission is unchanged. Built by Prensa.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-16 11:52:54 -03:00
Cauê Faleiros
a34d8e1888 feat: new layout phase F, Ficha da máquina and Números as on the canvas
Roadmap Novo Layout, phase F step 2 (canvas U2, N1): the machines list as
compact rows with their status line; the machine sheet in the shared
dialog with a fixed head and the tabs Situação, Lançamentos and Dados da
máquina (launch rule unchanged); Números as one scrolling page with the
four headline cards, Metros por dia, Produção, Vendas and Consulta
groups. The people list and roles matrix are untouched. Built by Bobina.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-16 11:52:39 -03:00
Cauê Faleiros
243138fea1 Merge test-order quote message (DTF-WEB-D)
All checks were successful
Build and deploy / Validate source (push) Successful in 6s
Build and deploy / Integration suite on a real stack (push) Successful in 6m35s
Build and deploy / Secret scan and release gate (push) Successful in 6s
Build and deploy / Publish images (push) Successful in 1m22s
2026-11-16 11:52:36 -03:00
Cauê Faleiros
e8423bec45 fix: a quote held by a test order says so, and its panel closes
Sentry DTF-WEB-D: after "Criar pedido de teste" the quote panel kept
offering "Pedido pago fora do site", and the register answered "Esta
cotação já virou o pedido #N" without saying it was the test order.
The message now names the test order and says to delete it to register
the payment; creating the test order closes the quote panel.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-16 11:28:48 -03:00
Cauê Faleiros
392a21082e feat: new layout phase F, Montar as on the canvas
Some checks failed
Build and deploy / Validate source (push) Successful in 12s
Build and deploy / Publish images (push) Has been cancelled
Build and deploy / Secret scan and release gate (push) Has been cancelled
Build and deploy / Integration suite on a real stack (push) Has been cancelled
Roadmap Novo Layout, phase F step 1 (canvas M1, M2, M3): the header with
the folder chip and Ajustes; "Adicionar estampa" by code with the found
card; the sheet list with steppers, metres and the live packed preview;
the side panel with Interno/Venda by role, the Tiny customer card,
delivery as real radio choices, brand per stamp and sticky totals; the
"Escolha a pasta dos pedidos" state; and Ajustes (sizes and the internal
customer) in the shared dialog with one save. Same reads, packing,
permissions and API calls. Built by Bobina.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-16 11:05:06 -03:00
Cauê Faleiros
040ef46f94 Merge review photo checks (DTF-WEB-B, C)
All checks were successful
Build and deploy / Validate source (push) Successful in 9s
Build and deploy / Integration suite on a real stack (push) Successful in 7m11s
Build and deploy / Secret scan and release gate (push) Successful in 6s
Build and deploy / Publish images (push) Successful in 1m10s
2026-11-16 10:37:44 -03:00
Cauê Faleiros
9e5811d58f Merge new layout phase D (production board, stage times) 2026-11-16 10:37:44 -03:00
Cauê Faleiros
92ffb679d6 fix: the review photo is measured before sending, and a drag to Finalizado without it opens Revisão
Sentry DTF-WEB-C and DTF-WEB-B (order #24, 16/11): a review photo under
1600 px on its longer side was refused only after the upload (a 1280x720
webcam always is), and dragging the card to Finalizado without the photo
got the server's 409. The dialog now says the minimum, the camera shot
and a chosen photo are measured in the browser with the same message,
and the drop opens Revisão instead of a refused move.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-16 10:37:44 -03:00
Cauê Faleiros
2c740da4c1 feat: new layout phase D, the production board and stage times as on the canvas
Roadmap Novo Layout, phase D step 2 (canvas A1, D1): a late card gets
the red border and red time (warn colour for a warn late) instead of the
Atrasados strip, which is no longer shown (renderLatebar kept for later);
machine lanes with name, blocking-alert dot, free places and dashed free
slots; compact Finalizado cards; the phone stage chips fade at the edge.
"Tempo aceitável de cada etapa" is a table (Etapa, Aceitável, Responde
pela etapa) with the same API. Built by Prensa.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-16 10:17:20 -03:00
Cauê Faleiros
d6c80ff447 Merge 503 during a database restart (DTF-API-8, 9)
All checks were successful
Build and deploy / Validate source (push) Successful in 1m22s
Build and deploy / Integration suite on a real stack (push) Successful in 7m6s
Build and deploy / Secret scan and release gate (push) Successful in 9s
Build and deploy / Publish images (push) Successful in 1m44s
2026-11-16 09:46:37 -03:00
Cauê Faleiros
4e6f96bfe2 Merge board and order panel files (plan 007e) 2026-11-16 09:46:37 -03:00
Cauê Faleiros
ee772a43ff refactor: the production board and the order panel in files of their own
Plan 007e (Critical Corrections 7, last step; layout Phase D step 1):
web/kanban-board.js holds the board and the phone screens, and
web/kanban-order.js the order panel, its dialogs, the final files and
Abrir e conferir, moved verbatim from kanban.js (now 952 lines). The
browser test also walks the phone board. Built by Prensa.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-16 09:46:36 -03:00
Cauê Faleiros
bcba1fbe67 fix: a request during a database restart answers 503, and the logs stay quiet
Sentry DTF-API-8/9 (stack restart, 16/11 09:15): the startup retry kept
the API up, but a board request in the ~7 s without the database got a
500, and the render thread logged its error every 2 s. A request that
hits psycopg.OperationalError now answers 503 "O servidor está
reiniciando" with Retry-After (the web does not report it); the render
thread warns once per outage and backs off; the worker's first outage
line and the audit's connection outage are warnings.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-16 09:32:50 -03:00
Cauê Faleiros
00c7fa3dfa Merge new layout phase B (Site tab)
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 6m57s
Build and deploy / Secret scan and release gate (push) Successful in 5s
Build and deploy / Publish images (push) Successful in 1m16s
2026-11-13 16:39:06 -03:00
Cauê Faleiros
2478c05ae6 Merge new layout phase C (Cotações) 2026-11-13 16:39:06 -03:00
Cauê Faleiros
70bdaf1a8d feat: new layout phase B, the Site tab as on the canvas
Roadmap Novo Layout, phase B (canvas S1 to S6): tabs Produtos e preços,
Cupons, Nota da arte and Vídeos; the products table with the on/off
switch, bands and next change; the price dialog with Agora/Agendar on
the Kanban calendar (calendar() takes options, Números unchanged), bands
and the live "O cliente vê" line; coupons, grade rules and videos in
tables with their dialogs; stacked rows and full-screen dialogs on the
phone. Same API calls and rules as before. Built by Prensa.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-13 16:39:06 -03:00
Cauê Faleiros
0e247e6b4c feat: new layout phase C, Cotações as on the canvas
Roadmap Novo Layout, phase C (canvas C1, C2): list rows with thumb,
product line, total and expiry; the "Tudo revisado" empty state with one
action to the quotes waiting for payment; the open quote with header,
total, facts in three columns, notes, Originais and the footer actions.
"Pedido pago fora do site" is now a dialog from the footer. Nothing
removed; the e-mail stays in the header. Built by Bobina.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-13 16:22:01 -03:00
Cauê Faleiros
8fa76b7819 Merge redeploy database retry (DTF-API-2..7)
All checks were successful
Build and deploy / Validate source (push) Successful in 10s
Build and deploy / Integration suite on a real stack (push) Successful in 7m0s
Build and deploy / Secret scan and release gate (push) Successful in 9s
Build and deploy / Publish images (push) Successful in 1m23s
2026-11-13 15:31:39 -03:00
Cauê Faleiros
fe224cfc9c Merge new layout phase A (Phosphor icons, shared pieces) 2026-11-13 15:31:39 -03:00
Cauê Faleiros
034f3bfbb5 feat: new layout phase A, Phosphor icons and shared pieces
Roadmap Novo Layout, phase A: every icon (IC, the stage marks, the rail
and the inline icons in kanban.html, the theme toggle and the select
chevrons) is Phosphor regular, filled at 256. Shared pieces from the
canvas for the next phases: switch, tag, data table, dialog scoping,
two- and three-column grids, tab counts in the lighter grey, and 44 px
controls on the phone. Built by Prensa.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-13 15:31:38 -03:00
Cauê Faleiros
445d686f43 fix: a redeploy's short database outage no longer takes the API down
Sentry DTF-API-2..7 (redeploy of 5a7fc0f, 13/11): the name db did not
resolve for about 12 s; the new API exited at startup and the worker and
audit() logged the error every second. The API now waits up to 90 s with
a backoff, the worker reports an outage once and backs off to 15 s, the
audit persistence error is logged at most once a minute, and api, site
and kanban update start-first so the old container serves meanwhile.

Built by Bobina.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-13 15:25:29 -03:00
Cauê Faleiros
5a7fc0f378 Merge Abrir e conferir fix for paid Ajuste Fino (DTF-WEB-A)
All checks were successful
Build and deploy / Validate source (push) Successful in 1m4s
Build and deploy / Integration suite on a real stack (push) Successful in 7m11s
Build and deploy / Secret scan and release gate (push) Successful in 10s
Build and deploy / Publish images (push) Successful in 1m54s
2026-11-13 14:38:49 -03:00
Cauê Faleiros
9ae865619e fix: Abrir e conferir sends a paid Ajuste Fino order to Tratar a arte
DTF-WEB-A: closing the viewer on an order with Ajuste Fino or Redesenho
paid approved the original as the final and then tried the move, which
the server refused (the queue needs the treated PNG). The dialog now says
the treated art is missing and opens Tratar a arte, approving nothing.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-13 14:24:51 -03:00
Cauê Faleiros
6be7e15f9f Merge Kanban fixes for Sentry DTF-WEB-4..7 and the Site tab price
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 6m57s
Build and deploy / Secret scan and release gate (push) Successful in 6s
Build and deploy / Publish images (push) Successful in 1m15s
2026-11-12 16:05:26 -03:00
Cauê Faleiros
eef899e838 fix: Site tab, an empty Novo preço keeps the current price
The grey 9,90 in Novo preço is only a hint; saving a band with the field
empty refused with "Informe o preço em reais". Empty now keeps the current
price, and Salvar sits below the bands it saves with the price.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-12 15:48:42 -03:00
Cauê Faleiros
d0ec629c4e fix: Kanban pulls and final approvals stop failing on stale or missing context
Sentry DTF-WEB-4..7 (12/11):
- Pulling a card with no machine asks which machine takes it (gestão and
  admins); an operator always pulls to the machine of their session.
- The alert before a pull only offers Feito/Adiar to the machine's own
  operator or management, as the machine sheet does.
- A final-file approval from a dialog opened before the same approval
  went through reloads and says it was already approved, instead of the
  409 "O pedido mudou".

Built by Prensa; machine cards shared between the two choosers.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-12 15:48:41 -03:00
Cauê Faleiros
7abd215d13 Merge timings fix (DTF-WEB-9)
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 6m48s
Build and deploy / Secret scan and release gate (push) Successful in 6s
Build and deploy / Publish images (push) Successful in 1m12s
2026-11-12 15:34:41 -03:00
Cauê Faleiros
e80f376d91 fix: an out-of-range cart timing is dropped, never refuses the quote
DTF-WEB-9: a cart left open for about 6 hours sent upload_ms 23556292,
above the 1 h limit, and POST /quotes answered 422: the customer could
not pay. The timings only feed Números, so a value out of range is now
dropped; an unknown field is still refused.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-12 15:34:41 -03:00
Cauê Faleiros
b8ee3fb35a Merge approve fix for reviewed quotes (DTF-WEB-8)
All checks were successful
Build and deploy / Validate source (push) Successful in 7s
Build and deploy / Integration suite on a real stack (push) Successful in 6m51s
Build and deploy / Secret scan and release gate (push) Successful in 6s
Build and deploy / Publish images (push) Successful in 1m15s
2026-11-12 15:20:12 -03:00
Cauê Faleiros
057643e167 fix: approving a reviewed quote no longer sends the acceptance stamps back
A quote held for review whose customer accepted the residue or the
stroke warning failed with "Confira os campos (422)" (DTF-WEB-8): the
server stamps residue_accepted_at and stroke_choice_at on the draft's
items, the Kanban sent the items back whole, and the item model forbids
extra fields. The metres field also showed the float noise of the draft
(212,32800000000012); it now shows up to three decimals.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-12 15:20:12 -03:00
Cauê Faleiros
9cf4da0dea Merge render limit per part (order #20)
All checks were successful
Build and deploy / Validate source (push) Successful in 12s
Build and deploy / Integration suite on a real stack (push) Successful in 7m38s
Build and deploy / Secret scan and release gate (push) Successful in 7s
Build and deploy / Publish images (push) Successful in 1m29s
2026-11-12 15:03:17 -03:00
Cauê Faleiros
a17287a118 fix: a long film's print file gets a render limit per 15 m part
Order #20 (23.6 m, 24 pieces) failed with "Falhou ao gerar": the whole
film had one 15 min limit, and two parts at 300 DPI take longer on the
server. The limit is now PRINT_RENDER_TIMEOUT_SECONDS (default 20 min)
for each part, and each claim records its deadline, so the stale-claim
check and the card's "Tempo limite" follow the same limit. A timeout, or
a final failed attempt, is logged as an error so Sentry sees it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-12 15:03:16 -03:00
Cauê Faleiros
c42e273c5b Merge Ajuste Fino Redesenho in the cart (slice R1)
All checks were successful
Build and deploy / Validate source (push) Successful in 7s
Build and deploy / Integration suite on a real stack (push) Successful in 7m15s
Build and deploy / Secret scan and release gate (push) Successful in 7s
Build and deploy / Publish images (push) Successful in 1m16s
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-12 11:27:59 -03:00
Cauê Faleiros
57851abffc fix: the designer's extra hours come from the order's own record
designer_hours ignored the hours stored with the order's treatment; an order
keeps the hours it was sold with, 48/24 only when none are recorded.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-12 11:25:09 -03:00
Cauê Faleiros
461bd6bbcc refactor: the Redesenho line reads its SKU through the shared setting constants
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-12 11:09:49 -03:00
Cauê Faleiros
912bab0278 Merge branch 'main' into redesenho 2026-11-12 11:09:14 -03:00
Cauê Faleiros
0964cdae1f Merge Tiny details of 12/11: Boleto account, Ajuste Fino by SKU
All checks were successful
Build and deploy / Validate source (push) Successful in 6s
Build and deploy / Integration suite on a real stack (push) Successful in 6m53s
Build and deploy / Secret scan and release gate (push) Successful in 6s
Build and deploy / Publish images (push) Successful in 1m15s
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-12 11:09:11 -03:00
Cauê Faleiros
38f947d632 feat: Ajuste Fino Redesenho in the cart (Marcus 12/11, slice R1)
Under each art the Prumo warns about, the customer can choose Ajuste Fino
or Ajuste Fino Redesenho (vectorize or redraw, per art, +48 h, no batch
price). It is a disabled product until Gestão prices it in the Site tab;
the server charges it per chosen art, Tiny gets a DTFIMP.AJF.RED line and
two more business days, the card shows 'Redesenho · N artes' and the
designer gate applies. The preview loop is slice R2.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-12 11:05:17 -03:00
Cauê Faleiros
973cd87b36 feat: Boleto with its bank account and Ajuste Fino by SKU in Tiny (Marcus, 12/11)
A faturado montador order's installments carry the bank account set in
TINY_BOLETO_ACCOUNT as their meioPagamento (Tiny v3 parcelas[]), so Tiny
does not pick another account. The Ajuste Fino line resolves the product
from its code (TINY_SKU_TREATMENT, default DTFIMP.AJF.UN) unless a numeric
TINY_PRODUCT_TREATMENT is set; the connection check verifies it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-12 10:52:46 -03:00
Cauê Faleiros
5ca6792221 Merge Sentry bugs of 12/11: 96 DPI, pending uploads, error grouping
All checks were successful
Build and deploy / Validate source (push) Successful in 1m53s
Build and deploy / Integration suite on a real stack (push) Successful in 8m3s
Build and deploy / Secret scan and release gate (push) Successful in 10s
Build and deploy / Publish images (push) Successful in 1m49s
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-12 10:23:40 -03:00
Cauê Faleiros
1a756a0beb Merge branch 'bugs-1112-web' into integration 2026-11-12 10:09:20 -03:00
Cauê Faleiros
6896e6a161 fix: one Sentry issue per kind of API error; the expected 410 of a resumed upload is silent (Sentry 12/11)
Every failed API call landed in one issue titled Object.apiError; each now
has its own fingerprint and title from status, path and message, with ids
and file names normalized. The 410 of a recovered cart's expired upload
was already handled (the file goes up again from the stored copy); the
probe no longer reports it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-12 10:09:20 -03:00
Cauê Faleiros
31776ca353 fix: 96 DPI is accepted as the Site shows it; big carts upload 4 at a time (Sentry 12/11)
The server compared the raw lowest resolution (95,6) with 96 but printed
it rounded, refusing '96 DPI abaixo do mínimo de 96'; it now decides on the
same rounded value the Site shows. A big cart started every upload at once
and hit the limit of 10 pending uploads (429): the limit is 30, that
refusal carries Retry-After so the Site retries by itself, and the Site
runs at most 4 uploads at a time.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-12 09:38:51 -03:00
Cauê Faleiros
d3918e83dc Merge Critical Corrections plan 007d: Pagamentos and Integrações tabs in their own file
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 7m12s
Build and deploy / Secret scan and release gate (push) Successful in 7s
Build and deploy / Publish images (push) Successful in 1m32s
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-11 17:26:19 -03:00