208 Commits

Author SHA1 Message Date
VPS 4 Deploy Agent d03ef85b64 fix(docker): imagem 1.62GB->340MB (sharp prebuilt, sem vips/toolchain; updates/ fora da imagem)
build-and-promote / build (push) Has been skipped
build-and-promote / promote (push) Failing after 3m34s
- sharp usa binario prebuilt (libvips embarcado) -> remove apk vips/vips-dev (camada ~400MB)
- toolchain (python3/make/g++) virtual, removido na mesma RUN
- .dockerignore exclui updates/ (196MB, servido por volume), data/, bkp/, **/node_modules
- corrige PUT 500/499 no registry (camadas grandes estouravam o limite de upload)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 05:38:27 +02:00
VPS 4 Deploy Agent 7ffaead255 feat(deploy): padroniza rx p/ Build Once->Promote->Deploy (CI registry, compose.prod, badge/health)
build-and-promote / build (push) Failing after 7m7s
build-and-promote / promote (push) Has been skipped
- .gitea/workflows/build.yml: push->build rx-scoreodonto:<sha> no registry; tag->promote+deploy
- docker-compose.prod.yml: image do registry, APP_VERSION/GIT_COMMIT em runtime
- deploy-prod.sh: VPS1 pull + up --no-build (antigo vira deploy-prod-legado-webhook.sh)
- /api/health usa APP_VERSION (tag) com fallback version.txt; badge no canto
- webhook 9003 aposentado (gatilho agora e CI/tag)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 02:39:30 +02:00
VPS 4 Deploy Agent 2b679a5473 security: redigir senha de DB e JWT_SECRET em test-db2.js e EXEMPLO-ENV.txt (T5.6 cont.)
test-db2.js usava DB_PASSWORD e machine_token hardcoded -> process.env.
EXEMPLO-ENV.txt tinha o JWT_SECRET real -> placeholder. Rotação ainda mandatória.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 21:21:32 +02:00
VPS 4 Deploy Agent 4616f20df9 security: remover segredos em texto puro de arquivos versionados (T5.6)
JWT_SECRET real (era == produção) e DB/REDIS_PASSWORD reais estavam commitados em
docs. Substituídos por placeholder + referência ao .secrets.

ATENÇÃO: continuam no HISTÓRICO do git → rotação do JWT_SECRET e da senha do
Postgres/Redis é MANDATÓRIA (+ scrub do histórico). Ver RX_BACKLOG T5.6.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 21:18:46 +02:00
VPS 4 Deploy Agent 016305ebf0 feat(rx): healthcheck de reconciliação banco<->Wasabi por tenant/clínica (T3.2)
GET /api/admin/rx-health (admin): contagens por (tenant_id, clinica_id) + último
resultado do cron de storage; ?clinica_id=&checkLimit=N faz HEAD-check bounded de
objetos ausentes no Wasabi. Read-only, aditivo.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 18:14:43 +02:00
VPS 4 Deploy Agent b815218c30 fix(rx): dedup idempotente no image-upload-direct (resync não duplica)
Antes do INSERT, remove linha existente com mesmo original_filename. Sem isso, o
reenvio (sync-request/Plan B) de um arquivo cujo objeto Wasabi sumiu mas a linha
existia criava DUPLICATA. Descoberto no teste de resync de 3 radiografias.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 17:52:40 +02:00
VPS 4 Deploy Agent 28ded7bbf9 feat(rx): Wasabi key tenant_id/clinica_id/paciente/arquivo + fallback legado
storage.js: escrita usa key nova (tenant/clinica/paciente) quando o device tem
tenant+clinica; leitura testa existência e cai para a key legada (clinic_name/
client_name/...) e raiz — não quebra objetos antigos antes do resync. deleteImage
apaga todas as keys. getUploadPresignedUrl/saveImage recebem tenantId/clinicaId.

Verificado em dev: presigned URL -> u_…/c_…/paciente/arquivo; leitura de imagem
existente (key legada) -> HTTP 200 via fallback.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 17:38:42 +02:00
VPS 4 Deploy Agent b6da56617a feat(rx): tenant_id (conta/dono) acima de clinica_id — multi-tenant 2 níveis
Hierarquia tenant_id (usuarios.id do dono) / clinica_id / pc / paciente, espelhando
o scoreodonto (conta multi-clínica planejada: um dono gerencia várias clínicas).

