Shop room: arrange panel slides out inside the room and waits for Save room - #1057
Merged
Merged
Conversation
The Arrange panel now opens inside the room's scene with the generators' shared look: Furniture, Goods and Decorations each have a keep pin and a reroll dice, with "Reroll the rest" above them, replacing the tick box and the three large generate buttons. Changes no longer save on every roll; they wait for "Save room", and Cancel or Discard puts the room back as it was last saved. Leaving Arrange with unsaved changes (the Shop tab, the close button, Escape or a press outside the room) shakes the panel and shows "Not saved yet" instead of closing. Refs #1026 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WEm4RH9mQFdTmye7jYjkou
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: none
Security implication: none. This is client-side widget UI only. The room is still saved through the existing room endpoint, and the buying code is untouched.
Consumer-verified: n/a
Mockup: Sign-offs card
gen-family, "Shop" tab of https://claude.ai/artifact/Tbkq94PxdMmcYKUCnnpeiq. The operator approved the shop room as shown.What this changes
Before:
After:
Why
Issue #1026 asks that the generators share one look and never lose unsaved work on a click-away. This uses the same pin, dice and "Not saved yet" pattern as the calendar wizard (#1042).
Load-bearing lines, all in
static/js/widgets/shop_room.js:save()now only marks the room as changed.saveRoom()does the PUT, and nothing else writes.tryLeave()anddiscard()drive the guard.discard()restores the room fromsavedLayoutthroughfromLayoutandroom.geometry().onOutsideDownis a named document listener, removed in cleanup, sowidget_listener_leaksstays green.Honest deviations: none from the signed mockup. The Foundry module vendors this file, so its copy needs a refresh after merge. The "Shop room in Foundry" thread owns that.
Test plan
node --test test/js/*.test.mjs: 434 pass, 0 failTenet self-check