Skip to content

[FEATURE]: Timeline dialog should load all session messages, not just those in memory #23346

@sim590

Description

@sim590

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

The /timeline dialog (accessible via Ctrl+X G or <leader>g) currently reads messages from sync.data.message, which only contains the messages loaded in memory. For long sessions, this means older messages are absent from the timeline and cannot be jumped to.

For example, a session with 1,283 messages but only 100 loaded in memory will only show the most recent ~100 user messages in the timeline picker. The user has no way to jump to earlier messages in the conversation.

Proposed solution:

The timeline dialog should fetch user messages directly from the API rather than reading from the in-memory store. This could use the cursor-based pagination introduced in #8535 (before/after parameters on GET /session/:id/message) to load all user messages incrementally.

A possible approach:

  1. The timeline dialog makes its own paginated API calls to build the full list of user messages
  2. When a message is selected, the TUI loads a window of messages around the target and scrolls to it

Dependencies:

This builds upon the cursor-based pagination API from #8535, which provides the necessary server-side infrastructure (before/after/oldest cursors on the messages endpoint).

Related:

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions