Skip to content

Fix Manage Conversations Count #163

@ofilson

Description

@ofilson

Bug: "x of 20 selected" always shows 20 regardless of actual conversation count

Description

On the Manage Conversations page, the selection info bar displays:

0 of 20 selected

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

  1. Have fewer than 20 conversations (e.g. 5).
  2. Navigate to Manage Conversations.
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions