Repository navigation
fix(ui): gateway logs truncate complete persisted messages - #117666
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 1, 2026, 9:57 PM ET / August 2, 2026, 01:57 UTC. ClawSweeper reviewWhat this changesThe PR updates the Control UI Logs parser to display a persisted log record’s complete canonical message before older positional fragments, with regression tests for modern and legacy records. Merge readinessThe patch is a focused, source-backed repair: current main parses raw gateway-log lines through the Control UI parser, which selects positional fragments before the persisted complete message. The PR reverses that precedence, retains the legacy positional fallback, adds targeted coverage, and has credible served-UI proof; it remains open only for the protected Priority: P2 Review scores
Verification
How this fits togetherThe Gateway returns bounded raw log lines through flowchart LR
A[Gateway log file] --> B[Gateway logs.tail response]
B --> C[Control UI log refresh]
C --> D[Structured log parser]
D --> E[Canonical message selection]
E --> F[Searchable Logs dashboard]
Decision needed
Why: The source, tests, successful checks, and real UI proof support the repair, but the repository policy reserves protected-label handling for explicit human judgment. Before merge
Agent review detailsSecurityNone. PR surfaceSource 0, Tests +49. Total +49 across 2 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the canonical top-level-message precedence with the legacy positional fallback, then merge the clean final result after maintainer approval. Do we have a high-confidence way to reproduce the issue? Yes. A current-main Is this the best way to solve the issue? Yes. Preferring the logger-produced canonical message at the UI parsing boundary fixes the owner of the display defect while preserving the existing positional-only fallback for older records. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 5dca33a8fb67. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Merged via squash.
|
Co-authored-by: Peter Steinberger <[email protected]>
…elf-release * commit '10a390ed7fa88d09da0d4523c3ed1e3550ece5c6': (4646 commits) fix(release): allow larger npm plugin artifacts (openclaw#117745) refactor(macos): consolidate gateway process fixtures (openclaw#117740) fix(ui): preserve complete persisted log messages (openclaw#117666) fix(ui): decode artifact previews as UTF-8 (openclaw#117657) fix(control-ui): restore sandbox media previews (openclaw#117689) fix(plugins): link host declared as direct dependency (openclaw#117738) fix(macos): avoid self-named defaults suite (openclaw#117690) fix(inference): preserve run ownership and completion delivery (openclaw#117731) test(talk): align browser E2E tool completion test: consolidate OpenClaw E2E fixtures (openclaw#117701) fix(release): ignore bundle fields in npm locks (openclaw#117730) fix(meeting-bot): keep configured host options internal refactor(line): remove dead card helpers (openclaw#117729) perf(cli): attribute command startup stages (openclaw#117720) refactor(whatsapp): deduplicate reply delivery test fixtures (openclaw#117710) docs(changelog): note bounded WebRTC tool calls docs(changelog): note meeting audio bounds fix(meeting-bot): preserve node host SDK surface test(talk): split WebRTC tool lifecycle coverage fix(meeting-bot): break node host import cycle ... # Conflicts: # package.json # src/agents/model-auth.ts
What Problem This Solves
Fixes an issue where users viewing Gateway Logs in the Control UI would see only the first positional log fragment when a persisted record already contains the complete flattened message.
Why This Change Was Made
The logger already produces the authoritative, complete top-level
message. The Control UI now reads that canonical field before positional fragments while retaining the existing positional-only fallback for older records and preserving subsystem, timestamp, level, and ANSI handling.User Impact
Operators now see complete gateway diagnostics in the Logs dashboard, including trailing context that previously disappeared. Existing older log records continue to display normally.
Evidence
request failedinstead ofrequest failed retry later.OPENCLAW_VITEST_MAX_WORKERS=1 node scripts/run-vitest.mjs run --config test/vitest/vitest.ui.config.ts ui/src/pages/logs/data.test.ts.google,ws_reconnect_events,agents_lifecycle,feishu_delivery).gpt-5.6-sol, high reasoning, P0–P3, zero findings, confidence 0.99; native TruffleHog 3.96.0 clean.c614538e46448ae736ea9e2330bcd62e125425f8; two files; production delta +8/-8 (net zero).c614538e46448ae736ea9e2330bcd62e125425f8: 1/1 passed using actual Google Chrome150.0.7871.187, the real Vite-served Logs page, and a mocked Gateway WebSocket serving canonical persisted JSONL via the actuallogs.tailrequest.{"0":"{\"subsystem\":\"gateway\"}","1":"request failed","2":"retry later","message":"request failed retry later","time":"2026-08-01T15:00:00.000Z","_meta":{"logLevelName":"ERROR"}}. The actual visible Logs row preserved the entire authoritativemessageasrequest failed retry later; a generic multi-part worker record preservedartifact conversion failed retry tomorrow, and an unchanged positional-only legacy record remained visible.retry laterreturned exactly the full visible messagerequest failed retry later, proving the previously lost trailing context is both rendered and searchable; time, level, and subsystem columns remained intact, with no Gateway or unknown-agent error.PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/qa400-logs-fidelity-proof.e2e.test.ts(the isolated temporary proof spec was removed after the run; the frozen reviewed tree remained unchanged).logs-complete-persisted-messages.pngandlogs-searches-preserved-trailing-context.pngunder/private/tmp/openclaw-qa400-logs-fidelity-c614-browser-artifacts/; structured persisted-record/rendered-row/search evidence is inlogs-fidelity-proof.jsonin the same directory./private/tmp/openclaw-qa400-logs-fidelity-c614-browser-proof.log(Test Files 1 passed;Tests 1 passed; duration16.18s).