Skip to content

fix(pptx): preserve sparse chart point alignment - #221

Open
Yzzz88 wants to merge 1 commit into
firecrawl:mainfrom
Yzzz88:fix/sparse-drawingml-chart-points
Open

Yzzz88 wants to merge 1 commit into
firecrawl:mainfrom
Yzzz88:fix/sparse-drawingml-chart-points

Conversation

@Yzzz88

@Yzzz88 Yzzz88 commented Nov 7, 2026 •

Copy link
Copy Markdown

Fixes #220

Problem

PowerPoint charts may omit a cached numeric point for an empty data cell, or omit a category label while its numeric point remains. Compaction of either list can attach a value to the wrong category or silently drop it.

Change

Match category labels and numeric points using their declared indices. Emit rows for observed indices, including unlabeled rows with data. Treat the first level of a multi-level category cache as its indexed leaf labels. Retain higher-level captions in the existing flattened view without attaching numeric values to them.

Validation

  • The schema-validated numeric-gap PPTX now keeps Week 2 empty and reports Week 3 = 27.
  • The schema-validated label-gap PPTX uses a single-level multiLvlStrCache. The previous local patch reported Week 3 = 20 and dropped 27. This revision yields Week 1 = 12, an unlabeled row = 20, and Week 3 = 27.
  • 300 root-package tests passed in WASI, including snapshots and fixture mutation. One local-corpus test was ignored. Workspace formatting and root-package WASI Clippy passed.
  • In separate WASI build directories, converted both PPTX files with AnyDoc v0.2.4 and this patch. At WeKnora main e3fb2335, both single-level and parent-child chunking preserved the resulting rows in the text passed to embedding. In the real read_document tool with in-memory storage fixtures, querying Week 3 exposed 20 on v0.2.4 and 27 with the patch for the label-gap file. No live deployment, model, or vector database was used.

Prepared with Codex assistance.


Summary by cubic

Fixes #220 so sparse chart data in PPTX files stays aligned. Category labels and numeric points are now matched by their declared idx instead of list position, preventing values from shifting onto the wrong category or being dropped when PowerPoint omits an empty cell's entry.

Multi-level category caches now treat only the first level as indexed leaf labels, so higher-level captions remain in the output without receiving numeric values. Values can also appear on unlabeled rows when a category label is missing.

Written for commit d574792. Summary will update on new commits.

View guided diff

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

View guided diff | Re-trigger cubic

@Yzzz88

Yzzz88 commented Nov 8, 2026

Copy link
Copy Markdown
Author

Hi, could a maintainer approve the CI run for the chart fix when convenient? The CI run for the separate DOCX preview PR #222 is also marked action required with no jobs started. The latest #222 commit adds the two-shape regression requested in review. Thanks!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PPTX chart values shift when the category or numeric cache has gaps

1 participant