- Colunas tenant_id em clinics_devices e images (+índices); backfill device + 2776 imgs.
- Cadastro de device, socket (machine_token), JWT de client e uploads gravam tenant_id.
- Listagens (/images, /patients, /by-patient, /unique-clinics) filtram por tenant_id e/ou clinica_id.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 17:26:06 +02:00
VPS 4 Deploy Agent 31022c6a6f feat(rx): multi-tenant por clinica_id + página /clients de clientes ativos
- clinica_id (tenant do scoreodonto, clinicas.id) como eixo de isolamento em
  clinics_devices e images (+índices); clinic_name vira rótulo legível.
- Cadastro de device, socket (machine_token) e uploads (direct + legado) gravam clinica_id.
- Listagens (/images, /patients, /by-patient, /unique-clinics) filtram por clinica_id.
- /clients: lista clientes Windows ativos (inclui autenticados sem client-identify),
  tempo real + polling, exibe a clínica.
- send-image marcado como legado (client real usa Direct Upload).

Inclui trabalho de dev acumulado no working tree (não havia commits desde origin/main).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 16:17:09 +02:00
VPS 4 Deploy Agent d9182cff09 chore(deploy): bump version
continuous-integration/webhook Ignorado: bump version
2026-06-03 20:26:50 +02:00
VPS 4 Deploy Agent c2c2652209 fix(versioning): revert unauthorized package.json bump, preserving docker cache
continuous-integration/webhook Deploy concluído (VPS4)
2026-06-03 20:22:38 +02:00
VPS 4 Deploy Agent 55eed94445 chore(deploy): bump version
continuous-integration/webhook Ignorado: bump version
2026-06-03 19:59:40 +02:00
VPS 4 Deploy Agent fb842d98a5 chore(deploy): responsive mobile layout exact clone from mockup
continuous-integration/webhook Deploy concluído (VPS4)
2026-06-03 19:53:53 +02:00
VPS 4 Deploy Agent 1d30e34d0e chore(deploy): bump version
continuous-integration/webhook Ignorado: bump version
2026-06-03 18:20:25 +02:00
VPS 4 Deploy Agent deeec67446 fix(ui): revert desktop aesthetics to original legacy layout as requested
continuous-integration/webhook Deploy concluído (VPS4)
2026-06-03 18:15:50 +02:00
VPS 4 Deploy Agent 433d823733 chore(deploy): bump version
continuous-integration/webhook Ignorado: bump version
2026-06-03 17:58:11 +02:00
VPS 4 Deploy Agent f775748dbd feat(ui): clone mobile aesthetics to main react app (responsive dashboard)
continuous-integration/webhook Deploy concluído (VPS4)
2026-06-03 17:54:40 +02:00
VPS 4 Deploy Agent fb5c554944 chore(deploy): bump version
continuous-integration/webhook Ignorado: bump version
2026-06-03 17:47:36 +02:00
VPS 4 Deploy Agent 933e3a0dab fix: remover moldura de celular (IOSDevice) do frontend responsivo
continuous-integration/webhook Deploy concluído (VPS4)
2026-06-03 17:43:10 +02:00
VPS 4 Deploy Agent a2e72af2e0 chore(deploy): bump version
continuous-integration/webhook Ignorado: bump version
2026-06-03 17:33:03 +02:00
VPS 4 Deploy Agent 49de013a99 fix: bundle mobile UI into dental-server/public_mobile so docker can serve it
continuous-integration/webhook Deploy concluído (VPS4)
2026-06-03 17:28:27 +02:00
VPS 4 Deploy Agent 806f910c38 chore(deploy): bump version
continuous-integration/webhook Ignorado: bump version
2026-06-03 17:23:27 +02:00
VPS 4 Deploy Agent b5d5e8cbf7 feat: serve mobile UI bundle for mobile devices or /mobile path
continuous-integration/webhook Deploy concluído (VPS4)
2026-06-03 17:16:03 +02:00
VPS 4 Deploy Agent 68dc2965da feat: add mobile API routes (download-all ZIP, upload-file multipart, auth/me, settings) 2026-06-03 17:02:07 +02:00
VPS 4 Deploy Agent e0de5af1f4 chore(deploy): bump version
continuous-integration/webhook Ignorado: bump version
2026-06-03 06:09:07 +02:00
VPS 4 Deploy Agent acf2712dc7 feat: watch latest.yml and emit force-update to clients
continuous-integration/webhook Deploy concluído (VPS4)
2026-06-03 06:05:47 +02:00
VPS 4 Deploy Agent 18bb8594b2 chore(deploy): bump version
continuous-integration/webhook Ignorado: bump version
2026-06-03 04:32:41 +02:00
VPS 4 Deploy Agent 322fda9fff fix: update timeout warning message and missing labels
continuous-integration/webhook Deploy concluído (VPS4)
2026-06-03 04:28:48 +02:00
VPS 4 Deploy Agent ba9897ee31 chore(deploy): bump version
continuous-integration/webhook Ignorado: bump version
2026-06-02 21:01:16 +02:00
VPS 4 Deploy Agent 5d2ba1a178 feat: Adicionado timeout assíncrono para ACK do Cliente Windows
continuous-integration/webhook Deploy concluído (VPS4)
2026-06-02 20:55:21 +02:00
VPS 4 Deploy Agent 34ef3efe1f chore(deploy): bump version
continuous-integration/webhook Ignorado: bump version
2026-06-02 01:33:01 +02:00
VPS 4 Deploy Agent 49c677b996 feat: implement remote CRUD for patients and update version
continuous-integration/webhook Deploy concluído (VPS4)
2026-06-02 01:28:23 +02:00
VPS 4 Deploy Agent bad4347e6e chore(deploy): bump version
continuous-integration/webhook Ignorado: bump version
2026-06-01 03:52:24 +02:00
VPS 4 Deploy Agent d86def2f12 feat(observation): separar observacao de imagem da observacao global do paciente (image_remark)
continuous-integration/webhook Deploy concluído (VPS4)
2026-06-01 03:48:34 +02:00
VPS 4 Deploy Agent 241a194f2a chore(deploy): bump version
continuous-integration/webhook Ignorado: bump version
2026-06-01 03:21:36 +02:00
VPS 4 Deploy Agent c3704fdc27 fix(clipboard): corrigir erro de permissao de escrita e adicionar botao copiar nome
continuous-integration/webhook Deploy concluído (VPS4)
2026-06-01 03:18:36 +02:00
VPS 4 Deploy Agent e929f108ff chore(deploy): bump version
continuous-integration/webhook Ignorado: bump version
2026-06-01 03:13:16 +02:00
VPS 4 Deploy Agent 0e71d2a88b feat(gtos): adicionar edicao inline de observacao de imagem na GTO
continuous-integration/webhook Deploy concluído (VPS4)
2026-06-01 03:10:22 +02:00
VPS 4 Deploy Agent 8ba1691a33 chore(deploy): bump version
continuous-integration/webhook Ignorado: bump version
2026-06-01 03:06:07 +02:00
VPS 4 Deploy Agent 84346d455a feat(gtos): adicionar botao abrir imagem com opcoes de baixar e copiar customizados
continuous-integration/webhook Deploy concluído (VPS4)
2026-06-01 03:02:29 +02:00
VPS 4 Deploy Agent c00c0a3646 feat(routes): simplificar rotas de paciente e imagens e ajustar redirecionamentos 2026-06-01 02:48:17 +02:00
VPS 4 Deploy Agent 2fd4ab91d4 fix(details): corrige erro de id null (RETURNING id) e implementa navegação baseada em rotas (/patient/:patientName)
continuous-integration/webhook Deploy concluído (VPS4)
2026-06-01 02:45:06 +02:00
VPS 4 Deploy Agent bc457b0d51 chore(deploy): bump version
continuous-integration/webhook Ignorado: bump version
2026-06-01 01:58:35 +02:00
VPS 4 Deploy Agent aa3f353979 style(cards): exibe a radiografia completa (object-fit contain) nos cards com fundo escuro
continuous-integration/webhook Deploy concluído (VPS4)
2026-06-01 01:55:27 +02:00
VPS 4 Deploy Agent c4f463344d chore(deploy): bump version
continuous-integration/webhook Ignorado: bump version
2026-06-01 01:44:26 +02:00
VPS 4 Deploy Agent 0cbb65acea fix(navigation): redireciona o botão voltar e resetar da imagem para a pasta de RX do paciente no Dashboard
continuous-integration/webhook Deploy concluído (VPS4)
2026-06-01 01:39:39 +02:00
VPS 4 Deploy Agent c85c991c7f chore(deploy): bump version
continuous-integration/webhook Ignorado: bump version
2026-06-01 01:33:51 +02:00
VPS 4 Deploy Agent 1dbdcfdb58 feat(clipboard): adiciona funcionalidade de copiar imagem transformada para a área de transferência
continuous-integration/webhook Deploy concluído (VPS4)
2026-06-01 01:30:18 +02:00
VPS 4 Deploy Agent 52fe81f1cd chore(deploy): bump version
continuous-integration/webhook Ignorado: bump version
2026-06-01 01:23:39 +02:00
VPS 4 Deploy Agent 80d491b0f2 fix(details): altera comportamento do salvamento para não redirecionar e muda texto do botão para Salvar
continuous-integration/webhook Deploy concluído (VPS4)
2026-06-01 01:20:27 +02:00