Drop one-shot tmp/axe scripts and agent i18n scratch so the Gitea tree is deployable.
3.2 KiB
3.2 KiB
Background Tasks (/processing) — E2E notes
Date: 2026-08-04
App: Descrybe v2 web http://127.0.0.1:5174 + API http://127.0.0.1:8080 + worker
Tenant: demo@descrybe.local → Platform Demo (not A1; see safe-test-fixtures.md)
LLM: Green Chat via OPENAI_BASE_URL / OPENAI_API_KEY / OPENAI_MODEL in root .env//integrations/ai`` — or local stub (mock-llm.md) for CI/dev without production keys
What /processing does
- Nav label: Background Tasks
- Lists recent
processing_jobsfor the active company (poll every 5s while tab visible) - Shows status, per-step badges (
normalize→ … →ai_enhance), product progress, start/complete times - Actions: Terminate (pending/running), Retry (failed/cancelled/completed)
Legacy aliases (SSR 307 → /processing):
| Path | Redirect |
|---|---|
/tasks |
/processing |
/dashboard/tasks |
/processing (hooks.server.ts) |
Verified matrix (this run)
| Check | Result | Notes |
|---|---|---|
| Login demo | PASS | Browser session on :5174 |
GET /api/processing/jobs |
PASS | Shape { jobs: [...] } |
Create normalize_only |
PASS | HTTP 202, status=pending |
| Cancel job | PASS | HTTP 200; status=cancelled; incomplete steps marked cancelled |
Create enhance_only + Green Chat |
PASS | ~1s; normalize+ai_enhance → done; product description rewritten |
| UI table progress / badges | PASS | Completed green; Cancelled grey; progress 1/1 / 0/1 |
/tasks SSR redirect |
PASS | 307 Location: /processing |
| Console / failed requests on page | PASS | 0 errors after login |
Sample enhance job: 045b3d15-… → completed, steps both done.
Sample cancelled job: 56c0bcee-… → step_progress[0].status=cancelled.
Fixes applied this pass
- Cancel step progress —
CancelJobnow marks pending/running steps ascancelledinstep_progress(was leftpending, confusing the UI). - Terminate button alignment — UI only offers Terminate for
pending/running(matches API). - Cancelled step display — client coerces stale pending steps on cancelled jobs.
- SSR
/tasksredirect — replaced clientonMountgoto + universalPageLoadwith+page.server.ts307 (no client flash). - Layout dark-class effect — guard with
browserbefore touchingdocument.
How to retest quickly
# API must be up; worker must inherit OPENAI_* from root `.env` / `/integrations/ai`
Test-NetConnection 192.168.50.181 -Port 8767
# After CSRF + login cookie jar:
# POST /api/processing/jobs {"raw_product_ids":["…"],"processing_type":"enhance_only"}
# POST /api/processing/jobs/{id}/cancel
# GET /api/processing/jobs/{id} # poll until completed
# UI: http://127.0.0.1:5174/processing (not :3000 — that is Descrybe v1 Next)
Cookie jar used locally: artifacts/processing-smoke-cookies.txt (local only).
Related
- green-chat-smoke.md — LAN Green Chat + prior enhance smoke
- ai-full-smoke.md — broader AI matrix
- green-chat-llm.md — wiring guide