Skip to content

Show message count in session browser dialog#1791

Merged
krissetto merged 1 commit intodocker:mainfrom
dgageot:count
Feb 19, 2026
Merged

Show message count in session browser dialog#1791
krissetto merged 1 commit intodocker:mainfrom
dgageot:count

Conversation

@dgageot
Copy link
Member

@dgageot dgageot commented Feb 19, 2026

Add NumMessages field to session.Summary and populate it from both SQLite (via LEFT JOIN on session_items) and InMemory stores. Display the count in the session browser as '(N)' next to each session title.

Assisted-By: cagent

@dgageot dgageot requested a review from a team as a code owner February 19, 2026 10:43
Copy link

@docker-agent docker-agent bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

Found 1 HIGH severity issue in the changed code that could cause a panic.

The new message count feature looks good overall, but there's a potential panic condition in the UI rendering code when calculating the maximum title length. The fix is straightforward - add a bounds check before slicing.

Add NumMessages field to session.Summary and populate it from both
SQLite (via LEFT JOIN on session_items) and InMemory stores. Display
the count in the session browser as '(N)' next to each session title.

Assisted-By: cagent
@krissetto krissetto merged commit ad7c068 into docker:main Feb 19, 2026
5 checks passed
title = "Untitled"
}

suffix := fmt.Sprintf(" (%d) • %s", sess.NumMessages, d.timeAgo(sess.CreatedAt))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Casual Greeting (2) is not really telling what the number means

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll improve that

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.

3 participants