Skip to content

project(board): a cut metrics note hides the failure reason — show the whole sentence in the note - #3159

Merged
Birfy merged 1 commit into
ThinkFlowLab:mainfrom
HugoXK:dev/1-metrics-note-full
Nov 18, 2026
Merged

Birfy merged 1 commit into
ThinkFlowLab:mainfrom
HugoXK:dev/1-metrics-note-full

Conversation

@HugoXK

@HugoXK HugoXK commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #3157

Owner: Dev-1
Written-by: Dev-1
Tier: T1
Claim-Id: 21c66a9a786d4cc6824e53481c4a6e2c
Branch: dev/1-metrics-note-full
Base: ed935b3

What changed

The Project board's metrics note cut a long read-failed: detail at 60 characters and appended …, so the part of the reason a reader needs could not be read anywhere in the window. The note now draws the whole sentence the client already had.

  • core/src/client/project-board.js: shortDetail and READ_DETAIL_MAX are gone; metricsReasonText hands the complete readFailed[1] to t('reading GitHub failed ({detail})'), and the stale "cut short" comment is corrected. No title is added — one source of truth, and a hover is not a reason a touch screen can read.
  • core/test/project-board-view.test.js: the case is now a long read-failed detail is readable in full in the note; it asserts p.bt-project-metrics-note's textContent equals the whole sentence and carries no …. The old helper that returned only the note text grew a node accessor so the test reads the paragraph itself.
  • English windows are unchanged (hostText), every other zh reason is unchanged, and no new dictionary sentence was added.

Red first (clean base ed935b30, test-only tree, two runs)

not ok 1 - a long read-failed detail is readable in full in the note
  + actual - expected
  + '指标不可用:读取 GitHub 失败(/pulls answered 403: the token this Project reads with cann…)'
  - '指标不可用:读取 GitHub 失败(/pulls answered 403: the token this Project reads with cannot list pull requests on the source repository)'

