Skip to content

feat(docs): add table header row pinning#862

Merged
steipete merged 1 commit into
mainfrom
codex/docs-pin-table-header
Jun 20, 2026
Merged

feat(docs): add table header row pinning#862
steipete merged 1 commit into
mainfrom
codex/docs-pin-table-header

Conversation

@steipete

Copy link
Copy Markdown
Collaborator

Summary

  • add docs table-row pin-header --rows N for pinning the first N table rows or unpinning with --rows 0
  • validate counts against every selected table, preserve tab targeting and table selectors, and submit revision-controlled requests
  • force-serialize zero so unpin requests are not dropped by the generated API client
  • share row-action result formatting with docs table-row style, removing duplicate output code
  • regenerate command docs and add the changelog entry

Closes #855.

Validation

  • make ci
  • autoreview: clean, no actionable findings
  • live API E2E with [email protected]: created disposable native Docs tables; validated dry-run; pinned one and two leading rows; confirmed tableHeader state through docs raw; unpinned with zero and confirmed all header state cleared
  • live render E2E: exported a 70-row table to two PDFs; the 5-page pinned export repeated the header marker 5 times, while the unpinned export contained it once; permanently deleted all Drive fixtures

@clawsweeper

clawsweeper Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed June 20, 2026, 6:08 PM ET / 22:08 UTC.

Summary
Adds gog docs table-row pin-header --rows with zero-value serialization, row-count validation, shared row-action output formatting, unit coverage, generated command docs, and a changelog entry.

Reproducibility: not applicable. as a bug reproduction; this is a feature PR. Source inspection confirms current main lacks a pin-header command, while the PR adds that surface.

Review metrics: 3 noteworthy metrics.

  • Command surface: 1 subcommand added. A new user-facing Docs mutation command makes command shape and generated docs the main review surface.
  • Focused tests: 3 unit tests added. The tests cover zero serialization, too-many-row rejection, and negative row validation for the new command.
  • Diff size: 11 files, +236/-23. Most of the diff is generated command documentation plus focused command and test code.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #855
Summary: This PR is a candidate implementation for the remaining PinTableHeaderRows slice of the broader Docs table-styling issue; earlier merged PRs addressed adjacent cell and row styling slices.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge readiness
Overall: 🦞 diamond lobster
Proof: 🌊 off-meta tidepool
Patch quality: 🦞 diamond lobster
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Risk before merge

  • Required CI was still in progress during review, so merge should wait for green required checks.
  • [P1] This adds a new public Docs command; maintainers should confirm that docs table-row pin-header --rows is the intended command shape for the linked table-styling issue.

Maintainer options:

  1. Decide the mitigation before merge
    Land the focused command after maintainer command-shape confirmation and green CI, preserving the existing table selector, tab, dry-run, revision-control, output, docs, and test patterns.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • [P2] No repair lane is needed; this collaborator-authored feature PR should stay open for maintainer command-shape review and required CI.

Security
Cleared: No concrete security or supply-chain concern was found; the diff adds a Docs API mutation command, tests, and generated docs without dependency, workflow, credential, or script changes.

Review details

Best possible solution:

Land the focused command after maintainer command-shape confirmation and green CI, preserving the existing table selector, tab, dry-run, revision-control, output, docs, and test patterns.

Do we have a high-confidence way to reproduce the issue?

Not applicable as a bug reproduction; this is a feature PR. Source inspection confirms current main lacks a pin-header command, while the PR adds that surface.

Is this the best way to solve the issue?

Yes, pending maintainer acceptance of the public command shape. The implementation follows the existing Docs table selection, tab targeting, revision-controlled request, output, test, and generated-doc patterns.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 42017c5e8ca8.

Label changes

Label changes:

  • add P3: This is a useful but optional Docs feature with limited blast radius and no broken existing behavior.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🌊 off-meta tidepool and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The external-contributor proof gate does not apply to this collaborator-authored PR; the body nevertheless reports make ci plus live Google Docs API and render validation.

Label justifications:

  • P3: This is a useful but optional Docs feature with limited blast radius and no broken existing behavior.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🌊 off-meta tidepool and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The external-contributor proof gate does not apply to this collaborator-authored PR; the body nevertheless reports make ci plus live Google Docs API and render validation.
Evidence reviewed

What I checked:

  • Repository policy read: AGENTS.md was read fully; its PR-review-mode guidance to inspect the diff without switching branches or changing code was applied. (AGENTS.md:1, 42017c5e8ca8)
  • Current main lacks pin-header: Current main registers table-row insert, delete, and style only, so the requested pin-header command is not already implemented. (internal/cmd/docs_table_ops.go:18, 42017c5e8ca8)
  • Current row-style surface is adjacent but not duplicate: Current main exposes min-height and prevent-overflow through UpdateTableRowStyle, but not PinTableHeaderRows or a tableHeader flag. (internal/cmd/docs_table_row_style.go:15, 42017c5e8ca8)
  • Existing helpers match the proposed implementation path: Current main already has shared table selection and revision-controlled batch helpers that the PR reuses for the new mutation. (internal/cmd/docs_table_ops.go:320, 42017c5e8ca8)
  • PR diff reviewed: The PR adds one focused command implementation, one focused test file, generated command docs, and a small row-style output helper refactor; no actionable diff defect was found. (internal/cmd/docs_table_pin_header.go:1, ac7179660327)
  • Linked feature request: The linked issue explicitly requests exposing PinTableHeaderRows as part of broader Docs table styling work, and remains open as the canonical umbrella.

Likely related people:

  • steipete: Blame and recent merged PR history show this person authored the current table-row style command and recently expanded the Docs table styling surface that this PR extends. (role: recent Docs table area contributor; confidence: high; commits: 42017c5e8ca8, 42de13590640; files: internal/cmd/docs_table_ops.go, internal/cmd/docs_table_row_style.go, internal/cmd/docs.go)
  • sebsnyk: This person opened the linked umbrella issue describing the missing PinTableHeaderRows behavior and is credited in the PR's user-facing changelog entry. (role: feature requester; confidence: medium)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. labels Jun 20, 2026
@steipete
steipete merged commit 0d260ac into main Jun 20, 2026
9 checks passed
@steipete
steipete deleted the codex/docs-pin-table-header branch June 20, 2026 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(docs cell-style): table cell borders + vertical alignment + padding, plus updateTableRowStyle / pinTableHeaderRows

1 participant