Changing the e-mail in Dados da conta took effect at once, with nothing
checking the new address: a typo locked the customer out, and anyone at a
signed-in computer who knew the password could move the account to their own
e-mail and then reset its password. Now the code goes to the new address, the
account changes only once it is entered (same screen and limits as signup,
and only the account that asked can complete it), and the old address gets
"O e-mail da sua conta foi trocado", with the WhatsApp to call if it was not
them. Without e-mail on, it changes at once as before.
Signup and e-mail change share one code check (expiry, five attempts, the
60 s resend wait). Tested: mail_test (wrong password, same and taken e-mail,
wrong code, another account's attempt, resend wait, the notice), the full
suite in a CI-style stack, and the screen in Brave.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Anyone could open an account on someone else's e-mail. Now "Criar conta"
e-mails a 6-digit code, and the account exists only once it is entered: one
big field that takes a paste or the phone's autofill and confirms by itself,
"Reenviar código" after 60 s, "Trocar e-mail", and the sign-in box hidden
meanwhile.
Security: 15 minutes per code, 5 wrong attempts, at most 5 codes, limits per
address and per source; the password is hashed at the first step and the code
stored only as a hash, its e-mail erased once sent. An address that already
has an account gets the same answer on screen and a "você já tem conta"
e-mail instead of a code, so the form does not reveal who is registered.
Without e-mail (MAIL_ADAPTER=off) the account is created at once, as before.
The browser test reads the code from a local-only endpoint that exists only
where e-mail stays in the log. Tested: mail_test (wrong, locked, resent,
expired codes, existing address, erasure after SMTP), the full suite and the
browser test in a CI-style stack, and the screens in Brave on desktop and phone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With "Aguardando contato" as a mark on the card, the stage only means the
team has checked the file, and its name now says so. The Kanban and the
customer's Minha conta both take stage names from the server, so this one
name changes both.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The 7 October meeting asked for a way to flag orders whose file needs a word
with the customer before printing: rename Arte tratada, or tag the card. A tag
keeps the stage meaning "file checked" and the order where it is in the
queue. In the order panel, "☎ Aguardando contato" asks what has to be agreed;
the card then shows the mark, the board has an "Aguardando contato" filter,
and the panel shows the note, who marked it and when, the customer's WhatsApp
and "Contato feito", which clears it. The customer is not told. Sellers see
the mark but cannot set it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pilot customers had no way to reset a forgotten password, and the 7 October
meeting asked for two things that only needed the client's inputs to go live.
Password recovery: "Esqueci minha senha" in Minha conta sends a link that
works once, for an hour (/conta/redefinir#token, in the fragment so it never
reaches a server or a Referer). Only the token's hash is stored, the e-mail's
text is erased once sent, the answer never says whether an account exists,
and a reset signs out every other session. Limited per address and source.
Team alerts: Kanban users who tick "Receber alertas por e-mail" in Usuários
get one when an order is paid, a cart waits for review, or a payment needs
attention. Messages are queued in the transaction that caused them and sent
by the worker with retries (app/mail.py). Integrações shows an E-mail row
with "Enviar teste".
E-mail is off in production (MAIL_ADAPTER=off; recovery keeps offering
WhatsApp) until the client's SMTP account exists; then it is only settings
(docs/PORTAINER.md). The local stack keeps messages in the database and log.
Files opened by hand: a finished sheet in CDR, AI, PSD or TIFF (or with a
length the customer typed) pays the full price plus MANUAL_FILE_EXTRA_CENTS
per metre, to steer customers to PNG as the meeting asked. It is 0 until
Marcus gives the amount. The Site shows it before checkout, the server
charges it, Tiny gets it in the unit price, and the Kanban says it.
Tested: new tests/mail_test (reset flow, SMTP delivery against a local SMTP
server, retry, who gets alerts), pricing unit tests, and the browser test now
checks the Site total equals the server's, run with the charge at 0 and at
R$ 5,00. The full CI suite passes in a CI-style stack.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The page was a grid of cards stuffed with paragraphs (Tiny's dates, the
freight's box and cubage, the Firefox how-to), so the cards had uneven
heights and left gaps. Each integration is now one row: name, state, one
line of summary and its main button. Everything else (dates, numbers,
how-tos, secondary buttons like Reconectar or Trocar pasta) opens under
"Detalhes", below its own row, without moving the others around; what is
open stays open through the automatic refresh. Mercado Pago's "Verificar
conta" now shows its result there instead of a 60-second message.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The folder was a small icon beside "Baixar" in Fila de impressão, easy to
miss, and in Brave it silently fell back to downloads that Brave blocks.
It is now a card in Integrações, which operators also see (only that card):
choose the folder FlexiPRINT reads, or the internal server's share, and
every order that enters the queue has its final files saved there.
- Brave hides the folder API behind a flag; the card says so, shows the
flag's address with a copy button, and points to Chrome or Edge.
- After a browser restart, a "!" on the Integrações tab and a "Liberar
pasta" button ask for the one click the browser requires.
- The folder checks the queue every 30 s on its own, so an order moved on
another computer is saved even with the board's auto-refresh off.
- A browser that cannot rename the finished file copies it instead of
leaving it as .baixando; errors stay on the card until the next success.
Tested in Brave (flag off: the card explains; flag on: 12 queued files
saved, and an order moved by another session saved 23 s later), and the
browser test now checks that an order entering the queue lands in the folder.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Firefox cannot write into a folder a site chose, so the folder button was
hidden there. It now appears in every browser: in Firefox it switches on
automatic downloads, each file that enters Fila de impressão downloaded
once, named after its order, into Firefox's download folder, which the
dialog explains how to point at FlexiPRINT's. Firefox writes .part and
renames when whole, so FlexiPRINT never reads half a file either.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The meeting asked that files moved to Fila de impressão land in the print
room's folder by themselves, instead of each one being downloaded from the
cloud. Beside "Baixar" in that column, a folder button lets the operator
pick a folder (FlexiPRINT's, or the internal server's share). While the
Kanban is open in Chrome or Edge, every final file that enters the queue is
saved there, named after its order, written under a temporary name and
renamed only when whole so FlexiPRINT never reads half a file. A file
already saved is not fetched again, even after FlexiPRINT moves it away.
The folder is remembered; after the browser restarts the button turns
orange and one click releases it. A machine's operator gets only that
machine's queue.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Dropstar sells in up to 3 installments. The card form offers no more, and
the server refuses a payment asking for more.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every operator could do everything, and accounts were made from the
console. Each account now has a profile, checked by the server on every
action: Administrador (everything, plus users and machines), Gestão
(everything but users), Operador (moves cards and handles artwork) and
Vendedor (reads orders, quotes and Números, changes nothing). The
superadmin is the system's own account, set from the console and kept by
the account OPERATOR_EMAIL seeds; administrators cannot change it, and
nobody can delete, disable or demote themselves.
The Usuários tab creates, edits, disables and deletes users with a first
password (there is no e-mail yet), and registers machines with the
products each prints. An order goes to the first active machine that
prints its product, or to the one chosen in its panel; an operator tied
to machines sees and downloads only their orders. Everyone changes their
own password in the account menu, which now holds the name and Sair too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The home page's steps said "Conferimos a metragem e liberamos o pagamento"
and "Aviso no WhatsApp a cada etapa": carts are now approved by the Site
and paid at once, and WhatsApp notices go out when the payment is approved
and when the order is ready. They read "Pague na hora: cartão de crédito ou
PIX" and "Acompanhe em Minha conta, com aviso no WhatsApp quando ficar
pronto". The footer listed boleto, which the Site does not take.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A refused card showed Mercado Pago's code ("Pagamento recusado pelo Mercado
Pago (cc_rejected_insufficient_amount)"), a request it refused showed its
cause list, and some errors were in English ("Quote is already paid",
"Payment provider unavailable; try again"). Each now becomes one sentence:
"O cartão não tem limite suficiente para este valor. Use outro cartão ou
pague com PIX." The codes still go to the log and, on the Kanban's "Cartão
recusado" badge, beside the same sentence. A form check the customer cannot
read is replaced by a general one, and every error a customer or operator
can meet in the quote, upload, account and artwork routes is in Portuguese.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Dropstar does not take debit cards, and Mercado Pago never enabled debit on
the account, so a customer who chose "Cartão de débito" met an error. The
payment page offers credit card and PIX, the card form accepts only credit
cards, and the server refuses a debit method sent around the page. The
adapter still knows how to pay by debit, should it be offered again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A picture had no size until it loaded, and a lazy image with no size may
never be loaded, so some cards showed the layout drawing instead. Pictures
now take their whole box from the start (object-fit keeps the look). A
picture dropped by a re-render while loading no longer counts as missing,
which removed it from every later render until a reload.
"Baixar todos" spilled out of the Fila de impressão header at 1440 px; it
is "Baixar" now, with the full description in its tooltip.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Site asks for e-mail, CNPJ and WhatsApp only, so the Kanban showed an
e-mail where a name belongs and a new Tiny contact was named after it. The
worker now looks up each customer's CNPJ in the public registry (BrasilAPI,
no key) a few at a time, never while a customer waits, and keeps the razão
social and trade name in dtf_local.cnpj_names; a failed lookup is retried a
day later. Cards, the order panel, quotes and the search results show the
trade name (else the razão social) above the e-mail, the search finds
orders and quotes by either name, and a new Tiny contact gets the razão
social as its name and the trade name as fantasia.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every paid order and every move is recorded, but nobody could see the
totals. The new tab shows, for the last 7, 30 or 90 days: paid orders,
metres sold, money received, the average ticket, how many orders needed a
correction, and the median time from payment to Finalizado. A column per
day charts the metres sold (with a table under it), and a table gives each
stage's median time and what waits in it now, with the oldest order.
Test and cancelled orders stay out.
The header now has five tabs: the search box narrows first, the refresh
picker keeps its width, and the operator's e-mail moves to Sair's tooltip
on narrower screens.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
To import a day's work into FlexiPRINT the operator opened each order in
Fila de impressão and downloaded its final. The column now has "Baixar
todos": the approved finals of every order in the queue, in queue order,
each named pedido-<n>-item-<i>-<original>. They download one by one from
storage with short-lived links; a zip of multi-GB sheets would go through
the server.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Customers are not told automatically that their artwork needs a fix: Tiny
has no situação for it. An order in Correção now opens with the reason and
"Avisar no WhatsApp", which opens the customer's chat with the message
ready: the order code, the reason and the link to send the new file in
Minha conta. "Copiar mensagem" covers orders without a WhatsApp number.
The board carries each corrected order's last reason and the Site's address.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An order in Arte tratada without an approved final showed "Mover para Fila
de impressão" as its main button, which the server refused, while the
approval sat folded at the bottom of the panel. Now the top of the panel
says what comes next: approve the final, with the file that would be
printed and a link to download it. A customer's correction or the
generated PDF is approved with one click; otherwise the upload form opens
in place. Once approved, the main button becomes the move to the queue.
A customer's correction can be approved as the final itself, without
downloading and sending it back. The board carries each order's approved
items and corrections, so cards say "Falta aprovar o final", "Correção
recebida" or "Final aprovado", and the item card shows the correction
instead of the stale reason the generated file could not be made.
Going back a stage is a small link, and cancelling or deleting a test
order moved into a "⋯" menu.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Beside "Atualizar", a picker sets how often the Kanban reloads by itself (off,
10 s, 30 s, 1, 5 or 15 min; 30 s by default, remembered by each browser). It
waits while the operator types, drags or has an order open, and with the tab
hidden it still looks at most once a minute. A new order in "Arte recebida"
or a new quote to review shows a notice, and the count goes into the tab's
title until the operator looks at it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bc1fb60 forgot the paid quote as soon as the confirmation showed, so the next
refresh of the page (the cart emptying) found no quote and replaced "Pagamento
confirmado" with "Nenhum pedido aguardando pagamento". The confirmation keeps
its quote again; the paid one is dropped only when the customer asks to pay a
cart identical to it, which then becomes a new order. The browser test waits
for the confirmation, and checks no "Pedido #" is shown, instead of catching
the momentary "Pedido #N criado" line.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
After a payment the browser kept the paid quote as its draft, so a cart
identical to it (the same test repeated) opened the old "Pagamento
confirmado" instead of a payment. The confirmation now forgets the draft, and
a draft found already paid when the customer asks to pay starts a new order.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each column is sorted explicitly by payment time, first paid on top, however
the board's list was put together (older finished orders, one opened from the
search). A card dragged within its column lands between the two it was
dropped between (queue_key, halfway between their keys) and keeps that place
for everyone; moving to another stage clears it. Reordering is not activity:
the stalled clock keeps running.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
"Minha conta" lists and opens orders as "Pedido 1E867B56" (the first 8
characters of the order's id) and searches by that code, so a customer never
sees how many orders the store has. The Kanban shows the code beside the #
number, with a copy button, and its search finds an order by the code a
customer reads out. Tiny keeps its reference (DTF-<number>): it is how a
resent order is found there instead of duplicated, and the WhatsApp notices
the client sends from Tiny use Tiny's own number.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
"Excluir pedido" now also works on a paid order once it is cancelled; one in
progress must be cancelled first, with its reason. Deleting a cancelled order
also discards its quote, so it neither returns to Cotações as unpaid nor can
be paid again. The payment stays recorded and the audit log keeps who deleted
which order and the cancellation reason.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The order panel kept the "Enviar para correção" button in a variable named
`confirm`, which hid window.confirm from the new delete button ("confirm is
not a function"). It is renamed, as is the same name in the final-files form,
and every question to the operator calls window.confirm explicitly.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Cotações (now subtitled "pedidos ainda não pagos") can discard a quote: it
leaves every list and the search, and a payment for it is refused like an
expired one. A test order can be deleted with its history; its quote is unpaid
again. A paid order is cancelled with a required reason: it leaves the board
for a "Cancelados" chip, keeps its payment and history, can no longer move,
and the customer's account shows it as cancelled. Refunds stay at Mercado
Pago and Tiny is not told; the cancel form says so.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The payment page's one message line was always green, so "O Mercado Pago
recusou o pagamento" looked like good news. Each message now has a tone: an
error (a refusal, a form error, a missing field) in red, a changed cart or an
expired quote in amber, a created order in green, the rest neutral.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each quote shows its latest payment attempt as a badge ("PIX gerado · expira
12:22", "PIX expirou sem pagamento", "Cartão recusado"), so "tried to pay" is
told apart from "never tried"; quote_view carries the PIX expiry and the
attempt's time for it. The quote stays payable for its 24 hours: a new PIX is
for the same quote.
Cotações now fills the window and never scrolls: a page holds as many quotes
as the list's height fits, measured after each render and on resize, and the
page bar sits at the bottom of the list.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A quote approved more than QUOTE_VALID_HOURS ago can never be paid; it no
longer shows in Cotações, its count or the search. Wherever a customer is
shown, the name comes first (the customer's, else whoever receives the
delivery) with the e-mail under it; with no name, the e-mail alone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
"Frete Jadlog · 4,541 kg" read as if 2,30 m of film weighed 4.5 kg. It now
reads "0,47 kg · cobrado como 4,54 kg pela caixa" when the box's cubed weight
is what Jadlog charges.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One badge system on every screen (canvas "Kanban DTF — redesign", v2). The
grade is a pill coloured by the price ladder's bands (90/75/60/40); product,
status and warnings are pills with text, so colour never carries meaning alone.
Quote rows: grade, product, metres, delivery city and age on one line; the
"Aprovada automaticamente" line is gone (only a team review is noted), and a
dot marks quotes from the last ten minutes. The quote detail has a status
badge, the total in large type, a copyable CNPJ, a WhatsApp button, facts in a
grid and items and freight apart. Board cards carry the grade, product, place
and a row of warning badges; columns take their stage colour and filter chips
their counts. The order panel shows what was paid and whether it is stalled at
the top, customer and delivery as cards, a print problem as a callout, the
final-file form behind a "next step", and dates on the right of the history.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The client corrected the box to 63 x 15.5 x 15.5 cm and said one box holds
about 60 m. JADLOG_METROS_POR_CAIXA quotes a longer order as several boxes,
each with its packaging weight and volume. UV ships in the same box.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The client's box is 56 x 14 x 14 cm and weighs 0.30 kg; the film is 0.075 kg
per metre. Jadlog charges the larger of the real and the cubed weight, and this
box is large for its weight, so quoting the real weight alone would price
below what Jadlog charges. JADLOG_CAIXA_CM and JADLOG_CUBAGEM_KG_M3 (both or
neither) give the cubed weight; the quote sends the larger. Until the
contract's factor is set, the Kanban's Frete card says so.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A checkbox label named `confirm` in the quote panel hid window.confirm from
the test-order button, which failed with "can't access lexical declaration
'confirm' before initialization". The quote list takes about a third of the
screen (up to 640 px) and cuts long e-mails with an ellipsis.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The customer's browser sends the small picture it already makes of each file
(at most 300 KB, WebP/JPEG/PNG read from the bytes, own uploads only); it goes
when the file's bytes go. Board cards, quote rows, the order panel and the
quote detail show it, with the layout drawing as a second view and as the
fallback for files without a picture.
Cotações gets a customer filter (e-mail, CNPJ, WhatsApp) and product, layout
and resolution-warning chips, with the page bar always shown. The board adds
Entrega, Retirada and stalled-order chips. The top search now covers orders in
any stage and unpaid quotes; CNPJ and phone match by digits only when nothing
but digits and punctuation was typed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Making the body a column to keep the footer at the bottom shrank every
block centred with auto margins (the account area, and two of the Site's
sections) to the width of its content. They take the full width again, up
to their max-width, exactly as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On a short page (sign-in, an empty cart) the footer followed the content
and the rest of the screen was left blank below it, more so with the Site
drawn at 80%. The body is now a column at least the screen's height with
the footer pushed to its end; under the 80% zoom that height is 125vh,
because the zoom scales viewport units too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The order page becomes the customer's area, one page at four addresses:
- /conta/entrar: sign in or create an account, side by side. "Esqueci
minha senha" points to the Dropstar WhatsApp until e-mail can be sent.
- /conta: the counts of orders waiting for payment, in production, in
correction and finished, and the latest one.
- /conta/pedidos: every order and the cart waiting for payment in one list,
newest first, filtered by group, order number and period, ten per page.
The cart shows "Aguardando pagamento" and its "Pagar" goes to the PIX
page when a PIX code is open. An order opens in place with its progress,
items, delivery, history, files and the correction form. A guest sees
the orders paid in this browser.
- /conta/dados: WhatsApp and a saved delivery address (the CNPJ is locked),
e-mail and password changes, both confirmed with the current password;
a password change signs the other devices out.
The cart fills in the account's details and saved address. New API routes
for the details, and the order list takes filters and pages and returns
the counts; only the newest unpaid quote whose files still exist is listed.
The Site's "Minha conta" and "Ver meus pedidos" point to the new addresses.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
"Meus pedidos" was still the prototype's plain page. It now has the Site's
stripe, header and footer, and its type, colours and cards: each order shows
its status, a progress line through production (or the correction the team
asked for), the items with metres and price, where it goes, and on request
the history, the files to download and the correction form. Carts waiting
for payment are listed with a button to pay. Sign-in and account creation
are side by side.
The header, stripe, menu, footer and tokens moved from index.html's inline
style to site-shell.css, which both pages load. The header's search box,
which did nothing, is gone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The text sizes were chosen looking at the Site with the browser at 80%; at
100% everything felt too big. On screens 1100 px and wider the Site is now
drawn at 80% (CSS zoom); phones and tablets keep their sizes. The time left
while reading a large file shows the seconds under 10 s ("faltam 7 s")
instead of "quase pronto".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reading a large PNG in the browser for its preview showed "gerando a
prévia… 87%". It now shows the time left, worked out from how long the
reading has taken so far: "faltam cerca de 25 s", "faltam cerca de 3 min",
"quase pronto". The bar still fills as it goes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The product page's notice about the upload time is gone. The cart's upload
bar now reads "Enviando seus arquivos · faltam cerca de 6 min", measured
from the upload's own speed (a range from the size for the first seconds),
with a line saying the time depends on the internet and to keep the page
open. The header and the pay button show the same time instead of a
percentage.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The notice stayed on the product page after the item went to the cart,
showing the last file's size on the next order. It is now redrawn wherever
the files are cleared and hidden when no product is open. The text is one
line: "Envio: até 8 min (501,2 MB), conforme sua internet. Mantenha a
página aberta."
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Removes "Complete o endereço de entrega para ir ao pagamento." The required
fields (CNPJ, WhatsApp, e-mail, and the delivery address except the
complement) carry a red asterisk, and aria-required for screen readers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each cart item has a checkbox and a thumbnail of its first file (or its
extension when there is none). Only checked items are priced, quoted,
uploaded and paid; an unchecked item stays in the cart, dimmed, for a later
order, and stays there after the others are paid. The header count is the
whole cart; the summary counts what is being paid.
Also removes the "A conta nasce aqui…" and "Carrinho salvo neste
navegador…" texts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>