Skip to content

feat: sort fetched sessions by creation date and improve tool result …#20

Merged
cnjack merged 1 commit into
mainfrom
fix/web-conversation-render-and-sort
Apr 17, 2026
Merged

feat: sort fetched sessions by creation date and improve tool result …#20
cnjack merged 1 commit into
mainfrom
fix/web-conversation-render-and-sort

Conversation

@cnjack

@cnjack cnjack commented Apr 17, 2026

Copy link
Copy Markdown
Owner

…handling

Summary by CodeRabbit

  • Bug Fixes
    • Sessions now display in reverse chronological order (most recent first).
    • Improved tool result resolution logic with enhanced fallback handling for better reliability.

@cnjack cnjack merged commit cba2a77 into main Apr 17, 2026
1 check was pending
@cnjack cnjack deleted the fix/web-conversation-render-and-sort branch April 17, 2026 17:02
@coderabbitai

coderabbitai Bot commented Apr 17, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 74a12b36-84f1-43c4-9cfc-9987cfd0e9d3

📥 Commits

Reviewing files that changed from the base of the PR and between dac1242 and 78e20ba.

📒 Files selected for processing (1)
  • web/src/stores/chat.ts

📝 Walkthrough

Walkthrough

The chat store's session fetching now sorts sessions by creation timestamp in descending order. Tool result handling in session loading is unified, prioritizing resolution by exact tool call ID via pending calls before falling back to timeline scanning by name.

Changes

Cohort / File(s) Summary
Chat Store Refactoring
web/src/stores/chat.ts
Updated fetchSessions() to sort sessions newest-first by created_at. Refactored loadSession() tool result handling from separate branches into unified logic with primary resolution by tool_call_id and fallback to timeline scanning by name.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 Sorted sessions hop in time,
Newest first—a perfect rhyme,
Tool results find their place,
By ID, or name's sweet trace,
Order reigns in every chase!

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/web-conversation-render-and-sort

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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