Single URL input, source/job history summary, start action, clear note that one job handles one resource.
01 / Основные экраны
Human-readable crawl plan, discovered sitemap/archive/feed surfaces, selected ordering strategy, confidence, warnings, Start/Cancel.
Current phase/activity, counters, progress indicators, live logs, checkpoint status, pause/cancel where allowed.
Preview of first up to 30 valid records, obvious source/order/status info, Continue / Reject & tune.
Read-only progress through VALIDATING → DEPLOYING → VERIFYING_LIVE.
DONE/PARTIAL/FAILED summary, totals, final live link, master index link, copy diagnostic summary.
02 / Sticky job header
| Field | UI contract |
|---|---|
| Job ID | Compact mono ID. |
| Source | Domain / normalized source URL. |
| Status | Canonical state badge. |
| Current phase | PREFLIGHT / FIRST BATCH / FULL RUN / VALIDATION / DEPLOY / VERIFY. |
| Current activity | Short human-readable operation. |
| State version | Useful for AI/debug screenshots. |
| Updated | Last state update time. |
| Counter | Meaning |
|---|---|
| Discovered | Unique in-scope URLs discovered. |
| Fetched | Successfully fetched pages. |
| Included | Current valid article records. |
| Excluded | Classifier exclusions. |
| Duplicates | Logical duplicate aliases/groups resolved. |
| Failed | Fetch/classifier failures requiring attention. |
| Pending | Queue work remaining. |
| Batches | Final/rendered batch count when available. |
03 / Status mapping
| Status | Human meaning |
|---|---|
| CREATED | Ready to begin. |
| PREFLIGHT | Building traversal plan. |
| PREFLIGHT_READY | Plan ready for execution. |
| RUNNING_FIRST_BATCH | Collecting first preview records. |
| WAITING_FOR_OWNER | Needs Continue/Reject decision. |
| RUNNING_FULL | Full source crawl in progress. |
| VALIDATING | Checking corpus, IDs, batches and manifests. |
| DEPLOYING | Publishing validated artifacts. |
| VERIFYING_LIVE | Checking real Work URLs. |
| DONE | All checks passed. |
| PARTIAL | Finished with explicit coverage limitation. |
| FAILED | Blocked by an error that needs correction. |
| CANCELLED | Stopped by owner/system. |
Например, строка «deploy completed» не делает job DONE. DONE показывается только когда canonical state уже прошёл VERIFYING_LIVE и записал DONE.
04 / Live log console
| Field | Purpose |
|---|---|
| timestamp | Local/UTC-readable event time. |
| severity | INFO / WARN / ERROR / SUCCESS. |
| stage | PREFLIGHT / CRAWL / CLASSIFY / DEDUP / VALIDATE / DEPLOY / VERIFY. |
| event | Structured event code. |
| message | Human-readable one-line explanation. |
| url | Relevant URL when applicable. |
| progress | Compact counts/position if applicable. |
| reason | Normalized reason/error code. |
| job_id | Job identity. |
| state_version | Canonical state version at event time. |
| Severity | Meaning |
|---|---|
| INFO | Normal progress. Neutral styling. |
| SUCCESS | Checkpoint or meaningful successful outcome. |
| WARN | Recoverable anomaly, skipped branch, degraded confidence, retry. |
| ERROR | Current action failed or job blocked. |
| Level | Stage | Event | Message | URL |
|---|---|---|---|---|
| INFO | PREFLIGHT | SITEMAP_DISCOVERY | Found sitemap index with 14 child sitemaps | https://example.com/sitemap_index.xml |
| INFO | CRAWL | FETCH_OK | Fetched article candidate 218 / 870 | https://example.com/project/abc |
| WARN | CLASSIFY | CLASSIFY_EXCLUDE | Excluded uncertain page: no qualifying content image | https://example.com/video/123 |
| WARN | CRAWL | FETCH_RETRY | HTTP 429. Retrying after server delay | https://example.com/archive/page/12 |
| SUCCESS | STATE | CHECKPOINT_COMMITTED | First 30 valid articles ready for review | — |
| ERROR | DEPLOY | LIVE_VERIFY_FAILED | Published batch returned HTTP 404 | https://work.mathchast.com/datasets/example/articles-031-060.html |
05 / Log UX
| Control | Behavior |
|---|---|
| Auto-scroll | Default on while user is at bottom; stop auto-scroll when user scrolls upward. |
| Pause visual stream | Pauses rendering only, never worker execution. |
| Filter severity | All / warnings / errors / success. |
| Filter stage | Preflight / crawl / classify / dedup / deploy / verify. |
| Search | Search visible log text, URL, event code. |
| Copy visible | Copies current filtered view. |
| Copy diagnostic packet | Copies compact job header + last N relevant events + current error/state. |
| Clear view | Clears browser view only; does not alter state/event history needed by current session. |
| No heavy archive | MVP does not promise historical log analytics across months. |
06 / First-30 OWNER GATE
| Element | Contract |
|---|---|
| Preview header | Source, ordering strategy, classifier/profile version, count found. |
| Rows | Sequence preview, title, original/canonical URL. |
| Flags | Warnings for low ordering confidence or partial source coverage. |
| Continue | Persists owner approval, transitions to RUNNING_FULL. |
| Reject & tune | Stops full crawl; returns job to corrective/tuning flow without publishing. |
| No silent edits | If preview is wrong, fix rules/profile and re-run preview; do not just delete bad rows manually. |
Кнопка не просто закрывает модальное окно. Она создаёт durable approval event, после чего job может перейти из WAITING_FOR_OWNER в RUNNING_FULL.
07 / Actions
| Action | Availability / rule |
|---|---|
| Start | Available after valid URL + successful preflight readiness conditions. |
| Continue | Only in WAITING_FOR_OWNER. |
| Reject & tune | Only in WAITING_FOR_OWNER. |
| Cancel | Allowed in running states; must checkpoint safely. |
| Retry failed step | Only where canonical state explicitly defines retry action. |
| Open final dataset | Only after final live URL exists. |
| Copy diagnostic packet | Always available once job exists. |
08 / Copy diagnostic packet
| Field | Included |
|---|---|
| job_id | Exact job ID. |
| source_url | Normalized source. |
| status | Current canonical status. |
| state_version | Version. |
| current_phase | Phase. |
| current_activity | Activity. |
| counts | Current counters. |
| last_checkpoint_id | Checkpoint. |
| last_error | Normalized error summary. |
| next_exact_action | What system expects next. |
| recent_events | Last relevant structured events, bounded length. |
09 / Interaction and accessibility
| Rule | Contract |
|---|---|
| Do not encode status by color only | Always include text/icon label. |
| Keyboard | All buttons, filters and log controls keyboard accessible. |
| Readable log | Monospace but not tiny; wrap toggle or horizontal scroll. |
| Sticky context | Job/status header stays visible while logs move. |
| Responsive | Desktop-first but usable on tablet/mobile for monitoring. |
| No full-page reload | Prefer state/log polling or stream update while preserving scroll/filters. |
10 / Failure modes
| ID | Failure | Required behavior |
|---|---|---|
| F-09-01 | Log stream disconnects | Show STREAM DISCONNECTED; keep canonical state polling; reconnect without changing job. |
| F-09-02 | Canonical state unavailable | Show state unavailable; never infer RUNNING/DONE from last log line. |
| F-09-03 | Duplicate events | De-duplicate by event ID/sequence in client if stream reconnect replays. |
| F-09-04 | Out-of-order events | Render by event sequence/timestamp but status comes only from canonical state. |
| F-09-05 | Huge log volume | Virtualize/bound client buffer; diagnostic packet uses bounded relevant tail. |
| F-09-06 | Owner double-clicks Continue | Action must be idempotent; one durable approval event. |
| F-09-07 | Browser reopened | Reload current canonical job state; reconnect to current event stream. |
| F-09-08 | DONE shown too early | Forbidden; UI maps DONE only from canonical job status after live verification. |
11 / Definition of Done
| ID | Criterion |
|---|---|
| A-09-01 | User can start with one URL without technical crawler parameters. |
| A-09-02 | Preflight plan is visible before mass crawl. |
| A-09-03 | Current canonical status and activity are always visible. |
| A-09-04 | Live logs update without full-page reload. |
| A-09-05 | A screenshot of an error contains job/status/stage/message/URL or reason context. |
| A-09-06 | Copy diagnostic packet produces a compact AI-readable troubleshooting payload. |
| A-09-07 | WAITING_FOR_OWNER exposes Continue and Reject & tune, and no full crawl starts before approval. |
| A-09-08 | Continue is idempotent and survives reload. |
| A-09-09 | Log disconnect does not change job state. |
| A-09-10 | UI never derives DONE from textual log content. |
| A-09-11 | Final dataset link appears only after live verification. |
| A-09-12 | Log filtering/search does not affect execution. |
| A-09-13 | User can cancel safely from supported running states. |
| A-09-14 | Page remains understandable on restart/reopen using canonical state. |
12 / Luna Medium bounded blocks
| Block | Scope | Expected result |
|---|---|---|
| LUNA-09-A | Static UI shell | Service/job page layout with mock state. |
| LUNA-09-B | Canonical state adapter | Render statuses, phase, activity, counters. |
| LUNA-09-C | Live event stream | SSE/WebSocket/polling selected from SP-03 runtime facts. |
| LUNA-09-D | Log console UX | Filters/search/autoscroll/copy. |
| LUNA-09-E | Diagnostic packet | Bounded copy/export payload. |
| LUNA-09-F | First-30 owner gate | Preview + Continue/Reject actions. |
| LUNA-09-G | Reconnect/reload behavior | State reload + event resume/dedup. |
| LUNA-09-H | Browser acceptance tests | Run status/error/gate/final-link scenarios. |