Skip to content

fix(export): honor --docs-only when skipping empty pages - #1523

Draft
cursor[bot] wants to merge 1 commit into
nextfrom
erunion/critical-bug-workflow-df70
Draft

fix(export): honor --docs-only when skipping empty pages#1523
cursor[bot] wants to merge 1 commit into
nextfrom
erunion/critical-bug-workflow-df70

Conversation

@cursor

@cursor cursor Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor
馃殽 Resolves

馃 Changes

rdme docs export and rdme reference export advertised --docs-only (skip empty non-link pages) but never read the flag. The skip check used this.route !== 'guides' instead:

  • rdme reference export always dropped empty pages, including parent grouping pages like empty "Users" / "Orders" section headers. A default export-then-upload to a new project lost those parents, so children referenced pages that were never created.
  • rdme docs export --docs-only was a no-op; empty guide pages were still written.

The skip now follows the documented flag (default: false). Empty pages are exported unless --docs-only is passed. The existing virtual-parent nesting path still applies when the flag is set.

馃К QA & Testing

  • Added coverage that empty non-link pages are exported by default on both docs export and reference export.
  • Added coverage that --docs-only skips those empty pages.
  • Updated the skipped-parent nesting test to pass --docs-only (the only way that path is now reached).
  • npx vitest run test/commands/pages/export.test.ts: 24 passed.
  • tsc clean.
Open in WebView Automation

Empty grouping pages were always skipped on reference export and never
skipped on guides export, because the skip check used the route instead
of the documented --docs-only flag. That dropped parent pages from a
default reference export and broke export-then-upload hierarchy.
@erunion erunion added bug Something isn't working command:pages Issues pertaining to page upload commands (e.g., `docs`, `reference`, `changelog`, `custompages`) labels Aug 29, 2026 — with Cursor
@greptile-apps

greptile-apps Bot commented Aug 29, 2026

Copy link
Copy Markdown

Confidence Score: 5/5

The PR appears safe to merge, with the corrected flag behavior consistently applied and covered for both export commands.

Both callers declare the exact docs-only boolean flag with a false default, and the export predicate, result accounting, and virtual-parent hierarchy behavior align with the documented semantics and added tests.

Reviews (1): Last reviewed commit: "fix(export): honor --docs-only when skip..." | Re-trigger Greptile

@erunion erunion self-assigned this Aug 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working command:pages Issues pertaining to page upload commands (e.g., `docs`, `reference`, `changelog`, `custompages`)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants