Skip to content

37562 跟进:引用定位用渲染后的标题文字与原文标题比对时,带格式的标题对不上 #37664

Description

@objectstack-fleet

repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc

Filing gate: ② follow-up out of #37562. The source is seat 5's REWORK 7200445298 on PR #37646 (nit N2), which asks for this p3 card under #37562. The owning area files it under the source card, per the maintainer's standing permission for areas to file their own follow-up cards.
Grading: area:ai · Task · p3 · reach: a citation whose heading text differs between the body source and the rendered page (inline markup, entities, escapes) · evidence: read.

维护者速读

  • 做什么:AI 引用里的段落标题取自正文原文,而页面上比对的是渲染后的文字。标题里有加粗、转义字符等时两边可能对不上,引用就打开到字段而不是那一段。让两边用同一种文字比对。
  • 谁受益:点引用查看出处的用户。
  • 不做会怎样:少数带格式的标题点开后定位不到具体段落。
  • 需要你做的:无。

What

The outline's heading entries (get_record_context body outline, headingsOf in @objectstack/spec record-body-anchor.ts) carry the heading as source text; the record page locates the cited heading (ui/packages/app-shell/src/views/recordSectionAnchor.ts) against the rendered text. A heading with inline markup (**x**, `x`, links), entities or escapes can then match on one side only.

Acceptance

  • Tests: a cited heading with bold, inline code, a link, an entity and an escape each opens its section; a control with plain text still does.
  • Clause-②: no, Metadata-protocol: none.

Blocked-by: #37562 (PR #37646)
Parent: #37562
Size: XS
Dedupe (objectstack, is:issue): cited heading rendered text source text 0 · recordSectionAnchor inline markup heading 0.

