Fix #225: chronological timeline #226

Merged
crueber merged 2 commits from fix/issue-225 into main 2026-09-09 04:19:24 +00:00
Owner

Chronological thread timelines (oldest top → newest bottom) on issues AND PR conversations via the shared ThreadTimeline (02 §11, 08 §2).

  • ThreadTimeline sorts stable-by-seq at render; the event-window wire stays newest-first (02 §7 Decisions) — no API change, client-side adaptation only.
  • Issue page: Older-events button moved above the thread; cursor reads the unfiltered assembly tail (no overlap/dup); viewport pinned across prepends (anchorScrollTop); SSE refetches never autoscroll (documented scroll policy: never yank the reader).
  • PR conversations inherit with zero PR-side code — both surfaces consistent by construction.
  • New pure lib web/src/lib/thread-order.js + web/test/unit/thread-order.test.js (8 ordering tests).
  • Comment-only corrections where code said newest-last but meant newest-first (web/sdk/src/issues.js, internal/issues/http_test.go assertion text; assertion logic unchanged).
  • Decisions appended to docs/features/02, 03, 08 in the same change (law 12).

Tests: node --test full unit suite 438/438 green; Go TestGetIssueHTTP green; gofmt/vet clean; no new deps.
Browser verification is OPEN: no CDP/chrome runnable in this environment (:9222 down) — long-thread top-oldest/bottom-newest + load-older + live-append in both themes with zero console errors still needs a real-Chromium pass. Do NOT merge before that.

Chronological thread timelines (oldest top → newest bottom) on issues AND PR conversations via the shared ThreadTimeline (02 §11, 08 §2). - ThreadTimeline sorts stable-by-seq at render; the event-window wire stays newest-first (02 §7 Decisions) — no API change, client-side adaptation only. - Issue page: Older-events button moved above the thread; cursor reads the unfiltered assembly tail (no overlap/dup); viewport pinned across prepends (`anchorScrollTop`); SSE refetches never autoscroll (documented scroll policy: never yank the reader). - PR conversations inherit with zero PR-side code — both surfaces consistent by construction. - New pure lib `web/src/lib/thread-order.js` + `web/test/unit/thread-order.test.js` (8 ordering tests). - Comment-only corrections where code said newest-last but meant newest-first (`web/sdk/src/issues.js`, `internal/issues/http_test.go` assertion text; assertion logic unchanged). - Decisions appended to docs/features/02, 03, 08 in the same change (law 12). Tests: node --test full unit suite 438/438 green; Go TestGetIssueHTTP green; gofmt/vet clean; no new deps. Browser verification is OPEN: no CDP/chrome runnable in this environment (:9222 down) — long-thread top-oldest/bottom-newest + load-older + live-append in both themes with zero console errors still needs a real-Chromium pass. Do NOT merge before that.
ThreadTimeline sorts stable-by-seq at render (oldest top, newest
bottom); the event-window wire stays newest-first, no API change.
Issue page: Older-events button above the thread, viewport pinned
across prepends (anchorScrollTop), never autoscrolled on SSE
appends. PR conversations inherit via the shared component with no
PR-side code. Decisions appended to 02/03/08; ordering pinned by
web/test/unit/thread-order.test.js.
Both-missing-seq now falls to the index tiebreak explicitly instead of
returning NaN (sort coerces NaN to 0 — same result, but implicit).
Behavior identical on all real inputs; thread-order tests still 8/8.
Sign in to join this conversation.
No description provided.