Skip to content

feat(docs): add paragraph list formatting#859

Merged
steipete merged 1 commit into
mainfrom
feat/docs-paragraph-formatting
Jun 19, 2026
Merged

feat(docs): add paragraph list formatting#859
steipete merged 1 commit into
mainfrom
feat/docs-paragraph-formatting

Conversation

@steipete

Copy link
Copy Markdown
Collaborator

Closes #852.

Summary

  • add native bullet, numbered-list, custom preset, and bullet-removal controls to docs format
  • add paragraph indentation, spacing, keep-with-next, and keep-lines-together controls with explicit zero/false support
  • preserve exact match text styling, contiguous list identity, and nested-list levels while accounting for Docs API index shifts
  • expose the same controls for plain-text docs write, with a guarded append workflow

Testing

  • make ci
  • structured autoreview: clean
  • live Google Docs proof: contiguous numbered paragraphs shared one list ID; leading-tab paragraphs retained nesting levels 0/1; exact-match bold styling and paragraph spacing persisted; custom indentation/keep values survived list creation; bullet removal plus zero indentation reset succeeded

@clawsweeper

clawsweeper Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper status: review started.

I am starting a fresh review of this pull request: feat(docs): add paragraph list formatting This is item 1/1 in the current shard. Shard 0/1.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@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: 97b36bc2ae

ℹ️ 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".

Comment thread internal/cmd/docs_edit.go
}

func (c *DocsWriteCmd) writePlainText(ctx context.Context, flags *RootFlags, docID, text string) error {
if c.Append && c.Format.createsBullets() && c.Format.hasParagraphStyle() {

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 Reject append bullets or move the range past the break

This guard still allows docs write --append --bullets without paragraph-style flags, but the formatter later builds the CreateParagraphBullets range starting at the append index. In the common case --text '\nItem', that range includes the inserted newline that terminates the existing last paragraph, so Docs treats the previous paragraph as overlapping the range and turns it into a list item too; either disallow append bullet creation or start the bullet range after the leading paragraph break.

Useful? React with 👍 / 👎.

@steipete
steipete merged commit 360310f into main Jun 19, 2026
9 checks passed
@steipete
steipete deleted the feat/docs-paragraph-formatting branch June 19, 2026 18:49
@steipete

Copy link
Copy Markdown
Collaborator Author

Landed as 360310f.

Proof:

  • local make ci passed; all GitHub checks passed on Linux, macOS CGO, Windows, worker, and container builds
  • structured autoreview completed with no actionable findings
  • live Docs API validation confirmed contiguous numbered paragraphs share one list ID, leading-tab paragraphs retain nesting levels 0/1, exact matched text styling remains scoped, and indentation/spacing/keep fields persist after list creation
  • live bullet removal followed by explicit zero indentation/spacing reset succeeded
  • disposable proof documents were trashed after verification

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(docs format): paragraph list + indentation/spacing controls (createParagraphBullets / deleteParagraphBullets / updateParagraphStyle gaps)

1 participant