Skip to content

Fix sidebar bulk action button overflow#1881

Open
AndyMik90 wants to merge 1 commit intodevelopfrom
auto-claude/240-please-fix-so-that-the-buttons-for-deleting-and-ar
Open

Fix sidebar bulk action button overflow#1881
AndyMik90 wants to merge 1 commit intodevelopfrom
auto-claude/240-please-fix-so-that-the-buttons-for-deleting-and-ar

Conversation

@AndyMik90
Copy link
Owner

@AndyMik90 AndyMik90 commented Feb 20, 2026

Base Branch

  • This PR targets the develop branch (required for all feature/fix PRs)
  • This PR targets main (hotfix only - maintainers)

Description

Fix overflow issue in the ChatHistorySidebar bulk action toolbar where "Delete Selected" and "Archive Selected" buttons overflow horizontally when both are visible. Added overflow-hidden and min-w-0 to the toolbar container to respect sidebar width constraints, and wrapped button text in <span className="truncate"> with min-w-0 on buttons to properly shrink and truncate text at narrow widths.

Related Issue

Closes #240

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 📚 Documentation
  • ♻️ Refactor
  • 🧪 Test

Area

  • Frontend
  • Backend
  • Fullstack

Commit Message Format

Follow conventional commits: <type>: <subject>

Types: feat, fix, docs, style, refactor, test, chore

Example: feat: add user authentication system

AI Disclosure

  • This PR includes AI-generated code (Claude, Codex, Copilot, etc.)

Tool(s) used: Claude Code

Testing level:

  • Untested -- AI output not yet verified

  • Lightly tested -- ran the app / spot-checked key paths

  • Fully tested -- all tests pass, manually verified behavior

  • I understand what this PR does and how the underlying code works

Checklist

  • I've synced with develop branch
  • I've tested my changes locally
  • I've followed the code principles (SOLID, DRY, KISS)
  • My PR is small and focused (< 400 lines ideally)

Platform Testing Checklist

CRITICAL: This project supports Windows, macOS, and Linux. Platform-specific bugs are a common source of breakage.

  • Windows tested (either on Windows or via CI)
  • macOS tested (either on macOS or via CI)
  • Linux tested (CI covers this)
  • Used centralized platform/ module instead of direct process.platform checks
  • No hardcoded paths (used findExecutable() or platform abstractions)

If you only have access to one OS: CI now tests on all platforms. Ensure all checks pass before submitting.

CI/Testing Requirements

  • All CI checks pass on all platforms (Windows, macOS, Linux)
  • All existing tests pass
  • New features include test coverage
  • Bug fixes include regression tests

Screenshots

N/A - CSS-only fix, no visual changes

Feature Toggle

  • Behind localStorage flag: use_feature_name
  • Behind settings toggle
  • Behind environment variable/config
  • N/A - Feature is complete and ready for all users

Breaking Changes

Breaking: No

Details: Changes are fully backward compatible. No API or interface changes; only CSS class adjustments to fix overflow behavior.

Summary by CodeRabbit

  • Bug Fixes
    • Improved stability and layout consistency of the bulk action toolbar in selection mode.
    • Enhanced text truncation and overflow handling to prevent button label overflow.
    • Refined button and icon sizing to ensure consistent appearance in compact layouts.

…torySidebar

Add overflow-hidden and min-w-0 to toolbar container, min-w-0 to buttons,
shrink-0 to icons, and truncate wrapper to button text content.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions github-actions bot added area/frontend This is frontend only size/S Small (10-99 lines) labels Feb 20, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @AndyMik90, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request resolves a visual bug in the chat history sidebar, specifically preventing bulk action buttons from overflowing their container. The changes ensure that button text truncates gracefully and the toolbar adapts to varying sidebar widths, improving the user interface's responsiveness and aesthetic consistency.

Highlights

  • UI Fix: Addressed an overflow issue in the ChatHistorySidebar's bulk action toolbar where "Delete Selected" and "Archive Selected" buttons would overflow horizontally.
  • Styling Improvements: Applied overflow-hidden and min-w-0 to the toolbar container and wrapped button text in <span> with truncate and min-w-0 to ensure proper text truncation and button shrinking at narrow widths.
Changelog
  • apps/frontend/src/renderer/components/ChatHistorySidebar.tsx
    • Added overflow-hidden and min-w-0 CSS classes to the bulk action toolbar container.
    • Applied min-w-0 to the "Delete Selected" and "Archive Selected" buttons.
    • Wrapped the text content of both bulk action buttons in a <span> element with the truncate CSS class.
    • Added shrink-0 to the Trash2 and Archive icons within the buttons to prevent them from shrinking.
Activity
  • The pull request includes AI-generated code using Claude Code.
  • The AI-generated code is currently untested.
  • The author has confirmed understanding of the PR's code.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 20, 2026

📝 Walkthrough

Walkthrough

Minor CSS and layout adjustments made to the bulk action toolbar in the ChatHistorySidebar component. Changes include adding overflow constraints, preventing button icon shrinking, and wrapping text labels in truncating spans to ensure stable sizing in compact layouts.

Changes

Cohort / File(s) Summary
Chat Sidebar Toolbar Layout
apps/frontend/src/renderer/components/ChatHistorySidebar.tsx
Toolbar container enhanced with overflow-hidden and min-w-0 to manage content overflow. Button icons marked with shrink-0 to maintain size, and text labels wrapped in truncating spans. Both bulk action buttons receive consistent min-w-0 flex behavior for stable sizing.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Suggested labels

bug, area/frontend, size/XS

Poem

🐰 A button that shrinks and a toolbar so tight,
Now wrapped in protection to stay on the site,
With overflow hidden and flex at its core,
This sidebar truncates like never before!

🚥 Pre-merge checks | ✅ 2 | ❌ 3

