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

Report actions pagination improvements #41153

Open
janicduplessis opened this issue Apr 27, 2024 · 1 comment
Open

Report actions pagination improvements #41153

janicduplessis opened this issue Apr 27, 2024 · 1 comment
Labels

Comments

@janicduplessis
Copy link
Contributor

janicduplessis commented Apr 27, 2024

Problem

We currently have an issue where pagination methods (GetNewerActions, GetOlderActions) are called unconditionally even if we should know that no newer or older messages are available.

Solution

To improve this OpenReport, GetNewerActions, GetOlderActions should all return pagination info. This should be stored in the REPORT_METADATA onyx collection.

  • For OpenReport it should be hasNewerActions and hasOlderActions.
  • For GetNewerActions it should be hasNewerActions.
  • For GetOlderActions it should be hasOlderActions.

Then in loadNewerChats and loadOlderChats we should check that newer / older actions are available before loading them.

This will reduce the call to these methods significantly. For regular chats we never should have newer actions since we start loading from the start of the chat so GetNewerActions will never be called. If we are in a short chat, we probably loaded all messages initially so we don't need to call GetOlderActions. For comment linking we should still call both GetNewerActions and GetOlderActions since we are probably in the middle of a chat.

Copy link

melvin-bot bot commented May 3, 2024

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

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

No branches or pull requests

1 participant