Skip to content

fix(slides): preserve raw XML output verbatim#2013

Merged
liangshuo-1 merged 1 commit into
mainfrom
fix/revert-slides-xml-reindent
Jul 22, 2026
Merged

fix(slides): preserve raw XML output verbatim#2013
liangshuo-1 merged 1 commit into
mainfrom
fix/revert-slides-xml-reindent

Conversation

@liangshuo-1

@liangshuo-1 liangshuo-1 commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

Preserve the server XML verbatim for slides +xml-get raw and file output.

Changes

  • Avoid reparsing and reserializing XML on raw output paths.
  • Remove the XML tree dependency that is no longer needed.

Test Plan

  • go test ./shortcuts/slides
  • go mod tidy leaves the worktree clean

Summary by CodeRabbit

  • New Features

    • XML retrieved through Slides XML Get is now preserved and delivered in its original format.
    • Raw XML output is clearly identified in command help and dry-run messages.
  • Bug Fixes

    • Files and standard output no longer receive unintended XML formatting changes.
    • Reported output size now accurately reflects the original XML content.

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a8e7dc98-aadc-42b7-bf2c-0e6f75fbe1bf

📥 Commits

Reviewing files that changed from the base of the PR and between 8ba910e and 023fb0f.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (3)
  • go.mod
  • shortcuts/slides/slides_xml_get.go
  • shortcuts/slides/slides_xml_get_test.go
💤 Files with no reviewable changes (1)
  • go.mod

📝 Walkthrough

Walkthrough

SlidesXMLGet now preserves fetched XML for raw stdout and file output, removes XML pretty-printing and its dependency, updates output metadata and documentation, and revises tests to validate unchanged server content.

Changes

Slides XML output behavior

Layer / File(s) Summary
Raw XML output flow
go.mod, shortcuts/slides/slides_xml_get.go, shortcuts/slides/slides_xml_get_test.go
SlidesXMLGet writes fetched XML unchanged to stdout or output files, reports raw content length, removes pretty_printed metadata and formatting helpers, and updates tests accordingly.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant SlidesXMLGet
  participant outputSlidesXMLGetContent
  participant stdout
  participant outputFile
  SlidesXMLGet->>outputSlidesXMLGetContent: pass fetched XML content and output flags
  outputSlidesXMLGetContent->>stdout: write raw XML when --raw is used
  outputSlidesXMLGetContent->>outputFile: save raw XML when --output is used
Loading

Possibly related PRs

Suggested reviewers: ethan-zhx, tianyouskrrr

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: preserving raw XML output verbatim.
Description check ✅ Passed The description follows the template with Summary, Changes, and Test Plan, and is mostly complete despite no Related Issues entry.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/revert-slides-xml-reindent

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the size/M Single-domain feat or fix with limited business impact label Jul 22, 2026
Keep --raw and file output byte-exact by returning the server response without XML reserialization.
@liangshuo-1
liangshuo-1 force-pushed the fix/revert-slides-xml-reindent branch from a5f69de to 023fb0f Compare July 22, 2026 13:51
@liangshuo-1 liangshuo-1 changed the title fix(slides): revert XML output reindentation fix(slides): preserve raw XML output verbatim Jul 22, 2026
@liangshuo-1
liangshuo-1 marked this pull request as ready for review July 22, 2026 13:52
@github-actions

Copy link
Copy Markdown

🚀 PR Preview Install Guide

🧰 CLI update

npm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@023fb0f73453f57c4483ac9608cc239fe3956281

🧩 Skill update

npx skills add larksuite/cli#fix/revert-slides-xml-reindent -y -g

@liangshuo-1
liangshuo-1 merged commit abf6f99 into main Jul 22, 2026
32 of 41 checks passed
@liangshuo-1
liangshuo-1 deleted the fix/revert-slides-xml-reindent branch July 22, 2026 14:06
@liangshuo-1 liangshuo-1 mentioned this pull request Jul 22, 2026
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Single-domain feat or fix with limited business impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants