Skip to content

fix(server): PowerPoint files whose presentation is not ppt/presentation.xml reach the agent - #41645

Merged
juliusmarminge merged 2 commits into
pingdotgg:mainfrom
only21mil:fix/server-pptx-custom-presentation-root
Nov 23, 2026
Merged

juliusmarminge merged 2 commits into
pingdotgg:mainfrom
only21mil:fix/server-pptx-custom-presentation-root

Conversation

@only21mil

Copy link
Copy Markdown
Contributor

Problem

When a PPTX attachment keeps its presentation somewhere other than ppt/presentation.xml, the agent gets none of its slides. The output is only [Skipped document part: ppt/_rels/presentation.xml.rels (missing or invalid XML).] and the same note for ppt/presentation.xml. An Office package names its main part in _rels/.rels (the officeDocument relationship), so a deck whose presentation is deck/main.xml is valid. #41598 made the text extractor follow that relationship for spreadsheets; PowerPoint still read the fixed ppt/ paths and resolved slide targets under ppt/.

Change

In documentTextWorker.ts, PowerPoint now uses the same mainPart lookup as Word and XLSX, with ppt/presentation.xml still the fallback. It reads the presentation's relationships from <folder>/_rels/<name>.rels and resolves slide targets from the presentation's folder, the same way the XLSX branch does. A small partRels helper replaces the three copies of that relationships path. Ordinary ppt/... decks and speaker-notes lookup resolve exactly as before. Two cases are added to the PPTX table in userInputAttachments.test.ts.

Scope

This is a small bug fix with no issue. It is the PowerPoint follow-up #41598 left for its own PR.

Verification

An AI agent ran each check on Linux with no accounts.

Setup: Linux x86_64, Node 26.13.1, and two synthetic PPTX files whose _rels/.rels points at deck/main.xml and at the package root /main.xml. Each has one slide and one speaker-notes page, and there is no ppt/ folder.
Steps: node apps/server/src/bin.ts __document-text custom-deck.pptx .pptx (the same worker entrypoint the server starts for attachments)

9b8ab94b2494 (main) 91001228676e (this PR)
[Skipped document part: ppt/_rels/presentation.xml.rels (missing or invalid XML).]
[Skipped document part: ppt/presentation.xml (missing or invalid XML).]
## Slide 1
Hello
Notes:
Speaker note
  • The root-level /main.xml deck shows the same before and after.
  • An ordinary ppt/presentation.xml deck prints the same slide and notes on main and on this PR.
  • vp test run apps/server/src/provider/userInputAttachments.test.ts: the new cases fail on main (the output is only the skip notes) and pass with this change (53/53).
  • vp run check:changed: passes.

Generated with Gemini 4 Neon in T3 Code Nightly

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

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 9100122 and 5ad622b.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

The document text worker now builds relationship-file paths from package part paths. PPTX extraction resolves the presentation from the package relationship, then resolves slide targets relative to the presentation directory. Tests cover relative and absolute presentation targets and linked notes.

Changes: Package relationship resolution

Layer / File(s) Summary
Resolve package relationships
apps/server/src/provider/documentTextWorker.ts, apps/server/src/provider/userInputAttachments.test.ts
A shared helper builds relationship-file paths for XLSX and PPTX parts. PPTX extraction follows the declared presentation target and resolves slide targets relative to the presentation directory. Tests cover relative and absolute presentation targets and verify slide text and linked notes are extracted without a skipped-part marker.

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

Change: Bug fix

Suggested reviewers: lucenx9, marve10s

Merge Risk: Minimal · previous review 91001

This change lets PowerPoint files whose main presentation part sits outside the usual ppt/ folder be read correctly. Ordinary decks are described as resolving as before. No merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: PowerPoint files whose presentation part is not at ppt/presentation.xml now reach the agent. The raw summary shows the worker now resolves the PPTX main part through t…
Description check Passed The description follows the template. It has Problem, Change, Scope, and Verification sections. The Problem section gives the symptom and a clear cause. The Change section explains the fix and the sha…
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: PowerPoint files whose presentation part is not at ppt/presentation.xml now reach the agent. The raw summary shows the worker now resolves the PPTX main part through the package's declared relationship, which matches the title. The title is 92 characters, so it is a little long, but it is specific and clear.

Full details: Description check

Explanation

The description follows the template. It has Problem, Change, Scope, and Verification sections. The Problem section gives the symptom and a clear cause. The Change section explains the fix and the shared partRels helper. The Scope section says this is a small bug fix and links the prior related PR #41598. The Verification section lists specific commands, a Linux environment, and before and after output for both the new synthetic decks and an ordinary deck, with a test result of 53/53. The template asks for a model and harness note, and the description includes one (Gemini 4 Neon in T3 Code Nightly). The Scope section gives no issue link, but it does explain why none is needed.

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 18d5eda and 9100122.

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

@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Nov 23, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@juliusmarminge

Copy link
Copy Markdown
Member

Evidence

Attached identical-content PPTX packages with presentations at deck/main.xml, /main.xml, and ppt/presentation.xml, then sent the extraction request. Matched each stored attachment byte-for-byte and displayed its exact server-generated text in the real web app. Fresh databases, Replay (dev), 1280×800, light theme on both sides. scenarios:prove exited 0.

Before After
b5e1f91cba 5ad622b4f4
Both relocated decks yield missing-part notices; standard control works. All three yield the slide text and speaker notes.
Before: missing text for relocated presentations After: slide text and notes for all layouts
Before recording After recording

Scenario source with embedded fixtures

The report shows actual extraction sidecars; Replay's fixed response is not a quotation of their contents.

Not shown:

  • A real model quoting the extracted text was not exercised: Replay returns a fixed reply. The real attachment upload and server-generated extraction files were verified and captured.

@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 23, 2026
@juliusmarminge
juliusmarminge merged commit c6bc43e into pingdotgg:main Nov 23, 2026
51 checks passed
@juliusmarminge juliusmarminge removed the takeover:ready Takeover done; auto-lands when gates pass label Nov 23, 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