Activity

  1. added
    pm:blocked
    domain:ui
    area:ai
    on Nov 26, 2026
  2. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in area:ai · domain:ui · Task · priority:p3 · pm:blocked · size S; rationale: citation location misses a heading whose rendered text differs from its source (inline markup, entities). Read, narrow: p3 as filed. Blocked by #37562.

  3. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc

    Unblocked: PR #37646 merged at c2bfa3ef7c; the parse-based heading reader this card builds on is on main. pm:blocked → pm:queue.

  4. added
    pm:queue
    and removed
    pm:blocked
    on Nov 26, 2026
  5. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-elon-musk · session_016WV4cxBECSPtHxQMZDHSie

    Claim: PM loop round 1 · area o1-B (epic #36996 follow-ups, handed over by seat 5 in mailbox #37561 comment 7206307064) · 2026-11-27T00:25Z
    Session: session_016WV4cxBECSPtHxQMZDHSie
    Account: os-elon-musk
    Branch: claude/area-o1B-37664
    Worktree: objectstack-issue-37664
    Domain: domain:ui
    Area: o1-B
    Seat: repo:objectstack#1
    File surface: ui/packages/app-shell/src/views/recordSectionAnchor.ts and a new test file beside it; read-only reuse of ui/packages/fields/src/widgets/markdownHeadings.ts; a changeset. ⛔ No change to the anchor or the outline wire shape (packages/spec/src/ai/record-body-anchor.ts untouched) (stop on breach; explain in the report)
    Container & model: XS review-nit follow-up, mode:subagent, model: default tier (dispatch-gates --tier: "no path-derived mandate"; one comparison-form choice is a design judgement), effort: medium
    Clause-②: no
    Metadata-protocol: none
    Responsibility: n/a — not a defect card (Task)
    Thread-read: 7202750499
    Premise: corrected — reading on origin/main 579b857: the outline gives a markdown heading as raw source (markdownHeadingOf, record-body-anchor.ts:51-63); the page compares through headingReading() (recordSectionAnchor.ts:117, letters and digits only, lowercased) at :227-228. That reading already makes **x**, inline code and escaped punctuation match; a link [x](url) (reads "xurl" from source, "x" rendered), an entity and inline html still differ. Same goal; the fix compares the listed heading through the same remark parse PR #37646 added (drawnMarkdownHeadings, markdownHeadings.ts:59, matched by start). The card's Acceptance cases all stay; bold, code and escape become controls that already pass.
    Serial constraints cleared: none: overlap-check on a probe branch touching recordSectionAnchor.ts exit 0, no open PR head shares the file
    Pre-claim lane: ui/** ⇒ domain:ui (file ownership only), built and self-reviewed or L1-read in o1-B.
    Pre-claim deps: #37562 / PR #37646 merged (c2bfa3e).
    Prior rulings read: check-prior-rulings.mjs --card 37664 --terms recordSectionAnchor,headingsOf: no ruling-hit line in recordSectionAnchor.ts; the hits under ui/packages/app-shell/src/views/ are other views' tests, unrelated.
    Fold-or-serial: not folded — no other o1-B card touches this file.

  6. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 27, 2026
  7. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-elon-musk · session_016WV4cxBECSPtHxQMZDHSie
    os-dev-report

    {
      "issue": 37664,
      "status": "done",
      "branch": "claude/area-o1B-37664",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/37756",
      "head": "93394e36",
      "session": "session_016WV4cxBECSPtHxQMZDHSie",
      "premise_still_valid": true,
      "summary": "Page side only (recordSectionAnchor.ts): each outline heading is now read as its face draws it - a markdown heading through the face's own remark parse (drawnMarkdownHeadings, matched by source start), an html heading through the page's heading-tag scan with every character reference decoded - and reading/ordinal/count/unlisted are all computed from those readings (candidateOf); a markdown candidate counted before the parse loads is recounted in full once it has. Anchor and outline wire shape unchanged; packages/spec not in the diff. Claim premise reproduced: bold, inline code and escapes already matched on main (controls); link, markdown entity, html entity the outline leaves encoded, and a link-titled listed heading miscounted as unlisted were red.",
      "tests": "Red-first: base file (579b8577, hash c5fa5fb7 verified) + new tests: Tests 4 failed | 43 passed (link, markdown entity, html entity, link-heading-counted-as-listed). Fix at 93394e36: vitest recordSectionAnchor.test.tsx + RecordDetailView.citedSection-37365.test.tsx: Test Files 2 passed (2), Tests 55 passed (55), VERDICT command-exit 0. pnpm --filter @object-ui/app-shell type-check (tsc --noEmit + tsconfig.test.json): VERDICT command-exit 0. Full app-shell suite (2458 files) started then stopped at PM request after 36 min to free the lock: NOT MEASURED, reason: stopped, CI Test UI carries it.",
      "gates": "dispatch-gates --commands derived 38 at 93394e36; 36 run, each EXIT=0 captured before any pipe (adr-0087-registration, changeset-no-major, closing-keyword-parity, comment-mask-corpus, empty-changeset, sdui-manifest, nul-bytes, cross-package-test-inputs, test-source-alias, type-check-coverage, published-files, undeclared-dep-imports, ... all exit 0). NOT MEASURED: pnpm --dir ui exec vitest run scripts/ (SIGKILL by container OOM while sibling runs shared memory); pnpm check:type-check-debt (exit 3 then rerun stopped: it builds the whole packages closure under the shared lock). --ran reconciliation: 38 derived, 36 run, 2 UNRUN (those two). overlap-check --branch=claude/area-o1B-37664: VERDICT clean exit 0. PR check-runs at report time: in_progress (Check Changeset, Lint*, Type Check*, PR-body guards); not awaited.",
      "dogfood_battery": "n/a - no ! in the PR title and no (narrowing) arm",
      "line_budget": "139 changed lines (+101/-38, 3 files) vs 3000 threshold",
      "files_changed": ["ui/packages/app-shell/src/views/recordSectionAnchor.ts", "ui/packages/app-shell/src/views/recordSectionAnchor.test.tsx", ".changeset/37664-cited-heading-drawn-text.md"],
      "deviations": "Tests went into the existing recordSectionAnchor.test.tsx as a top-level describe, not a new file as the claim's File surface says: AGENTS.md (ruling record 6583487846) puts a new pin for a component with a shared harness file into that file. Full app-shell suite stopped on PM request; scoped set run instead.",
      "mcp_calls": "0",
      "api_writes": "2 relay writes + 2 git push: pr_create (POST pulls, POST issues/37756/assignees) via fleet-write run 45922897033; os-dev-report comment on #37664 via post-stamped",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": []
    }
  8. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-elon-musk · session_016WV4cxBECSPtHxQMZDHSie

    Close-out (area o1-B) · 2026-11-27T02:27Z
    Delivered: PR #37756 merged: the record page reads each outline heading the way its face draws it (a markdown heading through the field's own remark parse, matched by source start; an html heading with every character reference decoded), so a cited heading carrying a link, an entity or inline html opens its section. Bold, inline code and escapes already matched and stay pinned as controls. Anchor and outline wire shape unchanged. L1 ACCEPT 7207736687; no contract review owed.
    State: pm:dispatched removed with the close. Remaining: none on this card.

  9. removed
    pm:dispatched
    on Nov 27, 2026
  10. added a commit that references this issue on Dec 1, 2026
    ca4838e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:aidomain:uipriority:p3

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions