feat(docs): add structural and segment editing#863
Conversation
|
Codex review: needs changes before merge. Reviewed June 21, 2026, 7:18 PM ET / 23:18 UTC. Summary Reproducibility: yes. for the review finding: source inspection shows header/footer create skips placement validation when only --occurrence or --match-case is provided. I did not execute the PR branch or live Google API commands in this read-only review. Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Land the feature after normal maintainer review, completed CI, and a small fix for the header/footer create validation gap. Do we have a high-confidence way to reproduce the issue? Yes for the review finding: source inspection shows header/footer create skips placement validation when only --occurrence or --match-case is provided. I did not execute the PR branch or live Google API commands in this read-only review. Is this the best way to solve the issue? Mostly yes: the PR reuses existing Docs placement and request plumbing, but header/footer create should validate anchor-only flags consistently before merge. Full review comments:
Overall correctness: patch is correct AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 0d260ac968f0. Label changesLabel changes:
Label justifications:
Evidence reviewedAcceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
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
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f36226fd20
ℹ️ 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".
|
|
||
| func BuildRequests(options Options, start, end int64, tabID string) ([]*docs.Request, error) { | ||
| if start <= 0 || end <= start { | ||
| if start < 0 || end <= start { |
There was a problem hiding this comment.
Handle segment bullet ranges that start at zero
When docs format --segment formats the first paragraph of a header/footer/footnote with both bullet creation and paragraph styling (for example --match Header --bullets --indent-start 36), this newly allowed start == 0 path reaches BuildRequests with PostBulletParagraphStart == 0. The existing post-bullet check below requires > 0, so the paragraph style request is emitted before CreateParagraphBullets instead of after it; bullet creation can then reset indentation/paragraph properties and drop the requested styling for the first paragraph of a segment.
Useful? React with 👍 / 👎.
Summary
Closes #856.
Closes #857.
Verification
make ci