Skip to content

Device list shows 'Interviewing' for fully online devices #101

@tashda

Description

@tashda

Summary

After joining a new device, the device list keeps showing the device as Interviewing even though the device is online and the device card (and the actual device) say Online. The two views disagree on the same underlying state.

Root cause

Modern Z2M replaced the legacy boolean pair interviewing / interview_completed on device records in bridge/devices with a single enum field interview_state (PENDING / IN_PROGRESS / SUCCESSFUL / FAILED). The Z2M frontend now reads only interview_state.

Shellbee's Device model only decodes the legacy fields:

  • Shellbee/Core/Models/Device.swift:16-17,57

On a current Z2M build, a successfully-joined device arrives with interview_state: "SUCCESSFUL" but the legacy interview_completed may be absent or stuck false. That makes the two view layers disagree:

  • Shellbee/Shared/Components/DeviceCard.swift:302 checks only device.interviewing (false) → shows Online. Accidentally correct.
  • Shellbee/Features/Devices/DeviceRowView.swift:55 checks device.interviewing || !device.interviewCompleted (true) → shows Interviewing. Wrong against modern Z2M.

Fix

  1. Add an interviewState: InterviewState? enum on Device that decodes interview_state.
  2. Add a single Device.isInterviewing accessor that prefers interviewState when present and falls back to the legacy pair.
  3. Replace every existing site that reads the legacy fields directly with the unified accessor (DeviceRowView, DeviceCard, DeviceListView, AppStore+Events, HomeSnapshot, etc.).
  4. Update the seeder fixtures so the mock bridge emits interview_state.

Repro

  1. Pair a new device against a recent Z2M (>= the version that introduced interview_state).
  2. Confirm channel and finish pairing.
  3. Device card → Online. Device list row → Interviewing. Mismatch persists indefinitely.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions