Skip to content

feat(entities): apply note-surface DNA and arm Live capture - #601

Merged
HomenShum merged 2 commits into
mainfrom
feat/note-surface-dna
Jul 30, 2026
Merged

feat(entities): apply note-surface DNA and arm Live capture#601
HomenShum merged 2 commits into
mainfrom
feat/note-surface-dna

Conversation

@HomenShum

@HomenShum HomenShum commented Jul 29, 2026

Copy link
Copy Markdown
Owner

Implements the reference-grounded note surface and closes the Live notebook capture gap without broadening workspace authority.

Root cause

EntityNotebookSurface converted write authority into canEditNotebook && !isReadMode before mounting the Live notebook. EntityNotebookLive applied the same read-mode mask again. Once the page entered read mode, the Live component could no longer distinguish an owner who may return to editing from a genuinely shared or read-only viewer. Cmd/Ctrl+E therefore changed the route mode but could not reliably focus or create an editable block.

What changed

  • Preserve underlying notebook write authority across the mount boundary; EntityNotebookLive remains responsible for the temporary read-mode mask.
  • Cmd/Ctrl+E from read mode now:
    • focuses the first editable block when one exists;
    • creates exactly one first block when the notebook is empty;
    • coalesces rapid shortcut events and ignores repeats/IME composition;
    • does not steal the shortcut from active text inputs;
    • does nothing on shared or genuinely read-only notebooks;
    • warns without appending when every block is read-only.
  • Rebuilt the note-surface corpus from authenticated Mobbin Evernote web/iOS screens, the pinned Mew source tree, and conservative Roam public-product facts.
  • Added three validated design rules and upgraded capture-always-armed from 2 to 3 only after the desktop behavior was scenario-proven. Mobile capture and signed-in production timing remain explicitly unclaimed.
  • Added per-surface changelog lanes and failing-before/passing-after evidence.

Reference-backed score delta

Rule Baseline Current Evidence boundary
stream-not-chrome 1 3 Existing UI/source receipts
single-accent-inline 1 3 Existing UI/source receipts
capture-always-armed 2 3 Desktop shortcut focus + exact-once creation scenarios

NodeKit corpus gate: 10/10 records validated, 21 atomic facts, 53 citations, 6 criterion scores.

Verification

  • npx vitest run apps/web/src/features/entities/components/notebook/EntityNotebookLive.empty-state.test.tsx apps/web/src/features/entities/components/EntityNotebookSurface.test.tsx — 15/15 passed.
  • npx tsc --noEmit --pretty false — passed.
  • npm run build — passed.
  • NodeKit reference-corpus-gate.mjs docs/design/note-surface — passed.
  • Failing-before and passing-after output: evidence/note-surface-live-capture/.
  • Exact remote head: 20f1653e558f4e5a64df30169ba82f9859cfc543.

Visual and deployment boundary

The exact-head preview and CI are still running. The Chrome pass reached the preview but the entity workspace requires a signed-in NodeBench account. No account was selected and no visual/live claim is made yet. Final browser capture, demo verification, merge, production deployment age, raw-HTML signal, and production interaction remain release gates.

Non-goals

  • No Convex schema or production backend deployment.
  • No app-wide palette cloning from Mew or Evernote.
  • No claim that mobile has an equivalent persistent capture control.
  • No weakening of shared-route or block-level read-only authority.

… with score receipts

Scored the entity notebook against the note-surface reference corpus
(node-platform atlas), fixed only the two lowest-scoring criteria, and
re-scored. Receipts validate under reference-corpus-gate (exit 0) and
live in docs/design/note-surface/ so provenance travels with the app.

rule-stream-not-chrome 1 -> 3: header card, three bordered provenance
panels, evidence chips, backlink/related cards and linked-entity pills
all became divider-separated rows or inline links; routing/plan panels
now default closed so the stream leads the page.

rule-single-accent-inline 1 -> 3: accent demoted from chrome (routing
pill, mode badge, tool names, parallel badges, decorative icons, model
and cost chips); accent now reserved for meaning carriers (citations,
evidence links, entity-link tokens, live status, capture affordance);
removed both hardcoded #d97757 literals from the editor mode toggle.

rule-capture-always-armed 2 -> 2: untouched by this diff, score held
honestly; the always-armed capture keystroke is named as the next fix.

Suite before and after: 23 files / 247 tests passing (vitest,
apps/web/src/features/entities/components). tsc and the agent-native
UI linter clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nodebench-ai Ready Ready Preview Jul 30, 2026 1:28am

Request Review

@github-actions

Copy link
Copy Markdown

PR size advisory

This PR adds 636 lines of substantive change. CONTRIBUTING.md defines a soft limit of ~400 LOC.

If the PR is genuinely cohesive (e.g. an architecture map, a generated migration, a deletion of a dead module), no action is needed. Otherwise consider:

  • splitting into 2-3 PRs along independent concerns
  • pre-discussing the architecture change in a GitHub Discussion before merge

This is advisory — it does not block the merge.

@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown

✅ Dogfood Visual QA Gate: PASSED

Check Status
Screenshots 7 captured (pass)
Walkthrough 9 chapters (pass)
Key Frames 9 extracted (pass)
Scribe Steps 8 how-to steps (pass)
Build success
Artifacts

Download the dogfood-evidence-cbd93b8 artifact from the Actions tab for full screenshots, frames, and walkthrough video.


Generated by Dogfood QA Gate

Preserve workspace write authority beneath read mode so Cmd/Ctrl+E can
enter the Live editor without broadening shared or block-level access.
Focus the first editable block, deduplicate empty creation, and keep
active-input and read-only paths fail-closed.

Add Mobbin, Mew, and Roam reference facts, validated design rules,
before/after scenario evidence, and per-surface changelog lanes.

Co-Authored-By: Codex <noreply@openai.com>
@HomenShum HomenShum changed the title feat(entities): apply note-surface DNA rules to the notebook surface, with validated score receipts feat(entities): apply note-surface DNA and arm Live capture Jul 30, 2026
@HomenShum
HomenShum merged commit 8416106 into main Jul 30, 2026
20 checks passed
@HomenShum
HomenShum deleted the feat/note-surface-dna branch July 30, 2026 01:35
@github-actions

Copy link
Copy Markdown

Demo: walkthrough of the surfaces this PR changed is available as a workflow artifact (pr-demo-601) at https://github.com/HomenShum/NodeBenchAI/actions/runs/30506081042

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