Skip to content

feat: draw a board View from its blocks' Markdown - #2

Merged
HyunjunJeon merged 4 commits into
mainfrom
feat/board-look
Nov 12, 2026
Merged

HyunjunJeon merged 4 commits into
mainfrom
feat/board-look

Conversation

@HyunjunJeon

@HyunjunJeon HyunjunJeon commented Nov 12, 2026 •

Copy link
Copy Markdown
Owner

Related: mission-6 node look (board View's look); nodes record (the export) and view (wiring) build on it.

Summary

A board an agent draws needs a screen where a person reads it comfortably, before the nodes that wire it to the core are built.
This adds the board View's drawing as a standalone web component, BoardView, with the wire types it reads and a gallery scene from invented boards.
Each block is drawn from the Markdown the core's export writes for it (renderMarkdown), inside the frame its kind asks for: a callout is a box in its tone (a decision tinted so it stands out), a quote gets a file caption, a divider is a separator.
Blocks an edit just changed are marked for a moment with a neutral tint and edge; a deleted board says so with Close view.
Nothing is wired yet: node view puts it in a View area and feeds it rest.boards.

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

Review

  • Decide: the look itself, in the captures (light-wide.png first): tones (note quiet, decision blue, risk amber), the changed-block mark (neutral foreground, the unread-result tone, since lime is for focus and selection and amber and blue already mean risk and decision), the head (title, updated time, opener mark).
  • Decide: the operator chose a diagram that fits over one that keeps its label size: a diagram shrinks with its column as showMermaidSvg draws it for every caller, never wider and never scrolled, so in the narrow lane its labels are small but its last box shows.
  • Risky files: web/src/boards.ts - calloutBody and quoteBody read two shapes the core's export writes (a callout's > [!…] line, a quote's `path:start-end` line); the design gives the web the frame, so this rule is known on both sides.
  • Risky files: web/src/gallery/boardSceneData.ts - a fixture's copy of design section 4's export table (agreed with node record as the contract); the app never uses it.
  • Risky files: web/src/BoardView.tsx - its markMs prop exists only so the gallery can hold the changed mark for a capture; the app uses the default.
  • Cost: no resident work. Per board revision the View compares changed_at with the revision it last drew and arms one timer per moment, owned by the mark and cleared on unmount; the fade uses --motion-update-pulse and none under prefers-reduced-motion. A cut title shows whole on hover (Hint), as the editor's path does.

Tests

  • Layer: unit (web/src/boards.test.ts, web/src/BoardView.test.tsx, jsdom); the mermaid library, which jsdom cannot run, stands in with its two answers (a picture, a parse failure), and the repository's own drawMermaid runs for real.
  • Catches: a block without data-board-block; a block marked that changed at or before the revision drawn (planted > → >= in changedBlocks: fails); a mark that never clears, including after a later edit that changes no block (a remove) or a wait for the board within the moment (both tests failed on the previous head before the fix); a callout drawn as a quotation with [!IMPORTANT]; a quote's place shown twice; a diagram drawn wider than its natural width allows.
  • Repeat: the two changed files x 20 runs locally at the head commit, 20/20 green (the fork has no repeat job).
  • Waits: none; the mark's moment runs on fake timers, one tick each side of BOARD_CHANGE_MARK_MS.

Evidence

  • Verified: vitest run src/boards.test.ts src/BoardView.test.tsx: 15 passed; tsc --noEmit and eslint clean; node scripts/check-design-contract.mjs ok.
  • Verified: gallery scene scene=board captured with Playwright (Chromium) in 11 conditions: light and dark at 760px, both at the 360px lane minimum, the largest text size (17/13) wide and narrow, the changed mark in both themes, waiting, deleted, English. The page never scrolled sideways, the diagram's picture ended inside its box in every capture that shows it, and no page error was logged; the changed state marked exactly the two blocks the edit changed.
  • Verified: the mission's check (check.sh: lint, Rust tests, web unit gates) at 09488fe: exit 0; Rust 36 suites 8471 passed, none failed; web 2970 and desktop 325 passed.
  • Not verified: the board inside a real View area fed by the core (node view and its e2e), and the core's own export output (node record, not merged; the fixture follows the agreed table).
  • Verified: Linux by the fork's verify run at 09488fe: web and desktop checks, the Rust workspace, policy, user docs and the six web e2e shards passed.
  • Not verified: Windows and macOS lanes, which the run's plan skipped for a web-only diff; the drawing has no system-specific code. A connected device: the component reads only the snapshot and has no device path.
  • Not verified: no private design document owns this drawing (design section 7 names suggestion-investigation.md and tasks-and-pr-list.md for other nodes); with-hide/hide-private could not be opened.
  • Not verified: docs/UI_BEHAVIOR.md is unchanged on purpose: what a board View does on screen becomes true when node view wires it, and that node updates View areas and View states.
More evidence

Captures (mission run folder, shots/look/): light-wide.png, dark-wide.png, light-narrow.png, dark-narrow.png, largest-text.png, largest-text-narrow.png, changed-mark-light.png, changed-mark-dark.png, waiting.png, unavailable-deleted.png, english-light-wide.png.

Verification record
  • Base: main at 0852106; head: 09488fe.
  • bash agents/runs/board-native/check.sh (lint, Rust tests, web and desktop unit gates) at the head: exit 0; Rust 36 suites 8471 passed, none failed; web 2970 and desktop 325 passed.
  • vitest run src/boards.test.ts src/BoardView.test.tsx: 15 passed; x20 20/20.
  • Planted defects: changedBlocks > to >= fails "marks only the blocks changed after the revision last drawn"; the previous head's timer, cancelled by a later revision, fails the two new moment tests; renderMarkdown and markdownMermaid.ts are unchanged from main.
  • node scripts/check-design-contract.mjs: tokens, contrast, logos and UI parts ok.
  • Self-review against docs/CODE_REVIEW.md: no serious or ordinary finding; the two shapes read from the export and the gallery's markMs are listed under Review.
  • Changed paths: web/src/boards.ts, web/src/boards.test.ts, web/src/BoardView.tsx, web/src/BoardView.test.tsx, web/src/gallery/BoardScene.tsx, web/src/gallery/boardSceneData.ts, web/src/gallery/mount.tsx, web/src/i18n/resources/boardView.ts, web/src/i18n/catalogs.ts.

@HyunjunJeon
HyunjunJeon merged commit 767b005 into main Nov 12, 2026
89 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