Skip to content

feat(frontend): name the stages inside a cold agent start - #6451

Merged
ashrafchowdury merged 4 commits into
release/v0.114.7from
feat/startup-phase-detail
Sep 3, 2026
Merged

feat(frontend): name the stages inside a cold agent start#6451
ashrafchowdury merged 4 commits into
release/v0.114.7from
feat/startup-phase-detail

Conversation

@ardaerzin

Copy link
Copy Markdown
Contributor

Follow-up to #6047 / #6073.

Context

A first turn in a new session shows one static line, Starting the agent, for the whole acquire. Measured on a trivial prompt that was 24.5 seconds, which reads as a hung screen rather than a working one.

Nothing regressed. #6047 asked for exactly two states ("Display 'Sandbox starting'… Display 'Sandbox started'"), #6073 delivered them, and STARTUP_LABELS has had one label covering the entire acquire ever since. The scope simply stopped short of the wait it was meant to explain.

Meanwhile the runner already times every stage inside that window and logs each one:

stage=sandbox_start        ms=563
stage=prepare_workspace    ms=719
stage=probe_capabilities   ms=1361
stage=create_session       ms=19175   <- 78% of the wait
stage=acquire_total        ms=24468

create_session is the overwhelming majority of a cold start and had no representation in the UI at all.

Changes

Two new phases, emitted beside the timing marks they correspond to:

phase label covers
environment_starting Starting the agent sandbox boot (existing)
preparing_workspace Preparing the workspace prepare_workspace (new)
opening_session Opening the agent session probe_capabilities + create_session (new)
environment_ready Agent ready existing

Both emits sit on the straight-line path of acquireEnvironment, in order, neither behind a branch — verified by walking each emit's enclosing block.

An unknown phase still maps to null and leaves the previous label standing, so the runner can add stages later without the UI needing to know them.

Nothing is faster. The wait just stops looking like a stall.

Tests

  • New unit case asserting both labels, alongside the existing coverage for the two original phases, unknown phases, and prototype-key rejection.
  • @agenta/chat: 567 tests pass. tsc --noEmit clean on the chat package and the runner. Prettier clean on all three files.

Not verified end to end in a browser, and I would rather say so than imply otherwise. Two local-environment blockers got in the way, neither related to this change:

  • One project's agent has a service URL frozen into its revision with no port (http://localhost/services/agent/v0), so every invoke goes to port 80 and fails before the runner is reached.
  • The other project's agent needs a Claude subscription login that is not present on this machine.

I confirmed the runner does cold-start and emit the stage timings (probe_capabilities 2308ms, create_session 7479ms, acquire_total 12575ms in the logs), but could not drive a turn through to the UI on either project.

