Repository navigation
fix: extract pptx text in presentation order - #14876
Conversation
Design Review (Fable 5) — ✅ PASSDesign-level review of Design-Verdict: PASS Verify against one real PowerPoint-saved reordered deck; every test fixture here is hand-built minimal XML, never a genuine Office container. [DESIGN-REVIEWED] 355bdf0 Description read[DESCRIPTION-READ] 330f96e2d04ccf3a0e88b9daa2a4c510e21a81c56a291aee48d52e72921bc395 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Fable 5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS All items justified; no real PowerPoint-saved deck is in the tests — verify one genuinely reordered What this change shipsInventory (8 items) — 8 justifiedIntent: FIX — PPTX previews should show slides in the deck's real presentation order, not stale ZIP filename order (supersedes #9235; the reordered-deck test fails on base).
Consumer counts: no new public surface; [FIRST-PRINCIPLES-REVIEWED] 355bdf0 Description read[DESCRIPTION-READ] c6ef086e3e98625287ff25bc3658f37078a02123a338136fccc23e4de7b0d3b8 That sha256 names the PR description this verdict read. Recompute it with |
GPT 5.6 Review — ✅ no blocking findingsGPT 5.6 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Opus 5 Review — ✅ no blocking findingsReviewed Review detailsTwo advisory findings; nothing blocks the merge. FINDING — src/kiro_crew/doc_parser.py:360 — FINDING — src/kiro_crew/dashboard/handlers/files.py:3665 — the PR redefines the slide [OPUS-REVIEWED] 355bdf0 Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
cc5f7d3 to
bed0a09
Compare
Co-authored-by: leonlaiyc <276034861+leonlaiyc@users.noreply.github.com>
bed0a09 to
355bdf0
Compare
Problem / Motivation
Goal: PPTX text previews come out in the deck's real presentation order, not ZIP filename order.
doc_parser.extract_textsortedppt/slides/slideN.xmlby the numericNin thefilename. A deck that has been reordered keeps its old filename numbers, so a
reordered presentation was previewed in the wrong (stale filename) order.
Why it matters
Users pasting or previewing a reordered
.pptxsaw slides in the wrong sequence,which misrepresents the document. Any downstream consumer of the preview text
(search, summaries) inherited the wrong order.
Not a goal
What changed (motivation → approach → change)
slideN.xmlfilename number.ppt/presentation.xml'sp:sldIdLst,resolved through the deck's internal slide relationships, so ZIP filenames no
longer determine positions. Blank/unresolved slides keep their positions,
unreferenced parts are omitted, each resolved part is extracted at most once,
and the text budget stops in presentation order. Ordering metadata uses the
same bounded ZIP reads and hardened XML parser as slide content. Containers
without
ppt/presentation.xmlretain numeric-filename best-effort extraction;a present-but-unreadable manifest does not fall back to it.
Backwards compatibility
Compatible: extraction output is reordered to match true presentation order; no
input previously accepted is rejected, and decks without an ordering manifest
retain the prior numeric-filename behavior.
Tests
test/test_doc_parser_pptx_order.py(new): reordered decks use presentationpositions (with and without a pre-opened archive), relationship targets need not
have numeric filenames, unreferenced slide parts are excluded, a blank slide
keeps the following presentation number, and the budget keeps the actual first
slide without reading later slides. 19 cases pass locally against fresh
main.Manual verification
N/A — unit coverage sufficient; the change is a pure text-extraction reordering
exercised deterministically by the new tests.
Related Issues
Supersedes #9235 (in-repo replacement of the fork PR by @leonlaiyc, rebased onto
current
main; authorship preserved, credited viaCo-authored-by).Pattern harvest
Not generalizable: this is a single ordering-source bug (filename order vs
declared presentation order) specific to the PPTX branch of
doc_parser.Checklist