B1: an upload start was limited to 60 per 15 minutes per session, so a
66-file cart failed with 'Muitas tentativas'; now 1000 per session and
3000 per source, and the Site waits Retry-After and retries quietly.
B2: a failed file shows its error and 'Tentar de novo' on its own card, and
payment stays blocked with 'Falta enviar N arquivos'. B3: after signing in
again, an upload id the new session does not own (403) is dropped and the
file starts again. B4: the quote is never created before every file is
sent, and an untranslatable 422 is logged for Sentry.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
app/observability.py starts sentry-sdk for the API and the worker when
SENTRY_DSN_API is set, with send_default_pii off and a scrub that strips
cookies, tokens, bodies, CPF/CNPJ and e-mails. The browser loads the
official Sentry bundle from our own origin (web/vendor, provenance in its
README) and starts with SENTRY_DSN_WEB from /api/session or
/api/operator/me; every failed API answer the customer or the team gets is
reported with its path, status and message, never the request body. The
CSP allows Blyzer's Sentry ingest host.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The designer treatment becomes Ajuste Fino, priced per art with a batch
band set in the Site tab (e.g. R$ 9,90, from 10 arts R$ 6,90). Under each
art the Prumo warns about, the Site offers 'Quer que um designer resolva?
Ajuste Fino'; the cart keeps 'Ajuste Fino em todas as artes'. The server
counts the chosen arts, Tiny gets the line with that quantity, the card
shows 'Ajuste Fino · N artes'. Old carts asking the treatment for the
whole order keep working.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A Venda can now ship: CEP lookup, the address, and the Site's freight
options for the packed metres; the server quotes the freight again at
approval, adds it to the total and keeps the destination, so Tiny gets the
freight and carrier like a Site order.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
When an order reaches Finalizado, the Kanban on the computer that opted in
(Integrações > Etiqueta 10x15) prints a 10x15 label rendered by the server:
the Tiny order number in large type (DTF-<n> when there is none), customer,
DTF · N folhas · X m, the delivery line, date and time, the Revisor and a
QR with the number. One automatic print per order (label_prints, claimed
once); Revisor, Expedição, Gestão and the administrators can reprint.
Chrome with --kiosk-printing prints without the dialog.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Marcus, 2026-11-11: DTFIMP.TXP.100CM per metre and DTFIMP.TXP.0010CM to
0090CM per 10 cm, like the Têxtil family, not a single DTFP.TX.100CM.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Interno: the Expedição assembles the marketplace's own sales on the fixed
internal customer Gestão fills in once; no Tiny order, no paid e-mail,
marked interno, it stays in house. Venda: a Vendedor or Gestão picks the
customer from the Tiny base and the order goes to Tiny like an approved
quote, faturado (Boleto from TINY_RECEIPT_BOLETO when set), pickup or
'junto com o pedido de roupa nº X'. Números counts both at table price,
apart from cash (and the average ticket over cash orders only). Each stamp
can carry a brand and a public flag for the future catalogue.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Premium (8 passadas, R$ 39,90/m, SKU DTFP.TX.100CM) is a fifth textile
ready-sheet product: priced on the server and the Site, a hidden fifth card,
a PREMIUM hot-folder class, its Tiny SKU, and a products row created
disabled by a migration until Dropstar says 'testado'. A machine with no
typed minimum now alerts at Dropstar's fixed minimums: 1 roll of film, 1 L
of each ink, 5 kg of powder.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
create_quote downloaded every PDF sheet (up to 150 MB) and parsed it inside
the customer's request, behind nginx's 30 s. The worker's scan already reads
every upload before the Site lets the customer continue, so it now stores
the PDF's DPI on the upload (uploads.pdf_checked, pdf_dpi) and the checkout
reads the number. An upload scanned before this, or whose work-out failed,
is read at checkout as before (Critical Corrections 2, step 2).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Every db.connect() opened a new Postgres connection; with DB_POOL=on each
process keeps a psycopg_pool pool (DB_POOL_SIZE, default 20, 10 s
acquisition timeout, dropped connections replaced) with the same
commit/rollback contract. Production stays off until switched in Portainer;
the local stack and CI run with it on. Two nested acquisitions that ran on
every board load and in audits now reuse the caller's connection.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
app/cart_pricing.py prices a cart once for every caller: the catalog read
once, a pure price_items (base price, manual extra, splits, bands) pinned
against today's arithmetic by a 16-cart characterization test, then the
grade rules, the coupon and the treatment. create_quote and approve call
it instead of their two drifting copies; the Site's pre-check now counts
the manual-file extra like the approval does.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A pure move: the 48 Kanban routes, their code and comments are unchanged,
grouped in session, board, quotes, orders, rework, integrations, stats
and files, with shared helpers in common. The fast CI check now compiles
the package's files too (app/**/*.py does not reach a third level without
globstar).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The API ran as one uvicorn process, so a slow 150 MB PDF check at checkout
held every other request; WEB_CONCURRENCY now comes from API_WORKERS
(default 2, 1 restores one process) and the api /tmp grows to 512 MiB for
two checks at once. The worker delivered one outbox job per second; it now
drains up to 50 per pass before its periodic tasks.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Gestão sets in the Site tab below which grade the designer is warned and
below which the designer treatment is required (only while it is offered).
The decision is stored with the approved quote, so a later change never
rewrites old orders; the card shows 'Nota N: conferir a arte', the Site
forces the treatment box with the reason. With no rule nothing changes.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
schema.sql dropped and re-added three CHECK constraints on every start, so
an older image narrowed the lists and failed on rows written by a newer one
(an Expedição user, for example). They are now created only when missing,
and app/migrate.py applies timestamped files from app/migrations/ once each,
recording them in dtf_local.migrations; an older image skips names it does
not know. The first migration sets today's full lists. A CI step rehearses
the rollback on the real database inside a rolled-back transaction.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The montador sends each stamp to storage, splits the list into items of
at most 20 sources and 4000 copies, packs each one with the Site's engine
and creates the order in Arte recebida: typed customer, pickup, the Site's
table price, payment 'faturado', origin dropflow for Expedição and
atendimento otherwise. Until Dropstar decides, these orders do not go to
Tiny and the customer gets no paid e-mail. Vendedor and Expedição may now
upload through the operator upload routes (can_any).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Dropstar uploads the six videos themselves; 100 MB was our own limit and
could stop a longer video in the videos area. ClamAV scans up to 2000 MiB,
so 500 MB is still scanned.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Gestão creates coupons in the Site tab: a code, a percentage or an amount
per billed metre, validity, a minimum of metres, use limits in all and per
customer, one product or all, and a note; they can be paused and deleted
(kept for history). The customer types the code at checkout; the server
checks it when the quote is made and again at approval, discounts only the
eligible items after the bands (never freight or the treatment) and keeps
the coupon on the order. Tiny gets the discount, the e-mail and receipt
show it, the order panel carries a badge and Números counts orders,
metres, discount and money per coupon.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Dropstar uploads the six videos themselves, so the panel moves from
Integrações to the Site tab, next to products and prices. A video can be
published without a VTT: the Site plays it without a captions track.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A price may carry up to five bands, "from N m, R$ Y": the order's total
billed metres of that product chooses one price for its whole quantity,
the manual-file extra still on top. Bands start and become history with
their price row. The Site charges the same band for the cart, shows
"Faltam X m para R$ Y o metro" and lists the bands under the price
table; the Kanban's Site tab edits them.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Gestão and the administrators switch each product on and off and set its
price from a start date; a price that has started is history and cannot
change, a scheduled one can be cancelled. The Site and the server read
the current price; with no row the code's prices and TREATMENT_CENTS
still apply, so nothing changes until someone sets one. A switched-off
product disappears from the Site and new quotes with it are refused.
Approved quotes and paid orders keep their price.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The new Expedição profile and the seller may assemble sheets (capability
assemble). Gestão edits the size table (letter and width). The Montar tab
reads Estampas/<code>-<size>.png or <code>.png from the orders folder,
checks the resolution with the Site's 96/200 DPI ruler, merges repeated
lines and estimates the metres. Montar itself is slice 2.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
An order generated before item 13 had a PDF print file and no strips,
so the 100% viewer opened it blank. Those still in Arte recebida, with
no approved final and no customer correction, are generated again once
as PNG with strips (migration png-regenerate-v1).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A new Números section, "Máquinas, mês a mês", one column per machine
and a month at a time: metres printed, metres per hour and hours
running (time shared by two orders counted once), hours stopped with
their reasons; metres per film roll, ink per 100 m by colour, powder
per 100 m; supplies, parts and total cost per metre; what the printed
orders sold, the month's contribution and since installation; and the
return in % and months to pay back once Gestão types the price.
Refills stand for consumption. Every ratio without data shows "—".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The machine's name in Imprimindo (and "Ficha" in Usuários › Máquinas)
opens its sheet: metres since the last cleaning and since the last film
change, each supply's estimate, pending alerts and the entries. The room
enters supplies (film, ink by colour, powder; a supply without cost
takes the last one), parts (cap, damper, head, wiper, other) and events
(cleaning, head alignment, a stop with reason and minutes). Gestão types
the price, installation date and supply minimums.
Alerts appear when someone pulls the next card onto the machine, never
mid-print: 10 m since the last cleaning, 20 m after a film change
without aligning the head, and a supply at its minimum. Marked done it
records the event; postponed once it lets one more card through. The
server refuses the pull otherwise. Counters start when the sheet went
live (machines.log_since), not from everything printed before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In Revisão the card gets "Revisar": a photo or a video of up to 30 s of
the printed sheet, from the computer's or the phone's camera in the
browser, or a file already recorded. It is attached to the order as
DTF-<n>-revisao-<seq> with when and who, kept 180 days, and copied by
the computers with the order folders to Kanban/Revisões/. A photo needs
1600 px on its longer side. An order above 1 m cannot reach Finalizado
without one. In Finalizado the customer's order page shows the photo.
The Revisor, Gestão and the administrators take it (capability
"inspect"). Dialogs opened from a card's face or the board (Revisar,
Editar tempos) now show over the page when the order panel is closed;
inside the closed panel they were invisible.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A paid treatment adds its 24 h to Arte recebida's acceptable time, on
the card and in Números (fronts 5 and 11).
- TINY_PRODUCT_TREATMENT is a required Tiny setting once the treatment
has a price, instead of every treated order failing at the Tiny.
- A quote reads each PDF once: Files caches the header and the DPI.
- A proof made from the parent's final split into parts uses the part
that holds the finest stroke, not the last one (0.1).
- Prumo report: one format line per item, the time from the claim (kept
on the finished print file), and the stroke class in customer words.
- The Site says the Prumo checks the art, and a too-tall PNG no longer
says "Este PDF".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An approved quote with no payment expires on its own after 24 h, never
while a Pix or card attempt is still live: the worker marks
quotes.expired_at, frees its files and e-mails the customer that the
order expired and can be sent again on the Site. The backlog from before
this front expires silently.
Kanban: Cotações › Aguardando pagamento shows when each one expires and
the review gets an "Abrir conversa" WhatsApp button; Números gets
"Pedidos sem pagamento" (made, paid, expired, waiting, abandonment rate).
release_files moves to app/payments.py so the worker can use it; an
expired quote no longer counts as open there. New tests/unpaid_test.py
in the integration job.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A delivery is done when it leaves and a test card is not production. Only
pickup orders waiting in Finalizado can be late, and the top strip now
shows working columns; the finished pickup keeps its card colour and its
place in Números.
TREATMENT_CENTS sets a fixed price per order; 0 keeps the option hidden.
The cart shows the designer treatment and adds 24 h; the quote total and
Tiny line carry it, and the card gets the "Tratamento pago" label. The
designer uploads the treated file through the existing card flow.
Gestão edits the hours and the responsible for each column. A card past the
limit turns yellow, twice the limit red, and the board lists it under
Atrasados. Números compares the real median with the limit and counts the
passages that exceeded it in the period and today.