Skip to content

Build Toward the Whole: notionwidgets - #1

Merged
DaveHomeAssist merged 2 commits into
mainfrom
law/build-toward-the-whole
Sep 10, 2026
Merged

DaveHomeAssist merged 2 commits into
mainfrom
law/build-toward-the-whole

Conversation

@DaveHomeAssist

Copy link
Copy Markdown
Owner

Applies the Build Toward the Whole patch series.

Commits

  • Run the canonical dataset validator in the CI gate
  • Accept the canonical dataset contract in graph-explorer

Gate

node scripts/check-site.mjs — passing locally on this branch.

Not for merge yet.

engine/validate.js documents itself as the canonical graph contract but
nothing in the repo executed it: the shipped widget does not import it
and scripts/check-site.mjs only ran JSON.parse over maps/. The Pages
gate therefore accepted datasets with duplicate ids or edges pointing at
unknown nodes. The check script now imports validateDataset and fails on
schema errors, printing warnings for orphans.

The internal link check also now mirrors the deploy job exclusions
(_* and .* paths) so a link that resolves in the repo but 404s on Pages
is caught before deploy.

Verified: node scripts/check-site.mjs passes on main content and fails
on an injected duplicate id, an injected dangling edge, and an injected
link into _archive/.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01656XvdqNAVojSPQBtLZAAt
The widget's only path to real data is the nodes and edges URL params,
but it expected an ad hoc shape (name, s, t, top level tags) that no
dataset in the repo uses. The canonical contract in engine/validate.js
and every maps/*/dataset.json use label, from, to and meta. Passing a
repo dataset crashed the page with a TypeError, and any non array JSON
crashed nodes.map, contradicting the README rule that invalid params
fall back to safe defaults.

Add a normalization step that accepts both shapes, drops malformed or
duplicate nodes and edges that reference unknown ids, defaults missing
fields, and falls back to the demo graph when no usable nodes remain.
Edge types outside structure, data and reference now get the structure
stroke instead of an undefined attribute. The demo path and the old URL
shape are unchanged.

Verified in headless Chromium with D3 and Dagre served locally: demo
renders 12 nodes and 18 edges before and after; the notion-workspace
dataset renders 24 nodes and 30 edges after (page error before); object
and non JSON input fall back to demo after (page error before).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01656XvdqNAVojSPQBtLZAAt
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@DaveHomeAssist
DaveHomeAssist merged commit 8bac2df into main Sep 10, 2026
2 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.

2 participants