Same output on both runs (# pass 0 / # fail 1).

Ran (tip 1093520f9b2fc4e012a3bea8c12d7d9fa07dba76, tree bbaf4f46c563d49ca401626fd3894bbcbc77cadb)

  • node --test core/test/project-board-view.test.js → 37/37 pass, two consecutive runs
  • TZ=UTC npm run verify → exit 0, 0 not ok: core 3293, plane 20, social 711, tree 149, timeline 172, workflow 538, project 147, .github+policy 686, interop 37, live-e2e 34
  • node scripts/ds-bot-patches.mjs check → 10 patches apply cleanly in order and core/ equals ds-bot/ + patches/ds-bot/
  • node scripts/ds-bot-patches.mjs canonical → generate is a no-op
  • (cd core && node scripts/build-client.mjs --check) → clean
  • ARCH_DOCS_BASE=ed935b304f71f1da386a73c31bb1f0e070573691 node core/scripts/check-arch-docs.mjs → arch-docs: OK (6 changed file(s))
  • node .github/scripts/changelog.mjs check → 2 fragment(s) in changelog.d/ are well formed (no new fragment: no new copy)

Not run: smoke test (client-only change; no index.js or src/host/ file), and the CI package job's pack check / typecheck / actionlint.

risk-tier: T1; basis: core/client.js=T1, core/src/client/project-board.js=T1, core/test/project-board-view.test.js=T1, patches/ds-bot/0008-client-bundle.patch=T1, patches/ds-bot/files/src/client/project-board.js=T1, patches/ds-bot/files/test/project-board-view.test.js=T1

Why the 0008 patch diff is large

patches/ds-bot/0008-client-bundle.patch changes 3,024 lines although core/client.js changes only 7: deleting the 6-line shortDetail block shifts the diff's alignment through a long duplicated region in the generated bundle, so the generator re-splits its hunks (largest stored hunk 11,893 lines, now 8,140). patches check reconstructs core/client.js byte for byte and canonical reports generate is a no-op, so this is generator output, not a hand edit.

Screenshots — same Project board view, same viewport 1280×800, zh window

Both images are the real ProjectBoardPane (which draws the real ProjectMetrics, its real CSS and the real zh dictionary) with the same 403 reason from the red-first, rendered by a static harness: real component + real zh dictionary, static harness, no full chromium on this machine (only chrome-headless-shell, no X11). Layout measured in the same page: the note's box and the cards' box are identical in both images (note 14px tall, cards starting 6px below), so only the sentence differs.

Before — the note is cut and ends in …:

before: the metrics note cuts the reason

After — the note reads the whole 403 reason:

after: the metrics note reads the whole reason

The images live on the fork's dev/1-shots-3157 branch (raw links pinned to commit a53ac6a9e429161d0ed0b0e9a4e66d40ab0ea368), because the API cannot upload images and they must not move this PR's tip.

Docs-not-needed: the note's sentence, its wording and the read it reports are unchanged; only a detail it used to shorten is drawn whole, and no documented behaviour moves.

Checkpoint

{
"pr": 3159,
"claim": "Dev-1",
"issue": 3157,
"summary": "The Project board's metrics note cut a long read-failed detail at 60 characters and appended an ellipsis, so the actionable tail of the failure reason could not be read anywhere. The note now draws the whole sentence the client already had, and the cut helper is gone. English windows and every other zh reason are unchanged, and no new copy was added.",
"files": [
"core/src/client/project-board.js",
"core/test/project-board-view.test.js",
"core/client.js",
"patches/ds-bot/0008-client-bundle.patch",
"patches/ds-bot/files/src/client/project-board.js",
"patches/ds-bot/files/test/project-board-view.test.js"
],
"checks": {
"ran": "TZ=UTC npm run verify",
"result": "green",
"at": "1093520f9b2fc4e012a3bea8c12d7d9fa07dba76"
},
"next": "none — ready for review"
}

The Project board's metrics note cut a long read-failed detail at 60 characters
and appended an ellipsis, so the part of the reason that mattered could not be
read anywhere on screen; a title tooltip would only hide it behind a hover a
touch screen cannot perform. The note now draws the whole sentence the client
already had, and the cut helper is gone.

Docs-not-needed: the note's sentence, its wording and the read it reports are
unchanged; only a detail it used to shorten is drawn whole, and no documented
behaviour moves.
@HugoXK
HugoXK marked this pull request as draft November 18, 2026 02:34
@github-actions github-actions Bot added the risk:T1 Risk tier T1 (client, tests, generated files), set by the controller from the diff label Nov 18, 2026
@HugoXK
HugoXK marked this pull request as ready for review November 18, 2026 03:20
@HugoXK

HugoXK commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

@Birfy merge request — tip f1127513777456a986397e0e868516f9d3baf4f9 (T1)

  • T1 needs no PASS from the repository reviewer for the queue; this tip is frozen and no further commit will land on dev/1-metrics-note-full.
  • Checks at this tip after the ready flip: 18 success + 2 skipped (window check, live · real model), 0 red, nothing running; tests-ok, enqueue-guard, merge-gate, policy-sign, package, the four plugins jobs, mock · Node 24, ubuntu-latest · Node 24 · DSH 0.2.0-rc.2 all success.
  • Mergeable clean, branch is ours (HugoXK/FlyBot), maintainer_can_modify: true, not a draft. 6 files +993/−2104: core/src/client/project-board.js +30/−3, core/test/project-board-view.test.js +25/−2, the generated core/client.js and patches/ds-bot/0008-client-bundle.patch / patches/ds-bot/files/* (the big 0008 hunk is generator reflow: the 6 deleted lines make the generator re-emit the bundle's repeated section, largest hunk 11,893 → 8,140; patches check rebuilds core/client.js byte-for-byte and canonical is a no-op).
  • No binary in the reviewed tree. UI screenshots are sha-pinned: raw.githubusercontent.com/HugoXK/FlyBot/a53ac6a9e429161d0ed0b0e9a4e66d40ab0ea368/p770/{before,after}.png, same viewport 1280×800, zh window, rendered by the real ProjectBoardPane with the real zh dictionary in a static harness; 画面内容未核(无视觉模型),留待 Birfy/owner 那一眼。
  • Red-first, on base ed935b30 with only the test added: not ok 1 - a long read-failed detail is readable in full in the note; the fix removes shortDetail/READ_DETAIL_MAX so the note carries the whole sentence and wraps (no title), English window and every other zh reason untouched.
  • Fixes #3157; base is ed935b30 while main has since moved to 57579cdd — mergeable_state: clean, no conflict.

@Birfy
Birfy added this pull request to the merge queue Nov 18, 2026
Merged via the queue into ThinkFlowLab:main with commit a306e3c Nov 18, 2026
20 checks passed
@Birfy
Birfy deleted the dev/1-metrics-note-full branch November 18, 2026 03:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:T1 Risk tier T1 (client, tests, generated files), set by the controller from the diff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

project(board): a cut metrics note hides the failure reason — show the whole sentence in the note

2 participants