Repository navigation
feat: draw a board View from its blocks' Markdown - #2
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related: mission-6 node
look(board View's look); nodesrecord(the export) andview(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
viewputs it in a View area and feeds itrest.boards.No screenshot: captures are kept in the mission's run folder; the fork has no image uploader
Review
light-wide.pngfirst): 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).showMermaidSvgdraws it for every caller, never wider and never scrolled, so in the narrow lane its labels are small but its last box shows.web/src/boards.ts-calloutBodyandquoteBodyread 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.web/src/gallery/boardSceneData.ts- a fixture's copy of design section 4's export table (agreed with noderecordas the contract); the app never uses it.web/src/BoardView.tsx- itsmarkMsprop exists only so the gallery can hold the changed mark for a capture; the app uses the default.changed_atwith the revision it last drew and arms one timer per moment, owned by the mark and cleared on unmount; the fade uses--motion-update-pulseand none underprefers-reduced-motion. A cut title shows whole on hover (Hint), as the editor's path does.Tests
web/src/boards.test.ts,web/src/BoardView.test.tsx, jsdom); themermaidlibrary, which jsdom cannot run, stands in with its two answers (a picture, a parse failure), and the repository's owndrawMermaidruns for real.data-board-block; a block marked that changed at or before the revision drawn (planted>→>=inchangedBlocks: 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.BOARD_CHANGE_MARK_MS.Evidence
vitest run src/boards.test.ts src/BoardView.test.tsx: 15 passed;tsc --noEmitand eslint clean;node scripts/check-design-contract.mjsok.scene=boardcaptured 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.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.viewand its e2e), and the core's own export output (noderecord, not merged; the fixture follows the agreed table).verifyrun at 09488fe: web and desktop checks, the Rust workspace, policy, user docs and the six web e2e shards passed.suggestion-investigation.mdandtasks-and-pr-list.mdfor other nodes); with-hide/hide-private could not be opened.docs/UI_BEHAVIOR.mdis unchanged on purpose: what a board View does on screen becomes true when nodeviewwires 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
mainat 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.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;renderMarkdownandmarkdownMermaid.tsare unchanged from main.node scripts/check-design-contract.mjs: tokens, contrast, logos and UI parts ok.docs/CODE_REVIEW.md: no serious or ordinary finding; the two shapes read from the export and the gallery'smarkMsare listed under Review.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.