Skip to content

fix: anchored textbox in header#3690

Open
VladaHarbour wants to merge 5 commits into
mainfrom
sd-2745_anchored-header-checkbox
Open

fix: anchored textbox in header#3690
VladaHarbour wants to merge 5 commits into
mainfrom
sd-2745_anchored-header-checkbox

Conversation

@VladaHarbour

Copy link
Copy Markdown
Contributor

No description provided.

@VladaHarbour VladaHarbour self-assigned this Jun 9, 2026
@VladaHarbour VladaHarbour requested a review from a team as a code owner June 9, 2026 15:56
@linear-code

linear-code Bot commented Jun 9, 2026

Copy link
Copy Markdown

SD-2745

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

The ecma-spec MCP tools are being denied at the permission layer in this session — every call (ooxml_children, ooxml_enum, ooxml_type, ooxml_section, ooxml_search) came back "not granted yet," so I couldn't pull live schema excerpts. I've reviewed the three changed handler files against my own knowledge of ECMA-376 instead. Flagging that up front so you know the spec checks here weren't tool-verified.

Here's the review:


Status: PASS

These changes parse textbox content (XML → PM), and the element/attribute usage lines up with ECMA-376.

What I checked:

  • w:tbl inside w:txbxContent (textbox-content-helpers.js:59-83, encode-image-node-helpers.js:1192-1208) — This is the headline change, and it's correct. CT_TxbxContent uses the EG_BlockLevelElts content model (same as the document body), which permits both w:p and w:tbl. Collecting tables and encoding them via tblTranslator is spec-valid. Recursing into w:sdtw:sdtContent is also fine, since SDTs can wrap block content. See https://ooxml.dev/spec?q=txbxContent.

  • w:tab as run content (encode-image-node-helpers.js:1105-1107) — Correctly treated as the tab character when it's a child of w:r, distinct from tab stop definitions. Good — w:tab is overloaded in the spec and this keeps the two senses separate. https://ooxml.dev/spec?q=tab

  • w:br (line 1108-1110) — Valid run-level break content. ✓

  • Tab stop justification (ST_TabJc) (textbox-content-helpers.js:223-264) — Reads valid values and the leftstart / rightend normalization matches the transitional↔strict aliasing in the schema. w:val and w:pos are required on CT_TabStop; defaulting a missing val to start and skipping non-finite pos is a reasonable tolerant-parse choice. https://ooxml.dev/spec?q=tabs

  • Tab leader (ST_TabTlc) — passed through as-is (filtering only none), which is fine for import; dot/hyphen/underscore/heavy/middleDot are all valid.

One minor, non-blocking note (not a violation):

normalizeTabVal maps numdecimal (textbox-content-helpers.js:229). In ECMA-376, num (list/numbered-list tab) is a distinct ST_TabJc value, not a decimal tab. Since paragraphTabs is only used for paint-time tab alignment inside the textbox (not for OOXML round-trip — the table/run data is preserved separately), collapsing it to decimal is a rendering simplification rather than a parse-fidelity bug. Worth a comment, but it doesn't break spec compliance.

No non-existent attributes/elements, no missing-required-attribute handling gaps, and no incorrect defaults in the changed handlers.

If you'd like the txbxContent content-model and ST_TabJc/ST_TabTlc enumerations confirmed against the actual XSD, re-run me with the ecma-spec tool permissions granted and I'll verify each one directly.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 305de5e003

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/super-editor/src/editors/v1/core/layout-adapter/internal.ts Outdated
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@VladaHarbour VladaHarbour force-pushed the sd-2745_anchored-header-checkbox branch from 5888d1e to 4cc3b54 Compare June 9, 2026 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants