Skip to content

fix: reuse TooltipIconButton and unify chat UI in shared agent screen Fixes #362#200

Open
priyansh87 wants to merge 1 commit into
potpie-ai:mainfrom
priyansh87:fix/chat-ui-consistency
Open

fix: reuse TooltipIconButton and unify chat UI in shared agent screen Fixes #362#200
priyansh87 wants to merge 1 commit into
potpie-ai:mainfrom
priyansh87:fix/chat-ui-consistency

Conversation

@priyansh87

@priyansh87 priyansh87 commented Jul 18, 2025

Copy link
Copy Markdown

Fixes #362

Description

This PR resolves issue #362 by ensuring consistent chat UI across different screens:

  • Reused the TooltipIconButton component from the Main Chat in the Shared Agent tab
  • Updated the send button UI to match the Main Chat styling (icon + tooltip + hover)
  • Applied conditional styling: the input border in Shared Chat turns blue when the repository is parsed (aligning with Main Chat)
  • Minor layout adjustments using justify-end to ensure the send button aligns to the right like in Main Chat

Before vs After

Before After
before after

🧪 Tested

  • ✅ Manually verified layout consistency across the screens
  • ✅ Checked tooltip visibility
  • ✅ Ensured responsive design and alignment on various screen sizes

Let me know if any further changes are needed.

Summary by CodeRabbit

  • Style

    • Updated the chat form's send button to use a new icon button with a tooltip and modern vector icon.
    • Improved placeholder text styling in the chat input area.
    • Enhanced chat form border color for better visual feedback when enabled.
  • New Features

    • Added loading spinner directly inside the send button for clearer status indication.

@coderabbitai

coderabbitai Bot commented Jul 18, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

The chat form's send button UI is updated to use a TooltipIconButton component with a vector SendHorizontalIcon, replacing the previous Button with an image. Styling for the button and textarea is adjusted, including placeholder color and border color changes. No modifications are made to the underlying chat logic or exported entities.

Changes

File(s) Change Summary
app/(main)/shared-agent/page.tsx Replaced Button with TooltipIconButton using SendHorizontalIcon; updated styling for button, textarea, and container borders.

Poem

A button once clicked with an image in hand,
Now shines with a vector, so crisp and so grand.
Blue borders appear, and gray text does show,
Tooltip and icon, together they glow.
Rabbits approve, as the UI takes flight—
Sending your words with style and delight! 🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a90ee0d and 53d0c8d.

📒 Files selected for processing (1)
  • app/(main)/shared-agent/page.tsx (4 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx,js,jsx}

Instructions used from:

Sources:
📄 CodeRabbit Inference Engine

  • CLAUDE.md
**/*.tsx

Instructions used from:

Sources:
📄 CodeRabbit Inference Engine

  • CLAUDE.md
🔇 Additional comments (7)
app/(main)/shared-agent/page.tsx (7)

16-16: LGTM! Import statement is correctly added.

The SendHorizontalIcon import from "lucide-react" is properly added and follows the established pattern.


37-37: LGTM! TooltipIconButton import is correctly added.

The import statement follows the established pattern and imports from the correct component path.


798-798: LGTM! Border color change enhances UI consistency.

The border color change from #edecf4 to blue-400 when the repository is parsed provides better visual feedback and aligns with the Main Chat styling as mentioned in the PR objectives.


803-803: LGTM! Placeholder text styling is consistent.

The addition of text-gray-400 class for placeholder text styling maintains visual consistency across the UI.


813-825: LGTM! TooltipIconButton implementation is well-structured.

The replacement of the Button component with TooltipIconButton provides better UX with:

  • Proper tooltip text ("Send")
  • Consistent size and styling (size-8 p-2)
  • Proper loading state handling with conditional rendering
  • Correct disabled state logic
  • Usage of vector icon (SendHorizontalIcon) instead of static image

The implementation follows the coding guidelines for component usage and TypeScript patterns.


832-832: LGTM! Text styling consistency maintained.

The addition of text-gray-400 class to the disabled textarea maintains visual consistency with the enabled state.


835-843: LGTM! Disabled state implementation is consistent.

The disabled chat form properly implements:

  • justify-end class for proper alignment matching the Main Chat layout
  • Same TooltipIconButton structure as the enabled state
  • Proper disabled state (disabled={true})
  • Consistent icon usage (SendHorizontalIcon)
  • Maintains the same styling patterns

This ensures UI consistency between enabled and disabled states.

✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@sonarqubecloud

Copy link
Copy Markdown

@dhirenmathur dhirenmathur 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.

Hey @priyansh87 thanks for opening the pr!
We are looking for consistency across the chat implementatinos in the app.
i.e. Visually and Functionally

All three implementations should reuse the same icons and components visually , should have the model selection and should have the enhance prompts button as well.

Please let me know if you have any questions

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