Skip to content

feat: rework the MCP server clients and sessions tab - #5077

Open
bflad wants to merge 1 commit into
mainfrom
bflad/chore-mcp-server-clients-sessions-ui
Open

feat: rework the MCP server clients and sessions tab#5077
bflad wants to merge 1 commit into
mainfrom
bflad/chore-mcp-server-clients-sessions-ui

Conversation

@bflad

@bflad bflad commented Aug 7, 2026

Copy link
Copy Markdown
Member

Both listings move from ad-hoc markup onto the shared design system Table: searchable, filterable, sortable, and paginated ten rows at a time, under a pair of metric cards summarizing the server's active sessions and registered clients.

The clients table gains an active session count per client, backed by a new required active_session_count field on the UserSessionClient API type and a batched tally query that defines "active" exactly as the sessions listing's active filter does. The count is clickable and drills into that client's sessions, the same as the kebab menu's View sessions action. Drilling in narrows both listings to that client behind a Filtered to X bar with a Clear filter button, so the two tables stay in view without scrolling.

The sessions table shows the subject's avatar and the session creation date, which adds subject_photo_url and user_session_client_id to the UserSession API type. Both come from columns the listing query already selects or joins.

The CIMD and DCR source badges each carry their own color now, so the two registration modes separate at a glance in a long list.

Counts, search, filters, sort, and pagination all operate over the whole result set rather than one page of it, so the tab pulls every cursor page up front, capped at ten pages, and says so when a set is cut short. Section copy is shortened accordingly and the per-row issuer slug is dropped, since a server is provisioned with one session issuer today.

Date dimensions are relative presets rather than the shared daterange filter kind, which reads and writes one set of URL params and so cannot express the three date windows this page needs.

Also fixes sortable headers in the shared Table component losing their uppercase eyebrow styling, because the browser's form control styling drops text-transform on the button inside the header cell. This affects every sortable table in the dashboard.

@bflad
bflad requested review from a team as code owners August 7, 2026 21:21
@changeset-bot

changeset-bot Bot commented Aug 7, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ed5cf06

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
server Minor
dashboard Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 23 files

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread server/internal/usersessions/listusersessionclients_test.go
Comment thread client/dashboard/src/components/sessions/ClientsAndSessionsTab.tsx
Comment thread client/dashboard/src/components/sessions/UserSessionsList.tsx Outdated
@bflad

bflad commented Aug 8, 2026

Copy link
Copy Markdown
Member Author

Demo

Sessions

sessions demo

  1. Paging through 15 sessions ten rows at a time.
  2. Searching by subject; the result count follows the search.
  3. Sorting by Created.
  4. Filtering to sessions expiring within 7 days.

Clients

clients demo

  1. Searching by client name, then filtering to DCR registrations.
  2. Sorting by Active sessions, ascending then descending.
  3. Clicking a client's active session count to drill into its sessions: both listings narrow to that client behind the Filtered to Cursor bar, and the metric cards keep reporting the server totals.
  4. Clear filter restores the full listings.

@bflad
bflad force-pushed the bflad/chore-mcp-server-clients-sessions-ui branch from b512901 to ee2f448 Compare August 8, 2026 14:02
@bflad bflad changed the title feat: sortable clients and sessions tables with active session counts feat: rework the MCP server clients and sessions tab Aug 8, 2026
@bflad
bflad force-pushed the bflad/chore-mcp-server-clients-sessions-ui branch from ee2f448 to 6c3558b Compare August 8, 2026 15:50
Both listings move from ad-hoc markup onto the shared design system Table:
searchable, filterable, sortable, and paginated ten rows at a time, under a
pair of metric cards summarizing the server's active sessions and registered
clients.

The clients table gains an active session count per client, backed by a new
required active_session_count field on the UserSessionClient API type and a
batched tally query that defines "active" exactly as the sessions listing's
active filter does. The count is clickable and drills into that client's
sessions, the same as the kebab menu's View sessions action. Drilling in
narrows both listings to that client behind a Filtered to X bar with a Clear
filter button, so the two tables stay in view without scrolling.

The sessions table shows the subject's avatar and the session creation date,
which adds subject_photo_url and user_session_client_id to the UserSession API
type. Both come from columns the listing query already selects or joins.

The CIMD and DCR source badges each carry their own color now, so the two
registration modes separate at a glance in a long list.

Counts, search, filters, sort, and pagination all operate over the whole
result set rather than one page of it, so the tab pulls every cursor page up
front, capped at ten pages, and says so when a set is cut short. Section copy
is shortened accordingly and the per-row issuer slug is dropped, since a
server is provisioned with one session issuer today.

Date dimensions are relative presets rather than the shared daterange filter
kind, which reads and writes one set of URL params and so cannot express the
three date windows this page needs.

Also fixes sortable headers in the shared Table component losing their
uppercase eyebrow styling, because the browser's form control styling drops
text-transform on the button inside the header cell. This affects every
sortable table in the dashboard.
@bflad
bflad force-pushed the bflad/chore-mcp-server-clients-sessions-ui branch from 6c3558b to ed5cf06 Compare August 8, 2026 16:55
@simplesagar
simplesagar requested a review from adaam2 August 9, 2026 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants