Skip to content

Add export depth controls to the Export modal#4517

Draft
raineorshine with Copilot wants to merge 1 commit into
mainfrom
copilot/export-depth-options
Draft

Add export depth controls to the Export modal#4517
raineorshine with Copilot wants to merge 1 commit into
mainfrom
copilot/export-depth-options

Conversation

Copilot AI commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Adds advanced export depth controls so users can choose whether to include the selected thought(s) and whether to traverse/export descendants. This makes export behavior match the requested combinations for single- and multi-selection without fetching or trimming unnecessary subtree data afterward.

  • Export depth options

    • Adds Export first thought (default on) to skip the selected thought(s) and export their children instead.
    • Adds Export subthoughts (default on) to restrict export to the top-level exported thoughts.
    • Supports the combined case where both are off: export only immediate children, with no deeper descendants.
  • Traversal behavior

    • Extends exportContext with depth controls so export shape is determined during traversal rather than by post-processing the rendered output.
    • Preserves existing default behavior for all existing callers outside the modal.
  • Preload limiting

    • Extends export preload traversal to stop at the required depth when descendants are excluded.
    • Avoids pulling full subtrees for exports that only need the selected roots or their immediate children.
  • Modal behavior

    • Wires the new options into preview text, exported content generation, and export phrase/count calculation.
    • Keeps multi-selection behavior aligned with the filtered selection set already used by the Export modal.
exportContext(state, thoughtId, 'text/plain', {
  includeRoot: false,
  includeDescendants: false,
})
// exports only the selected thought's immediate children

Copilot AI linked an issue Jul 5, 2026 that may be closed by this pull request
@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Vercel preview: https://em-exqabr2x8-cybersemics.vercel.app

Copilot AI changed the title [WIP] Add export options for first thought and subthoughts Add export depth controls to the Export modal Jul 5, 2026
Copilot AI requested a review from raineorshine July 5, 2026 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Export depth options

2 participants