Skip to content

feat(docs): add table column width command#669

Merged
steipete merged 1 commit into
mainfrom
docs-table-column-width-631
May 31, 2026
Merged

feat(docs): add table column width command#669
steipete merged 1 commit into
mainfrom
docs-table-column-width-631

Conversation

@steipete
Copy link
Copy Markdown
Collaborator

Summary

  • Add gog docs table-column-width (aliases: table-width, column-width) for native Docs tables.
  • Support fixed column widths in points with --col --width, plus --evenly-distributed reset for one column or all columns.
  • Add tab targeting, generated command docs, docs guide coverage, changelog entry, and focused request/validation tests.

Fixes #631.

Proof

  • go test ./internal/cmd -run 'TestDocsTableColumnWidth'
  • go test ./internal/cmd
  • make docs-commands
  • make ci
  • Autoreview: clean, no accepted/actionable findings.
  • Live Docs round trip with clawdbot@gmail.com:
    • created disposable Google Doc
    • inserted 2x3 native table
    • set column 1 to FIXED_WIDTH 90pt and column 2 to FIXED_WIDTH 140pt
    • verified raw Docs API table.tableStyle.tableColumnProperties
    • reset all columns with --evenly-distributed
    • verified all columns reported EVENLY_DISTRIBUTED
    • trashed disposable doc afterward

@clawsweeper
Copy link
Copy Markdown

clawsweeper Bot commented May 31, 2026

Codex review: needs changes before merge. Reviewed May 31, 2026, 6:08 AM ET / 10:08 UTC.

Summary
The PR adds a gog docs table-column-width command with table-width and column-width aliases, request-building tests, generated command docs, guide coverage, and a changelog entry.

Reproducibility: yes. from source inspection: the PR adds table-width and column-width aliases, while current commandPathAliases only maps docs.page-layout aliases for command filters. I did not run tests because this is a read-only review.

Review metrics: 1 noteworthy metric.

  • Command aliases: 2 added, 0 filter mappings. The new mutating command advertises two aliases, but the existing command allow/deny alias map remains unchanged.

Merge readiness
Overall: 🦐 gold shrimp
Proof: 🦞 diamond lobster
Patch quality: 🦐 gold shrimp
Result: ready for maintainer review.

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

Rank-up moves:

  • [P2] Add commandPathAliases entries and tests for docs.table-width and docs.column-width.

Risk before merge

  • [P1] The new table-width and column-width aliases are not wired into command allow/deny filtering, so alias-based --enable-commands* and --disable-commands policies would not behave like the established docs.page-layout aliases.

Maintainer options:

  1. Map the new aliases before merge (recommended)
    Add docs.table-width and docs.column-width to commandPathAliases for docs.table-column-width, with allow, exact-allow, and deny tests.
  2. Drop the aliases
    Remove the table-width and column-width aliases from the command registration and generated docs if maintainers do not want to support them in command filtering yet.
  3. Accept alias-filter mismatch
    Maintainers could merge as-is only if they are comfortable with the new aliases being CLI shortcuts but not supported command-filter spellings.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Update `internal/cmd/enabled_commands.go` so `docs.table-column-width` maps `docs.table-width` and `docs.column-width`, then add focused command-filter tests for allow, exact allow, and deny behavior for the new aliases.

Next step before merge

  • [P2] A narrow automated repair can add the missing command-filter alias mapping and regression tests without changing the new Docs table-width behavior.

Security
Needs attention: The diff has no supply-chain concern, but the missing command-filter alias mapping creates a small command restriction policy gap for the new mutating command aliases.

Review findings

  • [P2] Wire the new aliases into command filters — internal/cmd/docs.go:37
Review details

Best possible solution:

Land the command after adding command-filter alias mappings and focused tests for both new aliases; the Docs API request path and docs coverage otherwise look like the right direction.

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

Yes, from source inspection: the PR adds table-width and column-width aliases, while current commandPathAliases only maps docs.page-layout aliases for command filters. I did not run tests because this is a read-only review.

Is this the best way to solve the issue?

No as submitted: the Docs API request path is narrow, but the new aliases need the same command-filter mapping and regression coverage as the existing docs.page-layout aliases before merge.

Full review comments:

  • [P2] Wire the new aliases into command filters — internal/cmd/docs.go:37
    This registers table-width and column-width as aliases, but commandPathAliases still only knows about docs.page-layout. As a result, --enable-commands docs.table-width / --enable-commands-exact docs.column-width will not allow the canonical command, and --disable-commands docs.table-width will not block it; add the alias mappings and focused allow/deny tests before merging.
    Confidence: 0.88

