Skip to content
This repository was archived by the owner on Sep 2, 2026. It is now read-only.
This repository was archived by the owner on Sep 2, 2026. It is now read-only.

Board state storage #2

Closed
Closed

Description

@64ix

Part of #1

Question

Where does the workflow board's state live in Orca: declared stage per task, column order, hidden/ghost state?

Candidates:

  • orca-data.json (Orca-native): Worktree.workflowStage + a persisted UI-side column order (list of ids per column). No new infra; matches Orca's "all durable state in the profile JSON" model; a pre-alpha sketch of the derivation already lives in src/shared/workflow-stage.ts (untracked on the working branch).
  • Dedicated SQLite DB (emdash model): triggers, transactions, fractional ranks — robust but foreign to Orca's state model and doubles persistence paths.
  • Hybrid / other.

Ranking: column order as an explicit ordered list vs fractional indices. What survives restarts, renames, deletes; what the sync ticket needs.

Context: decision Q4 of the charting grilling. Blocks every board-side ticket.

Activity

  1. added
    wayfinder:grilling
    on Aug 12, 2026
  2. self-assigned this
    on Aug 13, 2026
  3. 64ix commented on Aug 13, 2026

    @64ix
    OwnerAuthor

    Part of #1

    Question

    Where does the workflow board's state live in Orca: declared stage per task, column order, hidden/ghost state?

    Candidates:

    • orca-data.json (Orca-native): Worktree.workflowStage + a persisted UI-side column order (list of ids per column). No new infra; matches Orca's "all durable state in the profile JSON" model; a pre-alpha sketch of the derivation already lives in src/shared/workflow-stage.ts (untracked on the working branch).
    • Dedicated SQLite DB (emdash model): triggers, transactions, fractional ranks — robust but foreign to Orca's state model and doubles persistence paths.
    • Hybrid / other.

    Ranking: column order as an explicit ordered list vs fractional indices. What survives restarts, renames, deletes; what the sync ticket needs.

    Context: decision Q4 of the charting grilling. Blocks every board-side ticket.

    Resolution (grilling, 2026-08-13)

    1. Declared stage lives on WorktreeMeta.workflowStage (orca-data.json)

    • New optional field on the persisted per-worktree meta (src/shared/types.ts:625), Orca's standard pattern: defaults-merge, no schema bump, atomic durable writes.
    • Survives worktree renames for free: moveKey rekeys worktreeMeta on move (src/main/persistence.ts:5677), lineage kept via priorWorktreeIds.
    • No dedicated SQLite: the only Orca app DB is orchestration.db (agent-runner ledger, src/main/runtime/orchestration/db.ts:324); JSON + LWW per key is the sync-ready shape for Multi-machine sync architecture #12.

    2. Column order = explicit ordered list of worktree ids per column, in PersistedUIState (ui), keyed per project. Not fractional indices (board_rank is a relational-DB design; JSON stores order directly). Sits beside existing board prefs (workspaceBoardOpacity, workspaceBoardColumnWidth, src/shared/types.ts:3486-3488).

    3. Hidden Tasks replaced by archiving (board sink) — no hidden concept survives.

    • Reuse existing isArchived (WorktreeMeta, already filtered from the sidebar everywhere — src/renderer/src/components/sidebar/visible-worktrees.ts:224).
    • The board renders archived worktrees in a collapsed "Archived" sink section; restore in one click from there. Restore affordance is a board-view requirement (rides into Board view: columns, DnD, filters #7).
    • emdash's "hidden but still a board card" is dropped: sidebar groups are collapsible anyway, and the sink keeps archived cards reachable.

    4. Ghost cards kept as "quick grab"; storage is minimal.

    • Candidates are runtime-derived, not persisted: open issues on the origin repo minus issues already linked via linkedIssue.
    • Grab = Orca's existing "Use issue" flow (worktree + branch + agent), created at stage idea.
    • Only durable state: dismissed issue ids — a set in ui per repo (user intent, not remote cache → not the githubCache sidecar).
    • emdash's marker/inbox machinery is replaced by the capture/triage label model (needs-triage/ready-for-agent/ready-for-human, [Spec] prefix) — detail belongs to GitHub inbound: ghost cards, link suggestions, issue grabbing #8.

    Renames/deletes: stage rides renames via moveKey rekey + priorWorktreeIds; stale ids in column lists are filtered at read (no eager pruning).

    Note: the audit's DÉCISION block (2026-08-12) was treated as opinion per the user's instruction; points 3 and 4 deviate from it by design.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

wayfinder:grilling

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions