GeezerVison is showing github.com — fix(server): omit ODT text hidden by paragraph styles from attachment text by only21mil · Pull Request #44895 · pingdotgg/t3code
Conversation
Problem
When a user attaches an .odt file with paragraphs or headings hidden by a paragraph style (style:family="paragraph" with text:display="none", directly or via style:parent-style-name), the server includes that hidden text in the extracted sidecar instead of omitting it. Text hidden by ODT character styles (#44509) and DOCX paragraph styles (#44611) is already omitted.
Change
In apps/server/src/provider/documentTextWorker.ts, ODT styles are now scoped by style:family (text and paragraph). Both families are collected from styles.xml and content.xml; <text:p> and <text:h> resolve text:style-name against paragraph while <text:span> resolves against text (so an inner span with text:display="true" shows again, matching #44509 and #44611), and both reset if styles.xml fails to parse. Extended the ODF table in apps/server/src/provider/userInputAttachments.test.ts.
Scope
Small bug fix (24 changed non-test lines, 1 file) for hidden .odt paragraphs and headings leaking into attachment text, matching #44509 and #44611; needs no separate issue.
Verification
Setup: Linux (Node v26.13.1), sandboxed server (T3CODE_DEV_SEED=0, --base-dir, TZ=UTC, synthetic project, devReplay), isolated home per commit.
Steps: Upload hidden-para.odt (mirroring #44509's XML extended to style:family="paragraph" with P1, HiddenBase, HiddenChild, and ShowSpan) via /api/attachments/upload/... → send on a devReplay thread → wait → read .odt.txt.
Before (c1bc3845db54):
Commit: c1bc3845db54
Provider: devReplay (default), run status: completed
Upload HTTP: 204, claimed sidecar: <attachmentsDir>/mcp-c75786b4-6068-4231-bc20-580fcf7005d0-7f7abf19-5a0b-4dee-a559-454909525a70-odt.odt.txt
--- Extracted text provided to agent ---
Visible intro
Direct hidden paragraph
Inherited hidden override visible tail
## Hidden heading
--- End extracted text ---
After (735a6e881dc8):
Commit: 735a6e881dc8
Provider: devReplay (default), run status: completed
Upload HTTP: 204, claimed sidecar: <attachmentsDir>/mcp-58c6e346-c31c-464d-ab70-d3272bb42e05-6b560e46-61ee-4958-9b69-78d7bd6031b0-odt.odt.txt
--- Extracted text provided to agent ---
Visible intro
override visible
--- End extracted text ---
Links: apps/server/src/provider/userInputAttachments.test.ts, #44509, #44611.
Not shown:
Focused test output and local checks
Base commit: c1bc3845db54 (44/44 check-runs green, commit status success).
Fail-first on c1bc3845db54 (vp env exec --node 26.13.1 -- vp test run apps/server/src/provider/userInputAttachments.test.ts):
FAIL |t3| src/provider/userInputAttachments.test.ts > question answer paths > preserves office structure and EPUB reading order with bounded archives
- North entrance
+ Retired
+ route.
+ ## Retired section
+ Draft North entrance only.
+ Hidden shared paragraph.
Keep shared text.
Paragraph ignores text family.
Foreign display control.
Foreign style control.
Tests 1 failed | 68 passed (69)
Passing on 735a6e881dc8 (Node v26.13.1):
vp test run apps/server/src/provider/userInputAttachments.test.ts: 69 passed (69).
vp run check:changed c1bc3845db54a5d0c13ce1283fad589e087898ca: exit 0 (format, lint 0 warnings, knip, graphql, typecheck 3 packages, 3 test files / 73 passed).
- Tested by: AI agent.
Generated with Gemini 4 Neon in T3 Code Nightly
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Nov 28, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

No actionable comments were generated in the recent review.
Walkthrough
-
ODT extraction now tracks text and paragraph styles separately. It applies family-specific visibility checks to spans, paragraphs, and headings. Tests cover inherited styles, overrides, shared style names, and malformed optional styles XML.
Changes: ODT visibility
| Layer / File(s) |
Summary |
Parse and apply family-specific styles apps/server/src/provider/documentTextWorker.ts, apps/server/src/provider/userInputAttachments.test.ts |
Style parsing now records text and paragraph families. Extraction applies the matching family’s hidden-style lookup to spans, paragraphs, and headings. Tests cover inheritance, overrides, same-name styles across families, foreign-namespace attributes, and malformed styles XML. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Possibly related PRs
Suggested reviewers: jadelike-wine, lucenx9, iamshadmantaqi
Merge Risk: Minimal · up to 2e4ef
-
Merge Risk: ⚪ Minimal · up to 2e4ef
ODT attachment extraction now omits text hidden by paragraph styles while keeping visible span overrides. No actionable merge risk remains.
Pre-merge checks: 4
-
| Check name |
Status |
Explanation |
| Title check |
 |
The title names the main change: ODT text hidden by paragraph styles is now omitted from attachment text. It follows the conventional commit form and matches the diff, the PR objectives, and the test … |
| Description check |
 |
The description follows the template. It includes Problem, Change, Scope, and Verification sections. It explains the bug and the fix, links the related issues (#44509, #44611), and gives focused fail-… |
| Linked Issues check |
 |
Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check |
 |
Check skipped because no linked issues were found for this pull request. |
Full details: Title check
-
Explanation
The title names the main change: ODT text hidden by paragraph styles is now omitted from attachment text. It follows the conventional commit form and matches the diff, the PR objectives, and the test changes. It does not cover the span-family scoping, but that detail is secondary.
Full details: Description check
-
Explanation
The description follows the template. It includes Problem, Change, Scope, and Verification sections. It explains the bug and the fix, links the related issues (#44509, #44611), and gives focused fail-first and passing test output. It notes what was not tested and names the agent and model that did the work. The template's Problem section asks for reproduction steps, and the author gives them in Verification. The opening HTML comment block from the template is not reproduced, which is minor. The description is mostly complete.
Finishing Touches
-
Generate unit tests (beta)
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info
-
Run configuration
-
Commits
-
Reviewing files that changed from the base of the PR and between 40b0a98 and 735a6e8.
Files selected for processing: 2
-
apps/server/src/provider/documentTextWorker.ts
apps/server/src/provider/userInputAttachments.test.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Evidence
Uploaded the same synthetic ODT on fresh databases, then opened an unchanged copy of each server-generated text sidecar in the real app's file viewer. Chromium, 1280×800, light theme, Replay (dev).
The scenario failed on base and passed on head; scenarios:prove exited 0. Reproduction scenario with embedded ODT fixture.
Not shown:
- A real Codex verbatim quotation and post-send attachment rename were not exercised; proof directly inspected fresh upload extraction through the real server and app.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
size:S
10-29 changed lines (additions + deletions).
vouch:unvouched
Author is not yet trusted in the VOUCHED list.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|