docs: add contributor placement guide for SuperDoc layers#3278
Merged
Conversation
A central routing map for "where do I put my change?" so contributors and agents land in the right layer without learning the boundaries by trial. Root CLAUDE.md (which root AGENTS.md follows via symlink): - Rewrite the rendering-flow arrow to include super-converter as the entry (.docx -> super-converter -> hidden PM -> pm-adapter+style-engine -> ...). - Replace the 3-row "Where visual changes go" table with an 11-row "Where To Put Your Change" routing table covering: DOCX import/export, style cascade, static visuals, direction-aware properties, editing behavior, ephemeral editor UI, interaction mapping, geometry/pagination, final DOM rendering, presentation state bridge, document-API operations, consumer SDK/CLI surface. - Add a "Quick Boundary Checks" section with rg commands that surface the three most common layer-leak patterns (painter upstream imports, pm-adapter DOM work, importer baking style cascade). packages/layout-engine/AGENTS.md (CLAUDE.md follows via symlink): - Rename the "Key Insight" header to "DomPainter Receives Paint-Ready Data" (the existing 'dumb' wording was a tone choice the new copy drops). - Replace the "Rendering Ownership" block with a "Layer Ownership" section that cross-references root CLAUDE.md and adds direction-axes + bidiVisual single-mirror reminders local to the package. packages/superdoc/AGENTS.md is intentionally untouched: it is consumer- facing and ships with the npm package. No behavior change. Docs only.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
caio-pizzol
added a commit
that referenced
this pull request
May 14, 2026
…umers (SD-3138) Centralize the read of table visual direction (w:bidiVisual, ECMA-376 section 17.4.1) through one helper, mirroring the paragraph-axis pattern already established for getParagraphInlineDirection. - Add getTableVisualDirection(attrs) to @superdoc/contracts. Reads attrs.tableDirectionContext.visualDirection first (future-ready for when pm-adapter writes the resolved context onto TableAttrs), falls back to attrs.tableProperties.rightToLeft (or bidiVisual alias) for compatibility. - Migrate three consumers off raw reads: - layout-engine/src/layout-table.ts (table-frame X positioning) - painters/dom/src/table/renderTableFragment.ts (visual mirror gate) - super-editor/.../tableBoundaryNavigation.js (RTL cursor nav) Out of scope for this PR: - pm-adapter wiring that populates TableAttrs.tableDirectionContext. Phase 1B - the helper is future-ready but the context isn't written yet, so the fallback path is exercised today. - packages/super-editor/.../TableResizeOverlay.vue reads a different shape (tableMetadata.value.rtl); migration deferred to keep this PR scoped. Companion to SD-3134 and PRs #3272/#3273/#3278; under SD-2771 Wave 3. Tests: - 14 unit tests for getTableVisualDirection (precedence, alias, no signal, null fallback). - 174 painter table tests, 652 layout-engine tests, 189 super-editor table extension tests all pass.
Contributor
|
🎉 This PR is included in @superdoc-dev/mcp v0.3.0-next.90 The release is available on GitHub release |
Contributor
|
🎉 This PR is included in vscode-ext v2.3.0-next.135 |
Contributor
|
🎉 This PR is included in @superdoc-dev/react v1.2.0-next.133 The release is available on GitHub release |
Contributor
|
🎉 This PR is included in superdoc-cli v0.8.0-next.105 The release is available on GitHub release |
Contributor
|
🎉 This PR is included in superdoc-sdk v1.8.0-next.89 |
Contributor
|
🎉 This PR is included in superdoc v1.30.0-next.87 The release is available on GitHub release |
caio-pizzol
added a commit
that referenced
this pull request
May 14, 2026
…umers (SD-3138) (#3279) Centralize the read of table visual direction (w:bidiVisual, ECMA-376 section 17.4.1) through one helper, mirroring the paragraph-axis pattern already established for getParagraphInlineDirection. - Add getTableVisualDirection(attrs) to @superdoc/contracts. Reads attrs.tableDirectionContext.visualDirection first (future-ready for when pm-adapter writes the resolved context onto TableAttrs), falls back to attrs.tableProperties.rightToLeft (or bidiVisual alias) for compatibility. - Migrate three consumers off raw reads: - layout-engine/src/layout-table.ts (table-frame X positioning) - painters/dom/src/table/renderTableFragment.ts (visual mirror gate) - super-editor/.../tableBoundaryNavigation.js (RTL cursor nav) Out of scope for this PR: - pm-adapter wiring that populates TableAttrs.tableDirectionContext. Phase 1B - the helper is future-ready but the context isn't written yet, so the fallback path is exercised today. - packages/super-editor/.../TableResizeOverlay.vue reads a different shape (tableMetadata.value.rtl); migration deferred to keep this PR scoped. Companion to SD-3134 and PRs #3272/#3273/#3278; under SD-2771 Wave 3. Tests: - 14 unit tests for getTableVisualDirection (precedence, alias, no signal, null fallback). - 174 painter table tests, 652 layout-engine tests, 189 super-editor table extension tests all pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a central placement guide for SuperDoc layers, so contributors and agents land in the right package without learning the boundaries by trial. Docs-only — no code or behavior change.
What lands:
CLAUDE.md(which rootAGENTS.mdfollows via symlink) gets an 11-row "Where To Put Your Change" routing table replacing the previous 3-row "Where visual changes go" version. Covers DOCX import/export, style cascade, static visuals, direction-aware properties, editing behavior, ephemeral editor UI (with theDecorationBridge/CommentHighlightDecorator/ search-exclusion / Vue overlay specifics), interaction mapping, geometry, final DOM rendering, presentation state bridge, document-API operations, and consumer SDK/CLI surface. The rendering-flow arrow now starts atsuper-converterso the entry isn't implicit.rgcommands that surface the most common layer-leak patterns (painter upstream imports, pm-adapter DOM work, importer baking style cascade). Agent-friendly: rules become greppable, not just prose.packages/layout-engine/AGENTS.md(CLAUDE.md follows via symlink) gets a "Layer Ownership" rewrite that cross-references root and adds direction-axes +w:bidiVisualreminders local to the package.What's untouched and why:
packages/superdoc/AGENTS.md— consumer-facing, ships with the npm package. Its siblingCLAUDE.md(internal) is intentionally separate; merging would either pollute the npm-shipped doc with contributor rules or strip the internal navigation map.Companion / sequencing:
pm-adapter/src/direction/README.mdplus dead-arg cleanup. This PR builds on that by routing future contributors there. If PR docs(direction): document visual mirror rule + drop dead isRtl args #3273 hasn't merged yet, expect a small textual conflict on the direction bullet inpackages/layout-engine/AGENTS.md— easy resolve, the more detailed wording wins.Verified:
cmp CLAUDE.md AGENTS.md→ identical (root symlink resolves).