Files
wyndham-ARR/.project-docs/50-evidence/topics/2026-07-30-task-log-relocation-and-scope.md
2026-07-31 15:11:42 +08:00

51 lines
3.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Task-Log Relocation and Daily-Only Scope
## Metadata
- Date: 2026-07-30
- Status: Historical before-state; superseded by the 2026-07-31 upload interaction update
- Scope: Desktop task-log information architecture, interaction and backend query boundary
- Confidence: Fact
- Source: `arr_web/static/`, `arr_web/repository.py`, focused tests and live local browser verification
- Last verified: 2026-07-30
- Stale trigger: The header utility, trace API/query, processing pipeline type, or task-console selection/polling lifecycle changes
## User-Facing Outcome
- The desktop header position formerly occupied by `手机看板` now contains a `任务日志` button.
- The sole existing black task console moved out of the 日报处理 panel into a native modal dialog; no duplicate console or alternate trace implementation was introduced.
- Before the 2026-07-31 upload interaction update, starting an upload opened the dialog. Mouse or keyboard activation
of a daily-history row still opens the selected job's trace.
- Closing the dialog returns focus to the opener. Trace polling runs only while the dialog is open and the selected job remains active.
- The `/h5` route and assets remain intact, but the desktop header no longer links to them.
## Scope Proof
- `JOBS_SQL`, `JOBS_COUNT_SQL` and `JOB_TRACE_RUN_SQL` each explicitly require
`run.pipeline_type = 'opera_daily'`.
- `GET /api/jobs/{job_id}/trace` resolves exactly one validated job ID.
- `get_job_trace` reads that run's processing attempts, artifact deliveries or legacy direct submissions, linked
Finance daily versions and processing-run outbox events, then sends those allowlisted facts to `build_job_trace`.
- The console therefore represents one daily XML-processing job across upload, processor, validation, database and
linked downstream-notification stages. It is not a global application/server log and does not enumerate other daily
jobs, reporting monthly-run histories or company-report jobs.
## Verification
- `node --check arr_web/static/app.js`: passed.
- Focused unit set: 12 passed across task-log UI contracts, repository SQL/privacy contracts and trace projection.
- At 1440×900, the live modal measured 1040×692, remained centered, had no page horizontal overflow and rendered a
current 13-event terminal. Closing returned focus to `#task-log-trigger`.
- Activating a different daily-history row selected the matching job and loaded `SUCCEEDED`, `13 events` and an `END`
terminal line.
- At 375×812, the modal measured 355×792 with 10-pixel margins. The header trigger remained displayed; document and
dialog horizontal-overflow checks were both false, with long raw lines confined to the terminal scroller.
- Browser warning/error count was zero.
## Known Verification Boundary
The broader `tests.test_arr_web` class currently issues anonymous requests while separate in-progress login work has
already changed the application to return redirects/401 responses. That class reported 13 authentication-boundary
failures/errors before reaching the relocation assertions. Authentication files were left untouched; task-specific
static contracts were isolated in `tests/test_arr_web_task_log_ui.py`.