mini-feat: Store page sizes of views in local storage#5830
Conversation
…d docstore view are now stored in local storage.
Summary of ChangesHello @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
Changelog
Activity
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
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.
|
@Mewyii , hey thanks for doing this change. Are you able to address two issues:
I don't see us wrapping a try catch in localStorage.setItem else where so you can skip that suggestion. Thanks. |
|
Updated branch and pushed the suggested changes. |
|
thanks guys! |
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.