Files
orca/src/shared
e49cab0a92 fix(workspace-board): paired hosts keep their own custom status columns (#34362)
* fix(workspace-board): paired hosts keep their own custom status columns

A desktop client grouped a paired host's workspaces with its local column
list, so cards in host-only columns (e.g. status-6) fell back to the default
column. Fetch each host's workspaceStatuses via the existing ui.get RPC and
merge them after the local columns for grouping, without persisting them.

Fixes #34227

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(workspace-board): keep paired host columns safe from local column edits

- Removing a local column resolves cards against the merged board list, so a
  host card in a host-only column is never rewritten.
- New column ids are unique against the merged list, not just local ones.
- The context menu status submenu and the closed-sidebar order use the merged
  columns too; the shared-status helper moves to the menu policy module.
- A host that sends no columns adds none instead of the defaults; identical
  replies keep the stored identity and out-of-order replies are dropped.
- The merged list is named boardStatuses and tolerates stores without the
  host fields, so the earlier WorktreeList fixture edits are reverted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(workspace-board): keep host cards whose host still defines a removed id

Removing a local column whose id a paired host also defines rewrote that
host's cards to the local fallback. Skip runtime-host cards when their own
host still has the column.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(workspace-board): keep host column ids in the composer and drop a retired host's columns

Creating from a host-only lane now keeps that column's status, a host that is
removed or re-paired to another machine no longer leaves its columns behind,
and the new tests use checked fixtures instead of casts.

Co-authored-by: Kooooojun <edisonhuang1122@gmail.com>

* fix(workspace-board): deliver a host's workspaceViewChanged so its columns refresh

Co-authored-by: Kooooojun <edisonhuang1122@gmail.com>

* fix(workspace-board): show and offer a paired host's columns only for that host's cards

The board adds a host's column only when one of that host's own cards uses it,
never the host's copy of the default column, so local cards keep falling back
to the local list. The context menu offers host columns only when every card
is on that host, the composer applies a lane's host column only when creating
on that host, and status writes drop another host's column id.

Co-authored-by: Kooooojun <edisonhuang1122@gmail.com>

* fix(workspace-board): read cards through the record selectors and skip foreign-lane drops

Board lanes and the context menu now leave out a host's copy of the default
column, so a host card's menu matches its lane. Lanes skip the card scan when
no host adds a column. A drop into another paired host's lane is ignored
instead of re-ranking the lane.

Co-authored-by: Kooooojun <edisonhuang1122@gmail.com>

* fix(workspace-board): sync tasks against every offered column and test host-lane drops

Task-status sync now finds a paired host's column that no card uses yet, as the
card's menu offers it. A write left empty after dropping another host's column
is skipped. New tests cover board and sidebar drops into a host-only lane.

Co-authored-by: Kooooojun <edisonhuang1122@gmail.com>

* fix(workspace-board): resolve host columns by runtime owner and compare mixed selections per card

A paired host's SSH workspace, which the host's runtime owns, now gets that
host's columns like its other cards. A mixed selection marks and moves each
card against its own host's columns. A status write for a card the store does
not know yet passes through unchanged.

Co-authored-by: Kooooojun <edisonhuang1122@gmail.com>

---------

Co-authored-by: Kooooojun <edisonhuang1122@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 03:02:14 -07:00
..
…