Skip to content

Fix model selector overflow on mobile by using shortName#461

Merged
AnthonyRonning merged 3 commits intomasterfrom
devin/1772757384-fix-model-selector-overflow
Mar 6, 2026
Merged

Fix model selector overflow on mobile by using shortName#461
AnthonyRonning merged 3 commits intomasterfrom
devin/1772757384-fix-model-selector-overflow

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Mar 6, 2026

Summary

On smaller mobile devices (e.g. iPhone 15), long model display names like "OpenAI GPT-OSS 120B" or "DeepSeek R1 671B" in the model selector button push the send button off-screen.

getDropdownLabel() now prefers shortName (e.g. "GPT-OSS", "DeepSeek R1") over displayName for the collapsed button label. The full displayName is still shown inside the dropdown menu items.

Note: the two primary models ("Quick" / "Powerful") are unaffected — they have hardcoded labels via early returns. This change only impacts models selected from the "More models" advanced view.

Fixes #460

Updates since last revision

  • Reverted the max-w-[120px] / CSS truncation commit per reviewer request. The fix is now purely the shortName preference — no layout/CSS changes.

Review & Testing Checklist for Human

  • Verify on a mobile screen (~375px width, e.g. iPhone 15) that the send button remains visible when selecting models with longer names like DeepSeek R1 or GPT-OSS
  • Confirm the short names are still identifiable at a glance (e.g. "Qwen3-VL", "Gemma 3", "GPT-OSS", "DeepSeek R1")

Notes


Open with Devin

On smaller mobile devices, long model display names (e.g. 'OpenAI GPT-OSS 120B')
push the send button off-screen. Use the shorter shortName field (e.g. 'GPT-OSS')
for the dropdown button label instead.

Fixes #460

Co-Authored-By: marks <markskram@protonmail.com>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Mar 6, 2026

Deploying maple with  Cloudflare Pages  Cloudflare Pages

Latest commit: b5e2174
Status: ✅  Deploy successful!
Preview URL: https://5fdb55f6.maple-ca8.pages.dev
Branch Preview URL: https://devin-1772757384-fix-model-s.maple-ca8.pages.dev

View logs

Copy link
Contributor Author

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

@marksftw
Copy link
Contributor

marksftw commented Mar 6, 2026

image Here is a screenshot of an iPhone 4. Possible to make it work for this @devin-ai-integration

Constrain the model selector button to max-w-[120px] with text truncation
so it works on very small screens like iPhone 4 (320px wide).
The button text will truncate with ellipsis if it exceeds the max width.

Co-Authored-By: marks <markskram@protonmail.com>
@devin-ai-integration
Copy link
Contributor Author

Thanks for the iPhone 4 screenshot! I've pushed a second commit that adds:

  1. max-w-[120px] on the model selector button to hard-cap its width
  2. truncate (text-overflow: ellipsis) so long names get clipped with "..." instead of overflowing

This should keep the send button visible even on 320px-wide screens. The new Cloudflare preview build is deploying now — you can re-test once it's live.

@devin-ai-integration devin-ai-integration bot changed the title Fix model selector overflow on mobile by using shortName Fix model selector overflow on mobile by using shortName and max-width Mar 6, 2026
@devin-ai-integration devin-ai-integration bot changed the title Fix model selector overflow on mobile by using shortName and max-width Fix model selector overflow on mobile by using shortName Mar 6, 2026
@marksftw
Copy link
Contributor

marksftw commented Mar 6, 2026

I had devin revert the iPhone 4 stuff because it didn't make a difference and we don't even support iPhone 4. It's working great now.

@marksftw marksftw requested a review from AnthonyRonning March 6, 2026 01:50
@AnthonyRonning
Copy link
Contributor

yeah that was the purpose of shortname in the first place, not sure how it got reverted.

@AnthonyRonning AnthonyRonning merged commit 7dda1fe into master Mar 6, 2026
12 checks passed
@AnthonyRonning AnthonyRonning deleted the devin/1772757384-fix-model-selector-overflow branch March 6, 2026 01:55
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.

Send button pushed off-screen on smaller mobile devices when long model names exist

2 participants