Skip to content

Conversation

@ngoiyaeric
Copy link
Collaborator

@ngoiyaeric ngoiyaeric commented Feb 9, 2026

This PR addresses issue #506 where long text in the Copilot and EmptyScreen components was causing UI overflow or truncation.

Key changes:

  1. Copilot Component: Updated inquiry option labels to allow wrapping by replacing whitespace-nowrap with whitespace-normal break-words. Also updated status headers to replace truncate with whitespace-normal break-words to support multi-line titles.
  2. EmptyScreen Component: Updated example message buttons to use whitespace-normal text-left, ensuring that long suggested prompts wrap within the button container instead of overflowing or being cut off.

Visual verification was performed by creating a test page with long strings and capturing screenshots using Playwright, confirming that the text now wraps as expected.


PR created automatically by Jules for task 15860545981663021301 started by @ngoiyaeric

Summary by CodeRabbit

  • Style
    • Improved text wrapping across UI elements so long content no longer truncates (errors, query labels, options, buttons).
    • Enhanced button text alignment and wrapping for readability.
    • Reduced mobile spacing and tightened paddings for chat, empty screens, and general layout.
    • Slimmed mobile icons bar height and gaps for a more compact mobile interface.
    • Adjusted chat input and form paddings/min-heights for a more consistent mobile typing experience.

Co-authored-by: ngoiyaeric <115367894+ngoiyaeric@users.noreply.github.com>
@google-labs-jules
Copy link
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@charliecreates charliecreates bot requested a review from CharlieHelps February 9, 2026 08:54
@vercel
Copy link
Contributor

vercel bot commented Feb 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
qcx Ready Ready Preview, Comment Feb 9, 2026 9:53am

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Feb 9, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
qcx f71f4c5 Feb 09 2026, 09:53 AM

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 9, 2026

Walkthrough

Replaces truncation classes with wrapping behavior and tightens mobile spacing/padding across UI components and global styles; no functional logic or exported API changes.

Changes

Cohort / File(s) Summary
Text wrapping & button text
components/copilot.tsx, components/empty-screen.tsx
Replaced truncate with whitespace-normal break-words on multiple text elements; added whitespace-normal text-left to EmptyScreen button to allow wrapping and left alignment.
Chat input / mobile form styling
components/chat-panel.tsx
Adjusted mobile vs desktop padding/min-height and conditional class application for the chat input and form container; simplified base input classes (styling-only changes).
Mobile global CSS tweaks
app/globals.css
Reduced heights, gaps, and padding for mobile UI bars and chat areas (.mobile-icons-bar, .mobile-icons-bar-content, .mobile-chat-messages-area, .mobile-chat-input-area, etc.).

Sequence Diagram(s)

(Skipped — changes are styling-only and do not introduce multi-component control-flow requiring a sequence diagram.)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested Labels

Review effort 2/5

Poem

🐰 I hopped through CSS and code so light,
Swapped truncate for words that might,
Unfurl and wrap, no edges fray,
Mobile bars snug, padding trimmed tight,
A little change — the UI's bright. ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
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 title accurately describes the primary objective of the PR: fixing UI overflow issues in the Copilot and EmptyScreen components by adjusting text wrapping and spacing.

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

✨ 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 fix-ui-overflow-506-15860545981663021301

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

@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

🤖 Fix all issues with AI agents
In `@components/copilot.tsx`:
- Line 128: Replace the invalid Tailwind class on the paragraph element: change
the className value on the <p className="text-lg text-foreground text-semibold
ml-2 break-words"> JSX node to use font-semibold instead of text-semibold so the
semibold weight is applied (i.e., swap text-semibold → font-semibold).
📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between af86c6b and 54aefe5.

⛔ Files ignored due to path filters (1)
  • verification_mobile.png is excluded by !**/*.png
📒 Files selected for processing (2)
  • components/copilot.tsx
  • components/empty-screen.tsx
🧰 Additional context used
🧬 Code graph analysis (1)
components/empty-screen.tsx (1)
components/ui/button.tsx (1)
  • ButtonProps (36-40)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Workers Builds: qcx
🔇 Additional comments (4)
components/empty-screen.tsx (1)

44-44: LGTM — wrapping and alignment classes are appropriate.

Adding whitespace-normal text-left to the link-variant button correctly allows long example prompts to wrap naturally and align consistently.

components/copilot.tsx (3)

101-103: LGTM — error text wrapping is appropriate.

Replacing truncation with whitespace-normal break-words ensures full error messages are visible to the user instead of being cut off.


114-123: LGTM — completed query display wraps correctly.

The parent flex-1 min-w-0 combined with whitespace-normal break-words on the <h5> properly constrains and wraps long query text while keeping the check icon aligned.


148-153: LGTM — option labels now wrap properly.

Replacing whitespace-nowrap with whitespace-normal break-words on checkbox labels correctly allows long option text to wrap within the flex container.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

<Card className="p-4 rounded-lg w-full mx-auto">
<div className="mb-4">
<p className="text-lg text-foreground text-semibold ml-2">
<p className="text-lg text-foreground text-semibold ml-2 break-words">
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

text-semibold is not a valid Tailwind utility — use font-semibold.

text-semibold will be silently ignored. The correct Tailwind class for semibold font weight is font-semibold.

Proposed fix
-          <p className="text-lg text-foreground text-semibold ml-2 break-words">
+          <p className="text-lg text-foreground font-semibold ml-2 break-words">
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<p className="text-lg text-foreground text-semibold ml-2 break-words">
<p className="text-lg text-foreground font-semibold ml-2 break-words">
🤖 Prompt for AI Agents
In `@components/copilot.tsx` at line 128, Replace the invalid Tailwind class on
the paragraph element: change the className value on the <p className="text-lg
text-foreground text-semibold ml-2 break-words"> JSX node to use font-semibold
instead of text-semibold so the semibold weight is applied (i.e., swap
text-semibold → font-semibold).

Copy link

@charliecreates charliecreates bot left a comment

Choose a reason for hiding this comment

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

The changes are directionally correct for fixing overflow, but components/copilot.tsx applies break-words to the question text without also ensuring wrapping via whitespace-normal, which may make the fix less reliable/inconsistent compared to the other updated headers.

Additional notes (2)
  • Readability | components/copilot.tsx:128-131
    break-words only affects line breaking when wrapping is allowed; without explicitly opting into wrapping, long strings can still overflow depending on the element’s default white-space. You fixed this for other headers by using whitespace-normal break-words, but the question <p> only adds break-words.

For consistency (and to make the behavior more robust across browsers/content), consider adding whitespace-normal here as well.

  • Compatibility | components/empty-screen.tsx:41-47
    Adding whitespace-normal enables wrapping, but on some button/link implementations the child text can still refuse to shrink unless the button has min-w-0 (or the text node is wrapped in an element with min-w-0). If this button is inside a constrained container, long headings could still cause horizontal overflow in edge cases.
Summary of changes

What changed

components/copilot.tsx

  • Updated text elements to wrap instead of truncating:
    • Replaced truncate with whitespace-normal break-words for the error header and completed state header.
    • Added break-words to the question <p> to prevent long question strings from overflowing.
    • Replaced option label styling from whitespace-nowrap to whitespace-normal break-words so long option labels can wrap.

components/empty-screen.tsx

  • Updated example message Button styling to allow wrapping and left alignment:
    • Added whitespace-normal text-left to ensure long headings wrap within the button.

Assets

  • Added verification_mobile.png as a visual verification artifact.

@charliecreates charliecreates bot removed the request for review from CharlieHelps February 9, 2026 08:58
- Fixed text wrapping in `Copilot` and `EmptyScreen` by replacing `whitespace-nowrap` and `truncate` with `whitespace-normal break-words`.
- Reduced mobile UI padding and heights to save vertical space:
  - `.mobile-icons-bar` height: 60px -> 48px.
  - `.mobile-chat-input-area` and `.mobile-chat-input` padding: 10px -> 4px.
  - `.mobile-chat-messages-area` padding: 12px -> 8px.
  - `EmptyScreen` vertical margins and spacing reduced.
- Optimized `ChatPanel` for mobile:
  - Reduced `min-h-12` to `min-h-10`.
  - Adjusted internal paddings (`pl-4`, `pr-10`, `pt-2`) to remove empty space left by relocated attachment buttons.

Closes #506

Co-authored-by: ngoiyaeric <115367894+ngoiyaeric@users.noreply.github.com>
- Removed nested paddings in `components/chat-panel.tsx` mobile form.
- Reduced `.mobile-chat-input-area` padding to 2px and set `.mobile-chat-input` padding to 0 in `app/globals.css`.
- This significantly reduces the vertical and horizontal space occupied by the chat input area on mobile devices.

Closes #506

Co-authored-by: ngoiyaeric <115367894+ngoiyaeric@users.noreply.github.com>
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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
app/globals.css (1)

167-178: 🧹 Nitpick | 🔵 Trivial

Remove the commented-out .mobile-chat-section block instead of leaving it as dead code.

Commented-out CSS blocks add noise. If this rule set is no longer needed, delete it entirely; version control preserves the history.

♻️ Proposed fix
-  /*
-  .mobile-chat-section {
-    flex: 1; 
-    width: 100%;
-    overflow-y: auto;
-    padding: 8px;
-    padding-bottom: 60px; 
-    box-sizing: border-box;
-    background-color: hsl(var(--card));
-    color: hsl(var(--card-foreground));
-  }
-  */
🤖 Fix all issues with AI agents
In `@components/chat-panel.tsx`:
- Line 243: In the class list inside components/chat-panel.tsx (the string
containing 'resize-none w-full rounded-fill ...'), replace the incorrect
Tailwind class 'rounded-fill' with the correct 'rounded-full' so the element
receives proper border-radius; update the class string where it's used (the
className on the chat input/textarea element) to use 'rounded-full'.
📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 54aefe5 and f71f4c5.

