Bug: "x of 20 selected" always shows 20 regardless of actual conversation count
Description
On the Manage Conversations page, the selection info bar displays:
The denominator is always 20 (the MAX_SELECTION bulk-delete limit), even when the user has fewer than 20 total conversations. For example, if a user only has 5 conversations, the bar should read 0 of 5 selected, not 0 of 20 selected.
Steps to Reproduce
- Have fewer than 20 conversations (e.g. 5).
- Navigate to Manage Conversations.
- Observe the selection info bar.
Expected Behavior
The denominator should be min(totalConversations, MAX_SELECTION):
- 5 conversations →
0 of 5 selected
- 30 conversations →
0 of 20 selected
Actual Behavior
The denominator is always 20 regardless of how many conversations exist.
Root Cause
In frontend/ai.client/src/app/manage-sessions/manage-sessions.page.ts, the template uses:
{{ selectedCount() }} of {{ maxSelection }} selected
maxSelection is a constant set to MAX_SELECTION (20). There is no computed signal that accounts for the actual number of loaded sessions. The denominator should be something like:
readonly selectableCount = computed(() => Math.min(this.sessions().length, this.maxSelection));
And the template should use selectableCount() instead of maxSelection.
Affected Component
- File:
frontend/ai.client/src/app/manage-sessions/manage-sessions.page.ts
- Section: Selection Info Bar template + component signals
Additional Context
The same maxSelection value is also used in the page subtitle ("You can delete up to 20 conversations at a time"), which is correct since that describes the feature limit. Only the selection counter denominator needs to change.
Bug: "x of 20 selected" always shows 20 regardless of actual conversation count
Description
On the Manage Conversations page, the selection info bar displays:
The denominator is always
20(theMAX_SELECTIONbulk-delete limit), even when the user has fewer than 20 total conversations. For example, if a user only has 5 conversations, the bar should read0 of 5 selected, not0 of 20 selected.Steps to Reproduce
Expected Behavior
The denominator should be
min(totalConversations, MAX_SELECTION):0 of 5 selected0 of 20 selectedActual Behavior
The denominator is always
20regardless of how many conversations exist.Root Cause
In
frontend/ai.client/src/app/manage-sessions/manage-sessions.page.ts, the template uses:{{ selectedCount() }} of {{ maxSelection }} selectedmaxSelectionis a constant set toMAX_SELECTION(20). There is no computed signal that accounts for the actual number of loaded sessions. The denominator should be something like:And the template should use
selectableCount()instead ofmaxSelection.Affected Component
frontend/ai.client/src/app/manage-sessions/manage-sessions.page.tsAdditional Context
The same
maxSelectionvalue is also used in the page subtitle ("You can delete up to 20 conversations at a time"), which is correct since that describes the feature limit. Only the selection counter denominator needs to change.