Skip to content

fix(server): PowerPoint speaker notes leave out the notes page's slide number, date, header and footer - #40568

Merged
juliusmarminge merged 3 commits into
pingdotgg:mainfrom
Marve10s:fix/pptx-notes-placeholders
Nov 21, 2026
Merged

juliusmarminge merged 3 commits into
pingdotgg:mainfrom
Marve10s:fix/pptx-notes-placeholders

Conversation

@Marve10s

Copy link
Copy Markdown
Contributor

Problem

When a .pptx is attached, the agent gets each slide's speaker notes under Notes:. A PowerPoint notes page has placeholder shapes besides the notes: the slide image, slide number, date, header, and footer. The worker prints every paragraph on the page, so:

  • a slide whose notes page has no notes text gets Notes: followed by its slide number;
  • real notes get the slide number appended, plus any header, footer, or date set for notes pages.

Running the extractor over Apache POI's sample decks shows it, for example:

51187.pptx    "## Slide 1\n\nNotes:\n\n1"
bug65551.pptx "...Notes:\n\naccount\n1"

Change

Before printing a notes page, the worker leaves out p:sp shapes whose p:ph type is sldImg, sldNum, dt, hdr, or ftr. The body placeholder and any other shape on the notes page stay. Notes: is printed only when the remaining page has text (hasCellText), and the notes still stream through the existing output limits. Only the notes page is filtered. A slide's own number and footer are visible slide text, and they stay.

Scope

This is a small fix for an obvious bug, so it has no issue. In 26 of the 28 Apache POI sample decks that have notes pages, those pages carry a cached slide number, so the agent reads it as a note, and a slide with empty notes gets a false Notes: label. Open #38542 applies the same rule to OpenDocument notes ("A notes page with only an empty thumbnail adds no label") and doesn't touch the .pptx branch.

Verification

The existing PPTX row in userInputAttachments.test.ts now uses a realistic notes page, with the slide image, body, header, date, footer, and slide number placeholders. Its absent list gains the placeholder texts. A new row in the same table has a notes page with only the slide image, an empty body, and a slide number, and expects no Notes:. Another new row puts notes text before a table that hits the row limit, and checks that the text and the truncation marker both appear.

main:  × preserves office structure and EPUB reading order with bounded archives
       expected '## Slide 1\nJuniper Pier\nNotes:\neva…' not to contain 'Harbor briefing'
fix:   Tests  45 passed (45)

With the fix, the two POI decks above extract as "## Slide 1" and "...Notes:\n\naccount". vp run check:changed upstream/main passes.

Claude Fable 5.2 (high, Claude Agent in T3 Code) found the bug. Claude Opus 5.5 (high) and GPT-6.2 Sol (high, Codex) reproduced it independently. Claude Opus 5.5 (Claude Agent in T3 Code) wrote the fix and test. Claude Opus 5.5 (xhigh), GPT-6.2 Sol, GPT-6.2 Astra (high, Codex), and Claude Fable 5.2 reviewed the final patch in T3 Code.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-21T21:42:38.734642Z 965bd8f PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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 21, 2026
@coderabbitai

coderabbitai Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

PowerPoint notes extraction now filters slide image, slide number, date, header, and footer placeholders. It omits a notes section when no text remains after filtering. Tests cover placeholder filtering and empty notes.

Changes: PowerPoint Notes Extraction

Layer / File(s) Summary
Filter and extract notes
apps/server/src/provider/documentTextWorker.ts, apps/server/src/provider/userInputAttachments.test.ts
The extractor filters specified placeholder shapes before checking for notes text and extracting paragraphs. Tests cover placeholder exclusion and notes pages with no remaining text.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested labels: bugfix

Suggested reviewers: macroscopeapp

Merge Risk: Minimal · up to c0e28

This change stops cached slide numbers and footer text from appearing as PowerPoint speaker notes, and it omits the notes section when a notes page has no real text. The behavior change is narrow and has tests. No actionable merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the fix and the affected area: PowerPoint speaker notes extraction now leaves out the notes page's slide number, date, header and footer. The changeset removes notes-page placeholder s…
Description check Passed The description follows the template's sections: Problem, Change, Scope, and Verification. The Problem section explains the bug with reproduction examples from Apache POI sample decks. The Change sect…
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 fix and the affected area: PowerPoint speaker notes extraction now leaves out the notes page's slide number, date, header and footer. The changeset removes notes-page placeholder shapes (sldImg, sldNum, dt, hdr, ftr) before extracting notes text, which matches the title. The title is specific and follows the conventional commit format. It is 102 characters, slightly long, but still clear.

Full details: Description check

Explanation

The description follows the template's sections: Problem, Change, Scope, and Verification. The Problem section explains the bug with reproduction examples from Apache POI sample decks. The Change section describes the placeholder filtering and the hasCellText guard. The Scope section explains why no issue is linked and why the fix is small. The Verification section lists focused test changes and results, including a failing main comparison and a passing fix run. It also ends with the model and harness that did the work. The description meets the template's core requirements. It does not link a tracking issue, but it gives a reason for that omission, as the template allows for small obvious fixes.

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

Commits

Reviewing files that changed from the base of the PR and between 965bd8f and c0e2821.

Files selected for processing: 1

  • apps/server/src/provider/userInputAttachments.test.ts
Files with no reviewable changes: 1

  • 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; 8 remain after this review.

@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Nov 21, 2026
juliusmarminge and others added 2 commits November 21, 2026 21:50
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…covers

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@juliusmarminge

Copy link
Copy Markdown
Member

Evidence

Uploaded the same synthetic two-slide deck in the real web client on fresh databases. Opened an unchanged copy of each server-generated extracted-text sidecar in T3's file viewer. Chromium, 1280×800, light theme, replay provider.

Proven: the scenario fails on base and passes on head. Base includes notes-page decorations and a false Notes label for the empty-notes slide. Head retains genuine notes and visible slide text and removes both defects.

Before After
ffb42a0b77 c0e2821ccd
Before: decorations and false Notes label After: genuine notes only, visible slide text preserved
Before recording After recording

Scenario · Synthetic deck · Deck generator

Not shown:

  • Extraction limits were not exercised by this small two-slide reproduction.
  • The deck uses python-pptx and PowerPoint notes-page placeholder structure, matching triage; a deck saved directly by Microsoft PowerPoint was not exercised.

@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 21, 2026
@juliusmarminge
juliusmarminge merged commit dac6422 into pingdotgg:main Nov 21, 2026
54 checks passed
@juliusmarminge juliusmarminge removed the takeover:ready Takeover done; auto-lands when gates pass label Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants