Skip to content

Switching floors from outside takes you into that floor's elevator - #193

Merged
webdevcody merged 1 commit into
mainfrom
office/widget-72eb
Sep 30, 2026
Merged

webdevcody merged 1 commit into
mainfrom
office/widget-72eb

Conversation

@webdevcody

Copy link
Copy Markdown
Contributor

Out on the street, the balcony, the golf course or down in the garage, picking another project from the floor list in the top-left corner looked like it did nothing.

Why: the floor list keeps you on the same spot on the other floor. Outside the office's walls, that spot looks the same on every floor. The street, the golf course and the balcony are identical, so you stayed outside with only the name in the corner changing.

Now: if you're outside the office on your floor, picking a floor rides the elevator. The lights dip, then you step out of that floor's car with the doors opening and a ding, the same as the elevator panel does from anywhere. Inside the office (the back office too, as far as it's built out), switching still keeps your spot. The roof and maps of their own work as before.

  • src/client/main.ts: new indoors() (within the office's walls at floor level, or in the built-out back office). switchFloor hands off to ride() when you're outside.
  • src/client/ui/floormenu.ts: from outside, the floor item's tooltip says "Go to X, in its elevator" instead of "right where you're standing".
  • docs/features.md: the floor-list paragraph describes what happens from outside.

Verification

  • npm run typecheck, npm run build and npm test (411/411) all pass.
  • Headless-browser smoke on a two-floor office (floors.json fixture), using __office.switchFloor:
    • street → beta: arrived in beta's elevator car at (8.5, 0, −11.87) ✅
    • balcony → beta: arrived in the car ✅
    • garage → alpha: arrived in the car on the floor, not in the garage ✅
    • indoors (0, 0, 2) → alpha: stayed at (0, 0, 2) ✅ (unchanged behavior)
  • A screenshot after the street switch shows you in beta's car with the doors open.

🤖 Generated with Claude Code

Picking a floor from the project list keeps you on the same spot. Out on the
street, the balcony, the golf course or down in the garage, that spot looks the
same on every floor, so switching seemed to do nothing. From outside the office
it now rides the elevator and you step out of that floor's car. Indoors it
still keeps your spot.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@webdevcody
webdevcody merged commit 01c1b75 into main Sep 30, 2026
1 check passed
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.

1 participant