Skip to content

docs: add a setup-path selector to the getting-started guides#743

Open
rashadism wants to merge 1 commit into
openchoreo:mainfrom
rashadism:main
Open

docs: add a setup-path selector to the getting-started guides#743
rashadism wants to merge 1 commit into
openchoreo:mainfrom
rashadism:main

Conversation

@rashadism

Copy link
Copy Markdown
Contributor

What

Replaces the collapsible "agent" callout at the top of the two install guides
(Run Locally on K3d and Run in Your Environment) with a two-way selector:

  • Set this up with your agent (default) — install the skill, pick your planes, copy a ready-to-run prompt.
  • Set this up manually — the full step-by-step guide.

Behaviour

  • Both panels render into the page and toggle via the hidden attribute rather than mounting on demand, so the full manual guide stays in the server-rendered HTML and is visible to crawlers. curl of either page returns the complete guide.
  • A deep link or table-of-contents click to a manual heading reveals the manual panel and scrolls to it. While the agent panel is active, the page table of contents is hidden (via a data-setup-pane attribute) so it does not list the hidden guide.
  • The markdown-export plugin drops the interactive agent panel and unwraps the switch containers, so the exported .md (and llms.txt) carries the manual guide alone.

Notes

  • next docs only; versioned docs are unchanged.
  • Verified against a production build: the manual guide is present in the static HTML for both pages, and the exported .md contains no agent/prompt content.

Replace the collapsible agent callout on "Run Locally on K3d" and "Run in
Your Environment" with a two-way selector. Readers choose between an
agent-driven install and the manual, step-by-step path, with the agent
path shown by default.

Both panels are rendered into the page and toggled via the `hidden`
attribute rather than mounted on demand, so the full manual guide remains
present in the server-rendered HTML and visible to crawlers, and the
exported Markdown carries the manual guide alone.

- Add the SetupSwitch / SetupAgent / SetupManual components. A deep link or
  table-of-contents click to a manual heading reveals the manual panel and
  scrolls to it; while the agent panel is active, the page table of contents
  is hidden via a data-setup-pane attribute so it does not list the hidden
  guide.
- Extend the markdown-export plugin to drop the interactive agent panel and
  unwrap the switch containers, keeping the exported Markdown limited to the
  manual guide.
- Install the openchoreo-setup skill at user scope (-g) and refine the
  surrounding copy and plane-card spacing.

Signed-off-by: Rashad Sirajudeen <rashad@wso2.com>
@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added a selectable setup flow in the getting-started guides, letting readers switch between guided and manual installation paths.
    • Improved the setup experience with clearer pane-based navigation and better support for deep links in manual steps.
  • Bug Fixes

    • Fixed missing closing sections in the updated guides so the pages render correctly.
    • Adjusted page behavior to hide irrelevant table-of-contents items during the guided setup view.
  • Style

    • Refreshed the setup option cards and code block styling for a cleaner, more consistent look.

Walkthrough

Adds a new SetupSwitch component with agent and manual panes, rewrites two getting-started guides to use the new layout, hides the TOC in agent mode via a data-setup-pane attribute, strips the switch markup in the markdown export plugin, and refines AgentSetupBuilder card styling.

Changes

Setup switch rollout

