Repository navigation
ui: split the Work page into a summary, a compact list and detail actions - #625
Conversation
HugoXK-bot
left a comment
There was a problem hiding this comment.
Verdict: PASS at 872ba1c
Written-by: HugoXK-bot
Posted-by: HugoXK-bot
Tip SHA: 872ba1c
#610: project memory read a historical revision under the current entry's audience, and a hidden entry stayed a write target.
Ran:
npm run checkat the tip (treee7f21edaac1ed26ce2897bf0e2641672b088caa9) — exit 1, 1510/1511. The one failure istest/duplicates.test.ts:82("a body with many issue references cannot stall the event loop"), a wall-clock assertion that tripped at 1026 ms while fournpm run checkruns shared the box; re-rannpx tsx --test test/duplicates.test.tsalone — 13/13 pass. Flake from my own parallelism, not this diff; this PR does not touch that code.- forward-merged the tip onto live
maincdb0fefebde9019fb6b9dd34412cd83a5e29d096(the branch forked 31 commits back, atec887f8) — clean, landing treec521dd6855b209f7d1c072a5a0b2b5f513a667f0,npm run check1731/1731 exit 0 node scripts/pr-lint.mjs --pr 625—ok (#625, T2, 5 files)node scripts/risk-gate.mjsagainst the merge base —T2; basis: src/app.tsnode scripts/changelog.mjs check,node scripts/version.mjs check— ok- read the two call sites, the two new tests and the three doc edits
Not run: Docker image, a browser pass over /repos/:id/memory.
Findings. None blocking.
src/app.ts:1909: the revision list is filtered by each revision's own audience (audienceVisible(row.audience, role)), not the entry's, so an entry that moved fromrole:maintainertoprojectdoes not retroactively publish its old maintainer revision. The test attest/projectMemory.test.ts:187moves the entry toproject, switches the reader todeveloper, and asserts the revision count drops to 1 and the old revision is not listed — that is the exact hole.src/app.ts:1913: a direct?rev=Noutside the audience returns 404 rather than the body, and the test asserts the page does not contain the maintainer text. Good: a list filter alone would still be walked around by URL.src/app.ts:2043-2045: a write whose key belongs to an entry outside the actor's audience is refused beforewriteMemory, redirecting to the existingmemory_not_foundrefusal (src/views/memory.ts:64), so a hidden key is neither a write target nor a revision oracle — the test pins that a deliberately wrongexpected_revisionstill yields the same refusal, notmemory_revision_conflict. Correct order.store.listMemoryVersionsandstore.getMemoryVersionhave exactly two consumers, both in this file (:1909,:1912), so there is no second reader left unfiltered. Conclusion: complete for the reads this card names.
Non-blocking:
- The branch is based on
ec887f8and is 31 commits behind livemain;git diff <its PR base>..HEADtherefore shows main's newer schedule work as deletions. The landing merge is clean and I measured it, but the body carries noTest-mergedline — whoever queues this must merge the forward-merged tree, not the branch tree as-is. - The refusal copy reuses the absent-entry sentence ("write it again as a new entry") for a hidden entry. That is deliberate for non-disclosure and fine; a reader who is in the audience never sees it.
Conclusion: PASS at this tip. T2 by the gate; review-gate is the only red and this verdict supplies it.
|
Record only — superseded, not a duplicate. Closing this PR because the change it carried landed through its replacement Replacement: #724 (merged). Written-by: HugoXK |
872ba1c to
04e0d3f
Compare
HugoXK-bot
left a comment
There was a problem hiding this comment.
Verdict: PASS at f0c6cdc
Written-by: HugoXK-bot
Posted-by: HugoXK-bot
Read the tip f0c6cdc4910bb52cc9c73e274c1ca81a8ce0b510 (7 files, +110/−55, second parent 7d1e3ef1f809 is live main, so the merge ref CI ran is the tree I read; src/views/pages.ts blob f1ea9d8c matches the contents API).
Findings, none blocking:
src/views/pages.ts:1603— the queue line testsinput.activeJob === true, but the same page derivesactiveJobat:1392from any queued/running job injobs. When a job is running and the prop is unset, the line says "Work items start when they are runnable" instead of naming the running job. Use the derived value, as the triage card at:1492-1497already does.src/views/pages.ts:1596-1605— the precedence is repo disabled, invalid credential, instance not ready, automatic work off, running job. That order answers "why is nothing starting" correctly for every state; note that automatic-off intentionally wins over a running job.src/views/pages.ts:1588-1594— with no work items every state renders—and the summary contains no%; with items the share has a real denominator. The empty case is exactly what the old0%got wrong, andtest/pages.test.ts:1176-1201pins one dash per state plus "no 0%" and "no NaN".public/app.css:517-527— the summary, the row disclosure and the two-column phone band are scoped to.work-summary/.work-actions; nothing unscoped changes another table.test/tableCards.test.ts:186andtest/tableBandAffordance.test.ts:241-271now count the repos page without an extra carded table and still require one filter link per state inWORK_ITEM_STATESorder — consistent with#boardmoving from a<section>to the summary<div>and with the docs update.
Ran (exact tip tree; the tree came from the API tarball because github.com:443 is unreachable from this box, and the blob above was hash-checked against the contents API):
npm run check— lint 11 baseline warnings, typecheck clean, 2183/2183 tests, build oknode scripts/pr-lint.mjs --pr 625— ok (#625, T2, 7 files)node scripts/changelog.mjs check— 63 fragments oknode scripts/version.mjs check— 0.3.6 oknode scripts/secret-scan.mjs— no suspected value in the tracked files
Not run: a browser against production, Docker, real SMTP.
Checks at the tip: ci-ok success 12:11:00Z, test (24) success 12:10:01Z, pr-lint success 12:09:48Z; review-gate failure 12:08:58Z is the pre-verdict state this review replaces. Head unchanged by me.
Written-by: HugoXK
Fixes #804
Reopened at the owner's request: the close was not authorised by the owner. The branch
fix/610-memory-audienceis legacy; #610 is already fixed on main via #724. This PR is repackaged as the Work page redesign for #804.What changed
src/views/pages.ts?workState=...#work).Actionsdisclosure.Actions, not an empty cell.public/app.css: scoped.work-summaryand.work-actionsstyles using existing tokens.test/tableCards.test.ts,test/tableBandAffordance.test.ts,test/pages.test.ts: summary links/labels/shares, no extra board table, actions disclosure, create dialog and queue line.docs/architecture.mdandchangelog.d/804-work-page.changed.md.—for every share instead of a confident0%:shareisnullwhen the board has no items, andtest/tableBandAffordance.test.tspins one dash per state. The trend testan empty window is —, never 0 and never NaNis the red half of this fix; on the pre-merge branch tip it failed with a0%.No route, permission, state-machine or POST field changes; every existing action form remains reachable.
Why
The board was a 10-column table, the work list was another table with four inline action forms per row, and the create form was always open. The page now has one summary, one compact list and one actions disclosure, while the
#boardand#workanchors and allworkStatelinks stay.Ran:
npm run checkatf0c6cdc4910bb52cc9c73e274c1ca81a8ce0b510— pass: lint 11 baseline warnings, typecheck clean, 2183/2183 tests, build ok. It was run on this tree merged againstmain7d1e3ef1f809286768ace84ec420a1d8d576fa69, which is what this tip carries as its second parent.npx tsx --test test/repoReviewTrend.test.ts test/tableBandAffordance.test.ts test/pages.test.ts— pass, includingan empty window is —, never 0 and never NaNnode scripts/risk-gate.mjs—risk-tier: T2; basis: src/views/pages.tsnode scripts/changelog.mjs check— 63 fragments ok;node scripts/version.mjs check— 0.3.6 oknode scripts/secret-scan.mjs— no suspected value in the tracked filesNot run:
Risk and rollback
Risk: row actions are one click deeper (the disclosure), and the create form is behind the header button; every route and field is unchanged. The summary is derived from the same
workItemslist as the table, so counts and shares cannot disagree. Rollback: revert the commit; the board table and inline actions return.Docs
docs/architecture.mdnow describes the summary, the actions disclosure and the create dialog.