Skip to content

feat: improve auth requests UI and API calls#32

Merged
rafaelsilva29 merged 4 commits intomainfrom
fix/improve-auth-requests
May 8, 2026
Merged

feat: improve auth requests UI and API calls#32
rafaelsilva29 merged 4 commits intomainfrom
fix/improve-auth-requests

Conversation

@rafaelsilva29
Copy link
Copy Markdown
Member

@rafaelsilva29 rafaelsilva29 commented May 7, 2026

Description

Improves the auth requests UI and supporting API with several targeted cleanups:

New API endpoint: GET /trace/session/{user_input_id} returns all events for a single session sorted by creation time, replacing the previous workaround of calling the paginated /trace endpoint with all=true.

Frontend hooks: Added useSession hook that consumes the new endpoint with a dedicated query key and staleTime. Removed the all=true workaround from useTraces. SessionTraceSheet now uses useMASById instead of useMAS() to fetch the MAS name by ID directly, avoiding missed results on large deployments.

Type safety: Converted EventType from a union type to a const object — all 6 consumer files updated to use EventType.* constants instead of raw string literals. Extracted ToolCheckFlags and TOTAL_TOOL_CHECKS to mas.types.ts as the single source of truth, removing duplicated bitmask constants from mas-deny-conditions-tab.tsx, mas-info-tab.tsx, and mas-detail-page.tsx.

Global search: Fixed the traces query to pass q to the server (matching how the MAS filter works) instead of fetching 100 results and filtering client-side.

Minor fixes: ColumnDef import changed to import type; get_mas_by_id return type corrected to MultiAgentSystem | None; UI text audit applied Title Case consistently across filter labels, blocking reason labels, deny condition labels, view toggles, sidebar tooltip, and pagination footer.

Type of Change

  • Bugfix
  • New Feature
  • Refactor

Checklist

  • I have read the contributing guidelines
  • Existing issues have been referenced (where applicable)
  • I have verified this change is not present in other open pull requests
  • Functionality is documented
  • All code style checks pass
  • New code contribution is covered by automated tests
  • All new and existing tests pass

- Add dedicated GET /trace/session/{user_input_id} endpoint returning all session events sorted by creation time
- Add useSession hook consuming the new endpoint; remove all=true workaround from useTraces
- Convert EventType union to const object for type-safe comparisons across all consumers
- Extract ToolCheckFlags and TOTAL_TOOL_CHECKS to mas.types.ts, removing duplicated bitmask constants from 3 files
- Replace useMAS() with useMASById in SessionTraceSheet for targeted MAS name resolution
- Fix global search traces query to pass q to server instead of client-side filtering
- Fix ColumnDef to use import type in mas-columns.tsx
- Fix get_mas_by_id return type to MultiAgentSystem | None
- UI text capitalization audit: Title Case across filter labels, blocking reason labels, deny condition labels, view toggles, sidebar tooltip, pagination footer
Signed-off-by: Rafael Silva (rafaelsi) <rafaelsi@cisco.com>
@rafaelsilva29 rafaelsilva29 force-pushed the fix/improve-auth-requests branch from ad630ce to 363abca Compare May 7, 2026 12:58
Signed-off-by: Rafael Silva (rafaelsi) <rafaelsi@cisco.com>
@rafaelsilva29 rafaelsilva29 merged commit 95162ce into main May 8, 2026
5 checks passed
@rafaelsilva29 rafaelsilva29 deleted the fix/improve-auth-requests branch May 8, 2026 08:33
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.

1 participant