Skip to content

feat: show a board as a View that follows the agent's edits - #6

Merged
HyunjunJeon merged 9 commits into
mainfrom
feat/board-view
Nov 13, 2026
Merged

HyunjunJeon merged 9 commits into
mainfrom
feat/board-view

Conversation

@HyunjunJeon

@HyunjunJeon HyunjunJeon commented Nov 13, 2026 •

Copy link
Copy Markdown
Owner

Related: mission-6 node view (boards in Hide itself), after node record (#3), node look (#2) and node hide-ai (#5, merged in); nodes keep and teach build on it.

Summary

An agent's board had no screen: a Markdown file tab reads its file once, so an edit made after the operator looked never reached them.
A board now opens as a View of its own kind. hide board new opens it (unless --no-open), it waits in Needs You as 볼 것 · <title> until the operator looks, and each later hide board edit is drawn in place, even after they looked, because the View holds only the board's id and draws the board from the snapshot's new rest.boards field.
hide board open brings it back or forward and makes a seen board news again; an edit never does. After a restart each open board's View is back in its area with its unseen record, kept in the board's own record so workspace-views.json never holds a board.

No screenshot: captures are kept in the mission's run folder; the fork has no image uploader

What nodes keep and teach build on:

  • The open path: BoardCommand::Open { board } and New { no_open }; the core opens through Action::OpenBoard and workspace_control_action, answering view: {"id","open":true,"unseen"} (or {"open":false,"reason","next_action"}).
  • Swapping a display in place (keep): a board display is DisplayKind::Board with board: Some(id) and the title in title; replace it in its area at its index with place_document, and sync_board_views drops its hint once no display shows it.
  • The head's controls slot (keep): BoardDisplay in web/src/ViewAreas.tsx passes no controls to BoardView yet; feed 파일로 남기기 and 지우기 there.
  • What keep inherits: an agent's delete leaves the View unavailable with board_deleted (closing it is keep's); boards are out of is_output, so the session record has no board tile yet.
  • teach: the commands to teach are hide board new … --file and hide board open <id>; hide board help already says what each does.

Review

  • Decide (settled by the Conductor): the drawing session and its ancestors open a board; an ancestor's open puts it in the ancestor's checkout as the ancestor's View to look at, which is how a parent shows the operator a child's board. An agent that only shares the checkout gets board_not_yours.
  • Decide: with a board shown in two checkouts, edit, set and list answer the View in the board's own checkout, and only that View comes back after a restart; an ancestor's View does not.
  • Decide: new keeps the board when its View cannot open (view_limit, views_unavailable) and says why in view, instead of refusing the board.
  • Decide: the board's View carries the same look mark a file does; the phone lists no board, so a phone row whose only unseen View is a board shows look and opens the conversation.
  • Risky files: hide-core/src/runtime/boards.rs - under Mutex<Runtime>, refresh_boards walks the front layout (at most 32 displays) on each snapshot read and draws again only a board that moved; sync_board_views walks every layout once per layout save; no I/O, the board folder's save thread writes.
  • Risky files: hide-core/src/runtime/workspace_view.rs - persist_workspace_views now reads the boards' View hints first, so a View opened or closed while no window reads a frame is kept for a restart.
  • Risky files: hide-core/src/model/rest.rs - the new boards rest field rides its own generation, so Retained::capture never compares it; the stamp must move on every content change (planted below).
  • Risky files: hide-core/src/runtime/workspace_control.rs - Action::OpenBoard joins the agent-open path (behind-the-front placement, lane call, opener stamp); it keeps no receipt, since its request id is the core's own.
  • Risky files: hide-core/src/view_layout.rs, workspace_views.rs - a new display kind; workspace_views::save takes board displays out so the stored file stays at schema 5 and upstream-readable.
  • Risky files: hide-core/src/node_migration.rs - three KEYS rows rewrite the View hint's machine ids on a core move or device rename.
  • Cost: no thread, timer, watcher or queue. Per snapshot read, one walk of the front layout's displays and a book lookup each; when a shown board moves, only that board's item is drawn again (at most 64 KiB) and the rest are shared Arcs, once per accepted command; per layout save, one walk of every layout for the View hints; a refused or unchanged command publishes nothing.

Tests

  • Layer: core runtime (runtime::tests::boards, 15 new: Needs You with the title, a delegated child, edit vs open and a sibling refused, a parent opening its child's board in the same checkout and from another checkout (a mission's Conductor and its worker's worktree), the cap, a full Workspace, the operator's close, a comment refused, restart with no frame read before it, a View opened or closed with no window reading, the wire field, a deleted board, a mission keeping nothing; one view_layout repair test; one record eviction test extended).
  • Layer: e2e, the second test of web/e2e/board.spec.ts: the agent opens, the person looks, the agent edits, the screen shows the edit. The core tests prove the edit moves rest.boards and leaves the View seen; only the page proves the View in front draws the new block in place with no reload or reopen, which is what the file-based board failed.
  • Layer: web unit (boards.test.ts): the store lookup, the state mapping, the wire enums against contracts/snapshot-wire-enums.json, and a board's same-content rule.
  • Catches (each planted and reverted): the generation stamp held still fails e2e step 5 at board.spec.ts:162 (received "The first text.") and the core wire test; the board open missing from stamp_control_opener fails four View tests; boards left out of closable_views fail the cap test; display_state without its board arm fails the deleted-board test; the View hint written only when a snapshot is read fails both restart tests; a hint taken from any checkout fails the parent-from-another-checkout test.
  • Repeat: locally at 812795976, runtime::tests::boards:: (28 tests) x 10 runs and e2e/board.spec.ts --repeat-each=3 (6 of 6), all green; the fork has no repeat job, so there is no link to one.
  • Waits: none new; the e2e waits on data-agent-status-mark, data-board-block text and the front tab's label, and the spec's 120 s budget is unchanged.

Evidence

  • Verified: the mission's check at 812795976 (after merging main): exit 0, verify-cargo.sh lint clean, 8540 Rust tests passed and 0 failed, web 319 and desktop 31 unit test files passed (macOS); verify on the fork passed at the previous head 3ce571912.
  • Verified: after verify-cargo.sh cli and pnpm --dir web build, pnpm --dir web exec playwright test e2e/board.spec.ts --repeat-each=3 at 812795976: 6 passed on an isolated daemon (macOS); the renderer capture of the board View after the look and the edit is in the mission's run folder.
  • Verified: verify-cargo.sh test-scoped -p hide-core --lib for runtime::tests::boards:: (28), suggestions:: (108, after the merge of main), unseen_views:: (25), view_areas:: (52), view_layout:: (19), node_migration:: (70), missions:: (226); -p hided --lib -- board_cli:: cli_contract:: mobile::looks (24); web boards, BoardView, viewLayout (55).
  • Verified: check-core-touches-no-machine.py, check-timed-waits.py, check-no-workstation-identity.sh, check-capability-readers-off-lock.sh, check-design-contract.mjs, check-no-attribution.py: clean. verify-web.sh install docs then node scripts/docs/check-all.mjs --hide target/debug/hide: ok.
  • Not verified: Windows and Linux on a workstation: only this pull request's verify run on the fork covers them; nothing here is written for one system.
  • Not verified: a connected device: a device's agent opens a board through the pane capability its plan uses, and the board View draws from the core's record; the remote lanes that prove that route run only upstream.
  • Not verified: the phone: it lists no board (phone_looks) and rest.boards is not in its projection; no phone run was made.
  • Not verified: the private design documents: with-hide/hide-private cannot be opened from this fork; this change touches the session record's 결과물 only by keeping boards out of it, which docs/tasks-and-pr-list.md owns, so no paired pull request is named.
  • Not verified: a release-written state folder: no release writes boards or their View hints yet; the core-move rekey of the hint is tested with hand fixtures (board_files_follow_the_core_owner, board_files_follow_a_device_rename).
How to run what this pull request was checked with

From the worktree, with no HIDE_* variable set:

bash scripts/verify-cargo.sh test-scoped -p hide-core --lib runtime::tests::boards::
bash scripts/verify-cargo.sh test-scoped -p hide-core --lib runtime::tests::unseen_views::
bash scripts/verify-cargo.sh test-scoped -p hide-core --lib node_migration::
bash scripts/verify-cargo.sh cli
pnpm --dir web build
pnpm --dir web exec playwright test e2e/board.spec.ts

The capture comes from the same run with HIDE_E2E_SCREENSHOT_DIR=<folder> set (screenshot(page, "board-view")).

A board an agent draws with `hide board new` opens as a board View in the
caller's checkout, through the same View action every agent open takes: it
lands behind the operator, wears its opener's mark and waits in Needs You as
To look at with its title. `hide board open` brings it back or forward and,
like any open, makes a seen board news again; an edit never does.

The View holds only the board id. The board itself rides `rest.boards`, made
again only when a board the front Workspace shows, or which boards it shows,
changed, and stamped with its own generation, so an edit reaches a board the
operator already looked at in place. Where each board's View was is kept in
its record, never in workspace-views.json, and put back after a restart.
…w reads

The hint that brings a board's View back after a restart was written only
while a client read snapshots, so a board opened or closed with no window
connected came back wrong after the daemon restarted. It is now read from
the layouts each time they are saved, and holds only the area, the openers
and the unseen record: its checkout is the board's own.

Only a board that moved is drawn again for rest.boards; the others share
the last frame's item. views_unavailable now says what happens, and a
retitle that fails is logged.
@HyunjunJeon
HyunjunJeon merged commit 60c7096 into main Nov 13, 2026
76 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant