Skip to content

fix(web): make REPL Latest navigation win over stale anchor restoration - #333

Merged
samheutmaker merged 3 commits into
developmentfrom
codex/release-ui-acceptance
Oct 17, 2026
Merged

samheutmaker merged 3 commits into
developmentfrom
codex/release-ui-acceptance

Conversation

@samheutmaker

@samheutmaker samheutmaker commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

After paging backward far enough to evict recent history, clicking Latest in the REPL can fetch the right records but leave the viewport at older cells. The history fetch starts an insertion-anchor restore while the click handler is awaiting it. Cancel that obsolete restore after the read completes, after the existing user-input cancellation guard, so Latest reaches the live execution.

This is a separate UI bug fix following merged #331. The defect exists in the frozen pre-reorganization frontend as well. The only production-code change is the additional stopRestore() call; there are no SDK, protocol, provider, backend, or persisted-data changes.

Refresh the existing acceptance harnesses without dropping behavioral assertions: wait for startup before contrast checks, use the real chat-prefetch threshold and upward gesture, avoid clicking a disappearing Latest button when counting loaded cells, explicitly configure an isolated local provider, use Appearance's current motion control, and scroll virtualized history to its gap controls. Add REPL, settings, child-agent, activity, and history-recovery acceptance to normal SDK CI with retained artifacts. Activity stress and recovery each use their existing standalone mode with a fresh fixture, preserving every assertion while avoiding interference from the prior scenario’s retained history budget.

Validation:

  • Reproduced Latest fetching new history while remaining at the old viewport before the fix.
  • All 11 REPL workflows pass in Chromium and Firefox, including live execution in the viewport, pagination/anchors, child isolation, bounded history, and light/dark accessibility.
  • All 14 settings workflows and the dedicated child-agent scenarios pass in both browsers.
  • 19 related reading-position/history-action tests pass; npm run check:web passes.
  • All 19 activity scenarios pass in each browser. Dedicated history recovery passes in both browsers: count/byte gaps, failed-read retry, retained execution identity, stable anchors, and a large gap limited to four automatic pages before explicit continuation.
  • Rebuilt staged desktop smoke passes with this renderer: daemon reuse, settings reload, multiple-host restoration, tab/draft preservation and drag/split interactions; no renderer errors.
  • Fresh CI is required on the retargeted development base before merging.

Include in #286 once the release gates pass.


Note

Medium Risk
The only product change is scroll/anchor restoration in virtualized reading lists, which is user-visible but localized; broader CI and test-harness churn increases merge risk without changing protocol or persistence.

Overview
Fixes a ReadingList race where Latest could finish loading newer history but stay scrolled on older REPL/chat rows because the awaited fetch had started an insertion-anchor restore. jumpToLatest now calls stopRestore() again after loadLatest() completes (still honoring the existing intent guard), so an explicit Latest wins over a stale restore.

CI and harness: SDK CI adds a Renderer release acceptance block (REPL viewer, settings, chat-activity in agents/activity/history-only modes) and uploads those result dirs as browser evidence. Acceptance scripts are updated to match current UI—Appearance Reduce motion, startup visibility, real history-prefetch thresholds, safer REPL cell counting, scrollable gap discovery (including REPL), and a fixture-local provider in settings—while splitting history recovery into its own run so activity stress does not evict the gap scenario.

Docs note that Latest supersedes pending insertion-anchor restores and describe the acceptance repairs.

Reviewed by Cursor Bugbot for commit 7c8b15c. Bugbot is set up for automated code reviews on this repo. Configure here.

Base automatically changed from codex/release-readiness to development October 17, 2026 03:04
@samheutmaker
samheutmaker merged commit 23012e9 into development Oct 17, 2026
22 checks passed
@samheutmaker
samheutmaker deleted the codex/release-ui-acceptance branch October 17, 2026 03:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant