GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

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

@only21mil

@only21mil only21mil commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

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:

  • LibreOffice Writer-saved .odt (not installed here; sample mirrors fix(server): omit text hidden by ODT character styles #44509's XML extended to style:family="paragraph" with text:display="none").
  • <style:default-style> and frame/note visibility resets (deferred to match fix(server): omit text hidden by ODT character styles #44509).
  • Paid provider turns (devReplay used) and repo-wide test/typecheck suites (CI runs them).
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.

All reactions
@only21mil
fix(server): omit ODT text hidden by paragraph styles from attachment…
735a6e8
… text
@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Nov 28, 2026
@coderabbitai

coderabbitai Bot commented Nov 28, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Explain Change →

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

  • pingdotgg/t3code#44509: Updates ODT extraction visibility checks for text spans and style inheritance.
  • pingdotgg/t3code#44611: Implements hidden paragraph-style handling in the DOCX parser.
  • pingdotgg/t3code#44724: Implements related ODT style visibility behavior in the web preview.

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: Passed 4

Check name Status Explanation
Title check Passed 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 Passed 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 Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed 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)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: pingdotgg/t3code
  • Branch: main
  • File: .coderabbit.config.ts
  • Commit: 40b0a98
  • Layers: Repository TS config
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f3510743-b3ac-4a9f-840c-75cb90a159b6
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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Nov 28, 2026
@juliusmarminge
Merge remote-tracking branch 'origin/main' into fix/server-odt-hidden…
2e4ef72
…-paragraph-styles
@juliusmarminge

juliusmarminge commented Nov 28, 2026

Copy link
Copy Markdown
Member

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).

Before After
40b0a98a20 2e4ef728a3
Before: hidden paragraphs and heading leak into extracted text After: visible introduction and explicitly visible span only
Before recording After recording

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.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge juliusmarminge added takeover:ready Takeover done; auto-lands when gates pass and removed takeover:in-progress A takeover lead is working on this PR labels Nov 28, 2026
@juliusmarminge
juliusmarminge merged commit 17a44b5 into pingdotgg:main Nov 28, 2026
56 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge juliusmarminge removed the takeover:ready Takeover done; auto-lands when gates pass label Nov 28, 2026
@iamshadmantaqi iamshadmantaqi mentioned this pull request Nov 28, 2026
fix(web): ODT preview hides text hidden by paragraph styles #44951
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

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.

Projects

None yet

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.

2 participants

@only21mil @juliusmarminge
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.