Overall correctness: patch is incorrect
Overall confidence: 0.86

AGENTS.md: found and applied where relevant.

Codex review notes: model gpt-5.5, reasoning high; reviewed against 6b83869bfce9.

Label changes

Label changes:

  • add P2: This is a bounded feature PR with one concrete command-filter compatibility defect that should be fixed before merge.
  • add merge-risk: 🚨 compatibility: Merging as-is would make documented command aliases inconsistent with existing command allow/deny filter behavior.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: The external-contributor proof gate does not apply to this collaborator-authored PR; the body nevertheless records unit, CI, docs generation, and a live Docs API round trip.

Label justifications:

  • P2: This is a bounded feature PR with one concrete command-filter compatibility defect that should be fixed before merge.
  • merge-risk: 🚨 compatibility: Merging as-is would make documented command aliases inconsistent with existing command allow/deny filter behavior.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: The external-contributor proof gate does not apply to this collaborator-authored PR; the body nevertheless records unit, CI, docs generation, and a live Docs API round trip.
Evidence reviewed

Security concerns:

  • [low] Alias deny rules do not cover the canonical command — internal/cmd/docs.go:37
    Because the new aliases are not added to commandPathAliases, an operator using --disable-commands docs.table-width would not block gog docs table-column-width, unlike the established page-layout alias behavior.
    Confidence: 0.82

Acceptance criteria:

  • [P1] go test ./internal/cmd -run 'TestCommandFiltersHonor|TestDocsTableColumnWidth' -count=1.
  • [P1] go test ./internal/cmd.

What I checked:

  • Repository policy read: AGENTS.md was read fully; its PR-review guidance applies, so this review used read-only PR/source inspection and did not switch branches or edit files. (AGENTS.md:1, 6b83869bfce9)
  • Current main lacks the requested command: Current main's Docs command registry includes insert-table, cell-update, cell-style, raw, and page-layout, but no table-column-width/table-width/column-width command. (internal/cmd/docs.go:20, 6b83869bfce9)
  • PR adds the command and aliases: The PR registers DocsTableColumnWidthCmd with aliases table-width,column-width and adds an implementation that builds UpdateTableColumnPropertiesRequest requests. (internal/cmd/docs.go:37, 06a6d37f3649)
  • Existing command-filter alias map is incomplete for this PR: Current main maps docs.page-layout aliases for command allow/deny filters, but the PR does not touch enabled_commands.go to add the new docs.table-width or docs.column-width aliases. (internal/cmd/enabled_commands.go:119, 6b83869bfce9)
  • Existing tests establish alias-filter behavior: The current test suite has coverage proving command filters honor canonical aliases for docs.page-layout, which is the pattern this new aliased command should follow. (internal/cmd/root_more_test.go:219, 6b83869bfce9)
  • Related issue context: The linked feature request asks for fixed per-column widths and evenly-distributed resets after Docs markdown/table import; this PR implements the core single-table command path but not the bulk-plan variant.

Likely related people:

  • steipete: Current-main blame attributes the Docs command registry and table helper snapshots to Peter Steinberger, and he authored recent Docs layout-control work adjacent to this command surface. (role: recent adjacent contributor; confidence: high; commits: a806d97a2ea3, b26e19003ebd, 6b83869bfce9; files: internal/cmd/docs.go, internal/cmd/docs_edit.go, internal/cmd/docs_set_page_layout.go)
  • chrischall: GitHub commit history shows chrischall introduced the native Docs insert-table primitive and worked on markdown table insertion behavior that this command builds on. (role: introduced table command surface; confidence: high; commits: 3a1b15592f47, 97fcd480faa4; files: internal/cmd/docs_insert_table.go, internal/cmd/docs_table_inserter.go, internal/cmd/docs_mutation.go)
  • sebsnyk: sebsnyk authored adjacent Docs page-layout work and opened the linked table column-width feature request that this PR addresses. (role: recent feature contributor and requester; confidence: medium; commits: 1b8a750026df; files: internal/cmd/docs_set_page_layout.go, docs/docs-editing.md)
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: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. labels May 31, 2026
@steipete steipete merged commit 97dd2d3 into main May 31, 2026
9 checks passed
@steipete steipete deleted the docs-table-column-width-631 branch May 31, 2026 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. P2 Normal priority bug or improvement with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: table column-width control (FIXED_WIDTH per column, or evenly distributed)

1 participant