Skip to content

fix(control): stop stuck spinners and stale room state - #521

Merged
MrYuion merged 2 commits into
developfrom
fix/control-state-bugs
Oct 2, 2026
Merged

MrYuion merged 2 commits into
developfrom
fix/control-state-bugs

Conversation

@MrYuion

@MrYuion MrYuion commented Oct 1, 2026

Copy link
Copy Markdown
Collaborator

Several async actions left a spinner up forever when they failed: dialling, routing a source, joining a meeting, and the "Leaving" spinner after a hang-up. Cancelling the join confirmation threw an error, and confirming left the confirmation open. Old source bindings were never released, so after a room change or join the panel could show the previous room's sources. Volume or mute changes jumped the tabbed view back to the driver's tab. Idle and Disconnecting calls counted as active, and a far-end hang-up left the call page open. The lighting scenes button showed in every room. A failed system search threw in the bootstrap template.

Changes

  • Spinners: try/catch/finally with an error notification for dial, route and meeting join. The join flow checks for cancel first and closes the confirmation. endCall clears its spinner.
  • Stale sources: bindSources releases bindings for aliases that left the list.
  • Tab jump-back: the tab sync effect reads only selected_tab.
  • Call state: Idle and Disconnecting are not active calls. The call page leaves when the call ends remotely.
  • Lighting scenes: shown only when the room has scenes.
  • Bootstrap search: reads the resource with hasValue(), so a failed request shows no results.
  • New error strings in all 11 locales.

Testing

  • Unit tests for each fix (237 pass). All 12 new tests fail on the old code.
  • Tested in the running app: mock mode for driver behaviour, plus the local PlaceOS stack for bootstrap search (500 and bad-token cases). For each fix, the tester also reverted the change in the browser and saw the bug come back.
  • E2E (mock): 179 pass, 19 fail. The same 19 specs fail on every branch in this stack and on the commit before fix/control-ux-fixes (bootstrap host visibility, app routing timing, and Escape not closing tooltips, which the last PR in the stack fixes). None of them reach this change. They were not run on develop itself.

Merge order

2 of 5. Based on fix/control-security-camera. Next: fix/control-ux-fixes.


Changes made by Claude Opus 5.5 (1M context) in Claude Code, running in T3 Code.

🤖 Generated with Claude Code

- Release source bindings for aliases that leave the input/output list,
  so a room change or join no longer shows the previous room's sources.
- Only re-run the tab sync when the driver's `selected_tab` changes, so
  volume or mute updates no longer jump the user back to another tab.
- Clear the loading state and show an error when dialling, routing a
  source or joining a meeting fails. Close the join confirmation after
  joining, and check for a cancel before setting its loading state.
- Treat `Idle` and `Disconnecting` calls as ended, leave the call page
  when the far end hangs up, and clear the "Leaving" spinner.
- Hide the lighting scenes action when the room has no scenes.
- Read the system search result with `hasValue()` so a failed request
  shows no results instead of throwing in the template.
@vercel

vercel Bot commented Oct 1, 2026

Copy link
Copy Markdown

Deployment failed for project frontend-templates with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/placeos?upgradeToPro=build-rate-limit

@greptile-apps

greptile-apps Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium risk] Fixes UI state bugs in the video call and control interface.

The PR appears safe to merge; neither previous finding remains outstanding.

What we checked:

  • Call end leaves the page twice: Both can reach _onCallEnded(), but _left lets only the first navigate.

Summary

This PR fixes stuck loading states, stale room data, and call pages that stay open after a call ends. It also makes room controls and failed searches reflect the current room and available results.

  • Dial, route, and meeting actions now clear their loading state and show errors.
  • Source bindings, tab syncing, call status, and lighting-scene visibility now follow current room state.
  • Failed system and calendar requests show empty result lists.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Call is active] --> B{Call ends}
  B --> C[Clear loading]
  C --> D{Already left?}
  D -- No --> E{Redirect enabled?}
  E -- Yes --> F[Navigate to panel]
  E -- No --> G[Tab view removes call page]
  D -- Yes --> H[Do not navigate again]
Loading

Reviews (2) · Last reviewed commit: "fix(control): leave the call page once w..."

Comment thread apps/control/src/app/ui/select-meeting-modal.component.ts
Comment on lines 146 to +149
await spectator.component.endCall();
expect(call_state.hangup).toHaveBeenCalled();
expect(router_mock.navigate).not.toHaveBeenCalled();
expect(spectator.component.loading()).toBe('');

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Hang-up test misses call update

The new call-ended effect and endCall() can both call _onCallEnded() for one local hang-up. The test's mocked hangup() never clears call(), so it cannot catch two navigations if the real call status clears before the command finishes. Change call() during the hang-up test and check that the page leaves once.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in aba4a0c: the page now leaves only once (_left guard), and a new test clears call() during hangup() and checks for one navigation.

A local hang-up and the call status clearing could both navigate away.
@vercel

vercel Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
frontend-templates Ignored Ignored Preview Oct 1, 2026 3:23pm UTC

Base automatically changed from fix/control-security-camera to develop October 2, 2026 00:47
@MrYuion
MrYuion merged commit 0ae4407 into develop Oct 2, 2026
6 checks passed
@MrYuion
MrYuion deleted the fix/control-state-bugs branch October 2, 2026 00:48
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