Phase 2-D: Frontend Codex/GPT Provider Experience #44
Labels
No Label
admin
agent-api
api
api-client
audit
backend
boards
cost-accounting
database
design
forgejo
frontend
issues
metrics
mutation
navigation
optional
phase:1
phase:2
phase:3
phase:4
phase:5
phase:6
polish
priority:high
priority:low
priority:medium
service
sync
usage-accuracy
validation
webhooks
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: null/Pipeline#44
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Source plan:
/home/kaspa/.claude/plans/with-our-backend-created-precious-owl.mdFeature context: Feature 2: Tool Use Analytics
Scope
Phase 2-D — Frontend: Codex/GPT Provider Experience
Summary
Extend the
/claude-codecommand center into a provider-aware AI sessions surface that can show Claude Code, Codex CLI, and OpenAI/GPT session analytics while preserving the current Claude look, feel, and interaction model.Problem
Duplicating the Claude page for Codex would create two experiences that drift apart. Users should be able to switch providers while keeping the same mental model: sessions, message detail, tool analytics, date ranges, copy controls, and readable operational dashboards.
Affected area
/claude-codecommand center, or a renamed/generalized AI sessions route if chosenAffected files
frontend/src/app/claude-code/page.tsx— add provider/source switcher while keeping Claude as the defaultfrontend/src/app/claude-code/sessions/[id]/page.tsx— support source-aware session detail links, or add a provider-aware routefrontend/src/components/claude/ToolAnalyticsPanel.tsx— accept source/provider props and fetch matching analyticsfrontend/src/components/claude/SessionMessageThread.tsx— keep shared rendering for Claude and Codex/GPT normalized messagesfrontend/src/components/claude/SessionHeroHeader.tsx— show source/provider labelfrontend/src/components/claude/SourceSwitcher.tsx— new provider/source switcher componentfrontend/src/components/claude/SourceStatusStrip.tsx— new source availability/status summaryfrontend/src/lib/api/claude-code.ts— add Codex/OpenAI API functions or rename/extract tofrontend/src/lib/api/agent-sessions.tsAffected routes or endpoints
Depending on backend choice:
GET /api/v1/claude-code/sessionsGET /api/v1/claude-code/analytics/tools?days=...codex_cli:GET /api/v1/codex/sessionsGET /api/v1/codex/analytics/tools?days=...GET /api/v1/agent-sessions/sourcesURL behavior
/claude-code/claude-code?tab=analytics&days=30/claude-code?source=claude_code&tab=sessions/claude-code?source=codex_cli&tab=analytics&days=90/claude-code?source=openai_api&tab=analytics&days=30claude_code.Expected behavior
/claude-codekeeps the same visual language introduced in Phase 1-B and Phase 2-B.Claude CodeCodex CLIOpenAI APIorGPTClaude Coderemains the default and existing behavior remains unchanged.Codex CLIupdates the URL and re-fetches sessions/analytics from the Codex backend source.OpenAI APIshows available sessions only if backend reports an owned event source; otherwise it shows an honest unavailable/setup state.SessionsandTool Analyticstabs remain consistent across providers.Visual and interaction direction
Accessibility and performance
Steps to reproduce (acceptance criteria)
/claude-codeTool Analyticsand confirm Claude analytics still worksCodex CLIsource=codex_cliCodex CLIanalytics and confirm it uses Codex analytics data when available/claude-code?source=codex_cli&tab=analytics&days=90directly and confirm source/tab/range are selectedOpenAI API/GPTsource shows data only when backend reports an owned event sourceNew opportunity to add
Compare sourcessummary when more than one source has data:2-D: Frontend: Codex/GPT Provider Experienceto Phase 2-D: Frontend Codex/GPT Provider Experience