Skip to content

[bug][alpha] AdminSessions: SessionStats includes KPI fields that are never shown on the dashboard #38099

@pho-29

Description

@pho-29

Project

ide

Description

fetchSessionStats() returns a SessionStats object (src/types/admin.ts) with seven numeric fields. AdminSessions.tsx only renders five stat cards (Total Sessions, Active Sessions, Total Messages, Total Tokens, Sessions Today).

The following API-typed fields are never displayed anywhere on the Sessions Management page:

  • averageMessagesPerSession
  • sessionsThisWeek

Admins therefore cannot see those metrics in the UI even when the backend supplies them. This is a missing feature / incomplete dashboard in the page shell, distinct from bounty #37591 (global stat cards vs filtered table totals).

Single root cause: the stats grid only maps a fixed subset of SessionStats; the type and UI are out of sync.

Error Message

Debug Logs

System Information

Cortex IDE alpha
OS: Windows (win32)
Component: src/pages/admin/AdminSessions.tsx

Screenshots

Image

Steps to Reproduce

  1. Open Sessions Management (/admin/sessions) with a working /api/v1/admin/sessions/stats response that includes averageMessagesPerSession and sessionsThisWeek.
  2. Inspect the stat cards at the top of the page.

Expected Behavior

All meaningful SessionStats fields returned by the API are represented in the UI (cards, secondary text, or drill-down), or the type is narrowed to match what the product intends to show.

Actual Behavior

averageMessagesPerSession and sessionsThisWeek are not shown.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingideIssues related to IDEinvalidThis doesn't seem right

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions