Skip to content
Merged
Show file tree
Hide file tree
Changes from 33 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
fa61d95
Merge branch 'main' of https://github.com/ambient-code/platform
jsell-rh Jun 3, 2026
50ddfb8
feat(ambient-ui): restructure sidebar into Operate/Build nav groups
jsell-rh Jun 3, 2026
e15a4da
feat(ambient-ui): add Dashboard as default project landing page
jsell-rh Jun 3, 2026
2e99338
feat(ambient-ui): agent detail page, CRUD, and lifecycle badges
jsell-rh Jun 3, 2026
22928df
feat(ambient-ui): Work Item/Review columns, bulk ops, timestamp toggle
jsell-rh Jun 3, 2026
bd60f88
feat(ambient-ui): keyboard navigation, command palette, escape-back
jsell-rh Jun 3, 2026
ba45b4e
fix(ambient-ui): pass projectId to agent get/update/delete operations
jsell-rh Jun 3, 2026
6cd4808
fix(ambient-ui,api): agent PATCH persists all fields, tab restructure
jsell-rh Jun 3, 2026
42360b1
feat(ambient-ui): Run Test Session split-pane on agent detail page
jsell-rh Jun 3, 2026
f1f20dc
fix(ambient-ui): test sessions stopped immediately, missing annotation
jsell-rh Jun 3, 2026
a099a1a
fix(ambient-ui): centralize model options, add test session badge
jsell-rh Jun 3, 2026
3587de6
fix(ambient-ui): add chat input to test pane, fix re-run and header o…
jsell-rh Jun 3, 2026
b30f43a
fix(ambient-ui): pin test pane to viewport height with internal scroll
jsell-rh Jun 3, 2026
58219be
feat(ambient-ui): display git commit SHA in sidebar footer
jsell-rh Jun 3, 2026
3c81b99
feat(ambient-ui): rename Sessions→Run History, filter test runs, open…
jsell-rh Jun 3, 2026
dfb0bfd
fix(ambient-ui): consistent cursor on run history rows
jsell-rh Jun 3, 2026
3778ff0
fix(ambient-ui): test pane input below fold due to missing min-h-0
jsell-rh Jun 3, 2026
21aedfb
fix(ambient-ui): remove chat icon from sessions table header
jsell-rh Jun 3, 2026
538fe3a
feat(ambient-ui): make agent name a clickable link in sessions table
jsell-rh Jun 3, 2026
8c54a67
fix(ambient-ui): prevent test pane input from scrolling below viewport
jsell-rh Jun 3, 2026
aac19f7
fix(ambient-ui): pin split-pane to viewport height when test pane open
jsell-rh Jun 3, 2026
af29ce5
fix(ambient-ui): use fixed positioning for test pane split layout
jsell-rh Jun 3, 2026
301eb74
fix(ambient-ui): use calc height instead of fixed positioning for spl…
jsell-rh Jun 3, 2026
ff96f07
fix(ambient-ui): replace ResizablePanelGroup with simple flex + sticky
jsell-rh Jun 3, 2026
086847d
fix(ambient-ui): use sticky top-14 with calc height for test pane
jsell-rh Jun 3, 2026
afcb937
feat(ambient-ui): unify chat sidebar with multi-session tabs
jsell-rh Jun 3, 2026
e3b19f3
fix(ambient-ui): add tooltips to sidebar hide/close buttons
jsell-rh Jun 3, 2026
7235e88
feat(ambient-ui): always-visible tabs, + button, responsive dashboard
jsell-rh Jun 3, 2026
481f7dc
fix(ambient-ui): anchor + popover to tab strip, responsive phase dots
jsell-rh Jun 3, 2026
6b34edd
Merge branch 'main' into jsell/feat/ambient-ui-dashboard-agents
mergify[bot] Jun 3, 2026
c06f355
fix(api-server): add DEFAULT values to agent LLM migration columns
jsell-rh Jun 3, 2026
9337ef7
fix(api-server): remove BeforeCreate temperature/maxTokens defaults
jsell-rh Jun 3, 2026
4304c73
Merge branch 'main' into jsell/feat/ambient-ui-dashboard-agents
jsell-rh Jun 3, 2026
f40dd08
test(api-server): write agent integration tests for CRUD + isolation
jsell-rh Jun 3, 2026
0f89be7
fix(ambient-ui): address 14 CodeRabbit review findings
jsell-rh Jun 3, 2026
98aabf4
fix(api-server): restore BeforeCreate defaults with sentinel for temp…
jsell-rh Jun 4, 2026
9c40c62
fix(api-server): correct test assertions, symmetric sentinel for max_…
jsell-rh Jun 4, 2026
3e49062
fix(runner): extract last assistant message, not first, from snapshot
jsell-rh Jun 4, 2026
c022e10
fix(ambient-ui): pass projectId to TestToolbar, generic error messages
jsell-rh Jun 4, 2026
e6b2676
feat(ambient-ui): persist draft messages in localStorage per session
jsell-rh Jun 4, 2026
66926bf
fix(runner): add push_error to GRPCMessageWriter for crash recovery
jsell-rh Jun 4, 2026
bdacbb7
docs(runner): update GRPCMessageWriter module docstring
jsell-rh Jun 4, 2026
634cb43
fix(ambient-ui): fix nested interactive element in tab strip (a11y)
jsell-rh Jun 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions components/ambient-api-server/plugins/agents/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,27 @@ func (h agentHandler) Patch(w http.ResponseWriter, r *http.Request) {
if patch.Name != nil {
found.Name = *patch.Name
}
if patch.DisplayName != nil {
found.DisplayName = patch.DisplayName
}
if patch.Description != nil {
found.Description = patch.Description
}
if patch.Prompt != nil {
found.Prompt = patch.Prompt
}
if patch.RepoUrl != nil {
found.RepoUrl = patch.RepoUrl
}
if patch.LlmModel != nil {
found.LlmModel = *patch.LlmModel
}
if patch.LlmTemperature != nil {
found.LlmTemperature = *patch.LlmTemperature
}
if patch.LlmMaxTokens != nil {
found.LlmMaxTokens = *patch.LlmMaxTokens
}
if patch.Labels != nil {
found.Labels = patch.Labels
}
Expand Down
8 changes: 4 additions & 4 deletions components/ambient-api-server/plugins/agents/migration.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ func agentSchemaExpansionMigration() *gormigrate.Migration {
Migrate: func(tx *gorm.DB) error {
stmts := []string{
`ALTER TABLE agents ADD COLUMN IF NOT EXISTS parent_agent_id TEXT`,
`ALTER TABLE agents ADD COLUMN IF NOT EXISTS owner_user_id TEXT`,
`ALTER TABLE agents ADD COLUMN IF NOT EXISTS owner_user_id TEXT NOT NULL DEFAULT ''`,
`ALTER TABLE agents ADD COLUMN IF NOT EXISTS display_name TEXT`,
`ALTER TABLE agents ADD COLUMN IF NOT EXISTS description TEXT`,
`ALTER TABLE agents ADD COLUMN IF NOT EXISTS repo_url TEXT`,
`ALTER TABLE agents ADD COLUMN IF NOT EXISTS workflow_id TEXT`,
`ALTER TABLE agents ADD COLUMN IF NOT EXISTS llm_model TEXT`,
`ALTER TABLE agents ADD COLUMN IF NOT EXISTS llm_temperature DOUBLE PRECISION`,
`ALTER TABLE agents ADD COLUMN IF NOT EXISTS llm_max_tokens INTEGER`,
`ALTER TABLE agents ADD COLUMN IF NOT EXISTS llm_model TEXT DEFAULT 'claude-sonnet-4-6'`,
`ALTER TABLE agents ADD COLUMN IF NOT EXISTS llm_temperature DOUBLE PRECISION DEFAULT 0.7`,
`ALTER TABLE agents ADD COLUMN IF NOT EXISTS llm_max_tokens INTEGER DEFAULT 4000`,
Comment thread
coderabbitai[bot] marked this conversation as resolved.
`ALTER TABLE agents ADD COLUMN IF NOT EXISTS bot_account_name TEXT`,
`ALTER TABLE agents ADD COLUMN IF NOT EXISTS resource_overrides TEXT`,
`ALTER TABLE agents ADD COLUMN IF NOT EXISTS environment_variables TEXT`,
Expand Down
6 changes: 0 additions & 6 deletions components/ambient-api-server/plugins/agents/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,5 @@ func (d *Agent) BeforeCreate(tx *gorm.DB) error {
if d.LlmModel == "" {
d.LlmModel = "claude-sonnet-4-6"
}
if d.LlmTemperature == 0 {
d.LlmTemperature = 0.7
}
if d.LlmMaxTokens == 0 {
d.LlmMaxTokens = 4000
}
return nil
}
52 changes: 41 additions & 11 deletions components/ambient-api-server/plugins/agents/presenter.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,26 @@ func ConvertAgent(agent openapi.Agent) *Agent {
},
}
c.ProjectId = agent.ProjectId
c.ParentAgentId = agent.ParentAgentId
c.OwnerUserId = util.NilToEmptyString(agent.OwnerUserId)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

Keep nullable agent fields nullable across presenter round-trips.

ConvertAgent collapses owner_user_id, llm_model, llm_temperature, and llm_max_tokens into zero values, and PresentAgent then always serializes those zero values back as non-nil pointers. That changes API null into "" / 0 on every GET/PATCH round-trip, so clients can no longer distinguish “unset” from “explicitly configured”. llm_temperature = 0 is a valid setting, so this needs presence-tracking in Agent (or separate nullable fields), not a zero-value check in the presenter.

Also applies to: 25-33, 60-69

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@components/ambient-api-server/plugins/agents/presenter.go` at line 18,
ConvertAgent currently collapses nullable fields (owner_user_id, llm_model,
llm_temperature, llm_max_tokens) into zero values (via util.NilToEmptyString /
zero checks) so PresentAgent always emits non-nil pointers; change ConvertAgent
and PresentAgent to preserve nil-ness instead of coercing to zero. Specifically,
stop calling util.NilToEmptyString (and similar zero-value helpers) for
agent.OwnerUserId, agent.LLMModel, agent.LLMTemperature, agent.LLMMaxTokens in
ConvertAgent and keep those fields as pointers or optional types on the Agent
model; then update PresentAgent to serialize those pointer fields as nil when
they are nil (do not convert nil->"" or 0). Ensure function names ConvertAgent
and PresentAgent and the fields
owner_user_id/llm_model/llm_temperature/llm_max_tokens are the places you change
so GET/PATCH round-trips retain true null vs explicit values.

c.Name = agent.Name
c.DisplayName = agent.DisplayName
c.Description = agent.Description
c.Prompt = agent.Prompt
c.RepoUrl = agent.RepoUrl
c.WorkflowId = agent.WorkflowId
if agent.LlmModel != nil {
c.LlmModel = *agent.LlmModel
}
if agent.LlmTemperature != nil {
c.LlmTemperature = *agent.LlmTemperature
}
if agent.LlmMaxTokens != nil {
c.LlmMaxTokens = *agent.LlmMaxTokens
}
c.BotAccountName = agent.BotAccountName
c.ResourceOverrides = agent.ResourceOverrides
c.EnvironmentVariables = agent.EnvironmentVariables
c.Labels = agent.Labels
c.Annotations = agent.Annotations

Expand All @@ -32,16 +50,28 @@ func ConvertAgent(agent openapi.Agent) *Agent {
func PresentAgent(agent *Agent) openapi.Agent {
reference := presenters.PresentReference(agent.ID, agent)
return openapi.Agent{
Id: reference.Id,
Kind: reference.Kind,
Href: reference.Href,
CreatedAt: openapi.PtrTime(agent.CreatedAt),
UpdatedAt: openapi.PtrTime(agent.UpdatedAt),
ProjectId: agent.ProjectId,
Name: agent.Name,
Prompt: agent.Prompt,
CurrentSessionId: agent.CurrentSessionId,
Labels: agent.Labels,
Annotations: agent.Annotations,
Id: reference.Id,
Kind: reference.Kind,
Href: reference.Href,
CreatedAt: openapi.PtrTime(agent.CreatedAt),
UpdatedAt: openapi.PtrTime(agent.UpdatedAt),
ProjectId: agent.ProjectId,
ParentAgentId: agent.ParentAgentId,
OwnerUserId: openapi.PtrString(agent.OwnerUserId),
Name: agent.Name,
DisplayName: agent.DisplayName,
Description: agent.Description,
Prompt: agent.Prompt,
RepoUrl: agent.RepoUrl,
WorkflowId: agent.WorkflowId,
LlmModel: openapi.PtrString(agent.LlmModel),
LlmTemperature: openapi.PtrFloat64(agent.LlmTemperature),
LlmMaxTokens: openapi.PtrInt32(agent.LlmMaxTokens),
BotAccountName: agent.BotAccountName,
ResourceOverrides: agent.ResourceOverrides,
EnvironmentVariables: agent.EnvironmentVariables,
CurrentSessionId: agent.CurrentSessionId,
Labels: agent.Labels,
Annotations: agent.Annotations,
}
}
3 changes: 3 additions & 0 deletions components/ambient-ui/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ COPY ambient-ui/ .
# Learn more here: https://nextjs.org/telemetry
ENV NEXT_TELEMETRY_DISABLED=1

ARG GIT_COMMIT=unknown
ENV NEXT_PUBLIC_GIT_COMMIT=$GIT_COMMIT

RUN npm run build

# Prepare standalone output with OpenShift-compatible permissions in the builder
Expand Down
Loading
Loading