Skip to content

fix: address #200, #201: Location handling on the Loads page - #205

Merged
t-kramer merged 3 commits into
developmentfrom
location-issue-fix-#201
Oct 13, 2026
Merged

t-kramer merged 3 commits into
developmentfrom
location-issue-fix-#201

Conversation

@t-kramer

Copy link
Copy Markdown
Collaborator

The location (city, climate zone, CA climate region and grid region) can come from the selected load profile or from the optional location search. The two paths behaved differently and could get out of sync. This PR makes the behaviour consistent.

Behaviour

  • A manual location stays fixed until cleared. Changing the load profile keeps a location picked in the search. Clearing the search goes back to the load profile's location.
  • A location change always updates all fields together: city, ASHRAE climate zone, climate region display (with "CA Region N" for California) and grid region.
  • The override is saved with the session, not read from the dropdown. It survives leaving and coming back to the page, and the dropdown shows the saved location again.
  • A custom upload clears the location unless one was set manually, and the user is asked to pick one.

I also added a small one-liner below to the search bar to indicate the current status. See different cases in screenshots down below.

Data

  • building_metadata.csv: new ca_climate_zone column for all California buildings. DEER buildings use the CEC reference cities, and Los Angeles uses CZ9 (downtown) @jiwonpark-HVAC Important for the next load library update!!
  • locations.csv: San Francisco climate zone corrected from 4C to 3C.

UI

  • The search description is down to one sentence. The rest is a hover tooltip.
  • A short note under the search shows the source: "Location based on load profile", or "Location manually adjusted to X ✓" in green. An orange warning appears when there's no grid region.

Note

If building_metadata.csv is generated by an external pipeline, the ca_climate_zone column has to be added there too.

Screenshot 2026-10-12 at 5 10 11 PM Screenshot 2026-10-12 at 5 10 32 PM Screenshot 2026-10-12 at 5 10 47 PM

@t-kramer
t-kramer requested review from praftery and urwahah October 13, 2026 00:12
@t-kramer t-kramer self-assigned this Oct 13, 2026
@t-kramer t-kramer added bug Something isn't working CALNext In scope of CALNext project labels Oct 13, 2026
@coderabbitai

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

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: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 867325b2-9e65-4710-a864-dd1dd62c145e

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
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@urwahah

urwahah commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator

your solution looks good to me! the only thing i'm not seeing when i run it is your note about the override being saved with the session. if i override the location, then return to the loads page, the location seems to reset to the load metadata default.

@t-kramer

t-kramer commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator Author

your solution looks good to me! the only thing i'm not seeing when i run it is your note about the override being saved with the session. if i override the location, then return to the loads page, the location seems to reset to the load metadata default.

@urwahah Oooops, forgot to stage the last changes and commit. Just updated the PR, should be complete now!

@t-kramer
t-kramer merged commit 4ad3609 into development Oct 13, 2026
2 checks passed
@t-kramer
t-kramer deleted the location-issue-fix-#201 branch October 13, 2026 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working CALNext In scope of CALNext project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants