Skip to content

[feat] Agent home/onboarding polish + unresolved-tool marking - #5222

Merged
ardaerzin merged 12 commits into
big-agentsfrom
fe/agent-onboarding-improvements
Jul 11, 2026
Merged

[feat] Agent home/onboarding polish + unresolved-tool marking#5222
ardaerzin merged 12 commits into
big-agentsfrom
fe/agent-onboarding-improvements

Conversation

@ardaerzin

Copy link
Copy Markdown
Contributor

Context

This branch polishes the agent home/onboarding surfaces that ship behind the onboarding flow, and adds resolution-state feedback to the agent config Tools section. Before this, the home template strip clipped a partial fourth card and its "X-Y of N" counter disagreed with what was on screen, dark-mode cards had no elevation, the hero composer and the onboarding composer drifted apart, the sidebar let a mid-onboarding user click into dead-end app screens, and connected-app tools gave no signal when their catalog action or connection had gone stale.

Changes

Home template strip: grid layout and viewport-aware paging. TemplateStrip gains a grid layout that renders exactly one PAGE_SIZE window of full-width cards with stateful arrow paging, so the wide home surface never shows a clipped card and the window always matches the counter. The pager now computes the visible-card count from clientWidth, clamps the first index to the true last window, and hides itself when every card already fits. Previously a 960px column showing ~3.7 cards read "3-5 of 6" while card 6 was fully visible.

Elevated cards and a hero-scale composer. Added strip-card surface roles (cardBg/cardBorder/cardBorderHover) to the templateStrip palette family so dark mode gets a subtly lifted surface with a near-bg border instead of leaning on a strong #303030 outline (light values unchanged; theme-variables.css regenerated, not hand-edited). Grid cards get roomier interiors (p-5, 40px icon badge, 15px title); the compact playground scroll-strip metrics are untouched. RichChatInput gains a size="comfortable" density prop so the home hero can scale up without forking the shared composer.

Shared agent-intent actions. Extracted the "Use my coding agent" + "Create agent" trailing cluster into AgentIntentActions, rendered from both the home hero (StripComposer) and the strip-mode playground onboarding composer, so the two can't drift. The hero composer now matches the onboarding config (Enter submits, shortcut hints visible) and the "describe an agent" placeholder lives once in STRIP_COPY.

Onboarding app chrome. During pre-commit onboarding the sidebar pins Home as selected and inert and disables dead-end links (Agents, Evaluation runs, Annotation Queues) while keeping app-less surfaces (Prompts, Test sets, Evaluators, Observability) live. New oss/src/state/onboarding module: useAgentOnboarding mirrors its lifecycle into onboardingSessionAtom and consumers read named selectors. The session bar/rail's New session (+) stays disabled after commit until the founding conversation's first run settles (finishes, awaits the user, or errors), then latches on permanently. The project dropdown's pinned New project footer gets a filled band + Plus icon so it reads as an action, and the list caps at max-h-60.

Mark unresolved connected-app tools. Tool rows in the agent template's Tools section now surface resolution problems without opening each drawer. A catalog action that 404s (renamed/removed) or a missing connection shows a red Unresolved tag; a connection with is_valid=false shows an amber Reconnect tag. Collapsed provider groups roll up their worst child status and the section header tooltip reflects it. The probe reuses the drawer's action-detail query family (shared cache, 5-min staleTime) with a low-priority fetch so playground load is unaffected; 404s skip retries and transient errors never mark a row. GatewayToolsBridge gains connectionsErrored so a failed connections fetch reads as "unknown" rather than "all connections removed".

Tests / notes

  • Added wide-viewport regression tests for the pager (pagerMath.test.ts) and a unit test for the tool action-availability probe (gatewayTool-action-availability.test.ts).
  • Theme changes went through web/oss/src/styles/theme/palette.ts + pnpm generate:tailwind-tokens; the regenerated theme-variables.css is committed, not hand-edited.

