Cleaner Web App

Cleaner channel preference

Each cleaner picks how they prefer to run walkthroughs — WhatsApp (plán) or the web app. Both channels stay active indefinitely; there's no forced migration.

Setting the preference

In the Teammate editor:

  • preferredCleanerChannelwhatsapp / web (default: whatsapp for legacy teammates, web for new ones).

The operator's dispatch action respects the preference:

  • whatsapp → sends the plán walkthrough message.
  • web → sends the Open cleaning app link + OTP.

Switching mid-flow

A cleaner can start in one channel and finish in the other. The shared cleaner_sessions row backs both — state is UNIQUE(taskId, teammateId).

Example:

  1. Cleaner starts the walkthrough on WhatsApp at 09:00; marks items 1, 2, 3 done.
  2. At 09:15 she opens the web app via the same OTP link the bot sent.
  3. The app loads the current state — items 1, 2, 3 already showing Done.
  4. She finishes the remaining items in the app and taps Finish cleaning.
  5. Operator gets ONE digest.

The reverse also works: start in the app, switch to WhatsApp if she runs out of phone battery and only WhatsApp Web works on the property tablet.

Server restart mid-session

If the server restarts mid-walkthrough, the cleaner doesn't lose progress — cleaner_sessions is durable (gh#524 Slice 1 lifted the in-memory walkthroughs Map into a real table). The cleaner can pause for ≥ 30 min OR survive a server restart and pick up where she left off.


Implements: gh#524 Slice 1 (cleaner_sessions table). Related: gh#249 (cleaner vacation/unavailability tracking — same teammate row).

Source: the FlatsBratislava operator manual.