Layer / File(s) Summary
SetupSwitch runtime and TOC hiding
src/components/SetupSwitch/index.tsx, src/components/SetupSwitch/styles.module.css, src/css/custom.css
SetupSwitch renders tab buttons and a shared context; SetupAgent conditionally shows its children; SetupManual auto-selects when a hash link targets content inside it and scrolls to that target. Selection state is synced to html[data-setup-pane], which a new CSS rule uses to hide the desktop and mobile TOC.
Docs wrapped in SetupSwitch
docs/getting-started/try-it-out/on-k3d-locally.mdx, docs/getting-started/try-it-out/on-your-environment.mdx
Both guides replace the AgentCallout block with SetupSwitch/SetupAgent/SetupManual wrappers; the agent install command now includes -g; closing tags were added at the end of each file.
Markdown export SetupSwitch stripping
plugins/docusaurus-plugin-markdown-export/mdxProcessor.js
A new Step 2.5 calls processSetupSwitch, which removes <SetupAgent> blocks, unwraps <SetupSwitch> and <SetupManual> tags, and strips <AgentSetupBuilder ... /> before later markdown transforms.
AgentSetupBuilder and AgentCallout presentation
src/components/AgentSetupBuilder/index.tsx, src/components/AgentSetupBuilder/styles.module.css, src/components/AgentCallout/styles.module.css
Required marker moved inline inside the plane name span; plane card gap, padding, border, and background styles revised; .planeReqBadge replaced by .planeReqInline; code block containers inside AgentCallout get surface background and an emphasis border.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • LakshanSS
  • chalindukodikara
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers the feature, but it does not use the required Purpose/Related Issues/Checklist template or include the checklist items. Rewrite the PR description using the repo template: add Purpose, Related Issues, and Checklist sections, and complete the required checklist entries.
Docstring Coverage ⚠️ Warning Docstring coverage is 12.50% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: adding a setup-path selector to the getting-started guides.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@rashadism

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/components/SetupSwitch/index.tsx`:
- Around line 27-48: The SetupSwitch controls are using tab semantics
incompletely, so either finish the full tabs pattern or simplify them to plain
buttons. In SetupSwitch, if you keep role="tab", add the matching
aria-controls/id wiring, role="tabpanel" on the content areas, and proper roving
tabIndex/keyboard behavior; otherwise remove the tablist/tab roles and leave the
buttons as a simple toggle between agent and manual.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: a1c39fbb-fff4-4ac6-852f-3cf840a9edab

📥 Commits

Reviewing files that changed from the base of the PR and between 236d385 and 1d56884.

📒 Files selected for processing (9)
  • docs/getting-started/try-it-out/on-k3d-locally.mdx
  • docs/getting-started/try-it-out/on-your-environment.mdx
  • plugins/docusaurus-plugin-markdown-export/mdxProcessor.js
  • src/components/AgentCallout/styles.module.css
  • src/components/AgentSetupBuilder/index.tsx
  • src/components/AgentSetupBuilder/styles.module.css
  • src/components/SetupSwitch/index.tsx
  • src/components/SetupSwitch/styles.module.css
  • src/css/custom.css

Comment on lines +27 to +48
<div className={styles.band} role="tablist">
<button
type="button"
className={styles.half}
role="tab"
aria-selected={sel === "agent"}
onClick={() => setSel("agent")}
>
<span className={styles.title}>Set this up with your agent</span>
<span className={styles.desc}>Install the skill and paste one prompt into Claude Code, Codex, Cursor, or any coding agent.</span>
</button>
<button
type="button"
className={styles.half}
role="tab"
aria-selected={sel === "manual"}
onClick={() => setSel("manual")}
>
<span className={styles.title}>Set this up manually</span>
<span className={styles.desc}>Install each plane yourself, step by step, and learn what every piece does and how it fits together.</span>
</button>
</div>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the relevant file and nearby components.
git ls-files src/components/SetupSwitch/index.tsx src/components/SetupSwitch

echo '--- outline ---'
ast-grep outline src/components/SetupSwitch/index.tsx --view expanded || true

echo '--- file with line numbers (first 220 lines) ---'
cat -n src/components/SetupSwitch/index.tsx | sed -n '1,220p'

echo '--- search for related ARIA/tab patterns in repo ---'
rg -n --hidden --glob '!**/node_modules/**' 'role="tablist"|role="tab"|role="tabpanel"|aria-controls|aria-labelledby' src || true

Repository: openchoreo/openchoreo.github.io

Length of output: 5213


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Read the existing tab implementation used elsewhere for comparison.
cat -n src/pages/ecosystem/item.tsx | sed -n '770,850p'

Repository: openchoreo/openchoreo.github.io

Length of output: 4447


Finish the tab semantics or use plain buttons. The controls are marked as tabs, but the panels aren’t wired with aria-controls/id, role="tabpanel", or roving tabIndex, so this reads as an incomplete tabs pattern to assistive tech. Either implement the full contract or drop the tab roles and keep it as a simple toggle.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/SetupSwitch/index.tsx` around lines 27 - 48, The SetupSwitch
controls are using tab semantics incompletely, so either finish the full tabs
pattern or simplify them to plain buttons. In SetupSwitch, if you keep
role="tab", add the matching aria-controls/id wiring, role="tabpanel" on the
content areas, and proper roving tabIndex/keyboard behavior; otherwise remove
the tablist/tab roles and leave the buttons as a simple toggle between agent and
manual.

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.

1 participant