Skip to content

feat(docs): write headers and footers (createHeader / createFooter / deleteHeader / deleteFooter) #857

Description

@sebsnyk

Headers and footers are currently read-only in gog docs — they surface in raw / structure output but there is no way to create, populate, or delete them. The four Docs API requests exist:

  • createHeader / createFooter (with a SectionBreakLocation or default type)
  • deleteHeader / deleteFooter

Once a header/footer segment exists, its body is addressable by segmentId, so populating it can reuse the existing text/insert path with a --segment selector.

Proposed:

gog docs header create <docId> [--type DEFAULT|FIRST_PAGE] [--text <content>]
gog docs header delete <docId> --id <headerId>
gog docs footer create <docId> ... / footer delete ...

and a --segment header:<id>|footer:<id> selector on insert / format so the body content can be written and styled the same way as the main body. This closes the last read-only-only structural surface; header/footer authoring currently has no path at all short of editing in the UI.

Ref: documents.batchUpdate CreateHeaderRequest, CreateFooterRequest, DeleteHeaderRequest, DeleteFooterRequest.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low-risk cleanup, docs, polish, ergonomics, or speculative feature.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper 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:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions