STATIYA_POLUCHATEL_1
SP-09 · OPERATOR UI & LIVE LOGS
P3 / OWNER CONTROL · STATE FIRST · LOGS SECOND

Интерфейс оператора и живые логи

Пользователь должен видеть, что сервис делает прямо сейчас: какой этап идёт, сколько найдено, что исключено, где произошла ошибка и чего система ждёт дальше. При этом UI всегда берёт статус из canonical job state, а logs остаются объясняющим потоком событий.

6main screens
13job statuses
14acceptance checks
1owner Continue gate

01 / Основные экраны

UI-01
Service landing

Single URL input, source/job history summary, start action, clear note that one job handles one resource.

UI-02
Preflight plan

Human-readable crawl plan, discovered sitemap/archive/feed surfaces, selected ordering strategy, confidence, warnings, Start/Cancel.

UI-03
Live run console

Current phase/activity, counters, progress indicators, live logs, checkpoint status, pause/cancel where allowed.

UI-04
First-30 review

Preview of first up to 30 valid records, obvious source/order/status info, Continue / Reject & tune.

UI-05
Validation/deploy

Read-only progress through VALIDATING → DEPLOYING → VERIFYING_LIVE.

UI-06
Completed result

DONE/PARTIAL/FAILED summary, totals, final live link, master index link, copy diagnostic summary.

03 / Status mapping

StatusHuman meaning
CREATEDReady to begin.
PREFLIGHTBuilding traversal plan.
PREFLIGHT_READYPlan ready for execution.
RUNNING_FIRST_BATCHCollecting first preview records.
WAITING_FOR_OWNERNeeds Continue/Reject decision.
RUNNING_FULLFull source crawl in progress.
VALIDATINGChecking corpus, IDs, batches and manifests.
DEPLOYINGPublishing validated artifacts.
VERIFYING_LIVEChecking real Work URLs.
DONEAll checks passed.
PARTIALFinished with explicit coverage limitation.
FAILEDBlocked by an error that needs correction.
CANCELLEDStopped by owner/system.
UI не интерпретирует log text как state.

Например, строка «deploy completed» не делает job DONE. DONE показывается только когда canonical state уже прошёл VERIFYING_LIVE и записал DONE.

04 / Live log console

FieldPurpose
timestampLocal/UTC-readable event time.
severityINFO / WARN / ERROR / SUCCESS.
stagePREFLIGHT / CRAWL / CLASSIFY / DEDUP / VALIDATE / DEPLOY / VERIFY.
eventStructured event code.
messageHuman-readable one-line explanation.
urlRelevant URL when applicable.
progressCompact counts/position if applicable.
reasonNormalized reason/error code.
job_idJob identity.
state_versionCanonical state version at event time.
SeverityMeaning
INFONormal progress. Neutral styling.
SUCCESSCheckpoint or meaningful successful outcome.
WARNRecoverable anomaly, skipped branch, degraded confidence, retry.
ERRORCurrent action failed or job blocked.
LevelStageEventMessageURL
INFOPREFLIGHTSITEMAP_DISCOVERYFound sitemap index with 14 child sitemapshttps://example.com/sitemap_index.xml
INFOCRAWLFETCH_OKFetched article candidate 218 / 870https://example.com/project/abc
WARNCLASSIFYCLASSIFY_EXCLUDEExcluded uncertain page: no qualifying content imagehttps://example.com/video/123
WARNCRAWLFETCH_RETRYHTTP 429. Retrying after server delayhttps://example.com/archive/page/12
SUCCESSSTATECHECKPOINT_COMMITTEDFirst 30 valid articles ready for review—
ERRORDEPLOYLIVE_VERIFY_FAILEDPublished batch returned HTTP 404https://work.mathchast.com/datasets/example/articles-031-060.html

05 / Log UX

ControlBehavior
Auto-scrollDefault on while user is at bottom; stop auto-scroll when user scrolls upward.
Pause visual streamPauses rendering only, never worker execution.
Filter severityAll / warnings / errors / success.
Filter stagePreflight / crawl / classify / dedup / deploy / verify.
SearchSearch visible log text, URL, event code.
Copy visibleCopies current filtered view.
Copy diagnostic packetCopies compact job header + last N relevant events + current error/state.
Clear viewClears browser view only; does not alter state/event history needed by current session.
No heavy archiveMVP does not promise historical log analytics across months.

06 / First-30 OWNER GATE

ElementContract
Preview headerSource, ordering strategy, classifier/profile version, count found.
RowsSequence preview, title, original/canonical URL.
FlagsWarnings for low ordering confidence or partial source coverage.
ContinuePersists owner approval, transitions to RUNNING_FULL.
Reject & tuneStops full crawl; returns job to corrective/tuning flow without publishing.
No silent editsIf preview is wrong, fix rules/profile and re-run preview; do not just delete bad rows manually.
Continue — это state transition.

