Issue order is not sequential #48

Closed
opened 2026-09-04 18:12:27 +00:00 by crueber · 3 comments
Owner

The issue order should be sequential.

image

It is currently showing 2, 3, 1. It should always show the latest issues at the top, and sort in reverse order.

The issue order should be sequential. ![image](/attachments/4481299b-7276-4183-a5df-8495f4232aa9) It is currently showing 2, 3, 1. It should always show the latest issues at the top, and sort in reverse order.
Author
Owner

Fixed by #58 (#58): combined list now always renders #N…#1. Root cause was server-side render sort (activity-first), not client merge. Index storage unchanged; Decisions amendments in docs 02 + 03. Not merging — awaiting review.

Fixed by #58 (https://git.packden.us/crueber/walhub/pulls/58): combined list now always renders #N…#1. Root cause was server-side render sort (activity-first), not client merge. Index storage unchanged; Decisions amendments in docs 02 + 03. Not merging — awaiting review.
Author
Owner

PR #58 review (scratch worktree @ a4827d1 + review fixup c7122da; main worktree untouched, read-only):

FINDINGS (file:line + resolution):

  1. Sort placement CORRECT — index storage untouched. internal/issues/store.go:282,285 and internal/pulls/service.go:245,248: upsertCard still uses activity-first sortCards; new sortCardsByNum is render-only. No action.
  2. All three ListIssues render paths covered (verified by reading, not faith) — service.go:845 (index-complete), :856 (LIST-failure degrade), :872 (LIST-merge). Pulls single path service.go:747. No action.
  3. pulls sort=created|updated silently overridden — ACCEPTABLE, not blocking. http.go:394-400 parses/validates sort= but ListPRs never consumed f.Sort; git log -S proves the param was dead since Wave C1 (bdebd02), so no working behavior is overridden. sort=created is now accidentally correct (creation order == num order). FIXED (c7122da): stale ListFilter.Sort comment claiming 'updated (default)' now states render is always number-descending. Follow-up suggestion (non-blocking): explicitly honor sort=updated or document inertness in 03 §8.
  4. after= cursor coherent — pools sorted num-desc before windowing; tests pin After:2->[1] + More flags; frontend Older buttons (Issues.jsx:165, Pulls.jsx:120) take cursor from server-ordered page tail, server order == display order. No action.
  5. SSE path safe — both pages refetch on SSE and wrap render in sortByNumDesc (Issues.jsx:134, Pulls.jsx:96). No action.
  6. Negative control CREDIBLE — reverted render sorts in scratch: TestListIssuesNumberDesc fails [2 1 3] (exactly the claimed pre-fix order), TestListPRsNumberDesc fails [1 3 2]; restored, both pass.
  7. Coverage holds — issues 96.2%, pulls 97.8% (gate >=95%).
  8. No new imports — only stdlib time in issues service_test.go; sort pre-existing; JS sort.js dependency-free.
  9. JS sort idempotent — executed: [2,3,1]->[3,2,1]->[3,2,1], input unmutated; null-safe per tests.
  10. Doc amendments accurate — 02/03 Decisions match code.

TESTS: go test -race ./internal/issues/... ./internal/pulls/... -> ok (16.1s/2.2s). node --test web/test/unit/*.test.js -> 245 pass, 0 fail (scratch worktree needed a node_modules symlink to main for solid-js resolution; the 2 initial file-level failures were that env gap, unrelated to the PR). No browser per review instructions; no docker.

MERGE RECOMMENDATION: ready to merge (includes review fixup c7122da).

PR #58 review (scratch worktree @ a4827d1 + review fixup c7122da; main worktree untouched, read-only): FINDINGS (file:line + resolution): 1. Sort placement CORRECT — index storage untouched. internal/issues/store.go:282,285 and internal/pulls/service.go:245,248: upsertCard still uses activity-first sortCards; new sortCardsByNum is render-only. No action. 2. All three ListIssues render paths covered (verified by reading, not faith) — service.go:845 (index-complete), :856 (LIST-failure degrade), :872 (LIST-merge). Pulls single path service.go:747. No action. 3. pulls sort=created|updated silently overridden — ACCEPTABLE, not blocking. http.go:394-400 parses/validates sort= but ListPRs never consumed f.Sort; git log -S proves the param was dead since Wave C1 (bdebd02), so no working behavior is overridden. sort=created is now accidentally correct (creation order == num order). FIXED (c7122da): stale ListFilter.Sort comment claiming 'updated (default)' now states render is always number-descending. Follow-up suggestion (non-blocking): explicitly honor sort=updated or document inertness in 03 §8. 4. after= cursor coherent — pools sorted num-desc before windowing; tests pin After:2->[1] + More flags; frontend Older buttons (Issues.jsx:165, Pulls.jsx:120) take cursor from server-ordered page tail, server order == display order. No action. 5. SSE path safe — both pages refetch on SSE and wrap render in sortByNumDesc (Issues.jsx:134, Pulls.jsx:96). No action. 6. Negative control CREDIBLE — reverted render sorts in scratch: TestListIssuesNumberDesc fails [2 1 3] (exactly the claimed pre-fix order), TestListPRsNumberDesc fails [1 3 2]; restored, both pass. 7. Coverage holds — issues 96.2%, pulls 97.8% (gate >=95%). 8. No new imports — only stdlib time in issues service_test.go; sort pre-existing; JS sort.js dependency-free. 9. JS sort idempotent — executed: [2,3,1]->[3,2,1]->[3,2,1], input unmutated; null-safe per tests. 10. Doc amendments accurate — 02/03 Decisions match code. TESTS: go test -race ./internal/issues/... ./internal/pulls/... -> ok (16.1s/2.2s). node --test web/test/unit/*.test.js -> 245 pass, 0 fail (scratch worktree needed a node_modules symlink to main for solid-js resolution; the 2 initial file-level failures were that env gap, unrelated to the PR). No browser per review instructions; no docker. MERGE RECOMMENDATION: ready to merge (includes review fixup c7122da).
Author
Owner

Fixed by PR #58 (review: 1 comment fix on top; Go + JS gates green), merged. Closing.

Fixed by PR #58 (review: 1 comment fix on top; Go + JS gates green), merged. Closing.
crueber added this to the v1 milestone 2026-09-10 22:20:44 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
crueber/walhub#48
No description provided.