Skip to content

Portal smoke test ​

Run after changes to portal UI (docs/.vitepress/theme/) or gateway REST used by the portal.

Prerequisites ​

  • Logged in (gw_access_token in browser)
  • npm run docs:stack (docs :5173 + API :3001) or remote gateway via GATEWAY_PROXY_TARGET

Multi-dealer (default tenant + vmedia) ​

Run once per dealer before release — see config/tenants.README.md in the repo root.

  • [ ] Default tenant (localhost) — http://localhost:5173/app/, login, /ai/me / credits use GOMMO_API_DOMAIN from env
  • [ ] vmedia — http://localhost:5173/login/?tenant=vmedia (no UI dealer list), login with vmedia.ai account
  • [ ] Nav links preserve ?tenant= when set; sign out if token is for wrong dealer
  • [ ] GET /gateway/site returns only active tenant (no tenants[] list)
  • [ ] Prod-like portal (optional) — npm run docs:build + npx vitepress preview docs: ?tenant=vmedia on localhost must not switch dealer; http://vmedia.localhost:4173/ (hosts file) must bind vmedia

Manual product chat job flows (inline form → submit → result): maintainer checklist Product chat E2E (signed-in, docs:stack).

bash
npm run theme:test
npm run test:aggregate
npm run portal:smoke   # HTTP 200 + HTML fragments (needs docs:stack)
npm run gateway:smoke  # API error envelope on login, /ai/me, models (needs API :3001)

Overview (/app/) ​

  • [ ] Hero: Open Playground, Activity, Copy token
  • [ ] Usage widget (7 days) loads; recent jobs clickable → Explore + job modal
  • [ ] Workspace cards: Activity, Access token, Credits, BYOK, Files, Observability
  • [ ] Header / sidebar credits pill → /app/credits/
  • [ ] Resources: Quickstart, MCP, Authentication, Portal smoke test (this page)

Playground (/app/playground/) ​

Immersive embed — no app sidebar/header. See API Playground (redirects here).

  • [ ] Overview hero Open Playground → /app/playground/
  • [ ] Iframe loads (default Create image worker); no endless loading spinner
  • [ ] Logged in → playground picks up token (Connection OK / can list models)
  • [ ] List models → pick catalog model + ratio from list (not guessed)
  • [ ] Image job with wait checked → resultUrl in response / preview
  • [ ] After SUCCESS, switch REQUEST / ENDPOINTS / AI GUIDE — tab stays pinned (poll does not steal RESULT)
  • [ ] URL updates when switching worker (?worker=create-video, etc.)
  • [ ] Deep link from Models Playground button → ?model= pre-filled
  • [ ] Optional: Observability Local mirror on → job row appears after run

Chat (/app/chat/) ​

  • [ ] Low-credit banner when balance < threshold
  • [ ] BYOK hint when gateway has mapped chat models — link Open BYOK
  • [ ] Hint updates when selecting a BYOK-mapped model (with provider key saved)
  • [ ] Model picker shows BYOK badge on mapped models

Product mode (default) — full checklist: Product chat E2E. Quick pass:

  • [ ] Media intent → inline job card + API details accordion + quick actions (Top up, Playground, Copy API path)
  • [ ] Support intent (còn bao nhiêu credit, affiliate) → portal chips, no inline job form
  • [ ] POST /gateway/chat includes mediaModelContext.account on product turns
  • [ ] Automated (mock, no job spend): npm run portal:browser:test -- tests/browser/chat-product-inline.spec.ts tests/browser/chat-product-intents.spec.ts
  • [ ] Tier 3: low-credit notice on inline form; remote session hydrate (Product chat E2E §7)

Activity (/app/activity/) ​

See Activity hub for URL params. Quick pass:

  • [ ] Overview → period, Refresh, Export CSV, Usage by type → Explore; error → Try again
  • [ ] Top models → Explore ?model=; cache tooltip; job modal ?job= per row
  • [ ] Trends / Explore → stats or logs error → Try again; Explore filters, Load more
  • [ ] Billing → top-up table refresh; links Credits / Observability; ?period= sync

Access token (/app/token/) ​

  • [ ] Tab curl (Gommo) or MCP (Gommo) snippet; Copy token; Test connection success message
  • [ ] Last activity link → Activity Explore (when jobs exist)

Files (/app/files/) ​

  • [ ] Upload → success message; Recent uploads persists after reload
  • [ ] Copy URL / Copy fields

BYOK (/app/byok/) ​

See BYOK reference and BYOK production checklist. Quick pass:

  • [ ] Load error → Try again; toolbar Refresh + Activity link
  • [ ] Save key → green message (no full-page flash; Refreshing… only)
  • [ ] Test / Delete with confirm
  • [ ] Usage tab → Activity link; event badges when chat BYOK ran

Observability (/app/observability/) ​

Handoff checklist: doc/OBSERVABILITY-TEST.md (not payment webhooks — use Credits for top-up). Quick pass:

  • [ ] Toolbar Refresh; stats load error → Try again
  • [ ] Stat cards → Activity / Credits; Available links open
  • [ ] Local session mirror toggle (optional)
  • [ ] Skip Webhooks section on page for boss/demo

Credits (/app/credits/) ​

See Billing & credits. Quick pass:

  • [ ] Low-balance banner when credits < threshold
  • [ ] KPI row: balance, total topped up, order count, last order
  • [ ] Quick links → Activity Billing, Job logs, Overview, Billing docs
  • [ ] Package grid: featured accent, others primary; checkout modal
  • [ ] Top-up history table; stale pending toggle; header Refresh reloads packages + orders

Profile (/app/profile/) ​

  • [ ] Usage 7d pill; links to Activity with same period
  • [ ] Recent jobs → Explore job modal

Automated ​

bash
npm run theme:test      # URL helpers, usage normalize
npm run test:aggregate  # usage aggregate cache (Activity Overview)
npm run portal:smoke    # route + fragment checks (docs :5173 + API :3001)
node scripts/verify-request-tab.mjs   # Playground response tab pin (needs docs:stack)