Repository navigation
fix(rooms): let a name that differs only in case update the room's spelling - #272
Open
kris-anderson wants to merge 1 commit into
Open
kris-anderson wants to merge 1 commit into
kris-anderson wants to merge 1 commit into
Conversation
…elling upsert_inventory_room matches an existing room ignoring case so a room isn't created twice, but it returned and kept the stored spelling, so a rename that only changes capitals came back unchanged. Store the new spelling on the matched room; its id and created=false stay the same. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the change enabling case-only room renames.
No open issues 🎉
What changed in this PR
Fixes #271 by allowing case-only room name changes through the existing room creation endpoint, while preserving the room’s ID and existing segment references.
Changes:
- Store and return the requested capitalization when an existing room matches ignoring case, keeping
created: false. - Add a regression test covering the response and persistence in both inventory room lists.
| File | Description |
|---|---|
tests/test_admin_api.py |
Tests case-only renaming, stable room ID, and persisted spelling. |
src/roborock_local_server/bundled_backend/https_server/routes/user/homes/service.py |
Updates an existing room’s spelling on a case-insensitive match. |
Review effort: Balanced
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #271
upsert_inventory_roommatches an existing room ignoring case so a room isn't created twice, but it returned and kept the stored spelling. A rename that only changes capitals, such as "Master bedroom" to "Master Bedroom", came back unchanged, and no other route renames a room.Change
createdstaysfalse, so segments that already point at the room keep working.Testing
test_create_room_with_new_capitalization_updates_existing_room: fails onmain, passes with this change.uv run pytest -q: 486 passed.🤖 Generated with Claude Code