Repository navigation
refactor(scripts): render the inputs table as a generated region - #509
Merged
Merged
Conversation
Vivswan
force-pushed
the
refactor/inputs-table-region
branch
from
October 6, 2026 11:00
ef74db0 to
c95ed8d
Compare
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused refactor preserves table contents and regeneration safeguards, with no unresolved defects identified.
Review effort: Balanced
Findings: None
What changed in this PR
Moves the inputs reference table onto the shared generated-region system introduced in #507, preserving table contents while removing action-docs.
Changes:
- Renders directly from
INPUT_DECLSwith round-trip validation. - Updates markers and tests to use the shared region driver.
- Removes the dependency and updates explanatory comments.
| File | Description |
|---|---|
| test/scripts/generated.test.ts | Removes special handling for action-docs markers. |
| test/scripts/gen-inputs-table.test.ts | Tests regeneration and invalid-content refusals. |
| test/docs/inputs.test.ts | Removes redundant rendering checks. |
| src/flows/inputs.ts | Updates generation comments only. |
| package.json | Removes action-docs. |
| docs/reference/inputs.md | Migrates markers and moves the heading outside the region. |
| docs/README.md | Documents the table's declaration source. |
| bun.lock | Removes dependency entries and updates resolution paths. |
| .github/workflows/auto-fix.yml | Updates the explanatory header comment only. |
| .github/scripts/generated.ts | Updates marker and dependency comments only. |
| .github/scripts/gen-inputs-table.ts | Implements rendering, parsing, and shared-driver integration. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The inputs table on docs/reference/inputs.md was rendered by the action-docs package from action.yml between action-docs's own markers, after a hand-written guard checked that the region held only a rendering. It is now one more GeneratedRegion: the data is INPUT_DECLS, the same source action.yml's inputs region is generated from; the render is a four-cell table through renderTable; the parse reads each row back through tableBody; and the round-trip seal refuses a moved marker, an authored row, or a description holding "<" naming the line. Every table line is byte-identical to the previous rendering, the paragraph wrapper and the empty-default spelling included. Only the marker lines changed, and the "## Inputs" heading moved above the BEGIN marker so the region sits under it like every other table region. action-docs leaves the devDependencies: the region needs a synchronous render and a parse, which the async, file-writing package cannot give. The docs README, the input declarations' comments, and the auto-fix workflow comment now name the generated region instead of action-docs. test/docs/inputs.test.ts goes: it restated the generator's rendering, its ASCII pin duplicates the typography gate, and its "|" and "<" checks duplicate the generator's refusals.
Vivswan
force-pushed
the
refactor/inputs-table-region
branch
from
October 6, 2026 20:42
c95ed8d to
8f7947f
Compare
Vivswan
marked this pull request as ready for review
October 6, 2026 20:50
Vivswan
enabled auto-merge (squash)
October 6, 2026 21:00
Vivswan
disabled auto-merge
October 6, 2026 21:01
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #507.
What this changes
How
gen-inputs-table.tsdeclaresinputs-tableunder## Inputsand drives it through the region driver, like every other table.<p>wrapper and""default included; only the marker lines changed, and the heading moved above the BEGIN marker.<in a description is refused naming the line.renderTablecall.Proof
generated.tsrun,git statusclean for every generated path; the build:check runner test passes.Technical details
## Inputswith its blank line sits above the BEGIN marker.generated.ts: the inputs-table row is unchanged; the dependency note "action.yml feeds the inputs table" goes, since the table reads INPUT_DECLS directly.<in a description fails the generator naming the input, where test/docs/inputs.test.ts used to catch it after the fact.action-docsdropped from devDependencies, since it renders asynchronously from a file and writes the page itself, so it cannot give the sync render and parse the region seal needs; the table is onerenderTablecall, nothing added.git diff --numstat): gen-inputs-table.ts +79/-90, its test +45/-67, generated.ts +2/-3, generated.test.ts +4/-7, docs/inputs.test.ts -38, inputs.md +3/-3, docs/README.md +1/-1, src/flows/inputs.ts +5/-6, auto-fix.yml +1/-2, package.json -1, bun.lock +5/-36.