Skip to content

feat(site/src): show organizations on the AI Gateway session summary - #32313

Merged
mollymaefraser merged 3 commits into
mainfrom
molly/aigov-754-sessions-detail-org
Nov 20, 2026
Merged

mollymaefraser merged 3 commits into
mainfrom
molly/aigov-754-sessions-detail-org

Conversation

@mollymaefraser

@mollymaefraser mollymaefraser commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

Adds an Organization row to the Session summary card on the AI Gateway session detail page, using the organizations field added to the session response in #32057. Each organization is a badge linking to /organizations/<name> and showing display_name || name, as in the Connection Logs details popover. Sessions with no organization recorded, which only exist from before v2.39, show "Not recorded". The row is shown only when useDashboard().showOrganizations is true, so single-organization deployments see no change. The AI Gateway audit docs mention the new row.

Refs AIGOV-754. Stacked on #32260.

Notes for reviewers

  • Several organizations: all are listed, wrapping like the Provider row. The label stays singular ("Organization"), matching "Provider".
  • Cost is still the whole session's cost, as agreed for AIGOV-754.
  • Tests: stories only, since the change is visual. SessionSummaryTable has OneOrganization, MultipleOrganizations and OrganizationNotRecorded; Default covers the hidden row. SessionThreadsPageView has WithOrganizations, which covers the page passing the organizations through. New shared fixtures: MockAIBridgeSessionOrganization and MockAIBridgeSessionOrganization2 in testHelpers/entities.ts.
Decisions and plan
  • Scope (Sas, 16 Nov): the detail page organization row is a separate PR after the list filter, built this sprint if time allows. There is no design, so it follows existing patterns.
  • Behavior: no row on single-org deployments; "Not recorded" for an empty list; one linked badge per organization.
  • Badge link: <Badge asChild hover> around the router link, as in WorkspacesTable.tsx, so the focus ring is not clipped and long names truncate with an ellipsis and a title.
  • Stack: feat: show and filter by organization in AI Gateway sessions API #32057 (backend) → feat(site/src): add organization filter to AI Gateway sessions list #32260 (list filter) → this PR.
  • Checks run: pnpm lint:types, Biome, frontend-deep-review (all findings fixed), and doc-check on audit.md (no blocking findings).

Code written by @mollymaefraser, with Coder Agents used as a guide: explaining the existing code path, reviewing each step, and running reviews.

@linear-code

linear-code Bot commented Nov 17, 2026

Copy link
Copy Markdown

AIGOV-754

@mollymaefraser
mollymaefraser marked this pull request as ready for review November 18, 2026 15:20
@mollymaefraser
mollymaefraser force-pushed the molly/aigov-754-sessions-org-frontend branch from cb6ae17 to 1164a4e Compare November 19, 2026 09:07
@mollymaefraser
mollymaefraser force-pushed the molly/aigov-754-sessions-detail-org branch from ed815d6 to 03d6666 Compare November 19, 2026 09:07
@mollymaefraser
mollymaefraser force-pushed the molly/aigov-754-sessions-org-frontend branch from 1164a4e to d253442 Compare November 19, 2026 09:09
@mollymaefraser
mollymaefraser force-pushed the molly/aigov-754-sessions-detail-org branch from 03d6666 to bef4f5d Compare November 19, 2026 09:09
Base automatically changed from molly/aigov-754-sessions-org-frontend to main November 19, 2026 12:11

@ssncferreira ssncferreira left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Great job 🎉 LGTM, just a few nits but non-blocking and can be done in a follow-up

@mollymaefraser
mollymaefraser enabled auto-merge (squash) November 20, 2026 09:16
@mollymaefraser
mollymaefraser merged commit 35bd24e into main Nov 20, 2026
31 of 32 checks passed
@mollymaefraser
mollymaefraser deleted the molly/aigov-754-sessions-detail-org branch November 20, 2026 09:24
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 20, 2026

This branch had an error being deployed

1 failed and 1 inactive deployments
docs-preview — 95a133ac Deployed Nov 20, 2026 by mollymaefraser via cleanup #272
main — 95a133ac Deployed Nov 20, 2026 by mollymaefraser via cla #260771
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants