Skip to content

Comments

fix(web): Fix search bar not taking full width in TopBar#909

Merged
brendan-kellam merged 2 commits intomainfrom
brendan/fix-search-bar-width
Feb 19, 2026
Merged

fix(web): Fix search bar not taking full width in TopBar#909
brendan-kellam merged 2 commits intomainfrom
brendan/fix-search-bar-width

Conversation

@brendan-kellam
Copy link
Contributor

@brendan-kellam brendan-kellam commented Feb 19, 2026

Summary

  • The right section of the TopBar had flex-1 unconditionally, splitting the bar into two equal halves
  • The SearchBar (in the left section) could only fill the left 50% of the viewport, leaving a large empty gap between it and the avatar
  • Fixed by making the right section use shrink-0 when no centerContent is present, allowing the left flex-1 section (with the SearchBar) to consume all remaining space
  • When centerContent is present (e.g. chat page), the right section remains flex-1 to preserve the balanced 3-column layout

Test plan

  • Verify the search bar spans the full width on the search results page
  • Verify the search bar spans the full width on the browse page
  • Verify the chat page TopBar still looks correct (chat title centered, share button on right)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes

    • Fixed search bar to span full width on search results and browse pages.
  • Improvements

    • Adjusted top bar layout behavior for better responsive design.

brendan-kellam and others added 2 commits February 19, 2026 14:52
The right section of the TopBar had flex-1 unconditionally, splitting
the bar into two equal halves. The SearchBar could only fill the left
50%, leaving a large empty gap. Now the right section uses shrink-0
when no centerContent is present, letting the SearchBar fill the
remaining width.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 19, 2026

Caution

Review failed

The pull request is closed.

Walkthrough

Updates a UI layout so the search bar spans full width on search results and browse pages. The topBar component's right-aligned actions container now uses conditional flex styling via the cn utility based on centerContent presence.

Changes

Cohort / File(s) Summary
Documentation
CHANGELOG.md
Adds entry describing the search bar full-width UI fix.
UI Layout Fix
packages/web/src/app/[domain]/components/topBar.tsx
Introduces cn import and replaces a static class with conditional className: applies flex-1 when centerContent is present, otherwise shrink-0, changing flex growth behavior of the right actions container.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

✨ Finishing Touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch brendan/fix-search-bar-width

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.

@brendan-kellam brendan-kellam merged commit 08a1f76 into main Feb 19, 2026
9 checks passed
@brendan-kellam brendan-kellam deleted the brendan/fix-search-bar-width branch February 19, 2026 22:53
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