Skip to content

docs: demos#197

Open
feloy wants to merge 1 commit intoopenkaiden:mainfrom
feloy:demo
Open

docs: demos#197
feloy wants to merge 1 commit intoopenkaiden:mainfrom
feloy:demo

Conversation

@feloy
Copy link
Copy Markdown
Contributor

@feloy feloy commented Apr 7, 2026

Demos:

  • detailed commands to create / start / terminal / stop / remove workspace
  • short commands to create / terminal / remove workspace
  • start a workspace with specific model
  • configure env vars and mounts with workspace.json file in the repository
  • configure env vars and mounts with projects.json file in user's home directory

fixes #196

@feloy feloy changed the title doc: demos docs: demos Apr 7, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 7, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds five new VHS terminal-recording scripts that automate bash CLI sessions to produce GIF demos by invoking and verifying kdn workflows with configured rendering settings, typed commands, timed sleeps, and screen-pattern synchronization.

Changes

Cohort / File(s) Summary
Detailed demo
vhs/01_detailed.tape
New tape: sets rendering params; runs kdn info, kdn init --runtime podman --agent claude --name demo, kdn list, kdn start demo, kdn terminal demo (interactive), /exit, kdn stop demo, kdn remove demo, and final kdn list verification using sleeps and screen matches.
Short demo
vhs/02_short.tape
New tape: sets rendering params and env vars (KDN_DEFAULT_RUNTIME, KDN_DEFAULT_AGENT, KDN_INIT_AUTO_START); runs kdn init, waits for container start, kdn list check, kdn terminal demo, exits, and force-removes demo with screen/wait sync.
Model demo
vhs/03_model.tape
New tape: sets rendering params and exports env vars; runs kdn init --model opus, waits for container start, opens kdn terminal demo, exits, and kdn remove --force demo with waits and delays.
Local config demo
vhs/04_config_local.tape
New tape: writes a local workspace JSON (.kaiden/workspace.json), shows it, sets env vars, runs kdn init, launches kdn terminal demo bash, verifies injected $KEY1 and .gitconfig mount inside container, then cleans up files and removes the demo.
Projects & secrets demo
vhs/05_config_projects.tape
New tape: backs up and replaces ~/.kdn/config/projects.json, injects a Podman secret (my-github-token) with a hardcoded token, runs kdn init and kdn terminal demo bash, verifies GH_TOKEN and .gitconfig mount, then restores config, removes secret, and force-removes demo.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'docs: demos' accurately reflects the primary change—adding demo documentation files (five VHS tape scripts generating demo GIFs).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The pull request description clearly outlines five demo scenarios covering workspace creation, terminal access, model selection, and configuration management via JSON files.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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 and usage tips.

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@vhs/02_short.tape`:
- Line 11: Several `Type` arguments open a quoted string but lack a closing
quote (e.g., the literal starting with Type "export
KORTEX_CLI_DEFAULT_RUNTIME=podman); fix each occurrence by terminating the
quoted string properly so the export command is fully enclosed in quotes.
Specifically, locate the `Type "export ...` lines (the instances that set
KORTEX_CLI_DEFAULT_RUNTIME and the other export commands) and add the missing
closing double-quote at the end of each export command so VHS can parse the
input correctly.

In `@vhs/03_model.tape`:
- Line 11: The Type commands for the export of KORTEX_CLI_DEFAULT_RUNTIME are
missing closing quote marks; locate the Type statements that begin with Type
"export KORTEX_CLI_DEFAULT_RUNTIME=podman (also the corresponding Type lines at
the other two occurrences) and add the missing trailing double-quote to make
them Type "export KORTEX_CLI_DEFAULT_RUNTIME=podman"; repeat the same fix for
the matching lines in vhs/02_short.tape to ensure all Type "<string>" literals
are properly closed.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a6da2ca5-0170-41c6-a350-4b45e89cfc11

📥 Commits

Reviewing files that changed from the base of the PR and between e9d481c and 1170b02.

