GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — id(web): footnote documents open as an empty doc in the web editor — footnote_reference/footnote_definition missing from richSchema (PR #1013) · Issue #1347 · developing-today/code

id(web): footnote documents open as an empty doc in the web editor — footnote_reference/footnote_definition missing from richSchema (PR #1013) #1347

New issue
Copy link
New issue
Copy link
Closed
#4640
Closed
id(web): footnote documents open as an empty doc in the web editor — footnote_reference/footnote_definition missing from richSchema (PR #1013)#1347
#4640
Copy link
Assignees
dezren39
Labels
app/idPackage/app: id (pkgs/ or apps/ in this repo)kind/bugSomething isn't working (prefixed form of the classic bug label)priority/highImportant and time-sensitivesource/pr-diff-reviewFiled by the pr-diff-review jobtask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Description

@dezren39
dezren39
opened on Oct 27, 2026
Issue body actions

Finding

PR #1013 (merged, merge commit 554dc37) taught the Rust markdown codec to emit two new ProseMirror node types — footnote_reference (inline atom, pkgs/id/src/web/markdown.rs:545) and footnote_definition (block, pkgs/id/src/web/markdown.rs:558) — but never added those node types to the web editor's ProseMirror schema.

The parallel change in the same batch did this correctly: PR #1009 added the html_inline node type to BOTH the codec and pkgs/id/web/src/editor.ts (current main: editor.ts:216). For footnotes, grep footnote pkgs/id/web/src/editor.ts on current main returns nothing.

Why it matters

pkgs/id/web/src/editor.ts parses the initial document with Node.fromJSON(editorSchema, initialDoc) (editor.ts ~line 375). ProseMirror throws Unknown node type for a node type absent from the schema, and the catch block in initEditor replaces the ENTIRE document with an empty one:

} catch (err) {
  console.error("[editor] Failed to parse initial doc JSON, using empty doc:", err);
  doc = editorSchema.topNodeType.createAndFill() ?? editorSchema.node("doc");
}

So opening any markdown file that contains a footnote in the web editor shows an empty document instead of the file's contents — and a subsequent save risks persisting that empty doc over the real file. The codec round-trip tests added by #1013 (and the follow-up #1031) all pass because they never go through the editor schema; the bug is only visible at the codec/editor boundary. Verified still present on current main (2026-10-27): codec emits the types, editor schema does not define them.

Evidence

  • PR: fix(id-web): preserve footnotes in markdown codec (#945) #1013 — fix(id-web): preserve footnotes in markdown codec (#945)
  • Codec parse direction: pkgs/id/src/web/markdown.rs:545 (footnote_reference), :558 (footnote_definition); save direction :1366, :1378
  • Editor schema: pkgs/id/web/src/editor.ts richSchema .append({...}) defines task_list, table*, html_inline — no footnote_reference / footnote_definition
  • Editor load path: pkgs/id/web/src/editor.ts initEditor — Node.fromJSON try/catch falling back to an empty doc
  • Dedup: id(web): footnotes are backslash-escaped on save — [^1] syntax mangled, definition orphaned #945 (closed) was the codec mangling; id(web): multi-paragraph footnote definitions fuse into one run of text on save — paragraphs concatenated with no separator #1031 (closed) was multi-paragraph definition fusion in the codec. Neither mentions the editor schema.

Acceptance criteria

  • richSchema in pkgs/id/web/src/editor.ts defines footnote_reference (inline atom carrying label) and footnote_definition (block carrying label and inline content), mirroring the html_inline pattern from fix(id-web): html_inline passthrough — inline HTML round-trips unescaped (#943) #1009 / PR fix(id-web): html_inline passthrough — inline HTML round-trips unescaped (#943) #1009, with inert toDOM rendering (label as text, never innerHTML).
  • Opening a markdown document containing Text.[^1] + [^1]: Body. in the web editor displays the full document (no "Failed to parse initial doc JSON" fallback, no empty doc).
  • A round-trip through the editor (open -> save with no edits) preserves the footnote reference and definition byte-identically.
  • A test or e2e check covers a footnote document going through Node.fromJSON(richSchema, ...) so a future codec node type cannot silently miss its schema entry again.

Activity

Next
  1. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/triageQueue packet kind: verify, reproduce, and route this item
    status/needs-triageNot yet triaged; needs a first look
    source/pr-diff-reviewFiled by the pr-diff-review job
    on Oct 27, 2026
  2. developing-today commented on Oct 27, 2026

    @developing-today
    developing-todayBot
    on Oct 27, 2026 – with developing.today
    Contributor
    More actions

    CODE-449

  3. dezren39
    added
    priority/highImportant and time-sensitive
    queue/queuedHas a queued queue task
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    on Oct 27, 2026
  4. github-actions
    assigned
    dezren39
    on Oct 27, 2026
  5. dezren39 commented on Oct 27, 2026

    @dezren39
    dezren39
    on Oct 27, 2026
    MemberAuthor
    More actions

    🤖 Agent note · filed

    • Agent: pr-diff-review job
    • Session / ID: pr-diff-review cron run 2026-10-27T07:28:52Z
    • Found via: filed this run
    • Task: Triage this PR-diff-review finding against current main (queued as a repo-task/v1 triage packet)
    • Expectation: effort class s — verify the finding against current main, then scope the fix
    • Links: source PR and evidence in the issue body
  6. dezren39
    added
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    on Oct 27, 2026
  7. 36 remaining items

  8. dezren39
    removed
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    work/assignedQueue worker lifecycle state
    on Nov 4, 2026
  9. dezren39 commented on Nov 4, 2026

    @dezren39
    dezren39
    on Nov 4, 2026
    MemberAuthor
    More actions

    🤖 Agent note · handed off

    • Agent: fleet monitor (repo-fleet-monitor)
    • Session / ID: task 7232 · repo-fleet-monitor run 2026-11-03 20:12 CST
    • Found via: monitor reconciliation
    • Task: Claim evaporated — task 7232 returned to queued and unclaimed in repo-health-code-pilot after the holding run ended without a terminal verb (checkpoint stage: handed_off). Labels reset to the truth: queue/queued + status/needs-triage. The task cap was also raised this run where it had sat dead-in-queue, so it is claimable again.
    • Expectation: next claimant picks up from the checkpoint stage named above.
  10. dezren39
    added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    on Nov 4, 2026
  11. dezren39 commented on Nov 4, 2026

    @dezren39
    dezren39
    on Nov 4, 2026
    MemberAuthor
    More actions

    agent-note:v1
    state: picked-up
    queue: repo-health-code-pilot
    task: 7232 (small_fix, worker repo-worker-code, lane 7b47536b-c162-444c-be8a-3a9538cc4cb5)
    by: openchamber-scheduled-lane
    at: 2026-11-04T03:12:23Z

    Resuming as shepherd of the bound PR #4640 only; no reimplementation. Fresh checks: issue #1347 is OPEN with no hard-stop labels; PR #4640 is OPEN, not draft, and matches the footnote-schema issue. Its visible check is green (OpenCode metered-provider guard); CodeRabbit is skipped/neutral; no review comments or reviews are present, though the codeowners team is requested. PR description records 120 targeted editor tests passing and clean-tree evidence for the pre-existing full-suite/typecheck failures. I am checking merge readiness before taking a terminal action.

  12. dezren39
    added a commit that references this issue on Nov 4, 2026

    Merge pull request #4640 from developing-today/queue/1357-1347-footno…

    3dd03c2
  13. dezren39
    closed this as completedin #4640on Nov 4, 2026
  14. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 4, 2026
  15. dezren39 commented on Nov 4, 2026

    @dezren39
    dezren39
    on Nov 4, 2026
    MemberAuthor
    More actions

    agent-note:v1
    state: done (fixed_merged)
    queue: repo-health-code-pilot
    task: 7232 (small_fix, worker repo-worker-code, lane 7b47536b-c162-444c-be8a-3a9538cc4cb5)
    by: openchamber-scheduled-lane
    at: 2026-11-04T03:13:52Z

    PR #4640 merged with merge commit 3dd03c2; issue #1347 is CLOSED. The scoped schema and round-trip diff matched the issue. Visible PR check passed (metered-provider guard); CodeRabbit skipped. PR records 120 targeted editor tests passed; broader web-suite/typecheck failures were verified pre-existing on a clean tree and were not rerun in this shepherd claim. Removed this task's in-flight labels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

Labels

app/idPackage/app: id (pkgs/ or apps/ in this repo)kind/bugSomething isn't working (prefixed form of the classic bug label)priority/highImportant and time-sensitivesource/pr-diff-reviewFiled by the pr-diff-review jobtask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.