Show message count in session browser dialog#1791
Merged
krissetto merged 1 commit intodocker:mainfrom Feb 19, 2026
Merged
Conversation
There was a problem hiding this comment.
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
approved these changes
Feb 19, 2026
rumpl
reviewed
Feb 19, 2026
| title = "Untitled" | ||
| } | ||
|
|
||
| suffix := fmt.Sprintf(" (%d) • %s", sess.NumMessages, d.timeAgo(sess.CreatedAt)) |
Member
There was a problem hiding this comment.
Casual Greeting (2) is not really telling what the number means
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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