❌ Failed checks (3 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR modifies ChatHistorySidebar.tsx for CSS overflow fixes, but linked issue #240 requires backend changes to normalize workflow_type values during planning. The changes are misaligned with the linked issue. Verify if this PR should target issue #240 or relink to a frontend-related issue. The CSS changes appear unrelated to workflow_type validation requirements.
Out of Scope Changes check ⚠️ Warning The changes to ChatHistorySidebar.tsx for button overflow fixes are out of scope for issue #240, which requires backend workflow_type normalization logic changes. Either relink the PR to a relevant frontend issue or refactor it to include the required backend workflow_type normalization changes specified in #240.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'Fix sidebar bulk action button overflow' accurately describes the main UI change to the ChatHistorySidebar component, matching the file modifications and stated objectives.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch auto-claude/240-please-fix-so-that-the-buttons-for-deleting-and-ar

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 and usage tips.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

The pull request effectively addresses the sidebar bulk action button overflow issue by applying appropriate Tailwind CSS classes. The changes ensure that the buttons and their text truncate correctly at narrow widths, improving the UI's responsiveness and preventing layout shifts. The use of overflow-hidden, min-w-0, and truncate classes is well-applied to achieve the desired visual behavior.

@AndyMik90 AndyMik90 self-assigned this Feb 20, 2026
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/frontend/src/renderer/components/ChatHistorySidebar.tsx`:
- Line 346: In ChatHistorySidebar (the component rendering the action buttons),
replace the incorrect translation key usage t('insights.archiveSelected') with
t('selection.archiveSelected') so the archive button uses the same `selection`
namespace as the delete button (the span rendering t('selection.deleteSelected')
and the archive span/button should both reference `selection.archiveSelected` to
match en/common.json and fr/common.json).

<Trash2 className="mr-1.5 h-3.5 w-3.5" />
{t('selection.deleteSelected')} ({selectedIds.size})
<Trash2 className="shrink-0 mr-1.5 h-3.5 w-3.5" />
<span className="truncate">{t('selection.deleteSelected')} ({selectedIds.size})</span>
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

# First, let's check the ChatHistorySidebar.tsx file around the mentioned lines
cat -n apps/frontend/src/renderer/components/ChatHistorySidebar.tsx | sed -n '340,365p'

Repository: AndyMik90/Auto-Claude

Length of output: 1237


🏁 Script executed:

# Search for translation keys in locale files
echo "=== Searching for deleteSelected key ==="
rg -n "deleteSelected" --type json

echo ""
echo "=== Searching for archiveSelected key ==="
rg -n "archiveSelected" --type json

echo ""
echo "=== Checking if 'selection' namespace exists ==="
rg -n '"selection"' --type json

Repository: AndyMik90/Auto-Claude

Length of output: 1339


🏁 Script executed:

# List all locale file directories to understand structure
echo "=== Listing locale directories ==="
fd -type d -name "locales" | head -20

echo ""
echo "=== Showing structure of en locale files ==="
fd -e json . apps/frontend/src/shared/i18n/locales/en/ 2>/dev/null | sort

Repository: AndyMik90/Auto-Claude

Length of output: 933


🏁 Script executed:

# Check the structure of selection namespace in common.json
echo "=== Checking 'selection' namespace in en/common.json ==="
sed -n '131,150p' apps/frontend/src/shared/i18n/locales/en/common.json

echo ""
echo "=== Checking 'selection' namespace in fr/common.json ==="
sed -n '131,150p' apps/frontend/src/shared/i18n/locales/fr/common.json

echo ""
echo "=== Checking 'insights' namespace in en/common.json ==="
rg -A 5 '"insights"' apps/frontend/src/shared/i18n/locales/en/common.json | head -20

Repository: AndyMik90/Auto-Claude

Length of output: 1720


🏁 Script executed:

# Check if selection.deleteSelected specifically exists
echo "=== Full search for 'selection' key patterns ==="
rg -A 20 '"selection":\s*{' apps/frontend/src/shared/i18n/locales/en/common.json

Repository: AndyMik90/Auto-Claude

Length of output: 226


🏁 Script executed:

# Search for all t() calls in ChatHistorySidebar.tsx
echo "=== All translation key usages in ChatHistorySidebar.tsx ==="
rg "t\(" apps/frontend/src/renderer/components/ChatHistorySidebar.tsx -A 1 | head -40

Repository: AndyMik90/Auto-Claude

Length of output: 1346


🏁 Script executed:

# Check if insights.deleteSelected exists anywhere
echo "=== Checking if insights.deleteSelected exists ==="
rg "deleteSelected" apps/frontend/src/shared/i18n/locales/en/common.json -B 2 -A 2

echo ""
echo "=== Full insights namespace ==="
rg -A 30 '"insights"' apps/frontend/src/shared/i18n/locales/en/common.json | head -40

Repository: AndyMik90/Auto-Claude

Length of output: 1750


Correct the namespace inconsistency on line 356: use selection.archiveSelected instead of insights.archiveSelected.

Both selection.deleteSelected (line 346) and selection.archiveSelected are properly defined in both en/common.json and fr/common.json. However, line 356 incorrectly uses insights.archiveSelected, creating an inconsistency between adjacent parallel actions. The selection namespace is the correct home for both keys, so line 356 should be updated to selection.archiveSelected to maintain consistency.

🛠️ Proposed fix
-              <span className="truncate">{t('insights.archiveSelected')} ({selectedIds.size})</span>
+              <span className="truncate">{t('selection.archiveSelected')} ({selectedIds.size})</span>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/frontend/src/renderer/components/ChatHistorySidebar.tsx` at line 346, In
ChatHistorySidebar (the component rendering the action buttons), replace the
incorrect translation key usage t('insights.archiveSelected') with
t('selection.archiveSelected') so the archive button uses the same `selection`
namespace as the delete button (the span rendering t('selection.deleteSelected')
and the archive span/button should both reference `selection.archiveSelected` to
match en/common.json and fr/common.json).

@AndyMik90
Copy link
Owner Author

🤖 Auto Claude PR Review

Merge Verdict: 🟠 NEEDS REVISION

🟠 Needs revision - 1 structural/other issue(s) require attention.

Branch is out of date with base branch. Update branch first - if no conflicts arise, you can merge. If merge conflicts arise, resolve them and run follow-up review again.

Risk Assessment

Factor Level Notes
Complexity Low Based on lines changed
Security Impact None Based on security findings
Scope Coherence Good Based on structural review

🚨 Blocking Issues (Must Fix)

  • Branch Out of Date: PR branch is behind the base branch and needs to be updated

Generated by Auto Claude PR Review


This review identified blockers that must be resolved before merge. Generated by Auto Claude.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/frontend This is frontend only size/S Small (10-99 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant