Skip to content

[address] modal for battery flow#39

Merged
divazbozz merged 5 commits intomainfrom
dz/modal-for-battery
Apr 2, 2026
Merged

[address] modal for battery flow#39
divazbozz merged 5 commits intomainfrom
dz/modal-for-battery

Conversation

@divazbozz
Copy link
Copy Markdown
Contributor

@divazbozz divazbozz commented Apr 1, 2026

Implementation

  • bring the address confirmation modal to battery flow

improvement to both battery & energy only flow

  • fix a problem where user x-out and click the same address selection without typing => this ensures the modal always pop up correctly
    • see inline comment for how this works

Testing

Screen.Recording.2026-04-01.at.4.04.41.PM.mov

Followups

  • I will work on unifying the battery flow & energy flow next week;

Open with Devin

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 1, 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: 8853f52a-458c-44cb-ac4c-6cacd46987ef

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 dz/modal-for-battery

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.

@divazbozz divazbozz changed the base branch from main to dz/modal-confirm-address April 1, 2026 20:53
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 potential issue.

View 5 additional findings in Devin Review.

Open in Devin Review

@divazbozz divazbozz force-pushed the dz/modal-for-battery branch from 407a944 to b1efe72 Compare April 1, 2026 21:04
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.

⚠️ 1 issue in files not directly in the diff

⚠️ AddressConfirmModal shows validation error styling and message immediately on mount, before user interaction (src/address-search/modal/AddressConfirmModal.tsx:62)

showLine2Warning at src/address-search/modal/AddressConfirmModal.tsx:62 is computed directly as requiresSubpremise && !line2.trim() on every render. Since the modal only opens when requiresSubpremise is true and line2 is typically empty (initialized from googleAddressComponents.line2 || ""), the error border, aria-invalid="true", and the "Please enter your apartment or unit number" message all display immediately when the modal appears — before the user has had any chance to type. The old inline code in EnergyOnlyAddressEntryFlow used a separate line2Error state (initialized to false) that was only set to true after the user attempted to submit without filling in line2. This is a UX regression: showing form validation errors before any user interaction violates standard form UX patterns.

View 7 additional findings in Devin Review.

Open in Devin Review

Base automatically changed from dz/modal-confirm-address to main April 1, 2026 22:13
@divazbozz divazbozz force-pushed the dz/modal-for-battery branch from 95d24b3 to 81121cd Compare April 1, 2026 22:20
devin-ai-integration[bot]

This comment was marked as resolved.

@divazbozz divazbozz merged commit 6cce255 into main Apr 2, 2026
2 checks passed
@divazbozz divazbozz deleted the dz/modal-for-battery branch April 2, 2026 01:02
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