⛔ Files ignored due to path filters (3)
  • demos/01_detailed.gif is excluded by !**/*.gif
  • demos/02_short.gif is excluded by !**/*.gif
  • demos/03_model.gif is excluded by !**/*.gif
📒 Files selected for processing (3)
  • vhs/01_detailed.tape
  • vhs/02_short.tape
  • vhs/03_model.tape

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@vhs/05_config_projects.tape`:
- Line 18: Backup/restore moves for ~/.kortex-cli/config/projects.json are
unguarded and fail when files are missing; update the script to check for file
existence before moving or restoring (e.g., test -f or [ -f ] checks) so the
initial mv to projects.json.orig only runs if projects.json exists and the
restore mv only runs if projects.json.orig exists, and handle missing-source
cases gracefully (skip the move or log a notice) to avoid demo init/cleanup
failures.
- Line 18: The JSON payload in the mv && echo -n ... | json_pp pipeline uses
single quotes so the mount path "$HOME/.gitconfig" is not expanded and ends up
literal in projects.json; change the write to expand the variable (e.g., switch
to double quotes with proper JSON escaping, or construct the JSON via
printf/envsubst/jq so $HOME is interpolated) so that the mounts host and target
contain the actual expanded home path instead of the literal "$HOME/.gitconfig".
- Around line 33-34: The Type command string is missing a closing quote which
breaks the tape parser; update the Type instruction (the line starting with Type
"kortex-cli init) to include the trailing double-quote so it becomes Type
"kortex-cli init" ensuring the quoted argument is balanced for the tape parser.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f188c607-e9b3-49f3-81c5-714896b67f52

📥 Commits

Reviewing files that changed from the base of the PR and between db203f6 and 35f9b25.

⛔ Files ignored due to path filters (2)
  • demos/04_config_local.gif is excluded by !**/*.gif
  • demos/05_config_projects.gif is excluded by !**/*.gif
📒 Files selected for processing (2)
  • vhs/04_config_local.tape
  • vhs/05_config_projects.tape
✅ Files skipped from review due to trivial changes (1)
  • vhs/04_config_local.tape

@feloy feloy marked this pull request as draft April 8, 2026 06:26
Signed-off-by: Philippe Martin <phmartin@redhat.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@feloy feloy marked this pull request as ready for review April 8, 2026 14:23
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
vhs/01_detailed.tape (1)

35-42: Harden terminal transition sync to reduce recording flakiness.

This block uses fixed sleeps only. Consider adding Wait+Screen checks before sending /exit and before continuing, so recordings stay deterministic across different machine speeds.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@vhs/01_detailed.tape` around lines 35 - 42, The recording uses fixed Sleep
5000ms delays which causes flakiness; replace those sleeps with deterministic
wait-for-screen checks: after the "Type \"kdn terminal demo\" / Enter" step, add
a WaitForScreen or WaitUntilVisible/Wait+Screen assertion that verifies the demo
prompt or expected output appears before continuing, and before sending "Type
\"/exit\" / Enter add a WaitForScreen check that the terminal is ready for
input; likewise replace the final Sleep 5000ms with a WaitForScreen or
confirmation that the exit completed (shell prompt or goodbye message) so
transitions in the sequence (the steps around the strings \"kdn terminal demo\"
and \"/exit\") are synchronized to actual UI state rather than fixed time.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@vhs/01_detailed.tape`:
- Around line 35-42: The recording uses fixed Sleep 5000ms delays which causes
flakiness; replace those sleeps with deterministic wait-for-screen checks: after
the "Type \"kdn terminal demo\" / Enter" step, add a WaitForScreen or
WaitUntilVisible/Wait+Screen assertion that verifies the demo prompt or expected
output appears before continuing, and before sending "Type \"/exit\" / Enter add
a WaitForScreen check that the terminal is ready for input; likewise replace the
final Sleep 5000ms with a WaitForScreen or confirmation that the exit completed
(shell prompt or goodbye message) so transitions in the sequence (the steps
around the strings \"kdn terminal demo\" and \"/exit\") are synchronized to
actual UI state rather than fixed time.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 95479ac1-13da-4bfc-9744-676946ea69ce

📥 Commits

Reviewing files that changed from the base of the PR and between 40dbe53 and 7989d06.

⛔ Files ignored due to path filters (5)
  • demos/01_detailed.gif is excluded by !**/*.gif
  • demos/02_short.gif is excluded by !**/*.gif
  • demos/03_model.gif is excluded by !**/*.gif
  • demos/04_config_local.gif is excluded by !**/*.gif
  • demos/05_config_projects.gif is excluded by !**/*.gif
📒 Files selected for processing (5)
  • vhs/01_detailed.tape
  • vhs/02_short.tape
  • vhs/03_model.tape
  • vhs/04_config_local.tape
  • vhs/05_config_projects.tape
✅ Files skipped from review due to trivial changes (2)
  • vhs/02_short.tape
  • vhs/03_model.tape
🚧 Files skipped from review as they are similar to previous changes (2)
  • vhs/04_config_local.tape
  • vhs/05_config_projects.tape

@feloy feloy requested a review from slemeur April 8, 2026 15:15
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.

create demos

3 participants