Repository navigation
bug(client): Feedback page says "No errors recorded" when the host could not read its error log - #2836
Conversation
…ThinkFlowLab#2833) Fixes ThinkFlowLab#2833 Docs-not-needed: the Feedback page's empty state is pinned by its new test and the changelog fragment; docs/subsystems/core-client.md documents the list's split and Clear, not this sentence. Risk tier: T1 Owner: Dev-1 Reviewer: Reviewer Written-by: Dev-1 Bot: Dev-1 Base: 1e27f10 Claim-Id: 1fd7cb86bd1148d7be89842b4e92cb2d ## What changed `core/src/client/feedback.js` (`FeedbackPage()`) drew `No errors recorded.` whenever the list it built was empty, and never read `report.unread` — the field the host has sent since ThinkFlowLab#2604 to say it could not read the diagnostics log at all. A host whose log is unreadable (for example `EACCES` after a permission change) was therefore drawn as a host with a clean log, exactly when the truth was that the errors were not shown. The empty state now reads the field: when it is a string, the row names the reason and says the errors the log holds are not shown; when it is absent, the old sentence stays. Rows the report does carry are untouched, so the notice never replaces them. The new `{reason}` key also has its zh entry. ## What ran - Red first at the base `1e27f10e`, twice: 3 tests / 2 pass / 1 fail, identical apart from temp paths and durations (`the empty state claims a clean log: ...`). - After the fix: 3/3. Neighbourhood (11 files: diagnostics x3, feedback x4, i18n, error-toast-code, shell-level, state-link-hardlink): 97/97. - `build-client` and `build-client --check`: exit 0; `core/client.js` rebuilt. - `generate`: rewrites only `patches/ds-bot/0001-core-fixes.patch` (+14/-4) and `patches/ds-bot/0008-client-bundle.patch` (+8/-3), plus the new `patches/ds-bot/files/test/feedback-unread-log.test.js`; the other eight patches are byte-identical. `check` three ok lines, `canonical` a no-op.
|
Verdict: PASS at 8b7e1f5 Ran at this tip: Red first is real: with only Review points:
|
|
Merged: e16c1d3 (squash). First queue entry was removed at 05:26:20Z because |
Fixes #2833
Owner: Dev-1
Reviewer: Birfy
Written-by: Dev-1
Bot: Dev-1
Claim-Id: 1fd7cb86bd1148d7be89842b4e92cb2d
Risk tier: T1
Base: 1e27f10
Docs-not-needed: the Feedback page's empty state is pinned by its new test and the changelog fragment; docs/subsystems/core-client.md documents the list's split and Clear, not this sentence.
What happened
The host has sent
report.unreadsince #2604: when it could not read<home>/logs/diagnostics.jsonlat all (for exampleEACCESafter a permission change), the report carriesentries: [],total: 0andunread: "EACCES".core/src/client/feedback.jsnever read that field, so the Feedback page's empty state saidNo errors recorded.— claiming a clean log exactly when the truth was that the errors it holds were not shown.Reproduction, with
core/src/client/feedback.jsat1e27f10eand a report shaped{ entries: [], total: 0, unread: 'EACCES' }: the page drawsRecent errors · 0and the rowNo errors recorded.(hintFailed model calls and FlyBot problems show here, newest first.).What changed
FeedbackPage()now reads the field —const unread = typeof report?.unread === 'string' ? report.unread : undefined— and the empty-state row becomesThe error log could not be read ({reason}); the errors it holds are not shown.when it is set, with the hint unchanged. With the same report the page now drawsRecent errors · 0andThe error log could not be read (EACCES); the errors it holds are not shown.Rows the report does carry are untouched: the notice belongs to the empty state only, so a report with entries keeps drawing its rows exactly as before. The new
{reason}key has its zh entry incore/src/client/i18n.js.core/client.jsis rebuilt, and the patch series carries the two sources inpatches/ds-bot/0001-core-fixes.patchand the bundle inpatches/ds-bot/0008-client-bundle.patch; the new test is mirrored inpatches/ds-bot/files/test/feedback-unread-log.test.js.Verification at the tip
Red first at the base
1e27f10ed89d364e085db24b8d3e21b0af0e1792, with onlycore/test/feedback-unread-log.test.jsadded and the source untouched, twice:# tests 3 / # pass 2 / # fail 1both runs, identical apart from temp paths and durations —the empty state claims a clean log: … Recent errors · 0 No errors recorded. ….After the fix: the same file
3/3, and the neighbourhood of 11 suites (diagnostics,diagnostics-corrupt-line,diagnostics-link, fourfeedback-*,i18n,error-toast-code,shell-level,state-link-hardlink)97/97.TZ=UTC npm run verifyat the tip: exit 0 — core lintFound 88 warnings and 0 errors,build-client --checkclean,10 patches apply cleanly,core/ equals ds-bot/ + patches/ds-bot/,canonicala no-op ("patches/ds-bot/ is what generate writes"), core3082/3082, project 147, social 619, tree 149, timeline 166, workflow 528,.github/scripts+policy673, interop 37, live-e2e 34, zeronot oklines.node core/scripts/build-client.mjs --checkandnode core/scripts/build-client.mjsexit 0.Not run: nothing outside that set —
npm run verifycovers every suite;arch-docswas run explicitly on the committed tree (ARCH_DOCS_BASE=1e27f10e node core/scripts/check-arch-docs.mjs→arch-docs: OK (8 changed file(s))) andgit diff --check 1e27f10e..HEADis clean.Known boundary
{reason}is the host's own short code (EACCES,EISDIR, …), printed as sent; this page has EN and ZH tables and both carry the sentence.Checkpoint
{ "pr": 2836, "claim": "Chief", "issue": 2833, "summary": "The Feedback page's empty state now reads `report.unread`: a host that could not read its diagnostics log draws `The error log could not be read (EACCES); the errors it holds are not shown.` instead of `No errors recorded.` The field has been on the wire since #2604; only the client dropped it. Nothing else moves — without `unread` the page renders byte-identically, rows stay when entries exist, and `total` is still the host's number. `core/client.js` is rebuilt rather than hand-edited and both sources stay in the patch series. Red first 1/3 at the base, 3/3 after, verify green at the tip.", "files": [ "core/src/client/feedback.js", "core/src/client/i18n.js", "core/test/feedback-unread-log.test.js", "core/client.js", "patches/ds-bot/0001-core-fixes.patch", "patches/ds-bot/0008-client-bundle.patch", "patches/ds-bot/files/test/feedback-unread-log.test.js", "changelog.d/2833-feedback-unread-log.fixed.md" ], "checks": { "ran": "node --import ./test/harness-resolve.mjs --test --test-timeout=120000 test/feedback-unread-log.test.js; TZ=UTC npm run verify", "result": "green", "at": "8b7e1f5035f1db83f1b5ad96da837cfd9cb10831" }, "next": "none — ready for review" }