Skip to content

mini-feat: Store page sizes of views in local storage#5830

Merged
HenryHengZJ merged 3 commits into
FlowiseAI:mainfrom
Mewyii:feature/storeViewPageSizesInLocalStorage
Mar 31, 2026
Merged

mini-feat: Store page sizes of views in local storage#5830
HenryHengZJ merged 3 commits into
FlowiseAI:mainfrom
Mewyii:feature/storeViewPageSizesInLocalStorage

Conversation

@Mewyii
Copy link
Copy Markdown
Contributor

@Mewyii Mewyii commented Feb 24, 2026

Summary

Stores page sizes of chatflow, agentflow, agent executions and doc store views in local storage so one doesn't have to do that manually every time.

…d docstore view are now stored in local storage.
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @Mewyii, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the user experience by introducing persistent pagination settings across multiple key views within the application. Specifically, the page size selected by a user for Agent Executions, Agent Flows, Chatflows, and Document Stores will now be automatically saved to and loaded from local storage. This eliminates the need for users to repeatedly adjust pagination settings, ensuring their preferences are maintained consistently across browsing sessions and improving overall workflow efficiency.

Highlights

  • Persistent Pagination Settings: Implemented functionality to store and retrieve the selected page size for Agent Executions, Agent Flows, Chatflows, and Document Stores using local storage.
  • Improved User Experience: Users no longer need to manually reset their preferred page size on each visit to these views, as settings are now automatically maintained across sessions.
Changelog
  • packages/ui/src/views/agentexecutions/index.jsx
    • Reordered import statements for better code organization.
    • Modified the pageLimit state initialization to read the page size from localStorage.
    • Added logic to save the updated pageLimit value to localStorage when the pagination changes.
  • packages/ui/src/views/agentflows/index.jsx
    • Reordered import statements for better code organization.
    • Modified the pageLimit state initialization to read the page size from localStorage.
    • Added logic to save the updated pageLimit value to localStorage when the pagination changes.
  • packages/ui/src/views/chatflows/index.jsx
    • Reordered import statements for better code organization.
    • Modified the pageLimit state initialization to read the page size from localStorage.
    • Added logic to save the updated pageLimit value to localStorage when the pagination changes.
  • packages/ui/src/views/docstore/index.jsx
    • Reordered import statements for better code organization.
    • Modified the pageLimit state initialization to read the page size from localStorage.
    • Added logic to save the updated pageLimit value to localStorage when the pagination changes.
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a useful feature to persist the page size for various views in local storage. The implementation is straightforward, but my review includes suggestions to enhance its robustness and performance. Specifically, I've recommended using the lazy initialization for useState to prevent reading from local storage on every render, switching to Number() for safer parsing of stored values, and wrapping all localStorage interactions in try...catch blocks to gracefully handle potential browser-related errors.

Comment thread packages/ui/src/views/agentexecutions/index.jsx Outdated
Comment thread packages/ui/src/views/agentexecutions/index.jsx
Comment thread packages/ui/src/views/agentflows/index.jsx Outdated
Comment thread packages/ui/src/views/agentflows/index.jsx
Comment thread packages/ui/src/views/chatflows/index.jsx Outdated
Comment thread packages/ui/src/views/chatflows/index.jsx
Comment thread packages/ui/src/views/docstore/index.jsx Outdated
Comment thread packages/ui/src/views/docstore/index.jsx
@HenryHengZJ HenryHengZJ added the ui Issues or features related to ui label Feb 26, 2026
@jchui-wd
Copy link
Copy Markdown
Contributor

@Mewyii , hey thanks for doing this change.

Are you able to address two issues:

  1. Rename flowPageSize to be agentFlowPageSize to be more consistent.
  2. Can you address Gemini's suggestion for lazy initializer and also the parseInt -> Number. This way it won't call getItem on every render.
const [pageLimit, setPageLimit] = useState(() => Number(localStorage.getItem('executionsPageSize')) || DEFAULT_ITEMS_PER_PAGE)

I don't see us wrapping a try catch in localStorage.setItem else where so you can skip that suggestion.

Thanks.

@Mewyii
Copy link
Copy Markdown
Contributor Author

Mewyii commented Mar 22, 2026

Updated branch and pushed the suggested changes.

Copy link
Copy Markdown
Contributor

@jchui-wd jchui-wd left a comment

Choose a reason for hiding this comment

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

Thanks for making this change @Mewyii

Tested and is adjusting Page Size in Local Storage Correctly
PageSizeLocalStorage.mp4

@HenryHengZJ HenryHengZJ merged commit 24e713b into FlowiseAI:main Mar 31, 2026
3 checks passed
@HenryHengZJ
Copy link
Copy Markdown
Contributor

thanks guys!

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

Labels

ui Issues or features related to ui

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants