Skip to content

fix(docs): preserve text-run link targets#924

Merged
steipete merged 1 commit into
mainfrom
agent/fix-docs-cat-text-links
Jul 16, 2026
Merged

fix(docs): preserve text-run link targets#924
steipete merged 1 commit into
mainfrom
agent/fix-docs-cat-text-links

Conversation

@steipete

Copy link
Copy Markdown
Collaborator

Summary

  • preserve external URLs and internal tab, bookmark, and heading targets from Google Docs text runs
  • render linked anchor text as Markdown under docs cat --chips, including tab, table, and numbered paths
  • expose link metadata in JSON while leaving default plain text unchanged
  • keep rendered links atomic when --max-bytes lands inside them

Proof

  • make ci
  • AutoReview: clean after fixing its internal bookmark/heading rendering finding
  • live Google Docs API validation with the exact built candidate: disposable secondary-tab document, external and heading links, plain/chips/JSON/numbered/max-bytes reads, then verified trash cleanup
  • candidate SHA-256: 52f2ab0d931624b50f607f5b4e8204d70dad5331fea607ac32aea27589f3ffb7

Closes #917
Closes #921

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 17cfdf3a18

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

if el.Paragraph != nil {
if renderChips {
text.WriteString(paragraphTextWithChips(el.Paragraph))
text.WriteString(paragraphTextWithChips(docID, el.Paragraph))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid truncating rendered table links

When renderChips is enabled, this line feeds the full Markdown link text into the existing 60-byte table preview truncation below. In docs cat --numbered --chips, a table cell containing a normal long URL will be cut into something like [Label](https://example.com/very-long..., losing the closing destination and no longer preserving the link target on the table/numbered path. Consider truncating only the display text before wrapping, or avoiding the preview cap for rendered links.

Useful? React with 👍 / 👎.

@steipete
steipete merged commit 0ec8dbe into main Jul 16, 2026
9 checks passed
@steipete
steipete deleted the agent/fix-docs-cat-text-links branch July 16, 2026 05:51
lox added a commit to lox/gogcli that referenced this pull request Jul 16, 2026
* lox/fix-calendar-remove-meet:
  fix(calendar): expose --remove-meet
  fix(gmail): accept padded raw message encoding (openclaw#923)
  fix(docs): preserve text-run link targets (openclaw#924)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant