Skip to content

[render preview] Fix/UI text overflow#669

Open
segundavid-dev wants to merge 4 commits into
QueueLab:mainfrom
segundavid-dev:fix/ui-text-overflow
Open

[render preview] Fix/UI text overflow#669
segundavid-dev wants to merge 4 commits into
QueueLab:mainfrom
segundavid-dev:fix/ui-text-overflow

Conversation

@segundavid-dev

@segundavid-dev segundavid-dev commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fixes text overflow bugs across chat, search result dialogs, and calendar notepad components that were breaking layout on narrow/mobile screens (320px).
  • Also moves the glassmorphic CSS import to app/layout.tsx where Next.js expects global styles.

PR addressing issue #567

@coderabbitai help confirm if the changes made here correlates with the highlighted changes my you on issue #567

Summary by CodeRabbit

  • Style

    • Improved overflow handling and added truncation/line-clamping for long filenames, timestamps, dialog descriptions, and headings to prevent horizontal scrolling on mobile.
    • Updated styling for chat attachment filenames and refined layout behavior in calendar notepads and the empty screen.
    • Applied global glassmorphic styling to the app layout and adjusted dialog description rendering in search results.
  • Tests

    • Added responsive Playwright coverage to confirm long attachment filenames and long search queries don’t overflow or trigger horizontal scrolling on small mobile.

Copilot AI review requested due to automatic review settings June 24, 2026 00:59
@vercel

vercel Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

@segundavid-dev is attempting to deploy a commit to the QCX-MAIN Team on Vercel.

A member of the Team first needs to authorize it.

@qodo-code-review

Copy link
Copy Markdown
Contributor

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: f10c4eb7-574b-4414-a4de-ade26063387e

📥 Commits

Reviewing files that changed from the base of the PR and between e4bb5d4 and 3be12e7.

📒 Files selected for processing (1)
  • components/empty-screen.tsx
📜 Recent review details
⚠️ CI failures not shown inline (1)

Commit Status: Vercel – qcx: Vercel – qcx

Conclusion: failure

Authorization required to deploy.
🔇 Additional comments (1)
components/empty-screen.tsx (1)

44-51: 🎯 Functional Correctness

No change needed here. The span already truncates within this flex row; min-w-0 flex-1 isn’t required.

			> Likely an incorrect or invalid review comment.

Walkthrough

Moves the glassmorphic stylesheet import to the app layout, updates several UI components to constrain overflow and truncation, and adds Playwright coverage for small-mobile horizontal scroll behavior with long filenames and search queries.

Changes

Responsive Overflow Fixes and CSS Consolidation

Layer / File(s) Summary
Glassmorphic CSS moved to app layout
app/layout.tsx, components/search-results-image.tsx
glassmorphic/glassmorphic.css is imported in app/layout.tsx and removed from search-results-image.tsx.
Overflow and truncation utilities across components
components/calendar-notepad.tsx, components/chat-panel.tsx, components/search-results-image.tsx, components/video-search-results.tsx, components/empty-screen.tsx
Adds overflow-hidden, truncate, and line-clamp-2 to multiple UI elements, updates the attachment filename width in chat-panel.tsx, and changes empty-screen button heading rendering to a truncating span.
Small-mobile overflow Playwright tests
tests/responsive.spec.ts
Adds two responsive tests that verify long attachment filenames and long query text do not overflow their containers or cause horizontal scrolling.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

Possibly related PRs

  • QueueLab/QCX#422: Also changes the selected-file UI block in components/chat-panel.tsx.
  • QueueLab/QCX#473: Also updates truncation-related styling in components/chat-panel.tsx and similar text-wrapping UI behavior.
  • QueueLab/QCX#205: Also touches components/chat-panel.tsx className logic for the input area.

Suggested labels

Review effort 1/5

🐇 I hopped through CSS, soft and light,
Clamping long words so screens stay right.
One layout to wear the style anew,
Small-mobile tests now guard the view!

