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

refactor(webviews): chat history tab with pagination #7020

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

abeatrix
Copy link
Contributor

@abeatrix abeatrix commented Feb 8, 2025

This PR refactors the chat history tab to match prompts tab with several UX improvements:

  • Add pagination support with configurable items per page
  • Add export and delete all functionality in the header
  • Improve search functionality with a cleaner command palette style interface
  • Remove period-based grouping of chat history items
  • Add confirmation dialog for delete all action
  • Make history items more compact and consistent
  • Add keyboard navigation support
  • Improve empty state messaging and layout
  • Aligns with Prompt Library tab layout
  • Unify e2e test for restoring and deleting chat history

image

image

Fixed bugs:

  • Delete All and Export buttons show up when chat history is empty

Test plan

Updated unit test and e2e test.

  • Verify pagination works correctly with different page sizes
  • Test search functionality filters correctly
  • Confirm export and delete all actions work as expected
  • Check keyboard navigation and accessibility
  • Verify empty state renders appropriately
  • Test history item interactions and delete functionality

After

20 chats per page

image

Before

With 400+ chat in my history the list gets too long for scrolling.

image

This PR refactors the chat history tab to match prompts tab with several UX improvements:

- Add pagination support with configurable items per page
- Add export and delete all functionality in the header
- Improve search functionality with a cleaner command palette style interface
- Remove period-based grouping of chat history items
- Add confirmation dialog for delete all action
- Make history items more compact and consistent
- Add keyboard navigation support
- Improve empty state messaging and layout

## Test plan
- Verify pagination works correctly with different page sizes
- Test search functionality filters correctly
- Confirm export and delete all actions work as expected
- Check keyboard navigation and accessibility
- Verify empty state renders appropriately
- Test history item interactions and delete functionality
- Add strict boolean check for human message text filtering
- Move filtering logic to avoid duplicate filtering operations
- Fix empty state to only show when there are no filtered chats and no search text
- Simplify filtered chats logic by combining conditions
- Remove unnecessary newline in component
@abeatrix abeatrix requested a review from a team February 13, 2025 19:30
@abeatrix abeatrix marked this pull request as ready for review February 13, 2025 19:31
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