What to QA

  • Start a new session with an agent and send a first message. The line under the avatar advances through "Starting the agent" → "Preparing the workspace" → "Opening the agent session" → the response, instead of holding one label.
  • Compare with a warm second turn in the same session: it should stay on the existing fast path with no startup narration.
  • Regression: cancel a cold start midway. It must not leave a stale phase label (this is requirement 6 of (feat) Show sandbox startup states before an agent streams #6047).

A first turn in a new session showed one static line, "Starting the agent", for
the whole acquire. Measured on a trivial prompt that was 24.5 seconds, which
reads as a hung screen rather than a working one.

#6047 asked for exactly two states ("Sandbox starting" / "Sandbox started") and
#6073 delivered them, so `STARTUP_LABELS` had one label covering the entire
acquire. Nothing regressed; the scope simply stopped short of the wait it was
meant to explain.

The runner already times the stages inside that window and logs every one:

    sandbox_start        0.6s
    prepare_workspace    0.7s
    probe_capabilities   1.4s
    create_session      19.2s   <- 78% of the wait
    acquire_total       24.5s

`create_session` is the overwhelming majority and had no representation in the
UI at all. It does now, along with workspace preparation:

    environment_starting  Starting the agent
    preparing_workspace   Preparing the workspace     (new)
    opening_session       Opening the agent session   (new)
    environment_ready     Agent ready

Both emits sit on the straight-line path of `acquireEnvironment`, in order,
neither behind a branch, beside the timing marks they correspond to. Nothing is
faster; the wait just stops looking like a stall.

An unknown phase still maps to null and leaves the previous label standing, so
the runner can add stages later without the UI needing to know them.
@vercel

vercel Bot commented Sep 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
agenta-documentation Ready Ready Preview Sep 3, 2026 10:20am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

Next included review available in 44 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 8 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Team

Run ID: 58a1d8ca-cb49-46f5-9abb-7d21b3fccb2a

📥 Commits

Reviewing files that changed from the base of the PR and between b4aa915 and 48c8d7f.

📒 Files selected for processing (5)
  • services/runner/src/engines/sandbox_agent/environment.ts
  • services/runner/tests/unit/sandbox-agent-orchestration.test.ts
  • services/runner/tests/unit/session-keepalive-engine.test.ts
  • web/packages/agenta-chat/src/assets/startupPhases.ts
  • web/packages/agenta-chat/tests/unit/assets/startupPhases.test.ts
ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Team

Run ID: 985cdfcf-3122-419a-b47a-bbd1e718b069

📥 Commits

Reviewing files that changed from the base of the PR and between b57de39 and 48c8d7f.

⛔ Files ignored due to path filters (4)
  • api/uv.lock is excluded by !**/*.lock
  • clients/python/uv.lock is excluded by !**/*.lock
  • sdks/python/uv.lock is excluded by !**/*.lock
  • services/uv.lock is excluded by !**/*.lock
📒 Files selected for processing (50)
  • api/pyproject.toml
  • clients/python/pyproject.toml
  • hosting/kubernetes/helm/Chart.yaml
  • sdks/python/pyproject.toml
  • services/pyproject.toml
  • services/runner/src/engines/sandbox_agent/environment.ts
  • services/runner/src/engines/sandbox_agent/session-continuity.ts
  • services/runner/tests/unit/sandbox-agent-orchestration.test.ts
  • services/runner/tests/unit/session-continuity.test.ts
  • services/runner/tests/unit/session-keepalive-engine.test.ts
  • web/ee/package.json
  • web/mobile/package.json
  • web/mobile/src/features/chat/Composer.tsx
  • web/oss/package.json
  • web/oss/src/components/AgentChatSlice/components/AgentComposerDock.tsx
  • web/oss/src/components/Layout/Layout.tsx
  • web/oss/src/components/pages/WorkspaceProjectRedirect/index.tsx
  • web/oss/src/components/pages/WorkspaceRedirect/index.tsx
  • web/oss/src/state/project/selectors/project.ts
  • web/oss/src/state/project/selectors/routeContext.test.ts
  • web/oss/src/state/project/selectors/routeContext.ts
  • web/package.json
  • web/packages/agenta-api-client/package.json
  • web/packages/agenta-chat/src/assets/startupPhases.ts
  • web/packages/agenta-chat/src/components/ElicitationDock.tsx
  • web/packages/agenta-chat/src/components/VoiceInputButton.tsx
  • web/packages/agenta-chat/src/hooks/useElicitationStepper.ts
  • web/packages/agenta-chat/src/hooks/usePushToTalk.ts
  • web/packages/agenta-chat/src/hooks/useVoiceComposer.ts
  • web/packages/agenta-chat/tests/unit/assets/startupPhases.test.ts
  • web/packages/agenta-chat/tests/unit/components/elicitationDockSettle.test.tsx
  • web/packages/agenta-chat/tests/unit/components/voiceInputButtonPushToTalk.test.tsx
  • web/packages/agenta-chat/tests/unit/hooks/useElicitationStepper.test.ts
  • web/packages/agenta-chat/tests/unit/hooks/usePushToTalk.test.ts
  • web/packages/agenta-entities/src/project/api.ts
  • web/packages/agenta-entities/src/workflow/state/agentModelCandidates.ts
  • web/packages/agenta-entities/src/workflow/state/store.ts
  • web/packages/agenta-entities/tests/unit/agent-model-candidate-sources.test.ts
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/SchemaPropertyRenderer.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/BuildKitSection.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/buildKitDescriptors.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/useBuildKit.tsx
  • web/packages/agenta-entity-ui/tests/unit/buildKitDescriptors.test.ts
  • web/packages/agenta-playground-ui/src/components/AgentPageHeader/AgentRevisionStatus.tsx
  • web/packages/agenta-shared/src/api/persist/debug.ts
  • web/packages/agenta-shared/src/api/persist/idbStorage.ts
  • web/packages/agenta-shared/tests/unit/persistReadTimeout.test.ts
  • web/packages/agenta-ui/src/RichChatInput/RichChatInput.tsx
  • web/packages/agenta-ui/tests/unit/richChatInputDictationSend.render.test.tsx
  • web/storybook/stories/entity-ui/BuildKitSection.stories.tsx
💤 Files with no reviewable changes (2)
  • web/oss/src/components/pages/WorkspaceProjectRedirect/index.tsx
  • web/oss/src/components/pages/WorkspaceRedirect/index.tsx
🚧 Files skipped from review as they are similar to previous changes (5)
  • services/runner/tests/unit/session-keepalive-engine.test.ts
  • services/runner/tests/unit/sandbox-agent-orchestration.test.ts
  • web/packages/agenta-chat/src/assets/startupPhases.ts
  • web/packages/agenta-chat/tests/unit/assets/startupPhases.test.ts
  • services/runner/src/engines/sandbox_agent/environment.ts

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Summary

Summary by CodeRabbit

  • New Features
    • Added progress updates for workspace preparation and agent session startup.
    • Added clearer labels for these startup stages.
    • Added a dedicated 404 screen for invalid workspace and project routes.
    • Build-kit tools and embedded capabilities now appear in one unified list with clearer descriptions.
  • Bug Fixes
    • Improved voice input cleanup when sending or clearing messages.
    • Push-to-talk now ignores hidden chat sessions.
    • Single-question forms no longer display unnecessary stepper controls.
    • Project and revision data refresh more reliably, including after subscription or storage errors.

Walkthrough

The pull request adds sandbox startup phases, route validation, dictation lifecycle controls, unified build-kit tools, persistence timeouts, subscription error states, elicitation UI changes, template error handling, revision cache refreshes, session diagnostics, and version updates.

Changes

Startup phase status

Layer / File(s) Summary
Emit and label acquire phases
services/runner/..., web/packages/agenta-chat/src/assets/startupPhases.ts, web/packages/agenta-chat/tests/unit/assets/*, services/runner/tests/unit/*
The acquire flow emits preparing_workspace and opening_session. The chat UI maps both phases to labels. Tests verify ordering and mappings.

Dictation lifecycle controls

Layer / File(s) Summary
Stop dictation during composer actions
web/packages/agenta-chat/src/hooks/*, web/packages/agenta-chat/src/components/VoiceInputButton.tsx, web/oss/src/components/AgentChatSlice/components/AgentComposerDock.tsx, web/mobile/src/features/chat/Composer.tsx, web/packages/agenta-ui/src/RichChatInput/*
Composers stop dictation before submission or clearing. Voice controls expose the stop reference and track recording intent.
Guard push-to-talk by visibility
web/packages/agenta-chat/src/hooks/usePushToTalk.ts, web/packages/agenta-chat/src/components/VoiceInputButton.tsx, web/packages/agenta-chat/tests/unit/hooks/*, web/packages/agenta-chat/tests/unit/components/*
Push-to-talk checks whether the session root is visible before arming and after the delay. Tests cover hidden sessions and recognizer teardown.

Route validation

Layer / File(s) Summary
Resolve guarded route context
web/oss/src/state/project/selectors/routeContext.ts, web/oss/src/state/project/selectors/project.ts, web/oss/src/state/project/selectors/routeContext.test.ts
Route context now reports neutral, resolving, error, and not-found states. Project queries use route-aware keys and retry rules.
Render invalid routes
web/oss/src/components/Layout/Layout.tsx, web/oss/src/components/pages/*Redirect/index.tsx
The layout renders NotFoundScreen for invalid routes. Redirect pages render their loading state while effects handle redirects.

Unified build-kit tools

Layer / File(s) Summary
Build descriptor and tool-list model
web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/*
Platform tools and Agenta-owned embeds use shared descriptors and one unified BuildKitTool[] list. Locked embeds and switchable platform tools render together.
Build-kit validation and stories
web/packages/agenta-entity-ui/tests/unit/buildKitDescriptors.test.ts, web/storybook/stories/entity-ui/BuildKitSection.stories.tsx
Tests cover descriptor copy and fallbacks. Stories use unified tool fixtures and props.

Data and state consistency

Layer / File(s) Summary
Propagate project and subscription states
web/packages/agenta-entities/src/project/api.ts, web/packages/agenta-entities/src/workflow/state/agentModelCandidates.ts, web/packages/agenta-entities/tests/unit/agent-model-candidate-sources.test.ts
Project failures propagate to callers. Subscription failures produce an error only when no vault candidates are available.
Refresh revision data
web/packages/agenta-entities/src/workflow/state/store.ts, web/packages/agenta-playground-ui/src/components/AgentPageHeader/AgentRevisionStatus.tsx
Revision list caches invalidate after commits and when the revision status mounts.
Bound IndexedDB reads
web/packages/agenta-shared/src/api/persist/*, web/packages/agenta-shared/tests/unit/persistReadTimeout.test.ts
IndexedDB reads return a cache miss after three seconds and emit a timeout diagnostic.

Elicitation and template UI

Layer / File(s) Summary
Hide single-question stepper controls
web/packages/agenta-chat/src/hooks/useElicitationStepper.ts, web/packages/agenta-chat/src/components/ElicitationDock.tsx, web/packages/agenta-chat/tests/unit/components/*, web/packages/agenta-chat/tests/unit/hooks/*
Single-question forms omit stepper navigation, progress, and numbering. Multi-step forms retain these controls.
Surface lazy template failures
web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/SchemaPropertyRenderer.tsx
Lazy import failures and render failures display an error panel instead of leaving the skeleton fallback.

Session diagnostics and release metadata

Layer / File(s) Summary
Validate session ownership guidance
services/runner/tests/unit/session-continuity.test.ts
Tests verify the guidance and operator-detail formatting for LocalSandboxNotOwnerError.
Update package and chart versions
api/pyproject.toml, clients/python/pyproject.toml, sdks/python/pyproject.toml, services/pyproject.toml, hosting/kubernetes/helm/Chart.yaml, web/package.json, web/ee/package.json, web/mobile/package.json, web/oss/package.json, web/packages/agenta-api-client/package.json
Project, package, and Helm chart versions advance from 0.114.6 to 0.114.7.

Estimated code review effort: 4 (Complex) | ~60 minutes

Merge Risk: 🔵 Low · up to 48c8d

A few uncommon failure and malformed-data paths can leave UI state stuck, render incorrect tool rows, or hide persistence diagnostics. The fixes are localized and should be applied before release where practical.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 58.33% which is insufficient. The required threshold is 60.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 12 functions across 37 files. (10 skipped… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The description clearly explains the new cold-start phases, their UI labels, emitted runner events, tests, and QA scope.
Title check ✅ Passed The title clearly and concisely identifies the main change: naming stages during a cold agent start.
Full details: Docstring Coverage

Explanation

Docstring coverage is 58.33% which is insufficient. The required threshold is 60.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 12 functions across 37 files. (10 skipped: 10 unsupported.)

✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/startup-phase-detail

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 1

🧹 Nitpick comments (1)
web/packages/agenta-chat/src/assets/startupPhases.ts (1)

1-16: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Keep each source comment to one short line.

The new comments in these files use multiple lines. Condense each comment or move the detailed rationale to external documentation.

  • web/packages/agenta-chat/src/assets/startupPhases.ts#L1-L16: replace the multi-line JSDoc comment with one short line.
  • services/runner/src/engines/sandbox_agent/environment.ts#L1029-L1030: condense the two-line stage rationale.
  • web/packages/agenta-chat/tests/unit/assets/startupPhases.test.ts#L22-L23: condense the two-line test rationale.

As per coding guidelines, comments must be at most one short line.

Source: Coding guidelines


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Team

Run ID: c44a7a41-a002-4d33-94e6-3df7d8dbbef8

📥 Commits

Reviewing files that changed from the base of the PR and between 68e9166 and 1a4ce0d.

📒 Files selected for processing (3)
  • services/runner/src/engines/sandbox_agent/environment.ts
  • web/packages/agenta-chat/src/assets/startupPhases.ts
  • web/packages/agenta-chat/tests/unit/assets/startupPhases.test.ts

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.

Comment thread services/runner/src/engines/sandbox_agent/environment.ts
… tests

acquireEnvironment now emits preparing_workspace and opening_session, but
both deepEqual assertions still listed only environment_starting and
environment_ready, so a normal acquire failed the runner unit job.
web/AGENTS.md sets at most one short line per comment; the three comments
added here were multi-line blocks.
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Railway Preview Environment

Status Destroyed (PR closed)

Updated at 2026-09-03T11:05:53.550Z

@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@ardaerzin
ardaerzin changed the base branch from main to release/v0.114.7 September 3, 2026 10:19
@ardaerzin

Copy link
Copy Markdown
Contributor Author

@coderabbitai full review

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 7

🧹 Nitpick comments (3)
web/packages/agenta-entities/src/workflow/state/store.ts (1)

2950-2952: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Shorten both new comments to one line.

  • web/packages/agenta-entities/src/workflow/state/store.ts#L2950-L2952: replace the cache-invalidation explanation with one short line.
  • web/packages/agenta-playground-ui/src/components/AgentPageHeader/AgentRevisionStatus.tsx#L118-L124: replace the mount-invalidation explanation with one short line.

As per coding guidelines: “Hard rule. At most ONE short line per comment.”

Source: Coding guidelines

web/storybook/stories/entity-ui/BuildKitSection.stories.tsx (1)

10-13: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Expose both helpers through @agenta/entity-ui/drill-in before importing them here. The current path bypasses the package boundary, and the existing subpath does not export either helper.

web/packages/agenta-chat/src/hooks/useVoiceComposer.ts (1)

48-51: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Condense the two dictationStopRef comments to one short line each. The comments exceed the checked-in frontend comment rule; keep only the essential dictation ownership and lifecycle details.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Team

Run ID: 985cdfcf-3122-419a-b47a-bbd1e718b069

📥 Commits

Reviewing files that changed from the base of the PR and between b57de39 and 48c8d7f.

⛔ Files ignored due to path filters (4)
  • api/uv.lock is excluded by !**/*.lock
  • clients/python/uv.lock is excluded by !**/*.lock
  • sdks/python/uv.lock is excluded by !**/*.lock
  • services/uv.lock is excluded by !**/*.lock
📒 Files selected for processing (50)
  • api/pyproject.toml
  • clients/python/pyproject.toml
  • hosting/kubernetes/helm/Chart.yaml
  • sdks/python/pyproject.toml
  • services/pyproject.toml
  • services/runner/src/engines/sandbox_agent/environment.ts
  • services/runner/src/engines/sandbox_agent/session-continuity.ts
  • services/runner/tests/unit/sandbox-agent-orchestration.test.ts
  • services/runner/tests/unit/session-continuity.test.ts
  • services/runner/tests/unit/session-keepalive-engine.test.ts
  • web/ee/package.json
  • web/mobile/package.json
  • web/mobile/src/features/chat/Composer.tsx
  • web/oss/package.json
  • web/oss/src/components/AgentChatSlice/components/AgentComposerDock.tsx
  • web/oss/src/components/Layout/Layout.tsx
  • web/oss/src/components/pages/WorkspaceProjectRedirect/index.tsx
  • web/oss/src/components/pages/WorkspaceRedirect/index.tsx
  • web/oss/src/state/project/selectors/project.ts
  • web/oss/src/state/project/selectors/routeContext.test.ts
  • web/oss/src/state/project/selectors/routeContext.ts
  • web/package.json
  • web/packages/agenta-api-client/package.json
  • web/packages/agenta-chat/src/assets/startupPhases.ts
  • web/packages/agenta-chat/src/components/ElicitationDock.tsx
  • web/packages/agenta-chat/src/components/VoiceInputButton.tsx
  • web/packages/agenta-chat/src/hooks/useElicitationStepper.ts
  • web/packages/agenta-chat/src/hooks/usePushToTalk.ts
  • web/packages/agenta-chat/src/hooks/useVoiceComposer.ts
  • web/packages/agenta-chat/tests/unit/assets/startupPhases.test.ts
  • web/packages/agenta-chat/tests/unit/components/elicitationDockSettle.test.tsx
  • web/packages/agenta-chat/tests/unit/components/voiceInputButtonPushToTalk.test.tsx
  • web/packages/agenta-chat/tests/unit/hooks/useElicitationStepper.test.ts
  • web/packages/agenta-chat/tests/unit/hooks/usePushToTalk.test.ts
  • web/packages/agenta-entities/src/project/api.ts
  • web/packages/agenta-entities/src/workflow/state/agentModelCandidates.ts
  • web/packages/agenta-entities/src/workflow/state/store.ts
  • web/packages/agenta-entities/tests/unit/agent-model-candidate-sources.test.ts
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/SchemaPropertyRenderer.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/BuildKitSection.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/buildKitDescriptors.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/useBuildKit.tsx
  • web/packages/agenta-entity-ui/tests/unit/buildKitDescriptors.test.ts
  • web/packages/agenta-playground-ui/src/components/AgentPageHeader/AgentRevisionStatus.tsx
  • web/packages/agenta-shared/src/api/persist/debug.ts
  • web/packages/agenta-shared/src/api/persist/idbStorage.ts
  • web/packages/agenta-shared/tests/unit/persistReadTimeout.test.ts
  • web/packages/agenta-ui/src/RichChatInput/RichChatInput.tsx
  • web/packages/agenta-ui/tests/unit/richChatInputDictationSend.render.test.tsx
  • web/storybook/stories/entity-ui/BuildKitSection.stories.tsx
💤 Files with no reviewable changes (2)
  • web/oss/src/components/pages/WorkspaceProjectRedirect/index.tsx
  • web/oss/src/components/pages/WorkspaceRedirect/index.tsx
🚧 Files skipped from review as they are similar to previous changes (5)
  • services/runner/tests/unit/session-keepalive-engine.test.ts
  • services/runner/tests/unit/sandbox-agent-orchestration.test.ts
  • web/packages/agenta-chat/src/assets/startupPhases.ts
  • web/packages/agenta-chat/tests/unit/assets/startupPhases.test.ts
  • services/runner/src/engines/sandbox_agent/environment.ts

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.

@coderabbitai coderabbitai Bot left a comment

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.

Caution

Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.

Actionable comments posted: 7

🧹 Nitpick comments (3)
web/packages/agenta-entities/src/workflow/state/store.ts (1)

2950-2952: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Shorten both new comments to one line.

  • web/packages/agenta-entities/src/workflow/state/store.ts#L2950-L2952: replace the cache-invalidation explanation with one short line.
  • web/packages/agenta-playground-ui/src/components/AgentPageHeader/AgentRevisionStatus.tsx#L118-L124: replace the mount-invalidation explanation with one short line.

As per coding guidelines: “Hard rule. At most ONE short line per comment.”

Source: Coding guidelines

web/storybook/stories/entity-ui/BuildKitSection.stories.tsx (1)

10-13: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Expose both helpers through @agenta/entity-ui/drill-in before importing them here. The current path bypasses the package boundary, and the existing subpath does not export either helper.

web/packages/agenta-chat/src/hooks/useVoiceComposer.ts (1)

48-51: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Condense the two dictationStopRef comments to one short line each. The comments exceed the checked-in frontend comment rule; keep only the essential dictation ownership and lifecycle details.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Team

Run ID: 985cdfcf-3122-419a-b47a-bbd1e718b069

📥 Commits

Reviewing files that changed from the base of the PR and between b57de39 and 48c8d7f.

⛔ Files ignored due to path filters (4)
  • api/uv.lock is excluded by !**/*.lock
  • clients/python/uv.lock is excluded by !**/*.lock
  • sdks/python/uv.lock is excluded by !**/*.lock
  • services/uv.lock is excluded by !**/*.lock
📒 Files selected for processing (50)
  • api/pyproject.toml
  • clients/python/pyproject.toml
  • hosting/kubernetes/helm/Chart.yaml
  • sdks/python/pyproject.toml
  • services/pyproject.toml
  • services/runner/src/engines/sandbox_agent/environment.ts
  • services/runner/src/engines/sandbox_agent/session-continuity.ts
  • services/runner/tests/unit/sandbox-agent-orchestration.test.ts
  • services/runner/tests/unit/session-continuity.test.ts
  • services/runner/tests/unit/session-keepalive-engine.test.ts
  • web/ee/package.json
  • web/mobile/package.json
  • web/mobile/src/features/chat/Composer.tsx
  • web/oss/package.json
  • web/oss/src/components/AgentChatSlice/components/AgentComposerDock.tsx
  • web/oss/src/components/Layout/Layout.tsx
  • web/oss/src/components/pages/WorkspaceProjectRedirect/index.tsx
  • web/oss/src/components/pages/WorkspaceRedirect/index.tsx
  • web/oss/src/state/project/selectors/project.ts
  • web/oss/src/state/project/selectors/routeContext.test.ts
  • web/oss/src/state/project/selectors/routeContext.ts
  • web/package.json
  • web/packages/agenta-api-client/package.json
  • web/packages/agenta-chat/src/assets/startupPhases.ts
  • web/packages/agenta-chat/src/components/ElicitationDock.tsx
  • web/packages/agenta-chat/src/components/VoiceInputButton.tsx
  • web/packages/agenta-chat/src/hooks/useElicitationStepper.ts
  • web/packages/agenta-chat/src/hooks/usePushToTalk.ts
  • web/packages/agenta-chat/src/hooks/useVoiceComposer.ts
  • web/packages/agenta-chat/tests/unit/assets/startupPhases.test.ts
  • web/packages/agenta-chat/tests/unit/components/elicitationDockSettle.test.tsx
  • web/packages/agenta-chat/tests/unit/components/voiceInputButtonPushToTalk.test.tsx
  • web/packages/agenta-chat/tests/unit/hooks/useElicitationStepper.test.ts
  • web/packages/agenta-chat/tests/unit/hooks/usePushToTalk.test.ts
  • web/packages/agenta-entities/src/project/api.ts
  • web/packages/agenta-entities/src/workflow/state/agentModelCandidates.ts
  • web/packages/agenta-entities/src/workflow/state/store.ts
  • web/packages/agenta-entities/tests/unit/agent-model-candidate-sources.test.ts
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/SchemaPropertyRenderer.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/BuildKitSection.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/buildKitDescriptors.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/useBuildKit.tsx
  • web/packages/agenta-entity-ui/tests/unit/buildKitDescriptors.test.ts
  • web/packages/agenta-playground-ui/src/components/AgentPageHeader/AgentRevisionStatus.tsx
  • web/packages/agenta-shared/src/api/persist/debug.ts
  • web/packages/agenta-shared/src/api/persist/idbStorage.ts
  • web/packages/agenta-shared/tests/unit/persistReadTimeout.test.ts
  • web/packages/agenta-ui/src/RichChatInput/RichChatInput.tsx
  • web/packages/agenta-ui/tests/unit/richChatInputDictationSend.render.test.tsx
  • web/storybook/stories/entity-ui/BuildKitSection.stories.tsx
💤 Files with no reviewable changes (2)
  • web/oss/src/components/pages/WorkspaceProjectRedirect/index.tsx
  • web/oss/src/components/pages/WorkspaceRedirect/index.tsx
🚧 Files skipped from review as they are similar to previous changes (5)
  • services/runner/tests/unit/session-keepalive-engine.test.ts
  • services/runner/tests/unit/sandbox-agent-orchestration.test.ts
  • web/packages/agenta-chat/src/assets/startupPhases.ts
  • web/packages/agenta-chat/tests/unit/assets/startupPhases.test.ts
  • services/runner/src/engines/sandbox_agent/environment.ts

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.

🛑 Comments failed to post (7)
web/packages/agenta-chat/src/hooks/useElicitationStepper.ts (1)

210-214: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Keep new code comments to one short line. Shorten both added comments or move their detail to documentation. As per coding guidelines, “At most ONE short line per comment.”

  • web/packages/agenta-chat/src/hooks/useElicitationStepper.ts#L210-L214: Replace the multi-line isMultiStep JSDoc with one short line.
  • web/packages/agenta-chat/src/components/ElicitationDock.tsx#L8-L12: Replace the multi-line layout contract comment with one short line.
📍 Affects 2 files
  • web/packages/agenta-chat/src/hooks/useElicitationStepper.ts#L210-L214 (this comment)
  • web/packages/agenta-chat/src/components/ElicitationDock.tsx#L8-L12

Source: Coding guidelines

web/packages/agenta-entities/src/project/api.ts (1)

24-25: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Validate each ProjectsResponse with safeParseWithLogging; array-only validation accepts malformed records. As per coding guidelines, keep zod validation at the boundary.

Source: Coding guidelines

web/packages/agenta-entities/src/workflow/state/agentModelCandidates.ts (1)

72-72: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🔎 Supported by static analysis

🏁 Script executed:

sed -n '1,150p' web/packages/agenta-entities/src/workflow/state/agentModelCandidates.ts

Repository: Agenta-AI/agenta

Length of output: 5676


🏁 Script executed:

sed -n '140,280p' web/packages/agenta-entities/src/workflow/state/agentModelCandidates.ts
printf '\n--- subscription query ---\n'
sed -n '1,220p' web/packages/agenta-entities/src/workflow/state/subscriptionStatus.ts
printf '\n--- query API definitions ---\n'
rg -n -A35 -B10 'fetchSubscriptionStatus|subscriptionStatusQueryAtomFamily' web/packages/agenta-entities/src/workflow

Repository: Agenta-AI/agenta

Length of output: 47540


Track subscription failure separately from subscriptionError; a falsy rejection makes line 72 return "loading" for the failed request.

web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/buildKitDescriptors.tsx (1)

139-142: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🔎 Supported by static analysis

🏁 Script executed:

sed -n '1,210p' web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/buildKitDescriptors.tsx
printf '\n--- related uses/tests ---\n'
rg -n --glob '*.{ts,tsx}' 'BUILD_KIT_TOOL_COPY|BUILD_KIT_EMBED_COPY|buildKitDescriptor|humanizeKey' web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate

Repository: Agenta-AI/agenta

Length of output: 8047


🤖 get_repo_knowledge executed:

get_repo_knowledge Agenta-AI/agenta /tmp/coderabbit-repo-knowledge/agenta-ai-agenta-4b53879a/conventions /tmp/coderabbit-repo-knowledge/agenta-ai-agenta-4b53879a/learnings

Length of output: 43014


Guard both descriptor maps against inherited keys. "__proto__" and "constructor" can supply inherited values, so buildKitDescriptor may emit rows with invalid name or description; use own-property checks or null-prototype maps and test both keys.

📍 Affects 1 file
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/buildKitDescriptors.tsx#L139-L142 (this comment)
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/buildKitDescriptors.tsx#L152-L158
web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/useBuildKit.tsx (1)

158-159: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🔎 Supported by static analysis

🏁 Script executed:

#!/bin/bash
set -e
file='web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/useBuildKit.tsx'
sed -n '1,230p' "$file"
printf '\n--- related key usage and tests ---\n'
rg -n --glob '*.{ts,tsx}' 'embed-tool-|embed-skill-|embeddedOverlayTools|embeddedOverlaySkills|embedRow' web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate

Repository: Agenta-AI/agenta

Length of output: 9706


🤖 get_repo_knowledge executed:

get_repo_knowledge Agenta-AI/agenta /tmp/coderabbit-repo-knowledge/agenta-ai-agenta-4b53879a/learnings /tmp/coderabbit-repo-knowledge/agenta-ai-agenta-4b53879a/conventions

Length of output: 17692


🏁 Script executed:

#!/bin/bash
set -e
printf '%s\n' '--- BuildKitSection and key consumer ---'
sed -n '1,260p' web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/BuildKitSection.tsx
printf '%s\n' '--- staticEmbedSlug and related descriptor contracts ---'
sed -n '1,240p' web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/itemDescriptors.ts
printf '%s\n' '--- relevant tests/package metadata ---'
rg -n --glob '*.{ts,tsx,json}' 'BuildKitSection|useBuildKit|staticEmbedSlug|BuildKitTool|`@ag`\.embed' web/packages/agenta-entity-ui web/packages/agenta-entities | head -160

Repository: Agenta-AI/agenta

Length of output: 9255


🏁 Script executed:

#!/bin/bash
set -e
printf '%s\n' '--- itemDescriptors candidates ---'
fd -t f -i 'itemDescriptors' web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate
printf '%s\n' '--- resolved import and staticEmbedSlug ---'
rg -n -C 10 'function staticEmbedSlug|const staticEmbedSlug|export .*staticEmbedSlug' web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate
printf '%s\n' '--- overlay shape declarations ---'
rg -n -C 8 'workflowAgentTemplateOverlayAtomFamily|interface .*Overlay|type .*Overlay|tools.*skills|skills.*tools' web/packages/agenta-entities web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate

Repository: Agenta-AI/agenta

Length of output: 50372


Prefix embedded-row keys by kind. embedRow uses staticEmbedSlug(entry) for both arrays, while BuildKitSection renders sibling keys from that value; a shared slug duplicates a React key and can mis-reconcile rows after updates. Add a duplicate-slug test.

web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/SchemaPropertyRenderer.tsx (1)

42-44: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Reduce these comments to one short line each.

These comment blocks exceed the repository limit. As per coding guidelines, “At most ONE short line per comment.”

Also applies to: 53-55, 61-67

Source: Coding guidelines

web/packages/agenta-shared/src/api/persist/debug.ts (1)

48-48: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Add a timeout case. Debug mode otherwise omits this diagnostic.

@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Review rate limited.


Your included review limit is currently reached under our Fair Usage Limits Policy. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 44 minutes.

@ashrafchowdury
ashrafchowdury merged commit e31bbf3 into release/v0.114.7 Sep 3, 2026
75 of 76 checks passed
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.

2 participants