System admin AI Management#1865
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new AI section to the Admin app that lets system administrators view/activate/deactivate AI review workflows and manage AI review templates (list/filter/create/edit/delete), including new routes and navigation.
Changes:
- Introduces AI admin routes + System Admin tab navigation for “AI Review Workflows” and “AI Review Templates”.
- Adds UI pages/modals for workflow listing/details and template listing/CRUD.
- Adds new admin services for workflows (PATCH disabled) and templates (list/create/update/delete).
Reviewed changes
Copilot reviewed 18 out of 19 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/apps/admin/src/lib/services/ai-workflows.service.ts | Expands workflow types and adds PATCH support to toggle workflow disabled state. |
| src/apps/admin/src/lib/services/ai-templates.service.ts | New service + request/response types for AI review template CRUD and filtering. |
| src/apps/admin/src/lib/components/common/Tab/config/system-admin-tabs-config.ts | Adds an “AI” tab group with links to workflows/templates pages. |
| src/apps/admin/src/lib/components/common/DropdownMenu/DropdownMenu.module.scss | Adjusts dropdown overflow/width behavior for better menu layout. |
| src/apps/admin/src/config/routes.config.ts | Adds route IDs for the new AI module and subpages. |
| src/apps/admin/src/ai/review-workflows/WorkflowDetailsModal.tsx | New modal to display AI workflow details (general/LLM/scorecard/metadata). |
| src/apps/admin/src/ai/review-workflows/WorkflowDetailsModal.module.scss | Styles for workflow details modal. |
| src/apps/admin/src/ai/review-workflows/index.ts | Barrel export for workflows page. |
| src/apps/admin/src/ai/review-workflows/AiReviewWorkflowsPage.tsx | New workflows list page with active toggle + details modal. |
| src/apps/admin/src/ai/review-workflows/AiReviewWorkflowsPage.module.scss | Styles for workflows page/table. |
| src/apps/admin/src/ai/review-templates/index.ts | Barrel export for templates page. |
| src/apps/admin/src/ai/review-templates/CreateTemplateModal.tsx | New create/edit template modal with validations and workflow selection/weights. |
| src/apps/admin/src/ai/review-templates/CreateTemplateModal.module.scss | Styles for create/edit template modal. |
| src/apps/admin/src/ai/review-templates/AiReviewTemplatesPage.tsx | New templates list page with filters, expand/collapse, edit/delete flows. |
| src/apps/admin/src/ai/review-templates/AiReviewTemplatesPage.module.scss | Styles for templates list and workflow tree. |
| src/apps/admin/src/ai/index.ts | Barrel export for AI module wrapper. |
| src/apps/admin/src/ai/Ai.tsx | AI module wrapper that renders nested routes via router context. |
| src/apps/admin/src/admin-app.routes.tsx | Registers lazy-loaded AI module + child routes for workflows/templates. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+137
to
+146
| { | ||
| defaultSortDirection: 'asc', | ||
| label: 'Provider/LLM', | ||
| propertyName: 'llm.provider.name', | ||
| renderer: (data: AiWorkflow) => ( | ||
| <div className={styles.cellText} title={`${data.llm?.provider?.name}/${data.llm?.name}`}> | ||
| {data.llm?.provider?.name} | ||
| / | ||
| {data.llm?.name} | ||
| </div> |
Comment on lines
+6
to
+7
| import { Table, TableColumn } from '~/libs/ui' | ||
| import FormToggleSwitch from '~/libs/ui/lib/components/form/form-groups/form-toggle-switch' |
Comment on lines
+200
to
+208
| const workflowOptions: InputSelectOption[] = useMemo(() => workflows | ||
| .filter(w => !w.disabled) | ||
| .map(w => ({ label: w.name, value: w.id })), [workflows]) | ||
|
|
||
| const watchedWorkflows: WorkflowFormItem[] = watch('workflows') || [] | ||
| const selectedWorkflowIds: string[] = watchedWorkflows.map( | ||
| (w: WorkflowFormItem) => w.workflowId, | ||
| ) | ||
|
|
| minPassingThreshold: number | ||
| mode: string | ||
| autoFinalize: boolean | ||
| formula?: Record<string, unknown> |
Comment on lines
+33
to
+37
|
|
||
| return ( | ||
| <div | ||
| className={styles.workflowItem} | ||
| onClick={handleClick} |
Comment on lines
+92
to
+97
| <div | ||
| className={styles.templateHeader} | ||
| onClick={handleToggleExpand} | ||
| role='button' | ||
| tabIndex={0} | ||
| > |
| setDeleteModal({ open: false }) | ||
| loadTemplates(filter) | ||
| } catch { | ||
| // Error handling can be added here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related JIRA Ticket:
https://topcoder.atlassian.net/browse/PM-5093
What's in this PR?