Skip to content

Fix energy-only autocomplete overflow on mobile#36

Open
divazbozz wants to merge 11 commits intomainfrom
codex/fix-energyonly-autocomplete-overflow
Open

Fix energy-only autocomplete overflow on mobile#36
divazbozz wants to merge 11 commits intomainfrom
codex/fix-energyonly-autocomplete-overflow

Conversation

@divazbozz
Copy link
Copy Markdown
Contributor

@divazbozz divazbozz commented Mar 19, 2026

Summary

  • allow the energy-only autocomplete flex item to shrink within its mobile column
  • prevent long selected addresses from forcing the column wider than the viewport
  • keep the existing truncation behavior instead of letting layout blow out

Testing

  • not run (local lint is currently blocked by pre-existing Biome config/index.html issues)

Open with Devin

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 19, 2026

Important

Review skipped

Auto reviews are disabled on this repository. To trigger a review, include rabbit in the PR description. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 51c7bcb3-2417-4f9a-ba0a-6fd023040ce4

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/fix-energyonly-autocomplete-overflow
📝 Coding Plan
  • Generate coding plan for human review comments

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

@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 bugs or issues to report.

Open in Devin Review

@divazbozz divazbozz force-pushed the codex/fix-energyonly-autocomplete-overflow branch from d9638c1 to a78a1da Compare March 19, 2026 23:45
divazbozz and others added 3 commits March 19, 2026 18:53
Change inputPositioner from position:absolute to position:fixed so it
is viewport-relative and cannot push the document's scrollWidth. Update
JS position calculations to use viewport-relative coords (getBoundingClientRect
values directly, no scrollY/scrollX offsets) to match fixed positioning.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add min-width: 0 to energyOnlyContinueButton to override browser default
min-width: min-content on buttons, and overflow: hidden to energyOnlyForm
to prevent flex column children from causing horizontal page overflow.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@divazbozz divazbozz force-pushed the codex/fix-energyonly-autocomplete-overflow branch from 399b24c to 83763fa Compare March 20, 2026 03:01
Copy link
Copy Markdown

@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 found 1 new potential issue.

View 9 additional findings in Devin Review.

Open in Devin Review

overflow: hidden;
min-height: 64px;
min-width: 0;
pointer-events: none;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔴 pointer-events: none on .inputContainer blocks all mouse interaction with the overlay's input and CTA button

The newly added pointer-events: none on .inputContainer (styles.module.css:73) applies to all elements with this class, including the interactive input container inside the ComboBoxOverlay portal (Autocomplete.tsx:216). Since there is no pointer-events: auto override on any child element (verified by searching the entire src/ directory), the <input>, <CtaButton>, and all other children inside the overlay's .inputContainer are completely non-interactive to mouse/touch events.

The pointer-events: none was likely intended only for the hidden positioning reference container in the Autocomplete component (Autocomplete.tsx:352, which already has visibility: "hidden"), but since both containers share the same CSS class, the overlay container is also affected.

Impact by flow
  • Desktop battery flow: The widget is completely non-interactive. The only visible input is inside the overlay's .inputContainer (pointer-events blocked), the hidden reference has visibility: hidden, and the mobile CTA button has display: none on desktop.
  • Energy-only flow: The autocomplete input cannot be clicked at all (though handleContinue at Autocomplete.tsx:209 can programmatically focus it via line1Ref).
  • All flows after activation: Users cannot click within the input to reposition the cursor or select text with the mouse.
Prompt for agents
The `pointer-events: none` on `.inputContainer` in src/address-search/styles.module.css:73 needs to be scoped so it only applies to the hidden positioning reference container in the Autocomplete component (src/address-search/Autocomplete.tsx:352), not the interactive overlay container in ComboBoxOverlay (src/address-search/Autocomplete.tsx:216). Options:

1. Move `pointer-events: none` to an inline style on the hidden reference div at Autocomplete.tsx:354, e.g. `style={{ visibility: 'hidden', pointerEvents: 'none' }}`.
2. Create a separate CSS class (e.g. `.inputContainerHidden`) for the positioning reference div that includes `pointer-events: none`, and keep `.inputContainer` interactive.
3. Add `pointer-events: auto` to the children inside the overlay's `.inputContainer` (the input and CTA button), though this is fragile.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

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.

1 participant