Skip to content

fix(docs): render markdown strikethrough#706

Merged
steipete merged 1 commit into
mainfrom
fix/docs-markdown-strikethrough
Jun 7, 2026
Merged

fix(docs): render markdown strikethrough#706
steipete merged 1 commit into
mainfrom
fix/docs-markdown-strikethrough

Conversation

@steipete
Copy link
Copy Markdown
Collaborator

@steipete steipete commented Jun 7, 2026

Summary

  • parse exact GFM ~~strikethrough~~ spans in the local markdown writer
  • emit Google Docs textStyle.strikethrough update requests for parsed spans
  • keep longer tilde runs such as ~~~text~~~ literal to avoid eating unsupported markdown

Fixes #702.

Proof

  • go test ./internal/cmd -run 'TestParseInlineFormatting|TestMarkdownToDocsRequests_Strikethrough|TestMarkdownToDocsRequests_BaseIndex|TestMarkdownToDocsRequests_AppendBulletsAndCode'
  • go test ./internal/cmd/...
  • make ci
  • autoreview clean: no accepted/actionable findings reported
  • Live E2E with clawdbot@gmail.com: scratch Doc 1GNjuLeCXtmNVQAyw0c7XOdLjGIv-p6f9VR21dDfrkY0, tab t.eyzzzc9zen2h; whole-doc write reported whole_strike:true and whole_tilde_markers:0; tab write reported tab_strike:true and tab_tilde_markers:0; cleanup reported cleanup_trashed:true.

@clawsweeper
Copy link
Copy Markdown

clawsweeper Bot commented Jun 7, 2026

Codex review: needs maintainer review before merge. Reviewed June 7, 2026, 1:44 AM ET / 05:44 UTC.

Summary
Adds ~~strikethrough~~ parsing to the Docs local markdown writer, emits Google Docs textStyle.strikethrough update requests, and adds parser/formatter tests plus a changelog entry.

Reproducibility: yes. from source inspection and the linked report: current main's local markdown writer parses bold/italic/code/link but has no strikethrough field or request emission, matching the reported literal tilde output. I did not run live Google commands during this read-only review.

Review metrics: 2 noteworthy metrics.

  • Files changed: 5 files, +112/-19. The diff is small and concentrated on the Docs markdown parser, formatter, tests, and release note.
  • Behavior tests added: 3 focused tests added. The new tests cover inline parsing, literal longer tilde runs, and Docs request emission for tab-aware strikethrough ranges.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🦞 diamond lobster
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • none.

Next step before merge

  • [P2] No repair lane is needed because the PR itself is the focused implementation candidate and has no actionable review findings.

Security
Cleared: The diff only changes local Go markdown parsing/formatting tests and a changelog entry; it adds no dependency, credential, CI, or code-execution surface.

Review details

Best possible solution:

Review and land this focused PR if maintainers accept the exact two-tilde GFM behavior and the reported live Google proof.

Do we have a high-confidence way to reproduce the issue?

Yes from source inspection and the linked report: current main's local markdown writer parses bold/italic/code/link but has no strikethrough field or request emission, matching the reported literal tilde output. I did not run live Google commands during this read-only review.

Is this the best way to solve the issue?

Yes. Extending the existing inline parser and buildTextStyleRequest path is the narrowest maintainable fix for the local Docs markdown writer, while leaving unsupported longer tilde runs literal as the PR states.

AGENTS.md: found and applied where relevant.

Codex review notes: model gpt-5.5, reasoning high; reviewed against f0dbde21f892.

Label changes

Label changes:

  • add P2: This fixes a normal Docs markdown rendering bug with limited blast radius in an existing command path.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes copied live E2E output for a scratch Google Doc showing both whole-doc and tab strikethrough success with tilde markers removed, plus cleanup.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body includes copied live E2E output for a scratch Google Doc showing both whole-doc and tab strikethrough success with tilde markers removed, plus cleanup.

Label justifications:

  • P2: This fixes a normal Docs markdown rendering bug with limited blast radius in an existing command path.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body includes copied live E2E output for a scratch Google Doc showing both whole-doc and tab strikethrough success with tilde markers removed, plus cleanup.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes copied live E2E output for a scratch Google Doc showing both whole-doc and tab strikethrough success with tilde markers removed, plus cleanup.
Evidence reviewed

What I checked:

  • Repository policy read: Read the full target AGENTS.md and applied its read-only PR review guidance plus its test/live-proof expectations for Google Workspace behavior. (AGENTS.md:1, f0dbde21f892)
  • Current main lacks local writer strikethrough style: On current main, the local markdown TextStyle only has Bold, Italic, Code, Link, Start, and End, so the requested style is not already implemented there. (internal/cmd/docs_markdown.go:49, f0dbde21f892)
  • Current formatter cannot emit strikethrough: On current main, buildTextStyleRequest emits bold, italic, monospace, and link fields, but has no strikethrough branch before this PR. (internal/cmd/docs_formatter.go:318, f0dbde21f892)
  • PR diff is focused on the missing local writer path: The PR diff adds TextStyle.Strikethrough, recognizes exact ~~ inline markers, keeps longer tilde runs literal, and emits textStyle.strikethrough requests with targeted parser/formatter tests. (internal/cmd/docs_markdown.go:503, 368eb23c8bad)
  • Linked bug is the active target: The PR body links the open bug at bug(docs write --tab --markdown): strikethrough ~~text~~ renders as literal text instead of struck-through #702, whose reproduction says docs write --replace --markdown --tab keeps ~~struck out~~ visible instead of producing a Docs strikethrough text style.
  • Real behavior proof is present: The PR body reports unit tests, make ci, and a live E2E against a scratch Google Doc where both whole-doc and tab writes reported strikethrough true and tilde markers absent, followed by cleanup. (368eb23c8bad)

Likely related people:

  • steipete: Recent main history shows repeated Docs markdown/tab and release work by Peter Steinberger, and this PR also comes from that current code path rather than only a drive-by proposal. (role: recent area contributor; confidence: high; commits: e4941e776504, b26e19003ebd, 63ff5bd0a8b7; files: internal/cmd/docs_markdown.go, internal/cmd/docs_formatter.go, CHANGELOG.md)
  • sebsnyk: Sebastian Roth authored recent fixes for the same Docs markdown/tab family, including current main's table-cell batching and earlier local writer fixes. (role: recent adjacent contributor; confidence: high; commits: f0dbde21f892, 58b866e9ac55, b646e886f6dd; files: internal/cmd/docs_markdown.go, internal/cmd/docs_formatter.go)
  • Gonçalo Alves: The original Docs markdown parser/formatter support traces back through git log -S 'TextStyle struct' to the Docs update command work. (role: introduced behavior; confidence: medium; commits: 7945602f1526; files: internal/cmd/docs_markdown.go, internal/cmd/docs_formatter.go)
  • rel: Recent merged work added markdown-aware docs update and tab-scoped update behavior adjacent to the local markdown writer. (role: feature-history contributor; confidence: medium; commits: c182ced42920; files: internal/cmd/docs_markdown.go, internal/cmd/docs_formatter.go)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal priority bug or improvement with limited blast radius. labels Jun 7, 2026
@steipete steipete merged commit 490a9cb into main Jun 7, 2026
11 checks passed
@steipete steipete deleted the fix/docs-markdown-strikethrough branch June 7, 2026 06:06
@steipete
Copy link
Copy Markdown
Collaborator Author

steipete commented Jun 7, 2026

Landed in 490a9cb.

Tested with:

  • go test ./internal/cmd -run 'TestParseInlineFormatting|TestMarkdownToDocsRequests_Strikethrough|TestMarkdownToDocsRequests_BaseIndex|TestMarkdownToDocsRequests_AppendBulletsAndCode'
  • go test ./internal/cmd/...
  • make ci
  • autoreview clean: no accepted/actionable findings reported
  • Live E2E with clawdbot@gmail.com: scratch Doc 1GNjuLeCXtmNVQAyw0c7XOdLjGIv-p6f9VR21dDfrkY0, tab t.eyzzzc9zen2h; whole-doc write reported whole_strike:true and whole_tilde_markers:0; tab write reported tab_strike:true and tab_tilde_markers:0; cleanup reported cleanup_trashed:true.
  • GitHub PR checks: pull_request ci run 27084005443 succeeded, pull_request docker run 27084005442 succeeded, Socket checks succeeded. A duplicate push-triggered ci run 27083999696 remained in progress on its redundant Windows job at merge time, but the protected PR checks were green and GitHub accepted the squash merge.

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

Labels

P2 Normal priority bug or improvement with limited blast radius. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(docs write --tab --markdown): strikethrough ~~text~~ renders as literal text instead of struck-through

1 participant