fix(web): bound workspace member pagination - #169
Conversation
Chat member directory followed has_more with no cursor-cycle cap. Settings overview already rejects a repeated cursor. Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
|
🦞👀 Pull request received. I will update this pull request when review starts. |
Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
|
Codex review: needs real behavior proof before merge. Reviewed August 18, 2026, 6:01 PM ET / 22:01 UTC. ClawSweeper reviewWhat this changesThe PR adds a cursor-cycle guard to Chat’s workspace-member pagination, tests the helper, and refreshes the checked-in web assets. Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 5 items remain Keep open: the prior P2 blocker remains because the channel and thread embed views still use the same unbounded member-pagination loop, and the PR has only isolated test proof. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: FAIL (partial) — step 2 Assertions:
How this fits togetherClickClack fetches workspace members in pages for Chat and embedded channel/thread views. Each client follows API pagination metadata to build member lists used for mentions and message UI. flowchart LR
A[Workspace selection] --> B[Chat and embed views]
B --> C[Member directory API]
C --> D[Cursor validation]
D --> E[Member collection]
E --> F[Mention and message UI]
Before merge
Findings
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Use the shared validator in Chat and both embedded member loaders, then provide a redacted served-client or production-boundary trace showing a repeated cursor terminates safely. Do we have a high-confidence way to reproduce the issue? Yes, from source: a repeated non-empty cursor causes both embed do/while loops to request the same page indefinitely because neither records prior cursors. Is this the best way to solve the issue? No: centralizing the validator is appropriate, but this patch must apply it to every full-directory caller of the same API rather than only ChatApp. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found, but no applicable review policy affected this item. Codex review notes: model internal, reasoning high; reviewed against acf70f8206c5. LabelsLabel changes:
Label justifications:
EvidenceAcceptance criteria:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
What Problem This Solves
The chat workspace member directory follows
has_morewith no cursor-cycle cap. Settings overview already rejects a repeated member-directory cursor. Chat did not, so a stuck page can hang the web client.Why This Change Was Made
Align chat pagination with the existing settings overview guard.
User Impact
A repeated member cursor stops the directory load instead of looping fetch forever.
Evidence
terminal output from the shared helper used by ChatApp:
Real behavior proof
Behavior addressed: Chat member pagination rejects an incomplete page and a repeated cursor.
Real environment tested: macOS, Node, clone at /tmp/pr-clickclack on the patched branch.
Exact steps or command run after this patch: cd apps/web && node --test src/lib/member-cursor.test.ts
Evidence after fix: terminal output copied below.
Observed result after fix: A repeated cursor throws
Member directory repeated a pagination cursor.What was not tested: Live ClickClack workspace UI against a wedged API.