Skip to content

bugfix: fix avoid extra API calls on try again and improve session polling - #1434

Open
harshil-2096 wants to merge 3 commits into
mainfrom
bugfix/hv/try-again-button-intermittently-gets-stuck
Open

harshil-2096 wants to merge 3 commits into
mainfrom
bugfix/hv/try-again-button-intermittently-gets-stuck

Conversation

@harshil-2096

@harshil-2096 harshil-2096 commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Closes AGE-2821 & AGE-2870

Changes

How was this tested?

Checklist

  • I have read the contributing guidelines
  • pnpm build, pnpm test, pnpm typecheck, pnpm lint:ci, and pnpm format:check pass locally
  • Tests added/updated where it makes sense
  • No hand-edits to generated code (packages/trueforge-sdk, python/trueforge_sdk, .github/fern/openapi/openapi.json, docs/openapi.json) — fork PRs omit SDK regen; maintainers regenerate after merge
  • Docs / .env.example updated if configuration or behavior changed

Note

Medium Risk
Changes touch core conversation rewind/branching and live sidebar status sync; incorrect parent-chain or fold stripping could corrupt transcripts, while polling gaps could briefly show stale list state.

Overview
Try Again / branch now rewinds the in-memory session snapshot when the retried turn and its parent are already loaded, instead of always refetching history through the server. New turn-parent plumbing (previousTurnId on records, stripped fold state including sub-agent threads) powers rewindLoadedSnapshotThroughTurn; edit/retry still falls back to buildSnapshotThroughTurn when the parent chain is missing.

Chat history sidebar polls running/paused sessions every 30s (was 5s), skips a tick while a list request is still in flight, and does not poll the open main thread (live stream owns that status). Sidebar ordering considers the later of lastMessageAt and lastActivityAt, and approving a paused turn clears the row’s waiting dot from the live transcript so stale getSession snapshots cannot restore paused.

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

… extra api calls and improve session polling

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread .changeset/local-try-again-rewind.md Resolved

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit c258aa3. Configure here.

This branch has not been deployed

No deployments
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