Antoni Nuñez Romeu
5aadc096d1
fix: add ok: true to fetch mocks in SearchView tests
Run Tests on Branches / Detect Changes (push) Successful in 12s
Run Tests on Branches / Backend Tests (push) Successful in 1m37s
Run Tests on Branches / Frontend Tests (push) Successful in 1m41s
Run Tests on Branches / Frontend Mobile Tests (push) Has been skipped
2026-07-16 10:51:01 +02:00
Antoni Nuñez Romeu
a85fd6cd05
Merge origin/main into feat/parapharmacy-baby-products - resolve conflicts keeping feature branch improvements
Run Tests on Branches / Detect Changes (push) Successful in 12s
Run Tests on Branches / Backend Tests (push) Successful in 1m37s
Run Tests on Branches / Frontend Tests (push) Failing after 1m41s
Run Tests on Branches / Frontend Mobile Tests (push) Has been skipped
2026-07-16 10:29:02 +02:00
Ichitux
1180599260
Background fixes & improvements
Run Tests on Branches / Detect Changes (push) Successful in 16s
Run Tests on Branches / Backend Tests (push) Successful in 1m53s
Run Tests on Branches / Frontend Tests (push) Failing after 1m57s
Run Tests on Branches / Frontend Mobile Tests (push) Successful in 1m44s
2026-07-16 10:13:25 +02:00
Antoni Nuñez Romeu
f88c9db0a2
fix: regenerate backend package-lock.json — sync OTel dependencies
2026-07-16 10:13:04 +02:00
Antoni Nuñez Romeu
562201869a
Fixed backend test
2026-07-16 10:13:04 +02:00
Antoni Nuñez Romeu
8245abd313
fix: skip Redis connection in test mode — prevents CI hang
...
The top-level await redisClient.connect() in redis-client.js was
blocking module import when no Redis server is available (CI env).
Add NODE_ENV guard + reconnect strategy with max retries.
2026-07-16 10:13:04 +02:00
Antoni Nuñez Romeu
a73ef4d422
fix(backend): use string resource attribute keys instead of semantic-conventions named exports
...
The resolved @opentelemetry/semantic-conventions version in CI does not
export ATTR_SERVICE_NAMESPACE/ATTR_SERVICE_NAME as named exports, breaking
the backend test import. Use plain 'service.name'/'service.namespace'
string keys so the code is independent of the semantic-conventions version.
2026-07-16 10:13:04 +02:00
Antoni Nuñez Romeu
c165359fd9
Package json outdated
2026-07-16 10:13:04 +02:00
Antoni Nuñez Romeu
295e5cd8fb
feat: add end-to-end observability (metrics, health, mobile RUM, dashboards, alerts)
...
- Backend: OTel metrics via OTLP -> Alloy -> Prometheus (OTEL_METRICS_EXPORTER=otlp)
- New business metrics (src/metrics.js): searches, CIMA latency/errors, cache
hits/misses, logins, rate-limits, pharmacy writes/links, push sent/failed,
DB + Redis timings/errors, HTTP req count/duration, heartbeat
- Backend health endpoints /healthz and /readyz
- Mobile (Expo): Grafana Faro RUM via @grafana/faro-react-native
- redis/postgres exporters in docker-compose + Prometheus scrape jobs
- Grafana dashboards (backend, datastores, mobile RUM, overview)
- Prometheus alert rules (farmafinder_*) -> existing Alertmanager (Telegram)
- Design/spec saved to docs/superpowers/specs/
2026-07-16 10:13:04 +02:00
Antoni Nuñez Romeu
d66a9184aa
fix: skip Redis connection in test mode — prevents CI hang
...
The top-level await redisClient.connect() in redis-client.js was
blocking module import when no Redis server is available (CI env).
Add NODE_ENV guard + reconnect strategy with max retries.
2026-07-16 10:12:37 +02:00
Antoni Nuñez Romeu
3bfc0524d5
ci: optimize test performance — from ~3h to 3.5s
...
- Lazy-load tesseract.js only in OCR route (skips 30MB WASM download)
- Conditional tracing.js import (skip OTel gRPC in test mode)
- Remove unused barcode-detector import
- Add testTimeout/openHandlesTimeout to jest.config.js
- Add --forceExitTimeout=30000 to test script
- Split CI test jobs into parallel workflows (backend/frontend/mobile)
- Add timeout-minutes: 15 to all test jobs
- Use npm ci --ignore-scripts + selective native rebuild
2026-07-16 10:12:37 +02:00
Antoni Nuñez Romeu
d3e4b0e05a
ci: consolidate test jobs into single workflow with npm caching
...
- Merge 3 parallel test jobs (backend/frontend/mobile) into one sequential job
- Remove dependency on dorny/paths-filter@v3 (replaced with git diff script)
- Add npm cache via setup-node to speed up dependency installation
- Downgrade Node.js from 24 to 22 LTS for stability
- Reduce checkout fetch-depth from full history to 2 commits
2026-07-16 10:12:37 +02:00
Antoni Nuñez Romeu
3a082877dd
fix: add missing mocks for off-service.js and searchOTC in backend tests
...
The backend test was hanging in CI because server.js imports off-service.js
which pulls in redis-client.js. Without a mock, it tries to connect to Redis
at import time, hanging indefinitely in CI where no Redis server exists.
Also added the missing searchOTC mock for cima-service.js to fix the
SyntaxError from the export mismatch.
2026-07-16 10:12:37 +02:00
Ichitux
6aec9c52d0
Actualizar .gitea/workflows/test-branches.yaml
2026-07-16 09:56:56 +02:00
Ichitux
5c782dede7
Merge pull request 'Background fixes & improvements' ( #37 ) from mobile_app_hotfixes into main
...
Build & Push Docker Images / Detect Changes (push) Successful in 12s
Build & Push Docker Images / Backend Tests (push) Has been skipped
Build & Push Docker Images / Frontend Tests (push) Has been skipped
Build & Push Docker Images / Build Backend (push) Has been skipped
Build & Push Docker Images / Build Frontend (push) Has been skipped
Build & Push Docker Images / Deploy (push) Has been skipped
Reviewed-on: #37
2026-07-14 17:56:19 +00:00
Ichitux
ff387e3d20
Background fixes & improvements
Run Tests on Branches / Detect Changes (push) Successful in 14s
Run Tests on Branches / Backend Tests (push) Has been skipped
Run Tests on Branches / Frontend Tests (push) Has been skipped
Run Tests on Branches / Frontend Mobile Tests (push) Successful in 1m52s
2026-07-14 19:52:55 +02:00
Ichitux
58c1fb5bb6
Merge pull request 'fix: regenerate backend package-lock.json — sync OTel dependencies' ( #36 ) from fix/backend-lockfile-sync into main
...
Build & Push Docker Images / Frontend Tests (push) Has been skipped
Build & Push Docker Images / Detect Changes (push) Successful in 11s
Build & Push Docker Images / Backend Tests (push) Successful in 1m36s
Build & Push Docker Images / Build Backend (push) Successful in 3m7s
Build & Push Docker Images / Build Frontend (push) Has been skipped
Build & Push Docker Images / Deploy (push) Successful in 1m5s
Reviewed-on: #36
2026-07-14 12:21:47 +00:00
Antoni Nuñez Romeu
e83f32324f
fix: regenerate backend package-lock.json — sync OTel dependencies
Run Tests on Branches / Backend Tests (push) Successful in 1m37s
Run Tests on Branches / Frontend Tests (push) Has been skipped
Run Tests on Branches / Frontend Mobile Tests (push) Has been skipped
Run Tests on Branches / Detect Changes (push) Successful in 12s
2026-07-14 14:16:57 +02:00
Antoni Nuñez Romeu
59f81c9203
Merge branch 'feat/observability-metrics-monitoring'
Build & Push Docker Images / Detect Changes (push) Successful in 11s
Build & Push Docker Images / Frontend Tests (push) Has been skipped
Build & Push Docker Images / Backend Tests (push) Successful in 1m38s
Build & Push Docker Images / Build Backend (push) Failing after 35s
Build & Push Docker Images / Build Frontend (push) Has been skipped
Build & Push Docker Images / Deploy (push) Has been skipped
2026-07-14 13:44:07 +02:00
Antoni Nuñez Romeu
809d4b8a7f
Fixed backend test
Run Tests on Branches / Detect Changes (push) Successful in 12s
Run Tests on Branches / Frontend Tests (push) Has been skipped
Run Tests on Branches / Frontend Mobile Tests (push) Successful in 1m34s
Run Tests on Branches / Backend Tests (push) Successful in 1m36s
2026-07-14 13:38:16 +02:00
Antoni Nuñez Romeu
e281bd4fa8
fix: skip Redis connection in test mode — prevents CI hang
...
Run Tests on Branches / Frontend Mobile Tests (push) Successful in 1m58s
Run Tests on Branches / Detect Changes (push) Successful in 12s
Run Tests on Branches / Backend Tests (push) Failing after 1m58s
Run Tests on Branches / Frontend Tests (push) Has been skipped
The top-level await redisClient.connect() in redis-client.js was
blocking module import when no Redis server is available (CI env).
Add NODE_ENV guard + reconnect strategy with max retries.
2026-07-14 13:25:17 +02:00
Antoni Nuñez Romeu
52b5b72cfb
ci: optimize test performance — from ~3h to 3.5s
...
- Lazy-load tesseract.js only in OCR route (skips 30MB WASM download)
- Conditional tracing.js import (skip OTel gRPC in test mode)
- Remove unused barcode-detector import
- Add testTimeout/openHandlesTimeout to jest.config.js
- Add --forceExitTimeout=30000 to test script
- Split CI test jobs into parallel workflows (backend/frontend/mobile)
- Add timeout-minutes: 15 to all test jobs
- Use npm ci --ignore-scripts + selective native rebuild
2026-07-14 13:24:19 +02:00
Ichitux
89cb8ee2fb
Merge pull request 'ci: optimize test performance — from ~3h to 3.5s' ( #35 ) from ci/optimize-test-performance into main
...
Build & Push Docker Images / Detect Changes (push) Successful in 12s
Build & Push Docker Images / Backend Tests (push) Successful in 1m36s
Build & Push Docker Images / Frontend Tests (push) Has been skipped
Build & Push Docker Images / Build Backend (push) Successful in 3m9s
Build & Push Docker Images / Build Frontend (push) Has been skipped
Build & Push Docker Images / Deploy (push) Successful in 1m2s
Reviewed-on: #35
2026-07-14 11:08:41 +00:00
Antoni Nuñez Romeu
bd7fe56330
fix: skip Redis connection in test mode — prevents CI hang
...
Run Tests on Branches / Detect Changes (push) Successful in 13s
Run Tests on Branches / Backend Tests (push) Successful in 2m9s
Run Tests on Branches / Frontend Tests (push) Has been skipped
Run Tests on Branches / Frontend Mobile Tests (push) Has been skipped
The top-level await redisClient.connect() in redis-client.js was
blocking module import when no Redis server is available (CI env).
Add NODE_ENV guard + reconnect strategy with max retries.
2026-07-14 13:03:46 +02:00
Antoni Nuñez Romeu
e3db56715b
ci: optimize test performance — from ~3h to 3.5s
...
Run Tests on Branches / Frontend Tests (push) Has been cancelled
Run Tests on Branches / Frontend Mobile Tests (push) Has been cancelled
Run Tests on Branches / Backend Tests (push) Has been cancelled
Run Tests on Branches / Detect Changes (push) Successful in 13s
- Lazy-load tesseract.js only in OCR route (skips 30MB WASM download)
- Conditional tracing.js import (skip OTel gRPC in test mode)
- Remove unused barcode-detector import
- Add testTimeout/openHandlesTimeout to jest.config.js
- Add --forceExitTimeout=30000 to test script
- Split CI test jobs into parallel workflows (backend/frontend/mobile)
- Add timeout-minutes: 15 to all test jobs
- Use npm ci --ignore-scripts + selective native rebuild
2026-07-14 12:42:02 +02:00
Ichitux
84bf5f3f79
Merge branch 'main' into feat/observability-metrics-monitoring
Run Tests on Branches / Run Tests (push) Failing after 3h11m0s
2026-07-13 23:08:19 +00:00
Ichitux
4370d3c35c
Merge pull request 'fix/backend-test-mocks' ( #34 ) from fix/backend-test-mocks into main
...
Build & Push Docker Images / Detect Changes (push) Successful in 10s
Build & Push Docker Images / Frontend Tests (push) Has been cancelled
Build & Push Docker Images / Build Backend (push) Has been cancelled
Build & Push Docker Images / Build Frontend (push) Has been cancelled
Build & Push Docker Images / Deploy (push) Has been cancelled
Build & Push Docker Images / Backend Tests (push) Has been cancelled
Reviewed-on: #34
2026-07-13 19:20:43 +00:00
Antoni Nuñez Romeu
5ae3ebecee
ci: consolidate test jobs into single workflow with npm caching
...
Run Tests on Branches / Run Tests (push) Successful in 1m44s
- Merge 3 parallel test jobs (backend/frontend/mobile) into one sequential job
- Remove dependency on dorny/paths-filter@v3 (replaced with git diff script)
- Add npm cache via setup-node to speed up dependency installation
- Downgrade Node.js from 24 to 22 LTS for stability
- Reduce checkout fetch-depth from full history to 2 commits
2026-07-13 21:16:46 +02:00
Antoni Nuñez Romeu
20cc399731
fix: add missing mocks for off-service.js and searchOTC in backend tests
...
Run Tests on Branches / Detect Changes (push) Successful in 14s
Run Tests on Branches / Frontend Tests (push) Has been cancelled
Run Tests on Branches / Frontend Mobile Tests (push) Has been cancelled
Run Tests on Branches / Backend Tests (push) Has been cancelled
The backend test was hanging in CI because server.js imports off-service.js
which pulls in redis-client.js. Without a mock, it tries to connect to Redis
at import time, hanging indefinitely in CI where no Redis server exists.
Also added the missing searchOTC mock for cima-service.js to fix the
SyntaxError from the export mismatch.
2026-07-13 21:10:06 +02:00
Antoni Nuñez Romeu
6fa12b12d9
fix: address code review issues — nutriscore field name, cache write isolation, missing rate limiter, dead props
2026-07-13 20:58:41 +02:00
Antoni Nuñez Romeu
731b51ff48
feat: display product results alongside medicine results in MedicineResults component
2026-07-13 20:58:41 +02:00
Antoni Nuñez Romeu
ca4a9671e7
feat(mobile): add product detail screen for CIMA and OFF products
2026-07-13 20:58:41 +02:00
Antoni Nuñez Romeu
241d362528
feat(mobile): integrate product search with filter tabs in search screen
2026-07-13 20:58:41 +02:00
Antoni Nuñez Romeu
13cf7b66ee
feat(mobile): add products API service with search and detail endpoints
2026-07-13 20:58:41 +02:00
Antoni Nuñez Romeu
39868d95c6
feat(frontend): integrate product search into PublicView with filter tabs
2026-07-13 20:58:41 +02:00
Antoni Nuñez Romeu
2d839b9082
feat(frontend): add ProductResults component for unified product search
...
Displays CIMA OTC and Open Food Facts baby products with source/category
badges, product images, brand info, and Nutri-Score for OFF items.
2026-07-13 20:58:41 +02:00
Antoni Nuñez Romeu
1a2e9aafb2
Add unified product search routes (CIMA OTC + Open Food Facts)
...
- GET /api/products/search?q={query} - parallel search across both sources
- GET /api/products/:source/:id - product detail by source (cima/openfoodfacts)
- Uses Promise.allSettled for fault-tolerant parallel search
- Added imports for searchOTC and OFF service functions
2026-07-13 20:58:40 +02:00
Antoni Nuñez Romeu
edfe7d6390
feat(backend): add CIMA OTC search function with Redis caching
2026-07-13 20:58:40 +02:00
Antoni Nuñez Romeu
b7ca3633e6
fix: remove dead BABY_CATEGORIES constant and emoji from logs
2026-07-13 20:58:40 +02:00
Antoni Nuñez Romeu
e48ef31fee
feat(backend): add Open Food Facts service with Redis caching
...
- transformOFFProduct: maps OFF products to unified Product model
- searchBabyProducts: searches baby products via OFF API (1h cache)
- getBabyProductDetails: fetches product details by barcode (1h cache)
- 9 tests passing for transform logic and input validation
2026-07-13 20:58:40 +02:00
Ichitux
ee42562e13
Merge branch 'main' into feat/observability-metrics-monitoring
Run Tests on Branches / Detect Changes (push) Successful in 14s
Run Tests on Branches / Frontend Tests (push) Has been skipped
Run Tests on Branches / Frontend Mobile Tests (push) Successful in 2m5s
Run Tests on Branches / Backend Tests (push) Failing after 3h10m31s
2026-07-13 18:52:58 +00:00
Ichitux
484220a0f6
Merge pull request 'Actualizar .gitea/workflows/test-branches.yaml' ( #33 ) from ichitux-patch-1 into main
...
Build & Push Docker Images / Build Frontend (push) Has been skipped
Build & Push Docker Images / Deploy (push) Has been skipped
Build & Push Docker Images / Detect Changes (push) Successful in 12s
Build & Push Docker Images / Backend Tests (push) Has been skipped
Build & Push Docker Images / Frontend Tests (push) Has been skipped
Build & Push Docker Images / Build Backend (push) Has been skipped
Reviewed-on: #33
2026-07-13 18:52:40 +00:00
Antoni Nuñez Romeu
8bf0b33249
feat: add pharmacy-product linking system
...
Run Tests on Branches / Detect Changes (push) Successful in 12s
Run Tests on Branches / Frontend Tests (push) Has been cancelled
Run Tests on Branches / Frontend Mobile Tests (push) Has been cancelled
Run Tests on Branches / Backend Tests (push) Has been cancelled
- Add pharmacy_products table (PostgreSQL + SQLite)
- Add public route GET /api/products/:source/:id/pharmacies
- Add admin CRUD routes for pharmacy-product links
- Add cascade delete when pharmacy is removed
- Update ProductView to show linked pharmacies
- Create PharmacyProductLink admin component
- Add 'Vincular Producto a Farmacia' tab in AdminView
2026-07-13 20:41:16 +02:00
Ichitux
930b9434c6
Actualizar .gitea/workflows/test-branches.yaml
Run Tests on Branches / Detect Changes (push) Successful in 11s
Run Tests on Branches / Backend Tests (push) Has been skipped
Run Tests on Branches / Frontend Tests (push) Has been skipped
Run Tests on Branches / Frontend Mobile Tests (push) Has been skipped
2026-07-13 18:33:45 +00:00
Antoni Nuñez Romeu
f921b15d67
fix(frontend): set screen to 'product' when navigating to product detail
...
Run Tests on Branches / Backend Tests (push) Has been cancelled
Run Tests on Branches / Detect Changes (push) Has been cancelled
Run Tests on Branches / Frontend Tests (push) Has been cancelled
Run Tests on Branches / Frontend Mobile Tests (push) Has been cancelled
- Add setScreen('product') to onNavigateToProduct callback
- ProductView was never rendered because screen stayed as 'search'
2026-07-13 19:50:24 +02:00
Antoni Nuñez Romeu
59edc7fbf1
fix(frontend): run medicine and product searches in parallel
...
Run Tests on Branches / Backend Tests (push) Has been cancelled
Run Tests on Branches / Frontend Tests (push) Has been cancelled
Run Tests on Branches / Frontend Mobile Tests (push) Has been cancelled
Run Tests on Branches / Detect Changes (push) Has been cancelled
- Use Promise.allSettled for parallel API calls
- Reduces total search time from ~1300ms to ~500ms
- Prevents results disappearing during sequential searches
2026-07-13 19:34:55 +02:00
Antoni Nuñez Romeu
731a6c98ae
feat(frontend): add product detail view and navigation
...
Run Tests on Branches / Detect Changes (push) Successful in 12s
Run Tests on Branches / Backend Tests (push) Has been cancelled
Run Tests on Branches / Frontend Tests (push) Has been cancelled
Run Tests on Branches / Frontend Mobile Tests (push) Has been cancelled
- Create ProductView component with product details display
- Add ProductView.css with responsive styling
- Add product screen to App.jsx screen system
- Pass onNavigateToProduct callback from App to SearchView
- Update ProductResults onSelect to use callback instead of window.location
2026-07-13 17:36:52 +02:00
Antoni Nuñez Romeu
31c1a14343
feat(frontend): integrate product search in SearchView
...
Run Tests on Branches / Detect Changes (push) Successful in 14s
Run Tests on Branches / Frontend Tests (push) Has been cancelled
Run Tests on Branches / Frontend Mobile Tests (push) Has been cancelled
Run Tests on Branches / Backend Tests (push) Has been cancelled
- Add ProductResults component import
- Add products and searchMode state
- Add parallel product search to search effect
- Add filter tabs (Todos/Medicamentos/Parafarmacia)
- Render ProductResults when products found
- Add CSS for filter tabs and products section
2026-07-13 17:31:42 +02:00
Antoni Nuñez Romeu
25ebb899e9
debug: add logging for OFF API requests
Run Tests on Branches / Detect Changes (push) Successful in 15s
Run Tests on Branches / Frontend Mobile Tests (push) Successful in 1m57s
Run Tests on Branches / Frontend Tests (push) Failing after 13m41s
Run Tests on Branches / Backend Tests (push) Failing after 15m38s
2026-07-13 17:13:22 +02:00
Antoni Nuñez Romeu
2e3ce44e7b
fix(backend): remove auth from OFF read operations
...
Run Tests on Branches / Detect Changes (push) Successful in 17s
Run Tests on Branches / Frontend Mobile Tests (push) Has been cancelled
Run Tests on Branches / Backend Tests (push) Has been cancelled
Run Tests on Branches / Frontend Tests (push) Has been cancelled
- READ operations don't require auth per OFF docs (only User-Agent)
- Auth credentials were causing 503 errors
- Keep User-Agent header which is required
2026-07-13 17:05:37 +02:00