Skip to content

(remote): every remote session shows Turn state unavailable since v0.0.96 #698

Closed

Description

@devsuitup

Since v0.0.96 every live remote session shows "Turn state unavailable" instead of Working / Waiting for input. Regression from dfe7a92 (#625/#638), first released in v0.0.96.

refreshRemoteHeadTurns (main.js:3145-3149 at v0.0.96) skips rows with !row.remoteAlias || row.isSidechain || row.archived, but getAllCached (SELECT * FROM session_cache, session-index-store.js:381) has no remoteAlias, isSidechain or archived column: a remote row is only identified by its folder key <alias>::<folder>, and archived lives in session_meta. So every row is skipped, taskRecords.readBatch is never called for a remote session, headTurn stays 'unknown', and public/session-state.js:196 shows the label. Local sessions are unaffected (get-task-snapshots filters on the folder key).

The test missed it because test/head-turn-review.test.js:189 stubs getAllCached with fabricated remoteAlias/archived fields.

Fix: derive the alias with parseFolderKey(row.folder), read archived state from session meta; test with rows from a real temporary store.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions