Skip to content
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

Adds useInfiniteQuery data fetching hook + fixes Inifinite Load issue in notes #9190

Open
wants to merge 52 commits into
base: develop
Choose a base branch
from

Conversation

JavidSumra
Copy link
Contributor

@JavidSumra JavidSumra commented Nov 23, 2024

Proposed Changes

@ohcnetwork/care-fe-code-reviewers


Merge Checklist

  • Add specs that demonstrate bug / test a new feature.
  • Update [product documentation](https://docs.ohc.network).
  • Ensure that UI text is kept in I18n files.
  • Prep screenshot or demo video for changelog entry, and attach it to the issue.
  • Request for Peer Reviews.
  • Completion of QA.

Summary by CodeRabbit

  • New Features

    • Enhanced patient note management with improved loading states and pagination.
    • Introduced edit history functionality for patient notes, accessible via a modal.
  • Bug Fixes

    • Resolved issues with state management during note addition and thread changes.
  • Refactor

    • Streamlined data fetching logic across multiple components using useInfiniteQuery.
    • Simplified state updates to ensure accurate reflection of the latest data.
    • Updated component properties and state interfaces to reflect recent changes in data handling.

@JavidSumra JavidSumra requested a review from a team as a code owner November 23, 2024 07:19
Copy link
Contributor

coderabbitai bot commented Nov 23, 2024

Walkthrough

The changes primarily involve updating several components related to patient notes management by replacing manual data fetching with the useInfiniteQuery hook from @tanstack/react-query. This update streamlines data retrieval, pagination, and loading state management across the components. Additionally, enhancements in state management during note addition and thread selection are implemented, along with the introduction of edit history functionality in the PatientNoteCard component.

Changes

File Change Summary
src/components/Facility/PatientConsultationNotesList.tsx Replaced manual data fetching with useInfiniteQuery, integrated loading state management, and updated useEffect for data changes.
src/components/Facility/PatientNotesList.tsx Similar updates as above, including state management and pagination improvements using useInfiniteQuery.
src/components/Facility/ConsultationDoctorNotes/index.tsx Modified tab click handler to reset state, updated note addition logic to prepend notes.
src/components/Facility/PatientNoteCard.tsx Introduced editHistory state and fetchEditHistory function for managing edit history display.
src/components/Patient/PatientDetailsTab/Notes.tsx Updated note addition logic to prepend new notes and reset state on thread change.
src/components/Patient/PatientNotes.tsx Revised note addition logic and state management, ensuring accurate reflection of server data.
src/components/Facility/DoctorNote.tsx Added hasMore property to DoctorNoteProps for pagination handling.
src/components/Facility/PatientNotesSlideover.tsx Updated state management for note addition, removed pagination properties, and reset state on thread change.
src/components/Facility/models.tsx Removed cPage and totalPages properties from PatientNoteStateType interface.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant PatientNotesList
    participant useInfiniteQuery
    participant DoctorNote

    User->>PatientNotesList: Add Note
    PatientNotesList->>useInfiniteQuery: Fetch Notes
    useInfiniteQuery-->>PatientNotesList: Return Notes
    PatientNotesList->>User: Display Updated Notes
    User->>DoctorNote: Scroll Down
    DoctorNote->>useInfiniteQuery: Check for More Notes
    useInfiniteQuery-->>DoctorNote: Return hasMore
    DoctorNote->>User: Load More Notes
Loading

Assessment against linked issues

Objective Addressed Explanation
Enhance scrolling experience in Discussion Notes (Issue #9188)
Implement better navigation for patient notes

Possibly related PRs

Suggested labels

tested

Suggested reviewers

  • rithviknishad
  • Jacobjeevan

Poem

In the land of notes, where patients dwell,
We fetch with ease, all stories to tell.
With a click and a scroll, the history flows,
Infinite queries, as everyone knows!
So hop along, let the data parade,
In this world of care, our changes cascade! 🐰✨

Tip

CodeRabbit's docstrings feature is now available as part of our Early Access Program! Simply use the command @coderabbitai generate docstrings to have CodeRabbit automatically generate docstrings for your pull request. This feature will be included in our Pro Plan when released.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c604aa0 and a68c960.

📒 Files selected for processing (2)
  • src/components/Facility/PatientConsultationNotesList.tsx (3 hunks)
  • src/components/Facility/PatientNotesList.tsx (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/components/Facility/PatientConsultationNotesList.tsx
  • src/components/Facility/PatientNotesList.tsx

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

netlify bot commented Nov 23, 2024

Deploy Preview for care-ohc ready!

Name Link
🔨 Latest commit a68c960
🔍 Latest deploy log https://app.netlify.com/sites/care-ohc/deploys/675d471c72fff9000893a52c
😎 Deploy Preview https://deploy-preview-9190--care-ohc.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Outside diff range and nitpick comments (2)
src/components/Facility/PatientNotesList.tsx (1)

Line range hint 1-105: Consider implementing a more robust infinite scroll solution

The current implementation might benefit from using established infinite scroll libraries or implementing virtual scrolling to handle large datasets more efficiently.

Consider these architectural improvements:

  1. Use a virtual scroll library like react-window or react-virtualized to efficiently render large lists
  2. Implement scroll position restoration using ScrollRestoration from react-router-dom
  3. Add loading states for individual batches to show progress without full-screen loading
  4. Consider implementing a cursor-based pagination instead of offset-based to prevent issues with concurrent updates

Example implementation structure:

import { FixedSizeList } from 'react-window';

interface NotesListProps {
  // ... existing props
  windowHeight: number;
}

const NotesListRow = ({ index, style, data }) => {
  const note = data.notes[index];
  return (
    <div style={style}>
      <DoctorNote note={note} />
    </div>
  );
};

const PatientNotesList = (props: NotesListProps) => {
  const [scrollOffset, setScrollOffset] = useState(0);
  
  // ... existing state and effects

  return (
    <FixedSizeList
      height={props.windowHeight}
      itemCount={state.notes.length}
      itemSize={120}
      onScroll={({ scrollOffset }) => {
        setScrollOffset(scrollOffset);
        // Trigger load more when near bottom
      }}
    >
      {NotesListRow}
    </FixedSizeList>
  );
};
src/components/Facility/PatientConsultationNotesList.tsx (1)

Line range hint 41-77: Enhance infinite scroll implementation to prevent unexpected reloads

The current implementation might be causing the reported issues with unexpected reloads and lost scroll position. Several improvements are recommended:

  1. The scroll position issue mentioned in Enhance Discussion Notes Chat History with Infinite Scrolling or Better Navigation Solution #9188 likely occurs because state updates trigger re-renders without preserving scroll position.
  2. Multiple rapid scroll events could trigger unnecessary fetches.
  3. The loading state might cause layout shifts during updates.

Consider these improvements:

  1. Implement scroll position preservation:
const scrollRef = useRef<HTMLDivElement>(null);
const scrollPosition = useRef(0);

const saveScrollPosition = () => {
  if (scrollRef.current) {
    scrollPosition.current = scrollRef.current.scrollTop;
  }
};

const restoreScrollPosition = () => {
  if (scrollRef.current) {
    scrollRef.current.scrollTop = scrollPosition.current;
  }
};

// Save position before fetch
saveScrollPosition();
fetchNotes().then(() => {
  setIsLoading(false);
  setReload?.(false);
  // Restore position after state update
  requestAnimationFrame(restoreScrollPosition);
});
  1. Add debouncing to prevent rapid fetches:
const debouncedHandleNext = useMemo(
  () => debounce(() => {
    if (state.cPage < state.totalPages) {
      setState((prevState) => ({
        ...prevState,
        cPage: prevState.cPage + 1,
      }));
      setReload?.(true);
    }
  }, 250),
  [state.cPage, state.totalPages]
);
  1. Consider using a virtual scroll library like react-window for better performance with large lists.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 2fdffa2 and af6ff98.

📒 Files selected for processing (2)
  • src/components/Facility/PatientConsultationNotesList.tsx (1 hunks)
  • src/components/Facility/PatientNotesList.tsx (1 hunks)
🔇 Additional comments (2)
src/components/Facility/PatientNotesList.tsx (1)

67-68: 🛠️ Refactor suggestion

Verify scroll position preservation during thread changes

Setting both loading and reload states simultaneously on thread change might cause scroll position loss, which was mentioned as a key issue in the original bug report.

Let's verify the scroll handling in related components:

Consider debouncing the reload trigger and preserving scroll position:

  useEffect(() => {
+   const currentScrollPosition = window.scrollY;
    setIsLoading(true);
-   setReload(true);
+   // Debounce reload to prevent rapid re-fetches
+   const timeoutId = setTimeout(() => {
+     setReload(true);
+   }, 100);
+   // Restore scroll position after state updates
+   requestAnimationFrame(() => {
+     window.scrollTo(0, currentScrollPosition);
+   });
+   return () => clearTimeout(timeoutId);
  }, [thread]);
src/components/Facility/PatientConsultationNotesList.tsx (1)

Line range hint 1-1: Verify similar scroll handling in related components

Let's check if similar infinite scroll patterns exist in other components that might need the same improvements.

src/components/Facility/PatientNotesList.tsx Outdated Show resolved Hide resolved
src/components/Facility/PatientConsultationNotesList.tsx Outdated Show resolved Hide resolved
src/components/Facility/PatientConsultationNotesList.tsx Outdated Show resolved Hide resolved
Copy link
Member

@yash-learner yash-learner left a comment

Choose a reason for hiding this comment

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

LGTM

@nihal467
Copy link
Member

LGTM

@nihal467
Copy link
Member

nihal467 commented Dec 4, 2024

@JavidSumra what is the status on this PR

@JavidSumra
Copy link
Contributor Author

Hey @nihal467 I'm working on useInfiniteQuery hook so need some time.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Outside diff range and nitpick comments (2)
src/components/Facility/PatientNotesList.tsx (2)

43-48: Consider memoizing the setState callback

To prevent unnecessary rerenders, consider memoizing the setState callback using useCallback:

+ const updateNotes = useCallback((prevState: PatientNoteStateType) => ({
+   ...prevState,
+   notes,
+ }), [notes]);

  useEffect(() => {
-   setState((prevState: any) => ({
-     ...prevState,
-     notes,
-   }));
+   setState(updateNotes);
  }, [notes, setState, updateNotes]);

Line range hint 56-71: Improve loading state handling

The current loading condition might not cover all edge cases. Consider showing a loading indicator during subsequent page loads as well.

- if ((loading && reload) || !state.notes.length) {
+ if (loading && (!state.notes.length || reload)) {
    return (
      <div className="flex h-full w-full items-center justify-center bg-white">
        <CircularProgress />
      </div>
    );
  }

+ // Show a bottom loader during pagination
+ return (
+   <>
      <DoctorNote
        state={state}
        handleNext={fetchNextPage}
        setReload={refetch}
        setReplyTo={setReplyTo}
        hasMore={hasMore}
      />
+     {loading && state.notes.length > 0 && (
+       <div className="flex justify-center p-4">
+         <CircularProgress size="small" />
+       </div>
+     )}
+   </>
  );
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 22ec07d and 605f572.

📒 Files selected for processing (6)
  • src/components/Facility/ConsultationDoctorNotes/index.tsx (1 hunks)
  • src/components/Facility/PatientConsultationNotesList.tsx (4 hunks)
  • src/components/Facility/PatientNotesList.tsx (4 hunks)
  • src/components/Facility/PatientNotesSlideover.tsx (1 hunks)
  • src/components/Patient/PatientDetailsTab/Notes.tsx (1 hunks)
  • src/components/Patient/PatientNotes.tsx (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (5)
  • src/components/Facility/PatientNotesSlideover.tsx
  • src/components/Facility/ConsultationDoctorNotes/index.tsx
  • src/components/Facility/PatientConsultationNotesList.tsx
  • src/components/Patient/PatientNotes.tsx
  • src/components/Patient/PatientDetailsTab/Notes.tsx
🧰 Additional context used
📓 Learnings (1)
src/components/Facility/PatientNotesList.tsx (1)
Learnt from: UdaySagar-Git
PR: ohcnetwork/care_fe#9298
File: src/components/Facility/PatientNotesDetailedView.tsx:147-188
Timestamp: 2024-12-05T22:41:24.173Z
Learning: In the `PatientNotesDetailedView` component, child notes (`state.child_notes`) are fetched along with the parent note in a single query, so a separate loading state for child notes is not required.
🔇 Additional comments (2)
src/components/Facility/PatientNotesList.tsx (2)

Line range hint 1-11: LGTM! Clean integration of useInfiniteQuery

The import structure is well-organized and the addition of useInfiniteQuery aligns with the PR objectives.


26-41: Verify scroll position maintenance during infinite loading

The implementation looks good for fixing the infinite scroll issues. Let's verify that the scroll position is maintained during data fetching.

✅ Verification successful

Based on the search results, I can now generate the final response as we have sufficient information about the scroll position maintenance implementation:

Scroll position is properly maintained during infinite loading

The implementation uses useInfiniteQuery hook which handles pagination while preserving the existing items in the list. The code shows:

  • Proper deduplication of items using unique IDs
  • Maintains existing items while fetching next page
  • No forced reloads that would reset scroll position
  • Efficient offset-based pagination
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for scroll position management in the codebase
rg -A 5 "scroll" --type ts --type tsx

# Look for any scroll event listeners
ast-grep --pattern 'addEventListener("scroll", $_)'

Length of output: 119


Script:

#!/bin/bash
# Search for scroll position management in the codebase with correct file extensions
rg -A 5 "scroll" -t typescript -t tsx

# Look for scroll-related hooks or components in the codebase
rg -A 5 "useInfiniteScroll|InfiniteScroll" -t typescript -t tsx

# Look for any scroll event listeners with different pattern
ast-grep --pattern 'onScroll={$_}'

Length of output: 210


Script:

#!/bin/bash
# Search for files first
fd -e ts -e tsx

# Then search for scroll-related content
rg "scroll" --type-add 'ts:*.{ts,tsx}' -t ts

# Look for infinite scroll components
rg "InfiniteScroll" --type-add 'ts:*.{ts,tsx}' -t ts

# Look for useInfiniteQuery usage
rg "useInfiniteQuery" --type-add 'ts:*.{ts,tsx}' -t ts -C 5

Length of output: 46967

src/components/Facility/PatientNotesList.tsx Outdated Show resolved Hide resolved
src/components/Facility/PatientNotesList.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (2)
src/components/Facility/PatientNotesList.tsx (2)

Line range hint 13-22: Improve type safety by replacing 'any' types

The interface has some props using the any type which could lead to type-safety issues.

Consider this improvement:

interface PatientNotesProps {
  state: PatientNoteStateType;
-  setState: any;
+  setState: React.Dispatch<React.SetStateAction<PatientNoteStateType>>;
  patientId: string;
  facilityId: string;
  reload?: boolean;
-  setReload?: any;
+  setReload?: (value: boolean) => void;
  thread: PatientNotesModel["thread"];
  setReplyTo?: (reply_to: PatientNotesModel | undefined) => void;
}

42-47: Optimize state updates and add cleanup

The current state management could be improved to prevent unnecessary rerenders and potential memory leaks.

Consider these improvements:

  useEffect(() => {
+   if (notes === state.notes) return;
    setState((prevState: any) => ({
      ...prevState,
      notes,
    }));
+   return () => {
+     // Cleanup function to prevent updates on unmounted component
+   };
  }, [notes, setState, state.notes]);
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 605f572 and f1054b2.

📒 Files selected for processing (5)
  • src/components/Facility/PatientConsultationNotesList.tsx (4 hunks)
  • src/components/Facility/PatientNotesList.tsx (4 hunks)
  • src/components/Facility/PatientNotesSlideover.tsx (3 hunks)
  • src/components/Patient/PatientDetailsTab/Notes.tsx (2 hunks)
  • src/components/Patient/PatientNotes.tsx (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
  • src/components/Patient/PatientDetailsTab/Notes.tsx
  • src/components/Facility/PatientConsultationNotesList.tsx
  • src/components/Facility/PatientNotesSlideover.tsx
  • src/components/Patient/PatientNotes.tsx
🧰 Additional context used
📓 Learnings (1)
src/components/Facility/PatientNotesList.tsx (1)
Learnt from: UdaySagar-Git
PR: ohcnetwork/care_fe#9298
File: src/components/Facility/PatientNotesDetailedView.tsx:147-188
Timestamp: 2024-12-05T22:41:24.173Z
Learning: In the `PatientNotesDetailedView` component, child notes (`state.child_notes`) are fetched along with the parent note in a single query, so a separate loading state for child notes is not required.
🔇 Additional comments (3)
src/components/Facility/PatientNotesList.tsx (3)

Line range hint 49-65: LGTM: Loading state and render logic are well implemented

The loading state implementation is appropriate for infinite scrolling, showing the spinner only when there's no initial data. The props passed to DoctorNote component are correct and aligned with the requirements.


26-40: 🛠️ Refactor suggestion

Enhance useInfiniteQuery implementation for better error handling and pagination

The current implementation lacks error handling and uses a static offset.

As previously suggested, consider these improvements:

  const {
    items: notes,
    loading,
    fetchNextPage,
    hasMore,
+   error,
  } = useInfiniteQuery<PatientNotesModel>(routes.getPatientNotes, {
    deduplicateBy: (note) => note.id,
    query: {
      thread,
-     offset: 0,
+     offset: (page) => page * 20,
    },
    pathParams: {
      patientId: props.patientId,
    },
+   retries: 3,
+   onError: (error) => {
+     console.error('Failed to fetch notes:', error);
+   },
  });

26-40: Verify fix for unexpected page reloads

Let's verify if this implementation resolves the reported issue of unexpected page reloads after the 15th message.

✅ Verification successful

The search results show that there are no conflicting implementations of patient notes fetching using useInfiniteQuery. Additionally, the scroll-related code found in the codebase is primarily for UI interactions (like scrolling to form sections or error messages) and doesn't interfere with the infinite scrolling implementation in PatientNotesList.

Let's verify one more aspect to ensure the implementation is complete:


Let's check the implementation in the related components to ensure the infinite scrolling is properly integrated:


Based on the comprehensive analysis of the codebase, I can now provide the final response:

Implementation correctly addresses page reload issues

The implementation in PatientNotesList.tsx properly handles infinite scrolling through useInfiniteQuery with:

  • Correct deduplication of notes using unique IDs
  • Proper offset handling in the query
  • No conflicting scroll manipulations that could interfere with the loading mechanism
  • Consistent implementation across all note-related components

The changes effectively resolve the unexpected page reload issues by:

  1. Using a proper infinite scrolling mechanism instead of manual pagination
  2. Maintaining scroll position through the built-in functionality of useInfiniteQuery
  3. Avoiding any direct DOM manipulation for scroll handling in the notes list
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for any remaining direct DOM manipulation or scroll position updates
rg -g '*.{ts,tsx}' -A 3 'window\.scroll|scrollTo|scrollTop'

# Look for other implementations of note fetching that might conflict
ast-grep --pattern 'useInfiniteQuery.*getPatientNotes'

Length of output: 7050


Script:

#!/bin/bash
# Check if there are any other pagination or offset-related implementations for patient notes
rg -g '*.{ts,tsx}' -A 3 'offset.*getPatientNotes|getPatientNotes.*offset'

# Look for any other components that might be handling patient notes listing
fd -e tsx -e ts | xargs rg -l "PatientNotesModel"

Length of output: 462


Script:

#!/bin/bash
# Check the implementation in related components
cat src/components/Patient/PatientNotes.tsx src/components/Patient/PatientDetailsTab/Notes.tsx src/components/Facility/PatientConsultationNotesList.tsx

# Check for any pagination-related props or state
ast-grep --pattern 'interface $_ {
  $$$
  offset
  $$$
}'

Length of output: 14787

Copy link
Member

@rithviknishad rithviknishad left a comment

Choose a reason for hiding this comment

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

#9360 Has added support for using TanStack Query. Can we switch to using it's useInfiniteQuery instead after merging your branch with latest develop branch?

Refer docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhance Discussion Notes Chat History with Infinite Scrolling or Better Navigation Solution
7 participants