Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: add page for ai-bridge interception logs#20331

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
jakehwll wants to merge59 commits intomain
base:main
Choose a base branch
Loading
fromjakehwll/routing-ai-governance

Conversation

@jakehwll
Copy link
Contributor

Relates#20287

This pull-request introduces a basic routing forAI Governance's Request Logs feature. Currently we're just pulling back the basics from the database and rendering it into the table. Nothing exciting.

The idea is to extend further upon the/aigovernance route so it has been appropriately wrapped with a<AIGovernanceLayout /> to introduce a navigation later.

@jakehwlljakehwll changed the titlefeat(ai-governance): implementrequest logs routingfeat: implementrequest logs routingOct 16, 2025
@jakehwlljakehwllforce-pushed thejakehwll/routing-ai-governance branch from321ce8c tocd9b38bCompareOctober 21, 2025 23:23
@jakehwlljakehwll changed the base branch frommain todean/aibridge-list-with-userOctober 21, 2025 23:23
Base automatically changed fromdean/aibridge-list-with-user tomainOctober 22, 2025 05:18
jakehwll added a commit that referenced this pull requestOct 23, 2025
…#20410)Thanks to the great work in#20393, we’ve successfully introducedoffset-based pagination for this endpoint. However, the frontend expectsa `count` field in the response rather than `total`. This PR updates theresponse payload to rename the returned key to `count` for consistencywith frontend expectations and existing API patterns.This is necessary to unblock the work in#20331
jakehwlland others added23 commitsOctober 23, 2025 02:27
Copy link
Contributor

CopilotAI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces basic routing and UI structure for the AI Governance Request Logs feature. It establishes a new/aigovernance/request-logs route with filtering capabilities, displaying AI request interceptions in a paginated table format.

Key changes:

  • New route structure under/aigovernance with automatic redirect torequest-logs sub-route
  • Request logs page with filtering by user and AI provider, displaying token usage and tool calls
  • Navigation integration via the Admin settings dropdown menu

Reviewed Changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.

Show a summary per file
FileDescription
site/src/testHelpers/entities.tsAdded mock data entity for AI Bridge interceptions to support testing
site/src/router.tsxRegistered new AI Governance routes with lazy-loaded components
site/src/pages/AIGovernancePage/RequestLogsPage/filter/filter.tsxImplemented provider filter menu for OpenAI and Anthropic
site/src/pages/AIGovernancePage/RequestLogsPage/filter/RequestLogsFilter.tsxCreated composite filter component combining user and provider filters
site/src/pages/AIGovernancePage/RequestLogsPage/RequestLogsRow/RequestLogsRow.tsxBuilt expandable table row component displaying interception details
site/src/pages/AIGovernancePage/RequestLogsPage/RequestLogsRow/RequestLogsRow.stories.tsxAdded Storybook story for RequestLogsRow component
site/src/pages/AIGovernancePage/RequestLogsPage/RequestLogsPageView.tsxCreated main view component with paywall, filtering, and table rendering
site/src/pages/AIGovernancePage/RequestLogsPage/RequestLogsPageView.stories.tsxAdded Storybook stories covering various page states
site/src/pages/AIGovernancePage/RequestLogsPage/RequestLogsPage.tsxImplemented page controller integrating filters and data fetching
site/src/pages/AIGovernancePage/AIGovernanceLayout.tsxCreated shared layout wrapper with header for AI Governance section
site/src/pages/AIGovernancePage/AIGovernanceHelpTooltip.tsxAdded help tooltip explaining AI Governance feature
site/src/modules/dashboard/Navbar/NavbarView.tsxUpdated navbar to accept and pass AI Governance visibility flag
site/src/modules/dashboard/Navbar/NavbarView.test.tsxUpdated tests to include new canViewAIGovernance prop
site/src/modules/dashboard/Navbar/Navbar.tsxAdded logic to determine AI Governance visibility based on feature flags
site/src/modules/dashboard/Navbar/DeploymentDropdown.tsxAdded AI Governance menu item to deployment dropdown
site/src/api/queries/aiBridge.tsCreated query configuration for paginated interceptions API
site/src/api/api.tsAdded API method to fetch AI Bridge interceptions
Comments suppressed due to low confidence (1)

site/src/modules/dashboard/Navbar/DeploymentDropdown.tsx:38

  • The conditional check for showing the dropdown is missing the newly addedcanViewAIGovernance flag. This means the dropdown won't appear when a user only has AI Governance permissions but none of the other admin permissions.
if (!canViewAuditLog &&!canViewConnectionLog &&!canViewOrganizations &&!canViewDeployment &&!canViewHealth) {

💡Add Copilot custom instructions for smarter, more guided reviews.Learn how to get started.

@jakehwlljakehwll added the cherry-pick/v2.28Needs to be cherry-picked to the 2.28 release branch labelOct 30, 2025
onSelect={(option:SelectFilterOption|undefined):void=>
menu.selectOption(option)
}
selectedOption={menu.selectedOption??undefined}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
selectedOption={menu.selectedOption??undefined}
selectedOption={menu.selectedOption}

returnuseFilterMenu({
id:"provider",
getSelectedOption:async()=>
AIBRIDGE_PROVIDERS.find((option)=>option.value===value)??null,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
AIBRIDGE_PROVIDERS.find((option)=>option.value===value)??null,
AIBRIDGE_PROVIDERS.find((option)=>option.value===value),

why are you coercing it tonull just to immediately coerce itback toundefined?

@aslilac
Copy link
Member

also, the pr title may pass the bots vibe check but it's not very clear to me. maybe something like...

feat: add page for ai-bridge interception logs

@jakehwlljakehwll changed the titlefeat: implementrequest logs routingfeat: add page for ai-bridge interception logsOct 30, 2025
jakehwll added a commit that referenced this pull requestOct 31, 2025
Resolved issue from#20331 where the article `an` was incorrectly usedbefore words not beginning with a vowel sound. Updated affectedinstances to use the correct article `a`.```diff- You need an Premium license to use this feature.+ You need a Premium license to use this feature.```This was already correct on the following pages.*[`ConnectionLogPageView.tsx`](https://github.com/coder/coder/blob/7182c53df7648cd7db8551629226c4a0a1cc8559/site/src/pages/ConnectionLogPage/ConnectionLogPageView.tsx#L130)*[`GroupsPageView.tsx`](https://github.com/coder/coder/blob/7182c53df7648cd7db8551629226c4a0a1cc8559/site/src/pages/GroupsPage/GroupsPageView.tsx#L49)
@jakehwlljakehwll removed the cherry-pick/v2.28Needs to be cherry-picked to the 2.28 release branch labelNov 4, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@aslilacaslilacaslilac left review comments

Copilot code reviewCopilotCopilot left review comments

@jaaydenhjaaydenhjaaydenh approved these changes

@david-fraleydavid-fraleydavid-fraley approved these changes

Assignees

@jakehwlljakehwll

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@jakehwll@aslilac@jaaydenh@david-fraley

[8]ページ先頭

©2009-2025 Movatter.jp