Skip to content

Conversation

@uinstinct
Copy link
Contributor

@uinstinct uinstinct commented Jan 14, 2026

Description

Show the number of messages (sent by the user) as a counter in the extension's history page.

AI Code Review

  • Team members only: AI review runs automatically when PR is opened or marked ready for review
  • Team members can also trigger a review by commenting @continue-review

Checklist

  • [] I've read the contributing guide
  • [] The relevant docs, if any, have been updated or created
  • [] The relevant tests, if any, have been updated or created

Screen recording or screenshot

feat.mp4

Tests

[ What tests were added or updated to ensure the changes work as expected? ]


Continue Tasks

Status Task Actions
▶️ Queued Create GitHub Issue (OS) View

Powered by Continue


Summary by cubic

Add a message counter to the history page that shows how many user messages each session contains. This makes it easier to scan session size at a glance.

  • New Features
    • Compute user message count per session in HistoryManager and store as messageCount in BaseSessionMetadata.
    • Display a badge with the count in HistoryTableRow, with a tooltip for clarity.
    • Keep messageCount optional to avoid breaking existing data.

Written for commit 3952a60. Summary will update on new commits.

@uinstinct uinstinct requested a review from a team as a code owner January 14, 2026 14:05
@uinstinct uinstinct requested review from RomneyDa and removed request for a team January 14, 2026 14:05
@continue
Copy link
Contributor

continue bot commented Jan 14, 2026

All Green - Keep your PRs mergeable

Learn more

All Green is an AI agent that automatically:

✅ Addresses code review comments

✅ Fixes failing CI checks

✅ Resolves merge conflicts


Unsubscribe from All Green comments

1 similar comment
@continue-staging
Copy link

All Green - Keep your PRs mergeable

Learn more

All Green is an AI agent that automatically:

✅ Addresses code review comments

✅ Fixes failing CI checks

✅ Resolves merge conflicts


Unsubscribe from All Green comments

@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jan 14, 2026
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 3 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="gui/src/components/History/HistoryTableRow.tsx">

<violation number="1" location="gui/src/components/History/HistoryTableRow.tsx:155">
P2: Message counter is placed at the right edge (`ml-auto`) but the hover action bar is absolutely positioned at the same right edge and stacks above it, causing the counter/tooltip to be obscured when hovering the row.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

sessionMetadata.messageCount === 1 ? " is" : "s are"
} present in this session`}
>
<span className="bg-vsc-background text-secondary-foreground ml-auto inline-flex items-center rounded-full px-2 py-1 text-xs font-medium">
Copy link
Contributor

Choose a reason for hiding this comment

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

P2: Message counter is placed at the right edge (ml-auto) but the hover action bar is absolutely positioned at the same right edge and stacks above it, causing the counter/tooltip to be obscured when hovering the row.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At gui/src/components/History/HistoryTableRow.tsx, line 155:

<comment>Message counter is placed at the right edge (`ml-auto`) but the hover action bar is absolutely positioned at the same right edge and stacks above it, causing the counter/tooltip to be obscured when hovering the row.</comment>

<file context>
@@ -144,6 +145,18 @@ export function HistoryTableRow({
+                  sessionMetadata.messageCount === 1 ? " is" : "s are"
+                } present in this session`}
+              >
+                <span className="bg-vsc-background text-secondary-foreground ml-auto inline-flex items-center rounded-full px-2 py-1 text-xs font-medium">
+                  {sessionMetadata.messageCount}
+                </span>
</file context>

Copy link
Collaborator

@RomneyDa RomneyDa left a comment

Choose a reason for hiding this comment

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

@uinstinct this is a nice addition! See comment about counting. I think cubic's feedback is also valid, the positioning isn't too bad but maybe we could try some other places to put the number, and maybe add a little message icon or something


let found = false;
const messageCount = session.history.filter(
(item) => item.message.role === "user",
Copy link
Collaborator

Choose a reason for hiding this comment

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

(item) => item.message.role === "user",

I think for longer agent conversations this will show a number much lower than it should e.g. 1 user message, 20 assistant/tool messages will show 1

Maybe we could count conversational turns or just simple chatHistory.length excluding system message?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

actually when trying out chatHistory.length, it show around 15 counter for a single message conversation which would include tool calls and assistant messages. I think the user will want to know how many followups he did.

@RomneyDa what do you think about replacing the message counter with dots or bars? something like | | | indicating 3 messages or • • • or ● ● ●. when there are more than 7-8 messages (depending on the sidebar width), it will show the counter.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it's currently counting by filtering for user messages, am I reading that wrong?

Personally I prefer a little number with message icon or similar to dots or bars but I don't have super strong opinions about the design!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes only user messages.

How about putting dots for the initial design? If they do not look good, it can be changed

@github-project-automation github-project-automation bot moved this from Todo to In Progress in Issues and PRs Jan 14, 2026
@uinstinct uinstinct requested a review from RomneyDa January 15, 2026 03:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files.

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants