# Operations domain QA

Completed 2026-09-12. Domain files: `shared/admin-operations.js`, `admin-atelier/operations.js`, `shared/admin-operations.test.mjs`; Operations declarations in `shared/admin-api.d.ts`.

## API

All domain storage is `w.admin.operations` in the existing `abnabot.world.v1`. No separate mock world or private frontend persistence. Bulk adjustments call core `applyBulkAdjustment` and update canonical subscription expiry/volume/usage and history. Setup computes real readiness from core categories/panels/plans/inbounds, report registration and finance payment settings.

- Broadcast: five canonical audiences; exact test and confirmation; Telegram HTML validation; timed notification queue and failed empty audience.
- Warning rules: three threshold types, effective-type edit validation, enable/disable, soft delete, independent category deletion policy.
- Channels, tutorials, ad attribution and referral: full CRUD where specified, numeric Telegram IDs, tutorial media remains bot-managed, ad reports derive from canonical ledger, numeric referral guards.
- Bulk jobs: frozen preview filters/sample, unknown variables shown while typing and block execution, run/pause/resume/cancel/delete state machine, editable settings only in permitted states, per-item pagination, route-leave/replacement discard, manual runner, elapsed changes, applied-item notifications.
- System/setup: dated reports, no-data/future-date/error cases, confirmed delayed backup, dispatcher lock, seven computed setup steps, regenerated report code, explicit demo registration, shared masked finance helpers and mandatory inbound synchronization.

`node --test shared/admin-operations.test.mjs`: **12/12 passed**. Checks include exact seeded240 result236applied/3failed/1skipped, canonical history/expiry changes,4items/sec and10notifications/sec, rollback-safe unknown settings, cancellation preserves applied data and notifies applied items, explicit template clearing, one-shot failures, setup fresh/provider agreement and order-zero validation.

## Browser

Session `admin-ops`, localhost8765,360×800 and390×844. Scripts explicitly reload before latest-code checks and bypass cache. Root shell supplies native dialogs, field errors, themes and navigation lifecycle.

- `admin-ops-outreach.js`: broadcast test/confirmation; rule create/change-type invalid threshold/correction/toggle/delete; invalid then valid channel; tutorial create/no-media guidance; ad create/report/copy; referral update; today/yesterday report and future date rejection; confirmed backup.
- `admin-ops-jobs.js`: unknown-variable feedback, blocked preview, preview replacement, meaningful sample, run confirmation, pause/settings/resume, real elapsed application, cancel confirmation, preserved applied items, delete, awaited leave-discard,50-item pagination, reduced motion.
- `admin-ops-setup.js`: full seven-step setup from empty configuration using actual UI. Report code/copy/regenerate/register; category; panel authentication/save; template; payment prerequisite/card/method/complete; plan; panel and plan connections. Verified6/7 before inbound sync,7/7 afterward, dashboard100% from the same provider.
- `admin-ops-final.js`: latest explicit reload, malformed HTML localized failure, zero-audience failed job localized, light theme390 and reduced motion.

Visual inspection included broadcast confirmation, bulk template form, bulk run confirmation, live/paused detail, setup completion and light outreach. No page overflow in captured360/390 screens; all tested flows completed. An initial pagination check raced the async refresh; the driver now waits for the rendered range and passes. Initial report-code test clicked registration during regeneration; the UI now fetches current status when opening registration and the test waits for the displayed regenerated code.

## UI inventory

17 routes: outreach, broadcast, warning-rules, channels, tutorials, ads, ad-report, referral, jobs, job, job-builder, system, setup, setup-report, setup-templates, setup-connections, setup-payments.46 routed actions. No placeholder or raw-JSON-only forms.

Scenario names: ops-html-failure, ops-broadcast-empty, ops-ad-failure, ops-report-failure, ops-backup-failure, ops-job-transition-failure.

Browser operations are simulated as specified; no real Telegram messages or backups were sent externally. Original01–20 concept folders were preserved.