What to QA

  • Open the agent home. The template strip shows a clean 3-up grid with no clipped card, and the "X-Y of N" counter matches what's visible at every page including the last. Resize the window narrower/wider and confirm the counter still tracks.
  • In dark mode, confirm the template cards read as lifted surfaces (subtle border, no heavy outline). Light mode should look unchanged.
  • Type in the home hero composer and the onboarding composer. Both show the same "Use my coding agent" / "Create agent" cluster, Enter submits, and the submitted text reaches create.
  • Start a pre-commit onboarding session. The sidebar pins Home, greys out Agents / Evaluation runs / Annotation Queues, and keeps Prompts / Test sets / Evaluators / Observability clickable. After committing, New session (+) is disabled until the first run settles, then enabled and stays enabled.
  • In an agent config Tools section, point a tool at a removed catalog action or a disconnected connection. The row shows a red Unresolved tag; an unauthenticated connection shows an amber Reconnect tag; a collapsed provider group rolls up the worst child status. Regression: a healthy tool shows no tag, and playground load time is unaffected.

…ig panel

Tool rows in the agent template's Tools section now surface resolution
problems without opening each drawer: a catalog action that 404s (renamed/
removed) or a missing connection shows a red Unresolved tag; a connection
with is_valid=false shows an amber Reconnect tag. Collapsed provider groups
roll up their worst child status, and the section header tooltip reflects it.

The probe reuses the drawer's action-detail query family (shared cache,
5-min staleTime) with a low-priority fetch so playground load is unaffected;
404s skip retries and transient errors never mark a row. GatewayToolsBridge
gains connectionsErrored so a failed connections fetch reads as unknown
rather than "all connections removed".
…ject dropdown

During pre-commit onboarding the sidebar now pins Home as selected and
inert, and disables the dead-end links (Agents, Evaluation runs,
Annotation Queues) while keeping app-less surfaces (Prompts, Test sets,
Evaluators, Observability) live. State lives in a new
oss/src/state/onboarding module: useAgentOnboarding mirrors its
lifecycle into onboardingSessionAtom and consumers read named selectors.

The session bar/rail's New session (+) stays disabled after the commit
until the founding conversation's first run settles (finishes, awaits
the user, or errors), latched off permanently once it does.

The project dropdown's pinned New project footer (AGE-3939) gets a
filled band + Plus icon so it reads as an action, and the list caps at
max-h-60.
The counter assumed a fixed 3-card window, so on wide viewports
(e.g. the 960px home column showing ~3.7 cards) the end-of-scroll
label read "3-5 of 6" while card 6 was fully visible. Compute the
visible-card count from clientWidth, clamp the first index to the
true last window, and hide the pager whenever every card already
fits. Adds wide-viewport regression tests.
…onboarding composer

Extract the 'Use my coding agent' + 'Create agent' trailing cluster
into AgentIntentActions and render it from both StripComposer (home
hero) and the strip-mode playground onboarding composer, so the two
surfaces can't drift apart. The hero composer now matches the
onboarding RichChatInput config (Enter submits, shortcut hints show)
and the 'describe an agent' placeholder moves to STRIP_COPY as the
single source. Enter-submit passes the submitted markdown through
onCreate since the editor clears itself before a ref read.
Add a 'grid' layout to TemplateStrip: exactly one PAGE_SIZE window of
full-width cards with stateful arrow paging, so the wide home surface
never shows a clipped fourth card and the window always matches the
'X-Y of N' counter. StripCard grows a 'fluid' prop to fill its grid
cell. StripHome adopts it and re-centers the page on a 1040px column
with an 840px hero measure and larger vertical rhythm.
…home page

Dark-mode template cards had no elevation (card and page are both #141414
via colorBgContainer) and leaned on a strong #303030 border for shape.
Adds strip-card surface roles to the templateStrip palette family
(cardBg/cardBorder/cardBorderHover; light values unchanged) and points
the card and the usage bar at them, so dark gets a subtle lifted surface
with a near-bg border. theme-variables.css regenerated, not hand-edited.

Grid-mode cards get the designer's roomier interior (p-5, 40px icon
badge, larger gaps, 15px title); the compact scroll-strip metrics on
playground surfaces are untouched.

RichChatInput gains a size="comfortable" density prop (padded editor,
placeholder offset, footer row) so the home hero can scale up without
forking the shared composer; chat surfaces keep the compact default.

Also: the provenance chip is absolutely positioned into the hero gap
(bottom-full) so its invisible zero-shift slot no longer inflates the
subtitle-to-composer distance past 44px, pager counters use an en-dash,
and the hero title-to-subtitle gap goes to 16px.
@dosubot dosubot Bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Jul 11, 2026
@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c239c6bd-42f9-4a12-a546-4258670f8c01

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The PR adds onboarding session state and navigation gating, updates agent-home and TemplateStrip composition, introduces gateway-tool availability validation, improves loading and project-selector presentation, and adds responsive strip layouts with new theme tokens.

Changes

Onboarding and agent home

Layer / File(s) Summary
Onboarding state and navigation
web/oss/src/state/onboarding/*, web/oss/src/components/Sidebar/*
Onboarding atoms drive Home highlighting, inert navigation, dead-end link disabling, and route selection overrides.
Session lock and onboarding composer
web/oss/src/components/pages/agent-home/PlaygroundOnboarding/*, web/oss/src/components/AgentChatSlice/*
The founding run controls new-session availability, while shared agent intent actions and placeholder copy are used in onboarding composers.
Loading and home integration
web/oss/src/components/PlaygroundRouter/*, web/oss/src/components/pages/agent-home/*
Loading uses an agent playground skeleton, and agent-home creation forwards prompt text into the updated layout.

Template strip experience

Layer / File(s) Summary
Shared composer actions and input contract
web/oss/src/components/TemplateStrip/components/*, web/packages/agenta-ui/src/RichChatInput/*
Shared agent actions handle creation and coding-agent copy, while submitted markdown and comfortable input sizing are supported.
Responsive paging and grid rendering
web/oss/src/components/TemplateStrip/index.tsx, web/oss/src/components/TemplateStrip/assets/*
Pager ranges now use viewport-visible card counts, and TemplateStrip supports clamped three-column grid paging.
Cards, copy, and theme tokens
web/oss/src/components/TemplateStrip/*, web/oss/src/styles/theme/*, web/scripts/generate-tailwind-tokens.ts
Cards support fluid sizing, shared placeholder copy is reused, and strip-card theme variables are added.

Gateway tool availability validation

Layer / File(s) Summary
Gateway query clients and availability state
web/packages/agenta-entities/src/gatewayTool/*
Gateway action queries use low-priority fetching and explicit retry handling, with derived resolved, missing, and unknown availability states.
Template validation and provider status
web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/*
Connected-app resolution failures and reconnection requirements now affect tool validation and collapsed provider status tags.
Connection error bridge and tests
web/oss/src/components/DrillInView/*, web/packages/agenta-entities/tests/unit/*
Connection query errors are exposed through the UI bridge, with tests covering 404s, retries, and duplicate probes.

Sidebar and loading presentation

Layer / File(s) Summary
Pinned project creation control
web/oss/src/components/Sidebar/components/ListOfProjects.tsx
New project creation is rendered as a pinned dropdown footer instead of a trailing menu item.
Reusable playground loading shell
web/oss/src/components/PlaygroundRouter/*
The dynamic playground fallback uses a reusable shell with agent/playground header variants and optional content.

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

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 60.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the main changes to agent home/onboarding polish and unresolved-tool marking.
Description check ✅ Passed The description clearly matches the pull request scope and explains the onboarding and tool-resolution updates.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fe/agent-onboarding-improvements

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.

@vercel

vercel Bot commented Jul 11, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
agenta-documentation Ready Ready Preview, Comment Jul 11, 2026 7:15pm

Request Review

@dosubot dosubot Bot added enhancement New feature or request Frontend labels Jul 11, 2026
@mmabrouk

Copy link
Copy Markdown
Member

Thanks @ardaerzin . I mean the clipped card was intended :D It is a signifier that there is more to scroll. But I'm alright with this change, I don't think it's worth iterating again on it for now.

Extract PlaygroundLoadingShell into its own module and give it an `agent`
override and a `children` slot. The onboarding loader now renders the real
agent playground shell (forced agent header + live chat skeleton) instead of
a bare centered spinner, so the ephemeral onboarding flow shows one continuous
screen that morphs straight into the live panel. Onboarding always targets an
agent, so the header is forced without waiting for the early app-id signal.
Mint failure still swaps the body for an error + Retry so the flow never
dead-ends.
The onboarding loader's body now mirrors the live PlaygroundMainView geometry:
a 440px raised config panel with its Configuration header + AgentConfigSkeleton
rows alongside the recessed chat canvas, instead of a lone chat skeleton. The
loader morphs into the real two-pane layout without a shift. Only the splitter
frame + header are static markup; both skeletons are provider-free.
@ardaerzin

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (1)
web/oss/src/components/PlaygroundRouter/PlaygroundLoadingShell.tsx (1)

34-35: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use --ag-colorFillSecondary here instead of the raw Ant token. web/oss/src/styles/theme-variables.css exposes the generated variable, and web/oss/tailwind.config.ts maps colorFillSecondary to it for theme consistency.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: cbd2f5c9-85f2-44ff-903e-71a1da59db01

📥 Commits

Reviewing files that changed from the base of the PR and between 9111c8b and a12f403.

📒 Files selected for processing (47)
  • web/oss/src/components/AgentChatSlice/AgentChatPanel.tsx
  • web/oss/src/components/AgentChatSlice/AgentConversation.tsx
  • web/oss/src/components/AgentChatSlice/components/SessionRail.tsx
  • web/oss/src/components/AgentChatSlice/components/SessionTagBar.tsx
  • web/oss/src/components/DrillInView/OSSdrillInUIProvider.tsx
  • web/oss/src/components/PlaygroundRouter/PlaygroundLoadingShell.tsx
  • web/oss/src/components/PlaygroundRouter/index.tsx
  • web/oss/src/components/Sidebar/components/ListOfProjects.tsx
  • web/oss/src/components/Sidebar/engine/SidebarMenu.tsx
  • web/oss/src/components/Sidebar/engine/SidebarShell.tsx
  • web/oss/src/components/Sidebar/engine/types.ts
  • web/oss/src/components/Sidebar/hooks/useSidebarConfig/index.tsx
  • web/oss/src/components/Sidebar/scopes/constants.ts
  • web/oss/src/components/Sidebar/scopes/mainScope.tsx
  • web/oss/src/components/TemplateStrip/assets/constants.ts
  • web/oss/src/components/TemplateStrip/assets/pagerMath.test.ts
  • web/oss/src/components/TemplateStrip/assets/pagerMath.ts
  • web/oss/src/components/TemplateStrip/components/AgentIntentActions.tsx
  • web/oss/src/components/TemplateStrip/components/StripCard.tsx
  • web/oss/src/components/TemplateStrip/components/StripComposer.tsx
  • web/oss/src/components/TemplateStrip/index.tsx
  • web/oss/src/components/pages/agent-home/PlaygroundOnboarding/OnboardingContext.tsx
  • web/oss/src/components/pages/agent-home/PlaygroundOnboarding/OnboardingLoader.tsx
  • web/oss/src/components/pages/agent-home/PlaygroundOnboarding/useAgentOnboarding.ts
  • web/oss/src/components/pages/agent-home/StripHome.tsx
  • web/oss/src/components/pages/agent-home/assets/constants.ts
  • web/oss/src/components/pages/agent-home/components/UsageSummary/index.tsx
  • web/oss/src/components/pages/agent-home/components/YourAgentsTable/index.tsx
  • web/oss/src/components/pages/agent-home/hooks/useAgentHomeActions.ts
  • web/oss/src/state/onboarding/atoms.ts
  • web/oss/src/state/onboarding/index.ts
  • web/oss/src/state/onboarding/selectors.ts
  • web/oss/src/styles/theme-variables.css
  • web/oss/src/styles/theme/palette.ts
  • web/packages/agenta-entities/src/gatewayTool/api/api.ts
  • web/packages/agenta-entities/src/gatewayTool/hooks/index.ts
  • web/packages/agenta-entities/src/gatewayTool/hooks/useToolActionAvailability.ts
  • web/packages/agenta-entities/src/gatewayTool/hooks/useToolActionDetail.ts
  • web/packages/agenta-entities/src/gatewayTool/index.ts
  • web/packages/agenta-entities/tests/unit/gatewayTool-action-availability.test.ts
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/AgentTemplateControl.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/ItemRow.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/ToolManagementList.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/sectionGroups.tsx
  • web/packages/agenta-ui/src/RichChatInput/RichChatInput.tsx
  • web/packages/agenta-ui/src/drill-in/context/DrillInUIContext.tsx
  • web/scripts/generate-tailwind-tokens.ts

Comment on lines +218 to +228
<Tooltip
title={
addDisabled ? "Available after your agent's first response" : "New session"
}
>
<Button
type="text"
aria-label="New session"
icon={<Plus size={14} />}
onClick={() => addSession()}
disabled={addDisabled}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Map the relevant component files first
ast-grep outline web/oss/src/components/AgentChatSlice/components/SessionRail.tsx --view expanded
printf '\n====\n'
ast-grep outline web/oss/src/components/AgentChatSlice/components/SessionTagBar.tsx --view expanded

printf '\n==== SessionRail excerpt ====\n'
sed -n '180,255p' web/oss/src/components/AgentChatSlice/components/SessionRail.tsx

printf '\n==== SessionTagBar excerpt ====\n'
sed -n '190,260p' web/oss/src/components/AgentChatSlice/components/SessionTagBar.tsx

printf '\n==== Search for similar tooltip-disabled button patterns in agent chat slice ====\n'
rg -n "Tooltip[\\s\\S]{0,120}disabled=\\{addDisabled\\}|disabled=\\{addDisabled\\}[\\s\\S]{0,120}Tooltip" web/oss/src/components/AgentChatSlice -U

Repository: Agenta-AI/agenta

Length of output: 7862


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# If the component files are small enough, inspect exact nearby structure and imports
printf '\n==== SessionRail top imports ====\n'
sed -n '1,80p' web/oss/src/components/AgentChatSlice/components/SessionRail.tsx

printf '\n==== SessionTagBar top imports ====\n'
sed -n '1,90p' web/oss/src/components/AgentChatSlice/components/SessionTagBar.tsx

Repository: Agenta-AI/agenta

Length of output: 6431


Wrap the disabled buttons in a non-disabled tooltip trigger.

Ant Design tooltips won’t reliably fire on a disabled Button, so the “Available after your agent's first response” hint can be missed.

  • web/oss/src/components/AgentChatSlice/components/SessionRail.tsx#L218-L228
  • web/oss/src/components/AgentChatSlice/components/SessionTagBar.tsx#L224-L236
📍 Affects 2 files
  • web/oss/src/components/AgentChatSlice/components/SessionRail.tsx#L218-L228 (this comment)
  • web/oss/src/components/AgentChatSlice/components/SessionTagBar.tsx#L224-L236

Source: MCP tools

Comment thread web/oss/src/components/Sidebar/engine/SidebarMenu.tsx
Comment thread web/oss/src/components/TemplateStrip/assets/pagerMath.ts
- New session (+) tooltip: antd v6 dropped the disabled-child auto-wrap its
  Tooltip had in v4/v5, so the disabled-state hint ("Available after your
  agent's first response") never fired on the disabled Button. Wrap the button
  in a non-disabled span trigger in SessionRail and SessionTagBar.
- Sidebar inert items: the <Link> onClick handlers still ran item.onClick after
  preventDefault, unlike navigateToItem which early-returns. Guard both handlers
  so an inert item suppresses onClick on every path (latent; Home has none today).
- Pager counter: floor 'first' at 1 so a transient negative scrollLeft from
  Safari elastic overscroll can't label "0-2 of 6". Adds a regression test.
- PlaygroundLoadingShell: use the mapped colorFillSecondary utility instead of
  the raw --ant-color-fill-secondary token.
@ardaerzin

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@ardaerzin
ardaerzin merged commit fad2db6 into big-agents Jul 11, 2026
16 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Frontend size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants