Multi-Room Spatial Scanning UX: A State Machine Approach to Debugging Interactions
This article examines the interaction failures that appear when mobile spatial scanning moves from a single room to multi-room projects. It maps four observed defects to an explicit scan-session state machine, proposes quality gates, pause anchors, and reversible actions, and explains why review-before-coding with AI coding tools reduces rework. A reusable improvement checklist is included.
1. Background: What On-Site Work Actually Demands
In whole-home customization, interior design, and on-site room measurement, practitioners must show clients a perceivable spatial result within seconds, in front of the client. Traditional approaches rely on verbal description and hand-drawn sketches, which rarely let a client form a spatial image quickly. This is why a class of mobile spatial scanning tools is widely used: an operator walks through the space holding the device, capturing continuous frames and depth information, and the tool outputs a 3D scene plus a 2D floor plan while recording key dimensions.
These tools often perform well in a single-room scenario. Real projects, however, are almost always multi-room, spanning door openings, corridors, and irregular geometry. Once the flow becomes a continuous scan across several rooms, interaction complexity rises non-linearly: the lifecycle of the scanning session, coordinate system relocalization, room boundary segmentation, and information density on the result page all become experience bottlenecks. This article starts from observed behavior in a real multi-space continuous scan, abstracts a general problem model, and offers an actionable set of improvements.
2. What the Footage Showed: Four Defect Classes Across Five Continuous Frames
Stringing together start scan → scanning → single-room save → cross-space relocalization → 2D result, the problems cluster in four places.
The first is a completion check that is too permissive. One room reconstructed only about 0.3 square meters of fragmented geometry, yet the UI still showed a pass state and guided the user to the next room. This conflates “the flow can advance” with “the data is acceptable.”
The second is a mismatch between session lifecycle and user attention. The user paused at a doorway, the capture camera went to sleep, and on returning to the scanning state the system asked the user to go back to the original room — contradictory instructions.
The third is ambiguous operation semantics. In the relocalization step, the tap area of the highlighted button was bound to “create a new independent space.” A mis-tap split the current room into two segments that do not stitch together, with no explicit undo.
The fourth is information overload on the result page. More than twenty wall IDs covered the floor plan at once, obscuring the dimensions and topology the user actually needed to confirm.
3. Root Cause: Restating Interaction Problems as State Machine Problems
These are not isolated UI blemishes but external projections of unclear state definitions. A robust scanning session should explicitly model at least the following states:
Idle -> Scanning(roomId) -> Paused(reason) -> Relocalizing(from, to)-> RoomSealed(roomId, quality) -> Merging(topology) -> ResultView
Three constraints matter:
- Quality gates precede state transitions. Only when coverage, loop closure, and feature point count meet their thresholds may the session enter RoomSealed; otherwise it stays in Scanning and prompts for rescanning.
- A pause must carry a reason and a recovery anchor. Sleep, backgrounding, and poor lighting should be handled differently, and recovery should locate the “most recent valid pose” rather than unconditionally sending the user back to the start.
- Relocalization and creating a new space must be two semantically distinct actions, both with reversible operations.
Illustrative pseudocode:
def on_resume(session):if session.state == "Paused":if session.pause_reason == "camera_sleep":return relocalize(session.last_valid_pose)return resume_scan(session.room_id)def try_seal(session, metrics):if metrics.coverage < 0.8 or not metrics.loop_closed:return stay_and_hint("Rescan the missing areas")return seal_and_advance(session.room_id)
4. Design Review: Why Diagram First, Code Second
When complex pages are coupled with complex state, the rework cost of editing code directly is very high. A safer sequence is to have an AI coding tool, mounted with the local project code, first produce a problem breakdown and interaction diagrams; after human review approves them, coding begins. The value of this flow is moving the “understanding cost” to the front, avoiding patches stacked on a wrong mental model.
In testing, the same set of continuous frames and the same single spoken requirement were given to four differently configured AI coding tools (each set to its highest available thinking level), and a clear capability stratification emerged:
- UI noise reduction and before/after comparison output: lower-to-mid tier models were the most proactive, quickly producing information hierarchy and visual comparison proposals.
- Deep logic debugging: among the four high-configuration options, only one followed the source call chain and located the hidden defect that “tapping retry splits the room”; the other three stayed at surface-level suggestions.
The conclusion is not that one tier is stronger, but that task type determines the payoff of a tier: visual and information architecture tasks are insensitive to reasoning depth, while state machine and side-effect investigation depend heavily on long-chain reasoning and code context retention.
5. Reusable Improvement Checklist
- Completion visualization: replace the single pass indicator with a coverage heat map, and disable “next room” below the threshold.
- Enumerated pause reasons: prompt separately for sleep, permissions, lighting, and occlusion; anchor recovery to the most recent valid pose.
- Relocalization confirmation and an undo stack: any action that splits a room must be rollback-able.
- Tiered disclosure on the result page: show only topology and key dimensions by default, with wall IDs expanded on demand.
- Calibrate area estimation separately: scale drift in large spaces needs independent calibration and should not be lumped in with interaction defects.
- Review-driven development: diagrams and a problem list first, coding second, with review records included in the release notes.
6. Conclusion
The difficulty of multi-space scanning lies not in any single algorithm but in the completeness and reversibility of state transitions. Translating interaction defects into state machine constraints, closing them out along three main lines — quality gates, pause anchors, and undo semantics — and then using AI coding tools for upfront review can significantly reduce rework in complex interaction scenarios. The same approach applies to log services and monitoring alert integration on container platforms, for continuously observing session success rate and relocalization failure rate.
