Skip to content

fix(friends): keep the add-friend dialog inside the window - #84

Merged
scotej merged 1 commit into
mainfrom
fix/add-friend-qr-overflow
Jul 25, 2026
Merged

fix(friends): keep the add-friend dialog inside the window#84
scotej merged 1 commit into
mainfrom
fix/add-friend-qr-overflow

Conversation

@scotej

@scotej scotej commented Jul 25, 2026

Copy link
Copy Markdown
Owner

Summary

The add-friend card surface computed to ~890px of fixed-centered, unscrollable content against the 800px default viewport (1024×640 minimum) — clipping title, footer, and the close button off both screen edges. Exactly the reported "QR UI too big, goes over the standard screen size".

  • Two-column card surface (QR left at 288px, import text box + controls right, per the report's suggestion) inside a widened max-w-3xl — total height ~630px, inside the window minimum.
  • max-h-[calc(100vh-4rem)] overflow-y-auto on this dialog's DialogContent so the scanner and legacy sub-surfaces scroll instead of clipping. (Left the vendored dialog.tsx primitive untouched — scope discipline; the same latent hazard in other dialogs can be a follow-up.)
  • Scanner preview capped at max-w-sm — it renders a full-width square, which at the widened dialog would itself outgrow 640px.
  • PairQrCode skeleton now sizes to the requested QR (was fixed w-56), removing a ~96px layout jump when the code resolves.

Testing

npm run build, lint, test, check-tokens, check-strings green. Height arithmetic per class values; visual walk recommended at the 1024×640 minimum window.

🤖 Generated with Claude Code

The card surface stacked a 320px QR above the import section — ~890px
of content against an 800px default viewport, and the dialog is
fixed-centered with no scroll surface, so the title, footer, and close
button clipped off both screen edges (worse at the 640px minimum).

- card surface goes two-column (QR left at 288, import controls right)
  inside a widened max-w-3xl DialogContent — ~630px tall, inside the
  window minimum
- DialogContent gains max-h + overflow-y-auto so the scanner and
  legacy sub-surfaces (which exceed 640 by design) scroll instead of
  clipping
- scanner preview capped at max-w-sm — full dialog width would have
  made the square preview taller than the window minimum
- PairQrCode's building skeleton sizes itself to the requested QR so
  resolving no longer shifts the pane ~96px

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 25, 2026 12:45

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@scotej, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 44 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 416fc6b5-d47c-45db-b1d4-cc6442a4f4d6

📥 Commits

Reviewing files that changed from the base of the PR and between eb74005 and 5a2d265.

📒 Files selected for processing (2)
  • src/components/PairQrCode.tsx
  • src/features/friends/AddFriendDialogView.tsx
✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch fix/add-friend-qr-overflow

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.

@scotej
scotej merged commit 4ebfed8 into main Jul 25, 2026
4 checks passed
@scotej
scotej deleted the fix/add-friend-qr-overflow branch July 25, 2026 12:49
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