Skip to content

Fix Resolution Search Bug and Mobile UI Enhancements#738

Open
ngoiyaeric wants to merge 2 commits into
mainfrom
fix/resolution-search-mobile-layout-3518132212432861164
Open

Fix Resolution Search Bug and Mobile UI Enhancements#738
ngoiyaeric wants to merge 2 commits into
mainfrom
fix/resolution-search-mobile-layout-3518132212432861164

Conversation

@ngoiyaeric

@ngoiyaeric ngoiyaeric commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

We have successfully resolved the 500 error in the resolution search feature by introducing a safe file validation helper and routing to the correct vision model on xAI. We also resolved mobile layout visual issues by fixing the border-radius class on the chat input and preventing cutoff of the Plus (New Chat) icon on small screen viewports.


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

Summary by CodeRabbit

  • New Features

    • Improved vision-enabled model selection for supported Grok requests, including explicit and fallback configurations.
  • Bug Fixes

    • Improved uploaded file handling by validating uploads before processing and selecting the best available valid file.
    • Updated mobile navigation icon bar layout to keep items properly aligned on smaller screens.
    • Corrected chat input styling for a consistent rounded appearance.
  • Chores

    • Updated ignore rules to prevent committing sensitive directory contents.
    • Refreshed service worker precached assets for the latest build.

This commit resolves the following issues:
1. Implements safe `isFile` validation on `formData` files to prevent TypeError/500 errors when empty or invalid inputs are parsed.
2. Selects the vision-enabled `grok-2-vision-1212` model on xAI when vision is required.
3. Corrects `rounded-fill` to standard Tailwind `rounded-full` to resolve square edges of the chat input on mobile.
4. Corrects `.mobile-icons-bar-content` overflow alignment from `center` to `flex-start` to prevent cutting off the Plus (New Chat) icon on small devices.

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

Copy link
Copy Markdown
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.

@vercel

vercel Bot commented Jul 14, 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 Jul 15, 2026 2:47am

@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 →

@CLAassistant

Copy link
Copy Markdown

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

coderabbitai Bot commented Jul 14, 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: aa39fb63-ab26-4b69-ac41-1bcce8b9b4e9

📥 Commits

Reviewing files that changed from the base of the PR and between 457e4c3 and 5848f68.

⛔ Files ignored due to path filters (1)
  • server.log is excluded by !**/*.log
📒 Files selected for processing (2)
  • app/actions.tsx
  • public/sw.js
📜 Recent review details
🧰 Additional context used
🪛 ast-grep (0.44.1)
public/sw.js

[warning] Avoid using the initial state variable in setState
Context: setTimeout(t,e)
Note: [CWE-710] Improper Adherence to Coding Standards. Security best practice.

(setstate-same-var)

🔇 Additional comments (3)
app/actions.tsx (2)

107-110: LGTM!


85-96: 🩺 Stability & Availability

Remove the MIME-type validation here. resolution_search only receives file_mapbox, file_google, or file from the map-capture flow, and those are already generated as image blobs; this guard is unnecessary for this path.

			> Likely an incorrect or invalid review comment.
public/sw.js (1)

2-2: 🩺 Stability & Availability

Verify the precache list matches the deployed build. A stale chunk or _buildManifest.js/_ssgManifest.js URL will stop service-worker install if it 404s.


Walkthrough

The change validates uploaded files before resolution searches, selects vision-capable Grok models when required, adjusts mobile and chat styling, ignores the Clerk directory, and refreshes service worker precache entries.

Changes

Runtime behavior

Layer / File(s) Summary
Validated upload extraction
app/actions.tsx
resolution_search validates file form values, selects the primary upload, and conditionally constructs provider data URLs.
Vision-aware model routing
lib/utils/index.ts
getModel selects vision or non-vision Grok IDs according to requireVision.

Interface updates

Layer / File(s) Summary
Mobile and chat styling
app/globals.css, components/chat-panel.tsx
Mobile icon alignment and chat textarea rounding styles are updated.

Deployment and configuration

Layer / File(s) Summary
Clerk directory exclusion
.gitignore
Adds a documented ignore rule for /clerk/.
Service worker precache refresh
public/sw.js
Updates the embedded precache manifest entries and revision metadata.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested labels: Review effort 1/5

Suggested reviewers: google-labs-jules[bot]

Poem

I’m a rabbit with files in my den,
Validating uploads again and again.
Grok sees the sights, icons align,
Chat bubbles round up just fine.
Clerk stays hidden—hop, hop, hooray!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Title matches the main fixes: resolution search reliability and mobile UI improvements.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/resolution-search-mobile-layout-3518132212432861164

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.

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

Blocking finding

  • server.log is modified in this PR even though it is already ignored and tracked. The new blob contains a Clerk keyless-mode claim URL with an embedded credential-bearing token. This is runtime output and must not be committed. Remove server.log from the PR, and revoke/rotate the exposed claim token if it is still valid, before merging.

No other actionable findings were identified in the reviewed code changes.

…tion types

This commit resolves the following issues:
1. Implements safe `isFile` validation on `formData` files to prevent TypeError/500 errors when empty or invalid inputs are parsed.
2. Selects the vision-enabled `grok-2-vision-1212` model on xAI when vision is required, and resolves TypeScript compiler null-pointer safety checks.
3. Corrects `rounded-fill` to standard Tailwind `rounded-full` to resolve square edges of the chat input on mobile.
4. Corrects `.mobile-icons-bar-content` overflow alignment from `center` to `flex-start` to prevent cutting off the Plus (New Chat) icon on small devices.

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