Repository navigation
Description
repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc
Filing gate: ② follow-up out of #37487. The source is seat 5's REWORK 7193228908 on PR #37539, which asks for a card carrying N6 and N7 of scope note 7190147175 before Fixes #37487 closes the only card that holds them. 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 chip whose cited heading shares its title with an unlisted heading, and an empty-reading section · evidence: read.
维护者速读
- 做什么:点引用打开记录时,有两个小边角:同名标题的计数检查可能挑错段落;内容为空时要等 4 秒才定位。补上这两处。
- 谁受益:使用 AI 引用的用户。
- 不做会怎样:极少数情况下定位到同名的另一段,或空段落定位慢。
- 需要你做的:无。
What
From scope note 7190147175 on the record-section locator (ui/packages/app-shell/src/views/recordSectionAnchor.ts, PR #37485):
- N6: the count check does not exclude the case of one unlisted same-titled heading plus one listed-but-undrawn heading, so the locator can pick the wrong one. Make the check tell them apart.
- N7: when the reading is empty, the field opens only after the 4 s settle. Open it as soon as the empty reading is known.
Acceptance
- A test per case, each with a control.
Clause-②: no,Metadata-protocol: none.
Parent: #37487
Size: XS
Dedupe (objectstack, is:issue): locateSection same-titled heading 0 · record section empty reading settle 0.
Activity
objectstack-fleet commentedon Nov 26, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Triage: lands in area:ai · domain:ui · Task · priority:p3 ·
pm:queue· size S; rationale: two corner cases of citation location (a heading that shares its title with an unlisted heading, and an empty section). Read, narrow reach: p3 as filed.objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc
Claim: PM loop round 11 · area ai-36996 (topic #36996 non-cloud rows; the maintainer, verbatim, 2026-11-25T12:57Z project thread: 「开一个 36996 专题,接手剩余任务」; area concurrency 3 under the maintainer's total of 10, 2026-11-26T13:44Z: 「后续并发降到10」) · 2026-11-26T16:15Z
Session:
session_01Utp6CbeF2saT6wUBV4E9ucAccount:
os-billArea: ai-36996
Branch:
claude/issue-37562-section-locate-edgesWorktree:
objectstack-issue-37562Domain:
domain:uiSeat:
repo:objectstack#5File surface:
ui/packages/app-shell/src/views/recordSectionAnchor.tsand its tests (recordSectionAnchor*.test.ts, theRecordDetailView.citedSection-37365.test.tsxcases if a pin moves); root.changeset/. ⛔ Nopackages/**,skills/**,docs/adr/**, noRecordDetailView.tsxbeyond what a test needs. Stop on breach and report.Container & model:
XS,mode:subagent,model: default — dispatch-gates --tier: "no path-derived mandate" (ui/**),effort: mediumClause-②: no
Metadata-protocol: none
Responsibility:
ui/packages/app-shell(locateSectioncount check; the empty-reading case waits for the settle) produces the wrong or slow section | no platform path covers it | every reader who opens a citation chip on a body with a same-titled heading or an empty sectionPremise: holds — on
origin/main4e10d4bff:locateSection(line 138) andRECORD_SECTION_SETTLE_MS = 4000(line 60); PR #37539 and PR #37571 merged.Serial constraints cleared: #37487 (PR #37539) and #37556 (PR #37571) merged. Siblings #37463 (queued,
packages/**) and #37141 (PR #37552,packages/**): disjoint.Pre-claim deps: #37487 closed
Prior rulings read: scope note 7190147175 (N6, N7); seat REWORK 7193228908 on PR #37539
objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc
os-dev-report
{ "issue": 37562, "status": "done", "branch": "claude/issue-37562-section-locate-edges", "pr": "https://github.com/objectstack-ai/objectstack/pull/37646", "head": "c41e2768d34596930bd8076a40993328b1763412", "session": "session_01Utp6CbeF2saT6wUBV4E9uc", "premise_still_valid": true, "summary": "N6: sectionCandidates now also scans the body for places outside the outline that could draw a heading of the cited reading (markdown: setext, ATX behind a quote, list marker or blank, a raw heading-tag line, fenced code excluded; html: an unlisted hN opener), recorded as SectionCandidate.unlisted; locateSection trusts the drawn-count only when unlisted is 0, so one unlisted same-titled heading plus one listed-but-undrawn heading opens the field instead of the wrong heading. N7: a target whose reading is empty (and a textarea one) is fieldOnly, and focusRecordSection scrolls to that field as soon as it is drawn instead of after RECORD_SECTION_SETTLE_MS; a titled heading not yet drawn still waits. focusRecordSection's mayScroll contract is untouched (every scroll still goes through it).", "files_changed": [ "ui/packages/app-shell/src/views/recordSectionAnchor.ts (+166/-16 net of both edits)", "ui/packages/app-shell/src/views/recordSectionAnchor.test.tsx", ".changeset/37562-section-locate-edges.md ('@object-ui/app-shell': patch; Clause-②: no; Metadata-protocol: none)" ], "line_budget": "277 changed lines (+256/-21, 3 files) vs the 3000 human-merge threshold: under; no skills/** touched, no ratcheted ledger touched", "acceptance": [ { "bullet": "N6: a test with the combined body (unlisted same-titled + listed-undrawn) and a control", "check": "PASS — case 'N6 — one unlisted same-titled heading plus one listed-but-undrawn heading opens the field...' (CONTROL: first Scope a paragraph line, heading marked) plus a place-shape case with its own control" }, { "bullet": "N7: a fake-timer test that an empty reading opens the field at once, and a control that a still-loading reading still waits", "check": "PASS — case 'N7 — a heading that reads as nothing scrolls to the field at once; CONTROL: a titled heading not yet drawn still waits for the settle'" }, { "bullet": "Keep focusRecordSection's mayScroll contract from PR #37539", "check": "PASS — scrollTo/mayScroll lines unchanged in the diff; RecordDetailView.citedSection-37365.test.tsx (S5 pins) green in the same run" }, { "bullet": "Ablation: one per item", "check": "PASS — N6 and N7 each red on exactly their case (1 failed / 20 passed), restored blob == HEAD 03e5ab195def, git diff HEAD empty" }, { "bullet": "Clause-②: no, Metadata-protocol: none", "check": "PASS — line-initial in PR body and changeset; Check Changeset success" } ], "tests": "head c41e2768d3: `vitest run recordSectionAnchor.test.tsx RecordDetailView.citedSection-37365.test.tsx` -> Test Files 2 passed (2), Tests 29 passed (29), lock VERDICT command-exit 0. `pnpm --filter @object-ui/app-shell run type-check` (tsc --noEmit + tsconfig.test.json) -> VERDICT command-exit 0. eslint on the 2 changed files -> exit 0. Ablation N6 (scripts/ablation-replace.mjs, anchor `const counted = candidate.unlisted === 0 && drawn.length === candidate.count;` x1->x0, blob 03e5ab195def -> bcfe4562ff87): N6 case red, Tests 1 failed | 20 passed; restore blob == HEAD. Ablation N7 (anchor `} else if (target?.fieldOnly) {` -> face === 'text', blob 03e5ab195def -> 7f4b5b882a28): N7 case red, Tests 1 failed | 20 passed; restored, git diff HEAD empty. Subject resolves to src (relative import), so no build/dist leg. Full app-shell suite (2452 files): NOT MEASURED locally, reason: stopped after 68 min holding the shared verify lock with a sibling queued; CI Test UI 16/16 shards success on c41e2768d3 carries it.", "gates": "local: dispatch-gates --commands (merge base b1c41e55e, 3 paths) derived 38; all run, each exit captured before any pipe: 38 exit 0 (check:type-check-debt first exit 3 PREREQUISITE NOT MET behind my own lock hold, re-run under the lock -> exit 0, re-measure OK); plus check:changeset-fixed exit 0 (roster under .changeset); `pnpm --dir ui exec vitest run scripts/` Test Files 172 passed | 2 skipped, Tests 5130 passed. --ran reconciliation: 'dispatch-gates --ran: 38 derived famil(ies) accounted for — 38 run, 0 NOT-MEASURED'. overlap-check --branch=HEAD: VERDICT clean exit 0. CI on c41e2768d3 (all completed, 38 success / 13 skipped, 0 failure): Lint & Repo Gates success, TypeScript Type Check success, Test Core success, Build Core skipped, Governed Surface Queue Guard success, Lint UI success, Type Check UI success, Test UI success (16/16 shards), Build & E2E UI success, Live E2E UI success, Dogfood Regression Gate success, Check Changeset success, Type Check · debt ledger success.", "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm", "readings": "check-runs read on objectstack-ai/objectstack commit c41e2768d3 after every run completed; PR #37646 draft: true, assignee os-bill, labels none; relay read-back: 6408 bytes sent, 6408 stored — identical", "mcp_calls": "0", "api_writes": "3 — relay stroke pr_create (POST /repos/objectstack-ai/objectstack/pulls draft + POST /issues/37646/assignees os-bill); POST /repos/objectstack-ai/objectstack/issues/37562/comments (this os-dev-report via post-stamped). git pushes (not REST): 4 to claude/issue-37562-section-locate-edges (empty branch probe + 3 commits)", "deviations": [ "Base is origin/main b1c41e55e2 (fetched first), not 4e10d4bff; `git diff --stat 4e10d4bff origin/main -- ui/packages/app-shell/src/views/` is empty.", "Full app-shell suite narrowed: started locally under the lock, stopped by its recorded pid after 68 min while a sibling queued; CI Test UI 16/16 green is the reading. The PR body says this result is in this comment.", "The spec build and the derived-gate loop ran as harness background tasks (each read to its end before use), not a single foreground call.", "Commit trailers use the model-free pair (Claude-Session + Co-authored-by: Claude) per the dispatch; the PR body ends with the session-URL footer and the signed line, not the harness footer." ], "open_questions": [], "security_findings": "none", "out_of_scope_findings": [ "carrier: none · noted, not filed — a body holding a same-titled place outside the outline still waits the 4 s settle before the field opens (the answer is known from the body, it could open at once); outside N6/N7, in the PR's Acceptance notes" ] }objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc
os-dev-report
{ "issue": 37562, "status": "blocked", "branch": "claude/issue-37562-section-locate-edges", "pr": "https://github.com/objectstack-ai/objectstack/pull/37646", "head": "c41e2768d34596930bd8076a40993328b1763412", "session": "session_01Utp6CbeF2saT6wUBV4E9uc", "rework_of": "REWORK 7200445298 (S1 route ruling) on contract record 7200419777", "summary": "Stopped before any edit, per the rework order's stop condition. The parse the field renders with is not shareable inside the claim surface: ui/packages/fields/src/widgets/MarkdownContent.tsx passes remarkPlugins [remarkGfm] and rehypePlugins [[rehypeSanitize, RICH_TEXT_SANITIZE_SCHEMA]] inline in JSX, exported by nothing; @object-ui/fields exports only '.' and './style.css'; @object-ui/app-shell's package.json declares none of react-markdown, remark-gfm, rehype-sanitize, unified. Sharing needs an edit in ui/packages/fields (and, for a direct import, an app-shell dependency entry), both outside claim 7197410219.", "facts_for_the_decision": [ "react-markdown 10.1.0 runs remark-parse, then the remark plugins, then remark-rehype with allowDangerousHtml forced on, then the rehype plugins; raw nodes are turned into text afterwards, so a raw heading tag in a markdown body never draws a heading element (N1 confirmed).", "The 'Footnotes' h2 is drawn by mdast-util-to-hast 13.2.1 (footnoteLabel default 'Footnotes', footnoteLabelTagName default h2) inside remark-rehype, not by remark-gfm: an mdast-only count (remark-parse + remark-gfm) misses it; the count must run through remark-rehype and rehype-sanitize to match what is drawn by construction.", "react-markdown is lazily loaded by the field (MarkdownContent is split for its 100-200 KB); RecordDetailView importing the pipeline eagerly would undo that split, so the shared piece wants to be a lazily importable function." ], "options": [ "A (recommended): widen the claim to ui/packages/fields: move the plugin lists in MarkdownContent.tsx to exported constants, add an exported drawnMarkdownHeadingTexts(value) next to it that runs the same unified pipeline to hast and returns each h1-h6 text, and expose it from @object-ui/fields; app-shell already depends on @object-ui/fields (workspace dep, package.json line 87) and imports it lazily. One config, drawn-by-construction. Cost: ~2 files in fields, a fields patch changeset, plus the app-shell work; S.", "B: copy the one-element config into app-shell (remark-parse + remark-gfm + remark-rehype + rehype-sanitize with the fields schema) and add the four deps to app-shell's package.json. Cost: second config that can drift from the field's; package.json and lockfile outside the surface anyway; XS-S.", "C: keep the line scan and patch S1's shapes by hand (seat's first suggestion in 7200419777). Contradicts the route ruling in 7200445298; not recommended." ], "not_blocked": "N3 (unlisted > 0 -> fieldOnly, one line) and its test do not depend on the decision; held back so the PR does not take a half delta. N2 is to be filed by the seat, not done here.", "worktree": "../objectstack-issue-37562 recreated at c41e2768d3, clean, installed", "mcp_calls": "0", "api_writes": "1 — POST /repos/objectstack-ai/objectstack/issues/37562/comments (this report via post-stamped)", "security_findings": "none" }objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc
Claim amendment · 2026-11-26T18:30Z · claim 7197410219 · widens the surface for seat 5's route ruling in REWORK 7200445298 (S1: count markdown headings from the same parse the field renders with), per the os-dev blocked report 7200523842, option A.
ui/packages/fields/src/widgets/MarkdownContent.tsx(its remark/rehype plugin lists become exported constants, behaviour unchanged), one new sibling module inui/packages/fields/src/widgets/exportingdrawnMarkdownHeadingTexts(value)(the same unified pipeline to hast — remark-parse, remark-gfm, remark-rehype, rehype-sanitize with the field's schema — returning each drawn h1–h6 text) and its test, theui/packages/fieldsindex export, and a@object-ui/fieldspatch changeset.app-shellimports it lazily, so the field's lazy split stays. Still ⛔packages/**,skills/**,docs/adr/**.Clause-②: nostands for app-shell; the new@object-ui/fieldsexport is additive, so the PR states the final line (expectedClause-②: yes (widening), patch).objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc
os-dev-report
{ "issue": 37562, "status": "done", "rework_of": "REWORK 7200445298 (S1 route, N1, N3) under claim amendment 7200539429 (option A)", "pr": "https://github.com/objectstack-ai/objectstack/pull/37646", "head": "c3f7728e8e", "clause_2": "Clause-②: yes (widening) for the PR (new @object-ui/fields export, patch); the app-shell changeset keeps Clause-②: no", "summary": "The markdown half now counts unlisted headings from the field's own parse: fields' drawnMarkdownHeadings runs react-markdown with MARKDOWN_REMARK_PLUGINS / MARKDOWN_REHYPE_PLUGINS (the lists MarkdownContent draws with) and reads h1-h6 with source starts after the last rehype plugin; app-shell loads it on demand through loadDrawnMarkdownHeadings (via MarkdownContent, so one lazy markdown module) and trusts no heading until it has. HTML half unchanged. N3: unlisted > 0 is fieldOnly (one line).", "pins": "S1 drawn and counted: setext in a quote, under a comment, under a link definition, under indented code, footnote ATX, the Footnotes h2, ATX behind a quote or list marker. N1 not drawn and not counted: raw heading tag, indented code, lazy quote over a rule, fenced code. Each shape pinned against the reader and against the face's own DOM.", "ablation": "parse count forced to 0: Tests 14 failed | 25 passed (N6 pair, setext, ten S1 rows, Footnotes row, N3); restored blob == HEAD, git diff HEAD empty", "tests": "4 targeted files 69/69; full fields suite 333 passed | 1 skipped; fields + app-shell type-check exit 0; console vite build: no new ineffective dynamic import, eager closure +297 bytes gz vs base, 120/2610 chunks both", "gates": "39 derived families run, --ran: 0 NOT-MEASURED; overlap-check clean; CI on c3f7728e8e: 44 success, 13 skipped, 0 failure", "pr_body": "not patched by this run: os-dev rule 3 keeps a PR body write after pr_create with the seat; the replacement body is handed to the seat", "mcp_calls": "0", "api_writes": "this comment", "security_findings": "none" }objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc
ACCEPT → PR #37646 comment 7201860982 (delta record 7201851923, PASS)
objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc
Merged: PR #37646 at
c2bfa3ef7cclosed this card byFixes. Delivered: a cited section is located on a markdown body from the field's own parse.@object-ui/fieldsdeclares its remark and rehype plugin lists once and exports a lazyloadDrawnMarkdownHeadings(), so unlisted headings (setext, footnotes, the Footnotes label) are counted by where they are drawn. A body with any unlisted heading in the cited reading opens at the field at once (N3). Left: #37664 (formatted headings: rendered text against source text), unblocked now.pm:dispatchedremoved.