Skip to content

Commit 933eb0d

Browse files
jsell-rhclaudemergify[bot]
authored
feat(ambient-ui): Dashboard, agent detail, multi-session sidebar, responsive layout (#1647)
## Summary Major ambient-ui feature batch: Dashboard landing page, agent detail page with CRUD, enhanced sessions table, keyboard navigation, unified multi-session chat sidebar, and responsive layout. ### Dashboard (default landing page) - Attention banner surfacing failed sessions, needs-review, needs-input - Active work cards grouped by Jira/PR annotations - Recent activity feed with last 10 completed sessions - Sidebar badge count for items needing attention - Container-query responsive layout for narrow widths ### Agent detail page - Full page at `/{projectId}/agents/{agentId}` with Manifest + Run History tabs - Manifest tab: editable config form + live YAML preview + annotations - Run History: compact table, click opens session in sidebar - Agent CRUD: create, update, delete with lifecycle badges (Unmanaged/GitOps) - "Run Test Session" popover creates session and opens in sidebar ### Multi-session chat sidebar - Unified chat sidebar replaces broken test session pane - Tab strip with phase-colored dots, session names, close-per-tab - Always-visible tabs even with single session - "+" button opens agent picker popover for quick session creation - Test mode toolbar (re-run, save, delete) when session has test annotation - Collapsed state: vertical dot stack with tooltips - Cap at 8 concurrent sessions ### Sessions table enhancements - Work Item column (Jira/PR/MR/Gerrit chips) - Review Status column (colored badges) - Bulk operations (stop/delete with confirmation) - Timestamp toggle (relative/absolute) - Test session "test" badge - Agent name as clickable link to agent detail - "Show test runs" toggle (hidden by default) ### Other - Sidebar restructured into Operate/Build nav groups - Keyboard navigation: j/k row nav, Cmd+K command palette, Escape-back - Centralized model options matching runner's VERTEX_MODEL_MAP - Git commit SHA in sidebar footer - API server fix: agent PATCH now persists all fields (display_name, repo_url, llm_model, description, llm_temperature, llm_max_tokens) ## Test plan - [ ] Dashboard renders attention banner for failed/needs-input sessions - [ ] Agent detail page: edit config, save, verify YAML updates - [ ] Run Test Session creates session and opens in sidebar - [ ] Multiple sessions open as tabs in sidebar, switching works - [ ] "+" button lists agents, creates session on click - [ ] Sessions table: Work Item and Review columns render - [ ] Bulk select + stop/delete works - [ ] Test sessions filtered from main Sessions page by default - [ ] Cmd+K opens command palette - [ ] Dashboard responsive when sidebar is open 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Full project-scoped agent CRUD UI (create sheet, detail page with Manifest/Overview/Config/Sessions tabs), agent YAML export/download, test-session flows, command palette, multi-session chat sidebar, dashboard widgets (Attention, Active Work, Recent Activity) * **Improvements** * Bulk session actions, richer fleet/agents tables (work-item, agent links, review badges, test-run toggle, time-format toggle), keyboard table navigation, session creation accepts annotations, agent metadata and LLM settings are surfaced and patchable * **Chores** * UI displays short git commit hash from build environment <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
1 parent 859caa7 commit 933eb0d

55 files changed

Lines changed: 6882 additions & 806 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

components/ambient-api-server/plugins/agents/factory_test.go

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ import (
44
"context"
55
"fmt"
66

7+
"github.com/ambient-code/platform/components/ambient-api-server/pkg/api/openapi"
78
"github.com/ambient-code/platform/components/ambient-api-server/plugins/agents"
9+
"github.com/openshift-online/rh-trex-ai/pkg/api/presenters"
810
"github.com/openshift-online/rh-trex-ai/pkg/environments"
911
)
1012

@@ -24,6 +26,22 @@ func newAgent(name string) (*agents.Agent, error) {
2426
return sub, nil
2527
}
2628

29+
func newAgentWithProject(name string, projectID string) (*agents.Agent, error) {
30+
agentService := agents.Service(&environments.Environment().Services)
31+
32+
agent := &agents.Agent{
33+
ProjectId: projectID,
34+
Name: name,
35+
}
36+
37+
sub, err := agentService.Create(context.Background(), agent)
38+
if err != nil {
39+
return nil, fmt.Errorf("agents.Create: %s", err.Error())
40+
}
41+
42+
return sub, nil
43+
}
44+
2745
func newAgentList(namePrefix string, count int) ([]*agents.Agent, error) {
2846
var items []*agents.Agent
2947
for i := 1; i <= count; i++ {
@@ -37,10 +55,35 @@ func newAgentList(namePrefix string, count int) ([]*agents.Agent, error) {
3755
return items, nil
3856
}
3957

58+
func presentAgent(agent *agents.Agent) openapi.Agent {
59+
reference := presenters.PresentReference(agent.ID, agent)
60+
return openapi.Agent{
61+
Id: reference.Id,
62+
Kind: reference.Kind,
63+
Href: reference.Href,
64+
CreatedAt: openapi.PtrTime(agent.CreatedAt),
65+
UpdatedAt: openapi.PtrTime(agent.UpdatedAt),
66+
ProjectId: agent.ProjectId,
67+
ParentAgentId: agent.ParentAgentId,
68+
OwnerUserId: openapi.PtrString(agent.OwnerUserId),
69+
Name: agent.Name,
70+
DisplayName: agent.DisplayName,
71+
Description: agent.Description,
72+
Prompt: agent.Prompt,
73+
RepoUrl: agent.RepoUrl,
74+
WorkflowId: agent.WorkflowId,
75+
LlmModel: openapi.PtrString(agent.LlmModel),
76+
LlmTemperature: openapi.PtrFloat64(agent.LlmTemperature),
77+
LlmMaxTokens: openapi.PtrInt32(agent.LlmMaxTokens),
78+
}
79+
}
80+
4081
func stringPtr(s string) *string { return &s }
4182

4283
var (
4384
_ = newAgent
85+
_ = newAgentWithProject
4486
_ = newAgentList
87+
_ = presentAgent
4588
_ = stringPtr
4689
)

components/ambient-api-server/plugins/agents/handler.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,27 @@ func (h agentHandler) Patch(w http.ResponseWriter, r *http.Request) {
7474
if patch.Name != nil {
7575
found.Name = *patch.Name
7676
}
77+
if patch.DisplayName != nil {
78+
found.DisplayName = patch.DisplayName
79+
}
80+
if patch.Description != nil {
81+
found.Description = patch.Description
82+
}
7783
if patch.Prompt != nil {
7884
found.Prompt = patch.Prompt
7985
}
86+
if patch.RepoUrl != nil {
87+
found.RepoUrl = patch.RepoUrl
88+
}
89+
if patch.LlmModel != nil {
90+
found.LlmModel = *patch.LlmModel
91+
}
92+
if patch.LlmTemperature != nil {
93+
found.LlmTemperature = *patch.LlmTemperature
94+
}
95+
if patch.LlmMaxTokens != nil {
96+
found.LlmMaxTokens = *patch.LlmMaxTokens
97+
}
8098
if patch.Labels != nil {
8199
found.Labels = patch.Labels
82100
}

0 commit comments

Comments
 (0)