Skip to content

hotfix: session bugging a bit when clicking around #3465

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chitalian
Copy link
Contributor

No description provided.

Copy link

vercel bot commented Mar 18, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
helicone ❌ Failed (Inspect) Mar 18, 2025 10:34pm
helicone-bifrost ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 18, 2025 10:34pm
helicone-eu ❌ Failed (Inspect) Mar 18, 2025 10:34pm

Copy link
Contributor

promptless bot commented Mar 18, 2025

✅ No documentation updates required.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR addresses session page performance and loading state management issues, focusing on optimizing refresh behavior and consolidating loading states.

  • Changed initial isLive state to false in /web/pages/sessions/[session_id].tsx to prevent automatic session refreshes
  • Added consolidated isAnyLoading state in /web/components/templates/sessions/sessionsPage.tsx to streamline loading indicators
  • Bug identified: Duplicate isLoading check in loading state conditions needs to be removed
  • Wrapped SessionContent in React Fragment for proper component rendering

2 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile

Comment on lines +139 to +146
return (
isLoading ||
allNames.isLoading ||
allNames.isRefetching ||
isLoading ||
names.isLoading ||
names.isRefetching
);
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: isLoading is listed twice in the conditions, which is redundant and may mask other loading states

Suggested change
return (
isLoading ||
allNames.isLoading ||
allNames.isRefetching ||
isLoading ||
names.isLoading ||
names.isRefetching
);
return (
isLoading ||
allNames.isLoading ||
allNames.isRefetching ||
names.isLoading ||
names.isRefetching
);

Copy link

fumedev bot commented Mar 18, 2025

Summary

  • Introduces a new isAnyLoading state to handle multiple loading conditions in SessionsPage.
  • Replaces direct loading checks with the new isAnyLoading state in the rendering logic.
  • Changes the initial state of isLive in SessionDetail from true to false.
  • Ensures SessionContent component is wrapped in a React fragment in SessionDetail.

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