Кнопка не просто закрывает модальное окно. Она создаёт durable approval event, после чего job может перейти из WAITING_FOR_OWNER в RUNNING_FULL.

07 / Actions

ActionAvailability / rule
StartAvailable after valid URL + successful preflight readiness conditions.
ContinueOnly in WAITING_FOR_OWNER.
Reject & tuneOnly in WAITING_FOR_OWNER.
CancelAllowed in running states; must checkpoint safely.
Retry failed stepOnly where canonical state explicitly defines retry action.
Open final datasetOnly after final live URL exists.
Copy diagnostic packetAlways available once job exists.

08 / Copy diagnostic packet

FieldIncluded
job_idExact job ID.
source_urlNormalized source.
statusCurrent canonical status.
state_versionVersion.
current_phasePhase.
current_activityActivity.
countsCurrent counters.
last_checkpoint_idCheckpoint.
last_errorNormalized error summary.
next_exact_actionWhat system expects next.
recent_eventsLast relevant structured events, bounded length.
EXAMPLE DIAGNOSTIC PACKET JOB: SPJ_2026_000123 SOURCE: https://example.com/ STATUS: RUNNING_FULL STATE_VERSION: 48 PHASE: CRAWL ACTIVITY: Fetching archive page 12/41 COUNTS: discovered=870 fetched=421 included=196 excluded=178 duplicates=11 failed=3 pending=449 LAST CHECKPOINT: CP-05-0007 LAST ERROR: HTTP_429 on /archive/page/12 NEXT ACTION: retry after Retry-After=60s RECENT EVENTS: [...] bounded relevant tail

09 / Interaction and accessibility

RuleContract
Do not encode status by color onlyAlways include text/icon label.
KeyboardAll buttons, filters and log controls keyboard accessible.
Readable logMonospace but not tiny; wrap toggle or horizontal scroll.
Sticky contextJob/status header stays visible while logs move.
ResponsiveDesktop-first but usable on tablet/mobile for monitoring.
No full-page reloadPrefer state/log polling or stream update while preserving scroll/filters.

10 / Failure modes

IDFailureRequired behavior
F-09-01Log stream disconnectsShow STREAM DISCONNECTED; keep canonical state polling; reconnect without changing job.
F-09-02Canonical state unavailableShow state unavailable; never infer RUNNING/DONE from last log line.
F-09-03Duplicate eventsDe-duplicate by event ID/sequence in client if stream reconnect replays.
F-09-04Out-of-order eventsRender by event sequence/timestamp but status comes only from canonical state.
F-09-05Huge log volumeVirtualize/bound client buffer; diagnostic packet uses bounded relevant tail.
F-09-06Owner double-clicks ContinueAction must be idempotent; one durable approval event.
F-09-07Browser reopenedReload current canonical job state; reconnect to current event stream.
F-09-08DONE shown too earlyForbidden; UI maps DONE only from canonical job status after live verification.

11 / Definition of Done

IDCriterion
A-09-01User can start with one URL without technical crawler parameters.
A-09-02Preflight plan is visible before mass crawl.
A-09-03Current canonical status and activity are always visible.
A-09-04Live logs update without full-page reload.
A-09-05A screenshot of an error contains job/status/stage/message/URL or reason context.
A-09-06Copy diagnostic packet produces a compact AI-readable troubleshooting payload.
A-09-07WAITING_FOR_OWNER exposes Continue and Reject & tune, and no full crawl starts before approval.
A-09-08Continue is idempotent and survives reload.
A-09-09Log disconnect does not change job state.
A-09-10UI never derives DONE from textual log content.
A-09-11Final dataset link appears only after live verification.
A-09-12Log filtering/search does not affect execution.
A-09-13User can cancel safely from supported running states.
A-09-14Page remains understandable on restart/reopen using canonical state.

12 / Luna Medium bounded blocks

BlockScopeExpected result
LUNA-09-AStatic UI shellService/job page layout with mock state.
LUNA-09-BCanonical state adapterRender statuses, phase, activity, counters.
LUNA-09-CLive event streamSSE/WebSocket/polling selected from SP-03 runtime facts.
LUNA-09-DLog console UXFilters/search/autoscroll/copy.
LUNA-09-EDiagnostic packetBounded copy/export payload.
LUNA-09-FFirst-30 owner gatePreview + Continue/Reject actions.
LUNA-09-GReconnect/reload behaviorState reload + event resume/dedup.
LUNA-09-HBrowser acceptance testsRun status/error/gate/final-link scenarios.

13 / Handoff

NEXT PLANNING ARTIFACT Statiya_poluchatel_1_10_AI_READABLE_DATASET_SCHEMA.html SP-10 defines the machine-readable dataset contract used by: - MASTER INDEX - batch HTML files - AI traversal - validation - deploy verification - future dataset update mode