🚥 Pre-merge checks | ✅ 4 | ❌ 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 (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the PR’s main goal: fixing UI text overflow across multiple components.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration.


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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The job was not started because the account is locked due to a billing issue.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/responsive.spec.ts`:
- Around line 226-261: Both tests conditionally skip their validation logic
based on element visibility, which allows them to pass without actually testing
anything. In the test function titled "should not overflow with long attached
file name", add explicit setup to ensure the attachment UI is triggered and
visible before performing the width checks, then use an expect assertion for
visibility instead of the conditional if guard. Similarly, in the test function
titled "should not cause horizontal scroll with long query in search dialog",
add explicit setup to open the search dialog and display the query text before
checking its dimensions, and replace the conditional visibility check with a
direct assertion that the element must be visible. This makes both tests
deterministic by ensuring the responsive overflow checks always execute and
validate the expected UI constraints.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 9a9d4ab4-e605-4ed9-ac78-06d84ddeefe3

📥 Commits

Reviewing files that changed from the base of the PR and between cb6ad06 and e4bb5d4.

📒 Files selected for processing (6)
  • app/layout.tsx
  • components/calendar-notepad.tsx
  • components/chat-panel.tsx
  • components/search-results-image.tsx
  • components/video-search-results.tsx
  • tests/responsive.spec.ts
📜 Review details
🔇 Additional comments (5)
app/layout.tsx (1)

5-5: LGTM!

components/search-results-image.tsx (1)

100-102: LGTM!

components/calendar-notepad.tsx (1)

95-95: LGTM!

Also applies to: 154-157

components/chat-panel.tsx (1)

244-244: LGTM!

Also applies to: 293-301

components/video-search-results.tsx (1)

121-121: LGTM!

Comment thread tests/responsive.spec.ts
Comment on lines +226 to +261
test('should not overflow with long attached file name', async ({ page }) => {
const attachmentButton = page.locator('[data-testid="mobile-attachment-button"]');
if (await attachmentButton.isVisible()) {
await page.locator('input[type="file"]').setInputFiles({
name: 'this-is-a-very-long-filename-that-should-not-overflow-the-container-on-small-screens.pdf',
mimeType: 'application/pdf',
buffer: Buffer.from('test')
});

const fileContainer = page.locator('[data-testid="clear-attachment-button"]').locator('..');
if (await fileContainer.isVisible()) {
const containerBox = await fileContainer.boundingBox();
expect(containerBox).toBeTruthy();
if (containerBox) {
expect(containerBox.width).toBeLessThanOrEqual(320);
}

const bodyWidth = await page.evaluate(() => document.body.scrollWidth);
expect(bodyWidth).toBeLessThanOrEqual(321);
}
}
});

test('should not cause horizontal scroll with long query in search dialog', async ({ page }) => {
const dialogDesc = page.locator('[role="dialog"] p.line-clamp-2');
if (await dialogDesc.isVisible()) {
const descBox = await dialogDesc.boundingBox();
expect(descBox).toBeTruthy();
if (descBox) {
expect(descBox.width).toBeLessThanOrEqual(320);
}

const bodyWidth = await page.evaluate(() => document.body.scrollWidth);
expect(bodyWidth).toBeLessThanOrEqual(321);
}
});

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.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Make the new small-mobile overflow tests deterministic instead of conditionally skipping.

At Line 228 and Line 251, visibility guards allow both tests to pass without validating anything when elements are absent/closed. Add explicit setup (open dialog/select item, trigger attachment UI) and assert visibility unconditionally before overflow checks.

Suggested tightening
 test('should not overflow with long attached file name', async ({ page }) => {
-  const attachmentButton = page.locator('[data-testid="mobile-attachment-button"]');
-  if (await attachmentButton.isVisible()) {
-    await page.locator('input[type="file"]').setInputFiles({
-      name: 'this-is-a-very-long-filename-that-should-not-overflow-the-container-on-small-screens.pdf',
-      mimeType: 'application/pdf',
-      buffer: Buffer.from('test')
-    });
+  const attachmentButton = page.locator('[data-testid="mobile-attachment-button"]');
+  await expect(attachmentButton).toBeVisible();
+  await page.locator('input[type="file"]').setInputFiles({
+    name: 'this-is-a-very-long-filename-that-should-not-overflow-the-container-on-small-screens.pdf',
+    mimeType: 'application/pdf',
+    buffer: Buffer.from('test')
+  });

-    const fileContainer = page.locator('[data-testid="clear-attachment-button"]').locator('..');
-    if (await fileContainer.isVisible()) {
-      const containerBox = await fileContainer.boundingBox();
-      expect(containerBox).toBeTruthy();
-      if (containerBox) {
-        expect(containerBox.width).toBeLessThanOrEqual(320);
-      }
-
-      const bodyWidth = await page.evaluate(() => document.body.scrollWidth);
-      expect(bodyWidth).toBeLessThanOrEqual(321);
-    }
-  }
+  const fileContainer = page.locator('[data-testid="clear-attachment-button"]').locator('..');
+  await expect(fileContainer).toBeVisible();
+  const containerBox = await fileContainer.boundingBox();
+  expect(containerBox).toBeTruthy();
+  if (containerBox) expect(containerBox.width).toBeLessThanOrEqual(320);
+  const bodyWidth = await page.evaluate(() => document.body.scrollWidth);
+  expect(bodyWidth).toBeLessThanOrEqual(321);
 });

 test('should not cause horizontal scroll with long query in search dialog', async ({ page }) => {
+  // open the search dialog in this test before querying description
+  // (use the existing trigger selector used elsewhere in this suite)
   const dialogDesc = page.locator('[role="dialog"] p.line-clamp-2');
-  if (await dialogDesc.isVisible()) {
-    const descBox = await dialogDesc.boundingBox();
-    expect(descBox).toBeTruthy();
-    if (descBox) {
-      expect(descBox.width).toBeLessThanOrEqual(320);
-    }
-
-    const bodyWidth = await page.evaluate(() => document.body.scrollWidth);
-    expect(bodyWidth).toBeLessThanOrEqual(321);
-  }
+  await expect(dialogDesc).toBeVisible();
+  const descBox = await dialogDesc.boundingBox();
+  expect(descBox).toBeTruthy();
+  if (descBox) expect(descBox.width).toBeLessThanOrEqual(320);
+  const bodyWidth = await page.evaluate(() => document.body.scrollWidth);
+  expect(bodyWidth).toBeLessThanOrEqual(321);
 });
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/responsive.spec.ts` around lines 226 - 261, Both tests conditionally
skip their validation logic based on element visibility, which allows them to
pass without actually testing anything. In the test function titled "should not
overflow with long attached file name", add explicit setup to ensure the
attachment UI is triggered and visible before performing the width checks, then
use an expect assertion for visibility instead of the conditional if guard.
Similarly, in the test function titled "should not cause horizontal scroll with
long query in search dialog", add explicit setup to open the search dialog and
display the query text before checking its dimensions, and replace the
conditional visibility check with a direct assertion that the element must be
visible. This makes both tests deterministic by ensuring the responsive overflow
checks always execute and validate the expected UI constraints.

@ngoiyaeric ngoiyaeric changed the title Fix/UI text overflow [render preview] Fix/UI text overflow Jun 25, 2026
@ngoiyaeric

Copy link
Copy Markdown
Collaborator

render-preview

@vercel

vercel Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
qcx Ready Ready Preview, Comment Jun 27, 2026 3:08pm

@ngoiyaeric

Copy link
Copy Markdown
Collaborator

Screenshot_20260627_184322_Chrome synchronize main branch and fix example prompt overflow

@segundavid-dev

Copy link
Copy Markdown
Contributor Author

Screenshot_20260627_184322_Chrome synchronize main branch and fix example prompt overflow

On it

@segundavid-dev

Copy link
Copy Markdown
Contributor Author

@ngoiyaeric
adjusted
image-2

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants