-
Notifications
You must be signed in to change notification settings - Fork 656
docs cat drops person smart chips from all output modes (plain, --plain, --json); readable only via --raw #907
Copy link
Copy link
Closed
Labels
P2Normal priority bug or improvement with limited blast radius.Normal priority bug or improvement with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:data-lossThis issue is about lost, corrupted, or silently dropped user/session/config data.This issue is about lost, corrupted, or silently dropped user/session/config data.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Description
Metadata
Metadata
Assignees
Labels
P2Normal priority bug or improvement with limited blast radius.Normal priority bug or improvement with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:data-lossThis issue is about lost, corrupted, or silently dropped user/session/config data.This issue is about lost, corrupted, or silently dropped user/session/config data.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Priority
None yet
Summary
docs cat(plain,--json, and--plain) silently drops person smart chips from its output. A tagged person in a doc is apersonelement — a sibling oftextRuninsideparagraph.elements— and the text extractor only concatenatestextRun.content, so the chip contributes nothing to the rendered text. The same applies todatechips andrichLink(Drive file / calendar event) chips.The result is silently misleading output: a table row like
Owner: @Jane Doerenders asOwner:with an empty cell, with no indication anything was skipped.--jsondoesn't help — it returns the same lossy string wrapped in{"tab": {"id", "index", "title", "text"}}. Today the only way to see who is tagged iscat --rawplus a hand-rolled jq walk.Notably the write side already has first-class chip support (
docs insert-person, #638,--atanchors in #683) — sogogcan insert a person chip it then cannot read back.Repro (self-contained, uses gog itself)
Observed on v0.33.0 (also v0.22.0).
Expected
Two parts, either would help; both would be ideal:
cattext rendering: render chips inline instead of skipping them, e.g.@Jane Doe <[email protected]>[Title](url)(Possibly behind a
--chipsflag if changing the default output is a concern, though rendering something seems strictly better than an invisible drop.)cat --jsonstructured output: include the chips as data, e.g. apersons/chipsarray per tab alongsidetext, so scripting consumers don't need to fall back to--raw+ a recursive jq descent (which on multi-tab docs also means downloading the entire doc, since--rawreturns all tabs).Related
find-replaceoffset math (chips as an editing hazard; here they're an extraction gap)rawtab traversal (the current workaround path)