Skip to content

🧩 style: Agent Side Panel Layout and Consistency Fixes#12676

Merged
danny-avila merged 5 commits into
devfrom
fix/minor-ui-issues
Apr 15, 2026
Merged

🧩 style: Agent Side Panel Layout and Consistency Fixes#12676
danny-avila merged 5 commits into
devfrom
fix/minor-ui-issues

Conversation

@danny-avila

@danny-avila danny-avila commented Apr 15, 2026

Copy link
Copy Markdown
Owner

Summary

I fixed layout and styling inconsistencies across the Agent side panel, improved markdown code block detection to handle edge cases, and cleaned up dead code.

  • Refactored AgentPanel form layout from h-auto flex-shrink-0 to flex flex-1 flex-col, wrapping panel content in a flex-1 container so the footer stays anchored at the bottom regardless of content height.
  • Restructured ActionsPanel to use a min-h-full flex-col inner wrapper, separating the header/auth section from the ActionsInput so the schema textarea and save button fill remaining vertical space naturally.
  • Updated ActionsInput to use flex-based sizing (flex-1 min-h-0) instead of the fixed h-96 textarea height, making the schema input resizable (resize-y) with a min-h-[12rem] floor and pinning the save button to the bottom with mt-auto.
  • Removed stale commented-out TODO blocks (example actions dropdown, format input button, "Learn more" link) from ActionsInput and ActionsPanel.
  • Reduced vertical padding in ModelPanel, AdvancedPanel, and ActionsPanel headers from py-4/py-6 to pt-2 for tighter, more consistent spacing across all sub-panels.
  • Removed the hardcoded min-h-[50vh] from ModelPanel and min-h-[40vh]/scrollbar-gutter-stable from AdvancedPanel, letting both panels size naturally within the parent flex container.
  • Added text-sm to the Dropdown popover and MCPTool accordion row to match the font size used elsewhere in the side panel.
  • Extracted an isSingleLineCode utility in MarkdownComponents that correctly handles children passed as an array of strings (not just a single string), fixing false negatives in single-line code detection for both code and codeNoExecution components.
  • Added an early return guard in the prompt editor's processChildren to skip cloning of non-HTML-string elements and code elements, preventing unintended re-processing of React component nodes.

Change Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Testing

  • Opened the Agent builder side panel and verified the form layout fills available height with the footer pinned at the bottom across all sub-panels (Builder, Model, Advanced).
  • Navigated to the Actions panel, confirmed the schema textarea grows to fill available space, is resizable, and the save button remains anchored below.
  • Verified Dropdown popovers and MCPTool accordion items render with consistent text-sm font sizing.
  • Tested inline code rendering in chat messages with both single-string and array-of-strings children to confirm isSingleLineCode correctly distinguishes single-line from multi-line code blocks.
  • Confirmed the prompt editor renders markdown with inline code without errors or unexpected re-processing of component nodes.

Test Configuration:

  • Browser: Chrome (latest)
  • Screen sizes: default and narrow side panel widths

Checklist

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • My changes do not introduce new warnings

…for improved layout

* Adjusted padding in ActionsPanel, ModelPanel, and AdvancedPanel components to enhance visual consistency and layout.
* Changed `py-4` to `pt-2` in the main container of each panel to reduce vertical spacing and improve overall design aesthetics.
* Changed text size in the MCPTool component to `text-sm` for better readability and consistency across the UI.
* This adjustment enhances the user experience by ensuring that text is appropriately sized for various display settings.
…, and AgentPanel components

* Updated the layout in ActionsInput to improve flex properties and ensure better responsiveness.
* Refined the structure of ActionsPanel for a more consistent visual hierarchy and added accessibility features.
* Adjusted the AgentPanel form layout for improved usability and streamlined component integration.
* Changed text size in Dropdown component to `text-sm` for better readability across the UI.
…iveness

* Updated the layout of the ActionsInput component to enhance flex properties and ensure better responsiveness.
* Adjusted the textarea styling for improved usability and consistency in design.
* Removed commented-out code related to example functionality to clean up the component structure.
Copilot AI review requested due to automatic review settings April 15, 2026 16:01
@danny-avila danny-avila changed the title style/minor UI issues 🧩 style: Agent Side Panel Layout and Consistency Fixes Apr 15, 2026

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

UI/layout tweaks to address minor styling issues across dropdowns and the Agents side panel, primarily by normalizing text sizing and adjusting flex/spacing for panel content.

Changes:

  • Add consistent text-sm styling to dropdown popovers and MCP tool headers.
  • Refine Agents side panel layout (flex structure, padding/margins) for AgentPanel, Model/Advanced panels, and Actions flow.
  • Improve Actions editor layout to better fill available height (flex + min-height adjustments, textarea sizing).

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/client/src/components/Dropdown.tsx Adds text-sm to dropdown popover styling for consistent menu typography.
client/src/components/SidePanel/Agents/ModelPanel.tsx Adjusts panel container sizing/padding to align with updated side panel layout.
client/src/components/SidePanel/Agents/MCPTool.tsx Adds text-sm to MCP accordion header row for consistent typography.
client/src/components/SidePanel/Agents/AgentPanel.tsx Refactors form/container flex layout to better distribute space with footer.
client/src/components/SidePanel/Agents/Advanced/AdvancedPanel.tsx Updates Advanced panel container structure/padding and spacing.
client/src/components/SidePanel/Agents/ActionsPanel.tsx Restructures Actions panel layout to be full-height flex with improved spacing.
client/src/components/SidePanel/Agents/ActionsInput.tsx Refines Actions input/editor layout to be flex-based with adjustable textarea sizing.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +93 to +97
<button
type="button"
className="btn btn-neutral relative"
onClick={() => {
setActivePanel(Panel.builder);

Copilot AI Apr 15, 2026

Copy link

Choose a reason for hiding this comment

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

The back navigation button is icon-only and currently has no accessible name. Add an aria-label (and optionally set ChevronLeft to aria-hidden) so screen readers can announce the control meaningfully.

Copilot uses AI. Check for mistakes.
Comment on lines +113 to +116
disabled={isEphemeralAgent(agent_id) || !action.action_id}
className="btn btn-neutral border-token-border-light relative h-9 rounded-lg font-medium"
>
<TrashIcon className="text-red-500" />

Copilot AI Apr 15, 2026

Copy link

Choose a reason for hiding this comment

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

The delete (trash) button is icon-only and lacks an accessible name. Add an aria-label (and consider aria-hidden on the icon) so assistive tech can identify this as the delete-action control.

Suggested change
disabled={isEphemeralAgent(agent_id) || !action.action_id}
className="btn btn-neutral border-token-border-light relative h-9 rounded-lg font-medium"
>
<TrashIcon className="text-red-500" />
aria-label={localize('com_ui_delete_action')}
disabled={isEphemeralAgent(agent_id) || !action.action_id}
className="btn btn-neutral border-token-border-light relative h-9 rounded-lg font-medium"
>
<TrashIcon aria-hidden="true" className="text-red-500" />

Copilot uses AI. Check for mistakes.
* Introduced a new utility function `isSingleLineCode` to streamline the logic for determining if code is a single line.
* Updated references in the `MarkdownCode` and `MarkdownCodeNoExecution` components to use the new utility function for improved readability and maintainability.
* Enhanced the `processChildren` function in the Markdown editor to handle non-code elements more effectively.
Repository owner deleted a comment from github-actions Bot Apr 15, 2026
@danny-avila

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Repository owner deleted a comment from github-actions Bot Apr 15, 2026
@danny-avila danny-avila merged commit dd26a2f into dev Apr 15, 2026
15 checks passed
@danny-avila danny-avila deleted the fix/minor-ui-issues branch April 15, 2026 18:27
krgokul pushed a commit to syedhabib39/LibreChat that referenced this pull request Apr 20, 2026
…2676)

* style: Update padding in ActionsPanel, ModelPanel, and AdvancedPanel for improved layout

* Adjusted padding in ActionsPanel, ModelPanel, and AdvancedPanel components to enhance visual consistency and layout.
* Changed `py-4` to `pt-2` in the main container of each panel to reduce vertical spacing and improve overall design aesthetics.

* style: Update text size in MCPTool component for improved accessibility

* Changed text size in the MCPTool component to `text-sm` for better readability and consistency across the UI.
* This adjustment enhances the user experience by ensuring that text is appropriately sized for various display settings.

* style: Enhance layout and accessibility in ActionsInput, ActionsPanel, and AgentPanel components

* Updated the layout in ActionsInput to improve flex properties and ensure better responsiveness.
* Refined the structure of ActionsPanel for a more consistent visual hierarchy and added accessibility features.
* Adjusted the AgentPanel form layout for improved usability and streamlined component integration.
* Changed text size in Dropdown component to `text-sm` for better readability across the UI.

* style: Refactor layout in ActionsInput component for improved responsiveness

* Updated the layout of the ActionsInput component to enhance flex properties and ensure better responsiveness.
* Adjusted the textarea styling for improved usability and consistency in design.
* Removed commented-out code related to example functionality to clean up the component structure.

* refactor: Simplify single line code detection in MarkdownComponents

* Introduced a new utility function `isSingleLineCode` to streamline the logic for determining if code is a single line.
* Updated references in the `MarkdownCode` and `MarkdownCodeNoExecution` components to use the new utility function for improved readability and maintainability.
* Enhanced the `processChildren` function in the Markdown editor to handle non-code elements more effectively.
krgokul pushed a commit to syedhabib39/LibreChat that referenced this pull request Apr 21, 2026
…2676)

* style: Update padding in ActionsPanel, ModelPanel, and AdvancedPanel for improved layout

* Adjusted padding in ActionsPanel, ModelPanel, and AdvancedPanel components to enhance visual consistency and layout.
* Changed `py-4` to `pt-2` in the main container of each panel to reduce vertical spacing and improve overall design aesthetics.

* style: Update text size in MCPTool component for improved accessibility

* Changed text size in the MCPTool component to `text-sm` for better readability and consistency across the UI.
* This adjustment enhances the user experience by ensuring that text is appropriately sized for various display settings.

* style: Enhance layout and accessibility in ActionsInput, ActionsPanel, and AgentPanel components

* Updated the layout in ActionsInput to improve flex properties and ensure better responsiveness.
* Refined the structure of ActionsPanel for a more consistent visual hierarchy and added accessibility features.
* Adjusted the AgentPanel form layout for improved usability and streamlined component integration.
* Changed text size in Dropdown component to `text-sm` for better readability across the UI.

* style: Refactor layout in ActionsInput component for improved responsiveness

* Updated the layout of the ActionsInput component to enhance flex properties and ensure better responsiveness.
* Adjusted the textarea styling for improved usability and consistency in design.
* Removed commented-out code related to example functionality to clean up the component structure.

* refactor: Simplify single line code detection in MarkdownComponents

* Introduced a new utility function `isSingleLineCode` to streamline the logic for determining if code is a single line.
* Updated references in the `MarkdownCode` and `MarkdownCodeNoExecution` components to use the new utility function for improved readability and maintainability.
* Enhanced the `processChildren` function in the Markdown editor to handle non-code elements more effectively.
jcbartle pushed a commit to jcbartle/LibreChat that referenced this pull request May 11, 2026
…2676)

* style: Update padding in ActionsPanel, ModelPanel, and AdvancedPanel for improved layout

* Adjusted padding in ActionsPanel, ModelPanel, and AdvancedPanel components to enhance visual consistency and layout.
* Changed `py-4` to `pt-2` in the main container of each panel to reduce vertical spacing and improve overall design aesthetics.

* style: Update text size in MCPTool component for improved accessibility

* Changed text size in the MCPTool component to `text-sm` for better readability and consistency across the UI.
* This adjustment enhances the user experience by ensuring that text is appropriately sized for various display settings.

* style: Enhance layout and accessibility in ActionsInput, ActionsPanel, and AgentPanel components

* Updated the layout in ActionsInput to improve flex properties and ensure better responsiveness.
* Refined the structure of ActionsPanel for a more consistent visual hierarchy and added accessibility features.
* Adjusted the AgentPanel form layout for improved usability and streamlined component integration.
* Changed text size in Dropdown component to `text-sm` for better readability across the UI.

* style: Refactor layout in ActionsInput component for improved responsiveness

* Updated the layout of the ActionsInput component to enhance flex properties and ensure better responsiveness.
* Adjusted the textarea styling for improved usability and consistency in design.
* Removed commented-out code related to example functionality to clean up the component structure.

* refactor: Simplify single line code detection in MarkdownComponents

* Introduced a new utility function `isSingleLineCode` to streamline the logic for determining if code is a single line.
* Updated references in the `MarkdownCode` and `MarkdownCodeNoExecution` components to use the new utility function for improved readability and maintainability.
* Enhanced the `processChildren` function in the Markdown editor to handle non-code elements more effectively.
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