Skip to content

fix(chat): preserve reading navigation during history loading - #4846

Merged
reachjalil merged 1 commit into
devfrom
fix/thread-reading-continuity
Sep 10, 2026
Merged

reachjalil merged 1 commit into
devfrom
fix/thread-reading-continuity

Conversation

@reachjalil

Copy link
Copy Markdown
Member

Summary

Follow-up to #4838: loading older history must not override a newer reading destination.

  • Preserve explicit top and reserved-history positions when full history arrives, and promptly mount the destination range.
  • Navigate once to the first late-arriving Find result. Raw query changes, closure, reader input (including during debounce), and explicit navigation cancel or supersede that pending jump.
  • Show “Searching...” while history is incomplete instead of prematurely reporting no matches.
  • Isolate reading positions, geometry, controller callbacks, and submission tracking by session owner. Legacy positions remain readable and ownership survives geometry eviction.
  • Update the existing streamed-history journey's persistence reader to use the exact owner-qualified key, retaining neighbor-isolation assertions.

Ownerless legacy positions are claimed once by the first committed owner; their original owner cannot be recovered. Known-owner legacy positions cannot migrate elsewhere or overwrite a newer owned position.

Verification

Candidate: e572778942ea0022dd2b37341f5d549c34b17dd2, based on dev at fb3bc5b219ec3904baeeefc9738930b2bcb7d096. Commit signature verified.

Passed from apps/app:

pnpm exec bun test --isolate tests/find-bar.test.tsx tests/find-store.test.ts tests/session-scroll.test.tsx tests/progressive-message-list.test.tsx ./tests/session-history.test.tsx tests/live-step-scroll.test.ts
pnpm typecheck
  • 75 passed, 0 failed, 0 skipped, 402 assertions; exit 0.
  • App typecheck and git diff --check: exit 0.
  • The debounce cancellation regression was first reproduced as two failing cases with two passing controls, then corrected.
  • Focused coverage includes delayed Find results, cancellation, partial-history top navigation, two owners sharing a session ID, geometry eviction, and persisted legacy decoding.
  • The updated journey storage key was checked against production principal/organization/endpoint/workspace/session assembly; the journey itself was not executed.

Proof verdict: Incomplete

Exact-head real-app journey evidence is missing. Scroll geometry in component checks is simulated; native anchoring and smooth scrolling are not established.

Existing runtime owners for follow-up proof:

pnpm evals:e2e session-full-history-on-open
pnpm evals:e2e new-split-session

The updated persistence reader also belongs to streamed-markdown-answer. No real-app responsiveness or memory improvement is claimed.

Scope and overlap

Independent PR targeting dev. Does not change progressive batch scheduling, message history actions, or task execution.

The PageUp/focus-reveal fix in #4742, the Find-clearance change in #4780, and the full-history cold-reload claim in #4792 are not duplicated. The owner-key reader migration changes a different part of the existing journey. Those PRs retain their own proof and merge requirements. Required repository CI is unchanged.

@vercel

vercel Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
openwork-app Ready Ready Preview Sep 10, 2026 8:40pm UTC
openwork-den Ready Ready Preview Sep 10, 2026 8:40pm UTC
openwork-diagnostics Ready Ready Preview Sep 10, 2026 8:40pm UTC
openwork-landing Ready Ready Preview, v0 Sep 10, 2026 8:40pm UTC

@github-actions

Copy link
Copy Markdown
Contributor

Warden review summary — Clear

Native findings: 0. Blocking policy matches before consolidation: 0. Full finding text remains in Warden's native checks and review threads. This comment retains only native IDs, severity, skill attribution, and safe locations. Analysis run

Reported trigger coverage (not proof of complete repository or context coverage): diff-security-review (137546 ms), confidentiality-review (84295 ms), spec-provenance-review (168152 ms), desktop-den-sync-review (167217 ms).

Blockers

  • None.

Advisories

  • None.

Needs recheck

  • None.

Observed review-thread metrics

  • Unique observed run attempts in retained window: 1
  • Distinct heads in retained window: 1
  • Current unresolved Warden threads: 0 of 0 observed
  • Observed resolved/unresolved transitions in retained snapshots: 0 / 0
  • First observed resolved/unresolved (state at first collection, not event time): 0 / 0
  • Precision: unavailable (no adjudications; no TP/FP values are inferred)
  • Observation window: 1/20 run attempts retained; truncated: false
  • Transition snapshot: 0/0 current attributed threads retained (limit 500); truncated: false

Thread states are read-only collection snapshots. These metrics are neither lifetime totals nor exact resolution times, and this summary is not clearance authority.

@diff-warden diff-warden Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (e572778942ea0022dd2b37341f5d549c34b17dd2). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run

@github-actions

Copy link
Copy Markdown
Contributor

Passed · 12/12 tests · 18/18 assertions · 8 images

Commit e572778942ea0022dd2b37341f5d549c34b17dd2 · selected evidence

Open review report

This branch was successfully deployed

4 active deployments
Preview – openwork-landing — e5727789 Deployed Sep 10, 2026 by vercel[bot]
Preview – openwork-app — e5727789 Deployed Sep 10, 2026 by vercel[bot]
Preview – openwork-den — e5727789 Deployed Sep 10, 2026 by vercel[bot]
Preview – openwork-diagnostics — e5727789 Deployed Sep 10, 2026 by vercel[bot]
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