Repository navigation
feat(mocks): show the same buildings, rooms and staff as the other PlaceOS apps - #339
Merged
Merged
Conversation
…aceOS apps The backoffice demo used its own org, zones, systems and users, so it did not match the user-interfaces demo apps. The mocks now use the zones, rooms and staff of the user-interfaces mocks. `bun config/sync-ui-mocks.ts` makes them again when those mocks change. The old AV systems now give modules and settings to 25 of the UI rooms. The e2e specs use the new names and IDs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
The backoffice demo had its own org, buildings, rooms and users, so it did not match the other PlaceOS demo apps. You saw "Tower 2" and "2.30.08 - Activity Space" here, but "Innovation Hub" and "Sydney Harbour" in workplace.
The backoffice mocks now use the zones, rooms and staff of the user-interfaces mocks: PlaceOS Global, 2 regions, 5 buildings, 21 levels, 168 rooms and 86 staff. The signed-in user is Sarah Chen, the same as in the UI apps.
How
bun config/sync-ui-mocks.tsruns the user-interfaces mock generators (origin/developof../user-interfaces) and writessrc/app/mocks/data/ui-mocks.ts. The UI mocks use a seeded random function, so the script runs them instead of copying their source. The output is the same on each run. The script does not change the user-interfaces checkout.data/systems.ts), so the module and control pages still have content.Two fixes to the UI data
The script makes two changes to the UI data, because the UI mocks have two bugs:
bld-01_lvl-0instead ofbld-01_lvl-G). The script changes them to the real level, so level pages list their rooms.@(test.space.1@@place.tech). The system form rejects these emails, so the script removes one.Testing
Created with Claude Opus 5.5 in Claude Code.
🤖 Generated with Claude Code