Skip to content

feat(devtools): high-fidelity seeded content for every node type - #272

Merged
crs48 merged 13 commits into
mainfrom
claude/nice-chandrasekhar-94ecf5
Jun 25, 2026
Merged

feat(devtools): high-fidelity seeded content for every node type#272
crs48 merged 13 commits into
mainfrom
claude/nice-chandrasekhar-94ecf5

Conversation

@crs48

@crs48 crs48 commented Jun 25, 2026

Copy link
Copy Markdown
Owner

What

Makes the dev-tools seed bake real, contextually-rich content into every node type so each surface exercises its full UI-pattern set instead of rendering blank (exploration 0223). Builds on the relational seed from #266.

Researched via a multi-agent map of every seedable surface's exact content structures (Yjs element names + attrs, dashboard widget/query shapes, DB view configs, canvas node kinds).

Highlights (phased)

  1. Dashboards (were 100% empty). New builders/dashboard-builder.ts: typed factories for metric.count, chart.bar/line, view.saved, list.tasks, links.pages, heatmap.streak — each a real SavedViewDescriptor query bound to seeded schemas — plus a responsive grid packer and time-range/custom variables. Two populated dashboards.
  2. Page blocks + inline (keystone). RichBlock gains image/file/embed/databaseEmbed/taskViewEmbed/richLink/toggle/mermaid/hr (+ callout caution) and an inline model (marks + hashtag/taskMention/databaseReference pills). A "Feature Showcase" page exercises every block.
  3. Databases. All six view types (table/board/list/gallery/calendar/timeline) with filters/sorts/column-summaries, plus dateRange/file/rollup/formula/auto fields.
  4. Canvas. builders/canvas-builder.ts: page/database/media/task/external-reference cards, a presentation frame + a group, and styled (dashed/curved/colored) connectors.
  5. Domain docs + Map. docs/page-builders.ts fills Task descriptions, Project briefs, Milestone notes, CRM org/contact/deal notes and an Experiment protocol; a Map gets a basemap + GeoJSON markers.

Safety net

New seed-render.test.ts builds the real editor ProseMirror schema and parses every seeded page/doc via yXmlFragmentToProseMirrorRootNode (and decodes the canvas scene) — a malformed Yjs fragment fails CI instead of rendering blank. Hand-built Y.XmlElements (not prosemirrorJSONToYDoc) keep the seed deterministic and editor-schema-decoupled. (tiptap added as devtools devDeps.)

Verification

  • 166 devtools tests green (render gate + idempotency/coverage/integrity); @xnetjs/devtools typecheck (24/24) + lint + prettier clean. Private package → no changeset.
  • Live: fresh seed = 615 created · 26 docs · 1.7s, zero console errors; idempotent re-run 0 created · 616 updated. The Team Overview dashboard renders metric counters (32/9/4) + a Tasks-by-status bar chart + an Observations line chart with a working time-range; the Tasks Tracker database renders all 6 view tabs with advanced columns.

🤖 Generated with Claude Code

xNet Test and others added 13 commits June 25, 2026 11:54
…e type

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add builders/dashboard-builder.ts: typed factories for metric.count, chart.*,
view.saved, list.tasks, links.pages, heatmap.streak — each emitting a real
SavedViewDescriptor query bound to seeded schemas — plus a responsive grid
packer (lg + xs) and time-range/custom variables. Seed two populated dashboards
(Team Overview analytics + Reliability team-hub) instead of empty shells.
Extend RichBlock with image/file/embed/databaseEmbed/taskViewEmbed/richLink/
toggle/mermaid/hr (+ callout caution) and an inline model (TextRun marks/link/
wikilink + hashtag/taskMention/databaseReference pills) built via exact editor
attrs. Add a Feature Showcase page exercising every block + inline pattern,
binding databaseEmbed to the seeded tracker DB. Add seed-render.test.ts: builds
the real editor ProseMirror schema and parses every seeded page doc through
yXmlFragmentToProseMirrorRootNode — a malformed fragment fails CI instead of
rendering blank. (tiptap added as devtools devDeps.)
Extend the DatabaseSpec view/field model: list/gallery/timeline views, plus
per-view filters (FilterGroup), sorts, columnSummaries, coverField/cardSize,
rowHeight and hiddenFields (field keys translated to field ids). The Tasks
Tracker now exercises every view type + dateRange/file/formula/created/createdBy
fields, a filtered+sorted+summarised table view, and the CRM Accounts DB gains a
rollup over its cross-database relation.
Add builders/canvas-builder.ts wrapping the real @xnetjs/canvas constructors:
card() for page/database/dashboard/media/task cards (embedding seeded nodes),
frame()/group() containers with memberIds, and styledEdge() across the
relationship-kind vocabulary. Rebuild the flagship canvas to embed the tracker
DB, overview dashboard, sample page, a media asset and a task inside a
presentation frame + asset group, wired with solid/dashed/curved/colored
connectors. Render test now also asserts the canvas scene is populated.
Add docs/page-builders.ts (task description, project brief, milestone notes, CRM
org/contact/deal notes, experiment protocol) on the rich-page vocabulary, wired
into work/crm/metrics so those nodes carry real Yjs documents instead of blank
descriptions. Seed a Map node with a basemap, viewport and a GeoJSON markers
layer. Render gate validates every new domain doc.
…ashboard card)

CanvasObjectKind has no 'dashboard' card and createCanvasFrameVariantNode needs
a viewport; model frames/groups as group nodes with containerRole and embed the
dashboard via an external-reference card. Typecheck green.
@crs48
crs48 temporarily deployed to pr-272 June 25, 2026 19:51 — with GitHub Actions Inactive
@github-actions

github-actions Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Preview removed for PR #272.

github-actions Bot added a commit that referenced this pull request Jun 25, 2026
}

/** Render one block to a Y.XmlElement (recursive for toggles). */
function renderBlock(block: RichBlock): Y.XmlElement {
@crs48
crs48 merged commit 69554c2 into main Jun 25, 2026
13 of 14 checks passed
@crs48
crs48 deleted the claude/nice-chandrasekhar-94ecf5 branch June 25, 2026 20:06
github-actions Bot added a commit that referenced this pull request Jun 25, 2026
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.

2 participants