Skip to content

[5970] fix(frontend): Preserve the Advanced label - #6058

Open
manrods wants to merge 1 commit into
Agenta-AI:mainfrom
manrods:fix/5970-advanced-label
Open

[5970] fix(frontend): Preserve the Advanced label#6058
manrods wants to merge 1 commit into
Agenta-AI:mainfrom
manrods:fix/5970-advanced-label

Conversation

@manrods

@manrods manrods commented Aug 15, 2026

Copy link
Copy Markdown

Summary

On an agent's Overview page, the Configuration rail rendered the Advanced row label as Advan…. The summary block could not shrink, so flexbox took the missing width from the row title instead.

The shared configuration row now supports an opt-in title priority. When enabled, the title keeps its intrinsic width and the secondary summary truncates first. Only the Advanced row in the agent Overview enables this behavior, so other consumers retain the existing title-first truncation behavior.

Before: Advan…

After: Advanced

Fixes #5970.

Testing

Verified locally

  • pnpm --filter @agenta/ui test:unit (32 tests passed)
  • pnpm --filter @agenta/ui lint
  • pnpm --filter @agenta/ui types:check
  • pnpm --filter @agenta/oss types:check
  • pnpm lint-fix
  • Verified the before/after layout in Chromium with the issue's title and summary text.

Added or updated tests

Added unit coverage that verifies preserved titles do not shrink, summaries can shrink and truncate, and the existing default behavior remains unchanged.

QA follow-up

  • Open an agent's Overview at desktop width. The final Configuration row should show Advanced in full.
  • Check an agent with sandbox and permission values configured. The summary may truncate when space is limited, but it must not push the row label into an ellipsis.
  • Regression: check the other Configuration rows. Their labels, summaries, and navigation affordances should behave as before.

Demo

The same component rendered at a constrained rail width before and after the opt-in title priority:

Advanced configuration label before and after

Checklist

  • I have included a video or screen recording for UI changes, or marked Demo as N/A
  • Relevant tests pass locally
  • Relevant linting and formatting pass locally
  • I have signed the CLA, or I will sign it when the bot prompts me

Contributor Resources

Copilot AI lite review requested due to automatic review settings August 15, 2026 17:34
@vercel

vercel Bot commented Aug 15, 2026

Copy link
Copy Markdown

@manrods is attempting to deploy a commit to the agenta projects Team on Vercel.

A member of the Team first needs to authorize it.

@CLAassistant

CLAassistant commented Aug 15, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions

github-actions Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

✅ Thanks @manrods! This PR now meets the contribution requirements and has been reopened. A maintainer will review it soon.

@github-actions github-actions Bot added the incomplete-pr PR is missing required template sections or a demo recording label Aug 15, 2026
@github-actions github-actions Bot closed this Aug 15, 2026
@coderabbitai

coderabbitai Bot commented Aug 15, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro Plus

Run ID: 83d385b6-b09f-4c37-95b7-b717dd383e09

📥 Commits

Reviewing files that changed from the base of the PR and between 0af145e and 14eee5a.

📒 Files selected for processing (3)
  • web/oss/src/components/pages/overview/agent/AgentConfigurationCard.tsx
  • web/packages/agenta-ui/src/components/presentational/section/ConfigAccordionSection.tsx
  • web/packages/agenta-ui/tests/unit/configAccordionSection.test.ts

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.


📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes

    • Improved Advanced configuration rows so their titles remain fully visible while longer summaries shrink and truncate appropriately.
    • Preserved the existing truncation behavior for other configuration sections.
  • Tests

    • Added coverage for title sizing, summary shrinking, and truncation behavior.

Walkthrough

ConfigAccordionSection now supports preserving its title while truncating the summary. The agent configuration card enables this behavior for the Advanced row. Unit tests cover both the new and default layouts.

Changes

Accordion title preservation

Layer / File(s) Summary
Accordion layout contract and rendering
web/packages/agenta-ui/src/components/presentational/section/ConfigAccordionSection.tsx, web/packages/agenta-ui/tests/unit/configAccordionSection.test.ts
Adds the optional preserveTitle prop. When enabled, the title does not shrink, while the summary region shrinks and truncates. Tests cover both layouts.
Advanced row configuration
web/oss/src/components/pages/overview/agent/AgentConfigurationCard.tsx
Passes preserveTitle to the Advanced configuration row. Other rows keep the default behavior.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

Copilot AI 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.

Pull request overview

This PR fixes a layout regression on the agent Overview page where the Advanced configuration row label was being truncated (Advan…) because the summary block refused to shrink. It introduces an opt-in sizing behavior on the shared ConfigAccordionSection so the title can retain its intrinsic width while the summary truncates first.

Changes:

  • Added a preserveTitle prop to ConfigAccordionSection to prioritize title width over summary width.
  • Updated the flex/min-width/truncation classes so the summary can shrink/truncate when preserveTitle is enabled.
  • Enabled preserveTitle only for the advanced row in the agent Overview configuration card, and added a unit test to cover the new behavior.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
web/packages/agenta-ui/src/components/presentational/section/ConfigAccordionSection.tsx Adds preserveTitle prop and adjusts flex sizing to truncate summary before the title when enabled.
web/oss/src/components/pages/overview/agent/AgentConfigurationCard.tsx Enables preserveTitle specifically for the advanced configuration row.
web/packages/agenta-ui/tests/unit/configAccordionSection.test.ts Adds unit coverage ensuring the title-group/summary-group class behavior changes with preserveTitle.
Suppressed comments (2)

web/packages/agenta-ui/tests/unit/configAccordionSection.test.ts:27

  • section.match(... )?.[1].split(" ") can still throw if the regex doesn't match (optional chaining only applies to the [1] access, not to .split). Capturing the match and asserting it exists gives clearer failures and avoids TypeErrors.
        const section = renderSection(true)
        const titleGroup = section.match(/role="button"[^>]*class="([^"]*)"/)?.[1].split(" ")
        const summary = classesBefore(section, "Sandbox: local · Permissions: allow")

web/packages/agenta-ui/tests/unit/configAccordionSection.test.ts:43

  • Same as above: .match(...)?.[1].split(" ") can throw a TypeError if the markup changes and the regex stops matching. Storing the match and asserting it exists makes the test failure easier to diagnose.
    it("keeps the existing title-first truncation behavior by default", () => {
        const section = renderSection()
        const titleGroup = section.match(/role="button"[^>]*class="([^"]*)"/)?.[1].split(" ")

        expect(titleGroup).not.toContain("shrink-0")

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +17 to +21
const classesBefore = (markup: string, text: string): string[] => {
const beforeText = markup.slice(0, markup.indexOf(text))
const className = beforeText.match(/class="([^"]*)"[^>]*>[^<]*$/)?.[1] ?? ""
return className.split(" ")
}
@github-actions github-actions Bot removed the incomplete-pr PR is missing required template sections or a demo recording label Aug 15, 2026
@github-actions github-actions Bot reopened this Aug 15, 2026
@dosubot dosubot Bot added size:S This PR changes 10-29 lines, ignoring generated files. frontend tests ui labels Aug 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend size:S This PR changes 10-29 lines, ignoring generated files. tests ui

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(bug) The Advanced row label is truncated to "Advan…" in the agent Overview configuration rail

3 participants