fix: make daily task log header-only

This commit is contained in:
Wyndham ARR
2026-08-11 17:23:33 +08:00
parent c947230471
commit f2c1265a1c
16 changed files with 251 additions and 34 deletions

View File

@@ -3,7 +3,7 @@
## Metadata
- Date: 2026-07-30
- Status: Historical before-state; superseded by the 2026-07-31 upload interaction update
- Status: Historical before-state; opening interactions superseded through 2026-08-11
- 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
@@ -15,7 +15,8 @@
- 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.
of a daily-history row also opened the selected job's trace until the 2026-08-11 entry-boundary correction. Current
behavior allows only the header `任务日志` link to open the dialog.
- 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.

View File

@@ -4,6 +4,10 @@ Date: 2026-08-06
Status: implemented and runtime-active
Scope: authenticated desktop Daily Report UI only
Interaction note (2026-08-11): the row-owned task-log behavior described as the surrounding before-state below is
superseded in local source by the Daily row / task-log entry-boundary correction. After that change is deployed, only
the top-right `任务日志` link opens the log dialog.
## Reported Problems
- Clicking `待人工处理` opened the task log instead of the manual-price operation panel.

View File

@@ -0,0 +1,32 @@
# `8.6 修正.XML` workbook-to-XML conversion
## Metadata
- Date: 2026-08-11
- Status: Converted and independently accepted by the active processor
- Scope: user-supplied `8.6 修正.XML` workbook and generated upload artifact
- Confidence: High for the generated artifact; no original workbook bytes were changed
## Input classification
- The supplied file is an XLSX ZIP package despite its `.XML` filename (`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`).
- It contains three sheets, with 181 data rows on `Sheet1`; every row has the same `20260806` / `06-08-26` business-date pair.
- The first sheet exposes the flattened Opera `RES_DETAIL` fields needed by the ARR parser, plus separate flattened comment and trace columns.
## Conversion and validation
- Generated a new UTF-8 `RES_DETAIL` XML with the fixed path
`LIST_G_GROUP_BY1/G_GROUP_BY1/LIST_G_RESERVATION/G_RESERVATION`.
- Mapped the workbook's required reservation fields without changing business values; flattened comment and trace values
were placed in the parser's existing nested `RES_COMMENT` and `TRACE_TEXT` paths. The workbook remained read-only.
- Output artifact: `8.6 修正-可上传.XML`, SHA-256
`27b41f4338967ba2b5ae03161fa7eb7b63929a9708c0106e01a740e6c2cc1c91`.
- `xmllint`, strict UTF-8 decoding and ARR processor 4.0.0 all pass. Processor result is `success` for business date
`2026-08-06`: 181 source rows, 37 rate-code exclusions, 29 duplicates, 115 retained rows, zero price-unmatched
rows and zero review items. No daily/Finance/database write was performed.
## Boundary
This artifact is a deterministic reconstruction from the supplied workbook, not a byte-for-byte restoration of the
malformed original Opera export. Upload the generated XML as a new task; keep the source workbook and the original
malformed XML as historical inputs.

View File

