Skip to content

feat: lazy loading for Genie conversations#163

Open
calvarjorge wants to merge 2 commits intomainfrom
jorge.calvar/genie_sequential_loading
Open

feat: lazy loading for Genie conversations#163
calvarjorge wants to merge 2 commits intomainfrom
jorge.calvar/genie_sequential_loading

Conversation

@calvarjorge
Copy link
Contributor

@calvarjorge calvarjorge commented Mar 5, 2026

Summary

  • When loading a Genie conversation, only the most recent page of messages is fetched initially (configurable via initialPageSize, default 20)
  • Older messages are loaded on demand when the user scrolls to the top
  • Adds a history_info SSE event that communicates pagination state (nextPageToken) to the frontend
  • Scroll position is preserved when older messages are prepended

Load only the most recent page of messages when opening a conversation,
and fetch older messages on demand when the user scrolls to the top.

- Add `history_info` SSE event with pagination token
- Add REST endpoint GET /:alias/conversations/:conversationId/messages
- Frontend auto-triggers loading via IntersectionObserver with scroll
  position preservation
- Consolidate to single `listConversationMessages` method in connector

Signed-off-by: Jorge Calvar <jorge.calvar@databricks.com>
Load only the most recent page of messages when opening a conversation,
and fetch older messages on demand when the user scrolls to the top.

- Add `history_info` SSE event with pagination token to existing
  getConversation endpoint (no new endpoints)
- Frontend auto-triggers loading via IntersectionObserver with scroll
  position preservation using the same SSE endpoint with pageToken
- Consolidate to single `listConversationMessages` method in connector

Signed-off-by: Jorge Calvar <jorge.calvar@databricks.com>
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