Skip to content

fix(xlsx): restore location hyperlinks on picture read#179

Merged
bobzhang merged 1 commit into
mainfrom
fix/drawing-location-hyperlink
Jul 19, 2026
Merged

fix(xlsx): restore location hyperlinks on picture read#179
bobzhang merged 1 commit into
mainfrom
fix/drawing-location-hyperlink

Conversation

@bobzhang

Copy link
Copy Markdown
Collaborator

Summary

Main is red: xlsx/drawing_readback_roundtrip_test.mbt ("picture positioning and hyperlinks round-trip") fails on native and wasm since the #172 + #177 merges. #172 switched drawing hyperlink resolution to external-mode relationships only; internal-mode hyperlink rels — which mbtexcel's own writer emits for location links like Sheet1!B2 — were dropped on read (hyperlink="", HyperlinkType::Unset). #177's round-trip test detects exactly this, but the two PRs ran CI before each other merged, so only main's post-merge run caught the interaction.

Fix: resolve both modes in parse_drawing_images — external-mode targets keep External; on a miss, fall back to internal-mode targets as Location.

Validation

  • drawing_readback_roundtrip_test: 8/8 on native and wasm (was 7/8 on both).
  • Picture/drawing-adjacent suites green (picture_read/picture_ops/image/cell_images/image_dimensions/drawing_preservation).
  • moon check clean, moon fmt, moon info (no .mbti change).

🤖 Generated with Claude Code

PR #172 switched drawing hyperlink resolution to
parse_external_relationship_targets only, so internal-mode hyperlink
relationships - which this library's own writer emits for location
links like "Sheet1!B2" - were dropped on read: the picture came back
with an empty hyperlink and HyperlinkType::Unset. The regression was
caught on main by the #177 round-trip test (merged concurrently, so
neither PR's CI saw the interaction).

Resolve both modes: external-mode targets keep HyperlinkType::External;
a miss falls back to internal-mode targets as HyperlinkType::Location.

Fixes the main-branch CI failure in
xlsx/drawing_readback_roundtrip_test.mbt on native and wasm.
@bobzhang
bobzhang merged commit 6769468 into main Jul 19, 2026
4 checks passed
@bobzhang
bobzhang deleted the fix/drawing-location-hyperlink branch July 19, 2026 13:07
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.

1 participant