Skip to content

style: render custom agent sections like presets - #361

Merged
RAIT-09 merged 2 commits into
devfrom
style/drop-custom-agent-card
Jul 15, 2026
Merged

style: render custom agent sections like presets#361
RAIT-09 merged 2 commits into
devfrom
style/drop-custom-agent-card

Conversation

@RAIT-09

@RAIT-09 RAIT-09 commented Jul 15, 2026

Copy link
Copy Markdown
Owner

Description

Custom agents in the settings tab were still wrapped in a card (background, border, rounded corners) — a leftover from before the collapsible agent sections (#350), when custom agent settings were a flat list and the card was the only thing marking where one agent ended and the next began. Since #350 the summary rows mark those boundaries themselves, so the card had become a double border; the CSS even carried a correction rule (border-top: none inside the card) to hide the doubling.

  • Drop the card: renderCustomAgent no longer creates the agent-client-custom-agent wrapper and renders the collapsible section directly, exactly like renderPresetSettings. Both card CSS rules (the card itself and the border-top correction) are deleted with it — the class is now referenced nowhere (grep-verified). Custom agents render identically to presets: summary rows separated by thin rules.
  • Label the "Add custom agent" row: with the card gone, the bare-button setting row stood out in themes that box every setting item (it rendered as an empty card with a lone button). Instead of fighting the theme with CSS, the row now has a name ("New custom agent") and description, so it reads like every other setting row in any theme. The button label is unchanged (docs reference it).

No behavior change: section open/collapse state, the Enabled toggle, and the delete button all live in the summary row and are untouched.

Related issue

None.

Type of change

  • Bug fix
  • New feature
  • Documentation
  • Refactor
  • Other

Checklist

  • npm run lint passes ("Use sentence case for UI text" errors are acceptable for brand names)
  • npm run build passes
  • Tested in Obsidian
  • Existing functionality still works
  • Documentation updated if needed (button label unchanged, so the custom-agents setup steps stay accurate)

Testing environment

  • Agent: N/A (settings tab layout only — no agent runtime change). Verified: sections render like presets, open/collapse + Enabled toggle + delete work, adding an agent opens its new section, empty state intact, light/dark themes checked
  • OS: macOS

Screenshots

image

Summary by CodeRabbit

  • User Interface
    • Improved the labeling and description of the “New custom agent” setting for clearer setup.
    • Updated custom agent sections for a more consistent layout with other agent settings.
    • Simplified custom agent styling and removed the documentation link hover underline.

RAIT-09 added 2 commits July 15, 2026 20:09
The card predates the collapsible sections; summary rows now mark the
boundaries, so custom agents render exactly like presets.
A bare-button setting row renders as an empty card in themes that box
setting items; naming the row makes it read like every other setting.
@RAIT-09 RAIT-09 self-assigned this Jul 15, 2026
@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6a327bee-da27-4940-a5d0-5e22e9d9a9c5

📥 Commits

Reviewing files that changed from the base of the PR and between 28a4265 and 8b2e08d.

📒 Files selected for processing (2)
  • src/ui/SettingsTab.ts
  • styles.css
💤 Files with no reviewable changes (1)
  • styles.css

📝 Walkthrough

Walkthrough

The custom-agent settings UI now uses a named and described creation control, renders collapsible agent sections directly in their parent container, and removes obsolete custom-agent and documentation-link hover styling.

Changes

Custom agent settings

Layer / File(s) Summary
Custom agent rendering and styling
src/ui/SettingsTab.ts, styles.css
The new-agent action now uses an explicitly named and described setting while preserving its creation flow. Custom-agent sections render directly into the parent container, and obsolete wrapper-specific CSS and documentation-link hover styling are removed.

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

Possibly related PRs

Suggested reviewers: donivatamazondotcom

Poem

A rabbit hops through settings bright,
Labels the button just right.
Old borders fade, wrappers flee,
Agents unfold naturally.
“Binky!” says the bunny with glee.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and clearly summarizes the main change: rendering custom agent sections like presets.
Description check ✅ Passed The description matches the template well, covering the change, issue status, change type, checklist, testing, and screenshots.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch style/drop-custom-agent-card

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.

@RAIT-09
RAIT-09 merged commit da1d782 into dev Jul 15, 2026
2 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.

1 participant