Repository navigation
fix(web): make REPL Latest navigation win over stale anchor restoration - #333
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
npm run check:webpasses.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.
jumpToLatestnow callsstopRestore()again afterloadLatest()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.