@@ -0,0 +1,41 @@
# `0806.XML` invalid UTF-8 diagnosis
## Metadata
- Date: 2026-08-11
- Status: Read-only input diagnosis; source re-export required
- Scope: exact desktop `0806.XML`, processor 4.0.0 isolated replay, public deployment health probe
- Confidence: High for the inspected file; the authenticated remote artifact hash was not read
## Observed behavior
- The public ARR endpoint at `8.138.234.141:8765` remained healthy: anonymous `/healthz` returned HTTP 200 while
authenticated detail endpoints remained protected.
- The inspected `0806.XML` is 694,286 bytes with SHA-256
`b41c103bfad7f9f0abb25af159a0c5920f0f9b89e156d31919521d057b62639f`.
- An isolated active-processor replay exited 3 with `status=failed`, `business_date=null`, zero parsed source rows and
exactly one `XML_PARSE_ERROR`: `not well-formed (invalid token): line 1872, column 0`.
- The structured result is processor 4.0.0 / Schema 4.0 with `activation_eligible=false`; every outcome count and
review count is zero. No price matching was reached.
## Root cause
- The XML declaration says UTF-8, but line 1872 inside a `TRACE_TEXT` value begins with bytes
`ED A0 BC ED BE 89`.
- Those six bytes are the CESU-8 representation of UTF-16 surrogate pair `U+D83C U+DF89`, whose intended Unicode
scalar is `U+1F389`. UTF-8 must encode that scalar as one four-byte sequence; XML 1.0 also forbids surrogate code
points as PCDATA.
- The file contains exactly one such surrogate pair. Its closing XML structure is present, so this is an encoding
defect rather than a truncated export.
- Manual price review is intentionally unavailable: only a non-empty error set consisting entirely of
`PRICE_UNMATCHED` can enter `review_required`; `XML_PARSE_ERROR` is a formal input failure before pricing.
## Safe recovery boundary
Re-export the 2026-08-06 Opera XML as standards-compliant UTF-8, preferably after the upstream trace text no longer
contains the mis-encoded character, then upload the new export as a fresh task. Do not edit the registered source
artifact or convert the failed task into a review case. A fresh replay is still required to discover any later price
or business-rule issues after parsing succeeds.
No original XML byte, upload, review item, database fact, Finance version, object-store object, event or runtime process
was changed during this diagnosis.

View File

@@ -0,0 +1,47 @@
# Daily Row / Task-Log Entry Boundary
Date: 2026-08-11
Status: implemented locally; production deployment pending
Scope: authenticated desktop Daily Report interaction only
## Reported Problem
On the production Daily page, clicking a concrete history row opened the technical task-log dialog. The intended
information architecture is stricter: logs are an on-demand utility available only from the top-right `任务日志` link;
ordinary users should not reach them while inspecting business rows.
## Root Cause
The row behavior was explicit rather than accidental bubbling. `renderJobs()` emitted every row with `role=button`,
`tabindex=0`, a selected state and a log-specific accessible label. Delegated click and Enter/Space handlers then called
`selectJob(..., { showLog: true })`; CSS reinforced the action with a pointer cursor, focus ring and selected-row tint.
## Change
- Render Daily history as ordinary table rows with no row action attributes.
- Remove the row click and Enter/Space log activation paths and the `showLog` option from internal trace selection.
- Remove the row pointer/focus/selected styling so appearance and accessibility semantics match the inert behavior.
- Preserve the explicit `待人工处理` button, report download link and top-right `任务日志` dialog trigger.
No API, trace query, processor, Finance, database, upload or monthly-publication behavior changed.
## Verification
- `node --check arr_web/static/app.js`: passed.
- All `test_arr_web*.py` tests: 81 passed in 1.105 seconds.
- The focused static contract proves `openTaskLog();` has exactly one caller, tied to `#task-log-trigger`, and rejects
any row key handler, log-selection call, interactive semantics or `.job-row` styling.
- An isolated local page served the real edited HTML/CSS/JavaScript with two mock Daily records. Browser checks proved:
- clicking ordinary `0805.XML` kept `#task-log-dialog.open === false` and left the hash at `#daily`;
- clicking `待人工处理` focused the visible review panel with one issue and kept the log closed;
- clicking the top-right `任务日志` link opened the dialog;
- the ordinary row had no role/tabindex, computed cursor was `auto`, and the console had zero errors.
The local browser used only mock GET responses. It did not upload, save a price, finalize/cancel a review, download an
artifact, write Finance/database state or contact a production mutation endpoint.
## Deployment Boundary
An unauthenticated production static-asset read correctly redirected to login, and no credentials or deployment path
were inferred. The edited source has not been committed, pushed, restarted or deployed to `8.138.234.141:8765`; the
production symptom therefore remains until the controlled release step is authorized and completed.