Skip to content

fix: Add load recent sessions button in Agent sessions - #843

Merged
govindavashishtha merged 6 commits into
mainfrom
fix/hv/when-i-open-the-session-page-fe-link-with-the-session-id
Sep 23, 2026
Merged

govindavashishtha merged 6 commits into
mainfrom
fix/hv/when-i-open-the-session-page-fe-link-with-the-session-id

Conversation

@harshil-2096

@harshil-2096 harshil-2096 commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Summary

image image

Closes #

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

Low Risk
UI-only session list filtering and URL share state; no API or auth changes.

Overview
Adds a Load recent sessions control on the Agent Sessions page when the list is filtered to a narrow, timestamp-pinned window (typical after opening or deep-linking a session), so users can return to the normal last 30 days list instead of staying stuck on an empty sidebar.

SessionsPage detects that pinned range (no rolling s_tw, span ≤ twice the session buffer) and passes onLoadRecentSessions, which resets filters to defaultSessionTimeRange(), clears sessionId, and updates share URL params. AgentSessions renders the button above the list and skips the full-page empty state while that callback is present, so the action stays available even when the pinned range returns no rows.

Unit tests cover empty pinned ranges, clearing selection/URL on load, and that the button stays visible while switching sessions within the narrow window.

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

@changeset-bot

changeset-bot Bot commented Sep 22, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: b543ef1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@truefoundry/trueforge-ui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@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 packages/trueforge-ui/src/atoms/agent-details/SessionsPage.tsx Outdated
@govindavashishtha
govindavashishtha enabled auto-merge (squash) September 22, 2026 15:14

@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 d689d38. Configure here.

Comment thread packages/trueforge-ui/src/atoms/agent-details/AgentSessions.tsx
@govindavashishtha
govindavashishtha merged commit dd421b7 into main Sep 23, 2026
10 checks passed
@govindavashishtha
govindavashishtha deleted the fix/hv/when-i-open-the-session-page-fe-link-with-the-session-id branch September 23, 2026 04:49
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.

2 participants