📒 Files selected for processing (3)
  • app/globals.css
  • components/chat-panel.tsx
  • components/empty-screen.tsx
🧰 Additional context used
🧬 Code graph analysis (3)
app/globals.css (2)
components/chat.tsx (2)
  • Chat (29-216)
  • checkMobile (56-70)
tests/responsive.spec.ts (2)
  • test (94-191)
  • test (193-225)
components/empty-screen.tsx (1)
components/chat.tsx (1)
  • setShowEmptyScreen (52-54)
components/chat-panel.tsx (1)
components/chat.tsx (2)
  • checkMobile (56-70)
  • chatPanelRef (48-50)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Workers Builds: qcx
🔇 Additional comments (6)
components/empty-screen.tsx (2)

36-37: LGTM — tighter spacing aligns with mobile refinements.

Reduced padding and margins are consistent with the broader mobile layout tightening in this PR.


44-44: Good fix for text overflow.

Adding whitespace-normal text-left correctly allows long suggested-prompt text to wrap within the button container rather than overflowing. This directly addresses the reported issue #506.

app/globals.css (2)

127-127: Verify touch-target clearance after height reduction.

The icons bar is now 48px tall while .icon-button elements inside are 40px (lines 228–229). That leaves only 4px vertical clearance on each side — acceptable, but confirm this doesn't clip or cause layout jitter on low-DPI devices with border/padding rounding.


190-212: Very aggressive padding reduction — verify usability on small screens.

mobile-chat-input-area has only 2px padding and mobile-chat-input has 0 padding. Combined with mobile-chat-messages-area at 8px, the input area will feel noticeably tighter than the messages area. Ensure visual consistency and that the input doesn't appear pressed against the container edges on 320px-wide viewports (iPhone 5/SE test scenario referenced in tests/responsive.spec.ts).

components/chat-panel.tsx (2)

201-201: LGTM — mobile form layout simplified.

Removing padding and using flex centering for the mobile form is consistent with the global CSS padding reductions.


244-246: LGTM — mobile input height and padding adjustments.

Reducing min-h-12 to min-h-10 and adjusting padding for mobile is consistent with the overall mobile spacing tightening in this PR.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

data-testid="chat-input"
className={cn(
'resize-none w-full min-h-12 rounded-fill border border-input pl-14 pr-12 pt-3 pb-1 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',
'resize-none w-full rounded-fill border border-input text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',
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:

# Search for rounded-fill usage and definition
rg -n "rounded-fill" --type css --type ts --type js --type tsx

Repository: QueueLab/QCX

Length of output: 83


🏁 Script executed:

# Also search for any Tailwind config files that might define custom utilities
fd -e "tailwind.config" -e "tailwind.config.js" -e "tailwind.config.ts" -e "tailwind.config.cjs"

Repository: QueueLab/QCX

Length of output: 38


🏁 Script executed:

# Search for any CSS files that might define rounded-fill
rg -n "rounded-fill" --type css

Repository: QueueLab/QCX

Length of output: 38


🏁 Script executed:

# Search for rounded-fill without type restrictions to catch all occurrences
rg -n "rounded-fill"

Repository: QueueLab/QCX

Length of output: 857


🏁 Script executed:

# Find and list Tailwind configuration files
find . -type f -name "*tailwind*" | head -20

Repository: QueueLab/QCX

Length of output: 76


🏁 Script executed:

# Search for where custom utilities might be defined in the project
rg -n "rounded" --type ts --type js -A 2 -B 2 | head -50

Repository: QueueLab/QCX

Length of output: 3666


🏁 Script executed:

# Read the tailwind.config.ts file
cat ./tailwind.config.ts

Repository: QueueLab/QCX

Length of output: 2482


🏁 Script executed:

# Also check if there are any CSS files defining rounded-fill
find . -type f \( -name "*.css" -o -name "*.scss" \) -exec grep -l "rounded-fill" {} \;

Repository: QueueLab/QCX

Length of output: 38


rounded-fill is not a standard Tailwind class and is not defined as a custom utility — this is a typo for rounded-full.

The Tailwind configuration does not define any custom rounded-fill utility, and no CSS files contain this definition. This will silently produce no border-radius. Change to rounded-full.

🐛 Proposed fix
-              'resize-none w-full rounded-fill border border-input text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',
+              'resize-none w-full rounded-full border border-input text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
'resize-none w-full rounded-fill border border-input text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',
'resize-none w-full rounded-full border border-input text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',
🤖 Prompt for AI Agents
In `@components/chat-panel.tsx` at line 243, In the class list inside
components/chat-panel.tsx (the string containing 'resize-none w-full
rounded-fill ...'), replace the incorrect Tailwind class 'rounded-fill' with the
correct 'rounded-full' so the element receives proper border-radius; update the
class string where it's used (the className on the chat input/textarea element)
to use 'rounded-full'.

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