Archived simulation UI (superseded)
Historical implementation record only. The simulator code and controls are removed. See the current README for FIPS usage.
Local-first SQLite boards, hierarchical todos and immutable semantic events. The real UI includes a removable three-peer simulation and explicit title/details/status conflict resolution. Real FIPS transport and deletion/hierarchy merge remain future work.
Simulate syncing in the real UI
- Open
/teams-todo list, select Peer A, and create a new board. - Add todos/children and edit their titles or statuses. Changes save only in A.
- Click Send updates to release A's events. Unsent changes cannot be pulled.
- Select Peer B. Its board/todo state is independent. Open the published board
from the boards list, or use the same
/teams-todo show <board-id>. - Click Sync. Events appear in Incoming, stored in a separate inbox database. Sync does not write those events or entities into B's database.
- ✓ Accept the board creation, then accept each todo/change you want, in prerequisite order. Each acceptance transaction writes that event and updates its entity. Decline leaves B's database unchanged. Declined items can be explicitly accepted later.
- Repeat with Peer C, or edit on B and send/sync back to A. Conflicting title/details/status changes open an inline resolver; the chosen result becomes your own immutable event.
Check before changing or sending
Board views check released publication counts every five seconds without staging or accepting anything. Sync (N) appears only for available updates; a nonzero N awaiting review count covers pending proposals across all review pages.
List and board views use one compact header: title, native peer dropdown, and ⋮. The menu holds Boards (on board views), Sync now (even with zero known updates), and both reset previews. Send updates (N) appears only for unsent own-origin events. The extra action row disappears entirely when idle, including zero counters. A visible but blocked Send button explains that incoming changes need review first.
Before each local todo mutation and Send updates, the backend performs a Sync preflight. Any pending board-local proposal or remaining unpulled batch blocks the edit/publication until reviewed (accept, resolve or explicitly decline). Existing unsent work is retained. Visible edit/send controls are disabled while known updates await Sync/review; the backend also catches updates released after that view was rendered. Resolutions Sync first too, but can proceed while other proposals remain; sending still waits for their review. This encourages the editing peer to resolve conflicts before publishing. Simultaneous edits can still conflict, and another receiving peer can still resolve them.
Incoming summaries and resolution
Incoming rows show one contextual sentence, not raw JSON: for example, Peer B changed “Item-1” status from Pending to Done. Exhaustive operation summaries use the event's original context, not the receiver's subsequently changed value. Left-side ✓ / ✗ icon buttons have accessible labels and tooltips. Concurrent rows and affected local todos are red with a text label, including conflicts across pages.
✓ accepts a compatible change, or opens an inline resolver for conflicting title/details/status.
Choose the final status or edit the final title, then Resolve. One peer transaction
accepts the competing source unchanged, creates todo.resolve under your identity with
both branches referenced, and applies the result. Keeping the current value also records
a resolution. Stale forms are rejected; retries finish external inbox decisions safely.
Use Send updates to share your resolution. Independent fields and equal concurrent
values can be accepted without choosing an arrival-time winner; local subsequent edits
reference all accepted entity heads.
On another peer, a received resolution may need staged edit context. ✓ opens a panel listing each missing event as an initially unselected checkbox. Every listed event must be explicitly selected; only then are those source events and the resolution accepted atomically. Creation/unavailable prerequisites still require separate review/Sync. Authors are preserved and context is pulled directly from its original publisher. Delete/edit and hierarchy conflicts remain blocked rather than silently overwritten. Review/preflight failures render inline with the board instead of disappearing on refresh.
Sync stages at most 200 released events per origin/board per call. Repeat Sync for larger histories. Incoming review has Previous/Next pages of 200 items, with pending items before declined history. Receipt cursors advance independently of acceptance, so declined or pending items are not repeatedly downloaded. Items with unaccepted prerequisites wait; accepting a prerequisite does not automatically accept its descendants.
The peer selector switches actual peer databases, not just the author label. Actions capture their originating peer so a later selector change cannot redirect an edit or review into another peer's store. Successful local edits immediately return that peer's updated board view. Incoming review appears above the task tree when present; an empty inbox is hidden.
Todo controls
- The compact ⋮ menu starts with Add child…, Add sibling…, then Update. Update opens a modal with title and optional details, Save and Close, plus collapsed creation metadata. Add actions retain their local inline panels. Siblings use the current item's parent. Items with details show 📝, opening the same editor. There are no Move up/down entries or keyboard reorder shortcuts.
- Details are shared task content (up to 50,000 characters), saved with explicit
todo.detailsevents. Saving only emits events for changed fields; changing title and details commits both field events atomically. Recipients still review each event. Empty details clears them. Failed/stale saves retain the draft in the modal; successful saves show feedback and a fresh revision. Close refreshes the originating peer board. - The regular Todo-style retro checkbox opens a status menu with In Progress, Done and, when applicable, Pending. Opening it does not change status.
- Add a new root item is at the bottom and reveals its form panel on demand.
- All submitted UI commands use
recordInTimeline: false. Opening/closing panels is a client-local reveal action; forms retain their board and peer context.
Personal order, branch winners and champion
Prioritization is local to the selected simulated peer and board. It creates no semantic events, publications or incoming proposals, and remains available while shared incoming changes await review. Regular Todo is unchanged.
- Drag the ⠿ handle on an active root to reorder its entire subtree. This never reparents items. New roots append; completed roots stay visible after active roots, outside dragging/champion selection. Branch winners display first within their sibling group; the remaining siblings keep their stable relative order. This is derived display ordering, not another preference write or shared reorder event.
- Choose branch winners directly, without pairwise duels, win rates or reordering the losing alternatives. Picking mode highlights the current parent and places accent Keep / Pick buttons beside its candidate rows, following regular Todo's picking UI. Status checkboxes are read-only in this mode. Parent ⋮ → Pick winner… enters it manually at any time. The current branch and its ancestors expand once for each review, placing Keep/Pick directly in view without a separate picking/Done panel. Later polling preserves any branch you collapse yourself. A blocked parent first opens its next lower branch that needs a choice. There is no winner dropdown.
- The champion is the final actionable item reached from the first active root through confirmed branch winners. A branch with one child is initially automatic; multiple alternatives need an explicit choice. Unresolved lower branches are reviewed before their parents; no arbitrary first child is silently chosen.
- Accepted candidate title/details/status edits (including reverted values) and sibling additions/ removals require reconfirmation. Use the candidate row's Keep or Pick button. Keeping an unchanged representative does not invalidate the parent. A changed winner or representative propagates review one level upward after each confirmation.
- An ineligible previous winner cannot be kept. Staged/declined events do not invalidate personal choices; accepting a task change does. Stale order/winner actions are rejected.
Winner titles and the entire champion path use var(--color-accent) rather than text badges. The champion's title
is prefixed with 🏆. Reorderable trees reserve the handle gutter on child rows too,
so the handle does not cancel out their indentation.
Preferences live in recipient/board-scoped personal_root_order and
personal_branch_winners tables in transport.sqlite, outside peer event databases.
Read-only derivation never saves choices. Peer/all resets clear the corresponding
preferences along with the existing simulation state.
Start from scratch
In the header ⋮ menu, use Reset this peer… or Reset all peers…. Both show their scope before confirmation. Command equivalents:
/teams-todo reset --peer b --confirm
/teams-todo reset --confirm
Reset this peer clears only the selected peer's boards, todos, events, publications, recipient inbox/decisions and personal priorities, leaving it selected. Other peers' databases and their already-received proposals remain. Transport cursors involving the reset peer restart, so it can pull other origins again and its new publication positions are not skipped. Resynced incoming items still require acceptance; its erased own-origin history is not reconstructed from other peers.
Reset all peers clears all three peer databases and the whole inbox, including
publications, decisions, cursors, personal priorities and selection. It returns to empty Peer A. Use this
for a completely clean simulation. FIPS identity/pairing and other apps are unaffected.
Without --confirm, either command only previews the scope. Normal immutable-event
guards are restored after reset.
Commands
All commands use the existing teams-todo entrypoint. --peer a|b|c selects the
simulated peer; on list/show it changes the persisted UI selection. Actions capture
their actor/recipient. Successful local web edits focus that peer's updated board;
Ordinary CLI mutation flags do not change the default peer; reset selects its cleared
peer, or A when resetting everything.
| Command | Purpose |
|---|---|
list [--peer a|b|c] |
Accepted/local boards and other published board IDs |
show <board> [--peer a|b|c] [--page <n>] [--pick <parent-uuid>|off] [--status pending|in_progress|done|all] [--flat] [--champion] [--board-details] [--recent-activity] |
Peer-local tasks (with filter/view/details panel), incoming review and optional winner picking mode |
new <title> [--peer a|b|c] |
Create a board and its source event immediately |
add <board> <title> [--parent <todo>] [--peer a|b|c] |
Create a todo/child and event |
details <board> <todo> [--peer a|b|c] |
Open the details/editor, or show details and metadata in CLI |
update <board> <todo> [--peer a|b|c] |
Open the title/details editor |
update <board> <todo> --save --title <title> [--details <text>] [--revision <hash>] [--peer a|b|c] |
Save the complete form; omitted/empty details clears them |
order <board> --items <root> … --revision <hash> [--peer a|b|c] |
Save personal active-root order from the reviewed snapshot |
winner <board> <parent> <child> --snapshot <hash> [--peer a|b|c] |
Choose or reconfirm a personal branch winner |
title <board> <todo> <title> [--peer a|b|c] |
Change a todo title |
status <board> <todo> pending|in_progress|done [--peer a|b|c] |
Change status |
done|undone|delete <board> <todo> [--peer a|b|c] |
Change completion or soft-delete a leaf todo |
send <board> [--peer a|b|c] |
Release that peer's own unsent origin events |
sync <board> [--peer a|b|c] |
Pull released origin events into the separate inbox |
accept|decline <board> <event> [--peer a|b|c] |
Explicitly review one staged item |
accept <board> <resolution-event> --reviewed <event> … [--peer a|b|c] |
Explicitly select each staged edit prerequisite of a received resolution |
resolve <board> <event> [<value>] --heads <head> … [--peer a|b|c] [--resolution <uuid>] [--clear] |
Resolve title/details/status; details can explicitly resolve empty with --clear |
peers |
Show fixed fixture identities and current selection |
reset [--peer a|b|c] [--confirm] |
Preview/reset one peer, or omit --peer to reset everything |
help |
Command summary |
Delete live children before deleting their parent. Entity pubkey remains its
creator; subsequent events retain their own actors. Timestamps are Unix milliseconds,
not causal conflict resolution. There are no entity signatures.
Persistence and ownership
- Peer A:
data/entities.sqlite. - Peer B:
data/peer-b.sqlite. - Peer C:
data/peer-c.sqlite. - Separate inbox/control:
data/transport.sqlite, containing recipient-scoped proposals, review status, durable receipt cursors, UI peer selection and private priorities.
Each peer stores only locally authored or explicitly accepted entities/events. Publication metadata is local to its origin. Sync reads released events, never raw SQLite/WAL files; it never forwards another peer's history as its own.
commands/peers/playground.ts supplies fixture identities. simulation.ts provides
the removable in-process delivery adapter; task and review handlers do not require
that adapter. Replace it with authenticated direct-origin FIPS delivery after UX is
settled. Pairing, grants and real network onboarding remain future integration work.
Verification and plans
Targeted lint, generation and one-off in-memory command/UI-schema checks passed. Checks cover independent stores, unsent isolation, separate staging, decline without peer writes, individual acceptance, prerequisite blocking, retry/deduplication, conflict resolution/propagation, explicit context review, schema upgrade and origin-only publication. TypeScript reports only the three existing FIPS vendor errors. Authenticated visual UX remains owner acceptance.
The old xitdb implementation, commands, protocol, dependencies and data have been removed. Historical evidence is retained only in explicitly archived documents. See implementation progress, architecture, schema contracts and locality.