Skip to content

Conversation

@AlexSkrypnyk
Copy link
Member

@AlexSkrypnyk AlexSkrypnyk commented Nov 13, 2025

Closes #2092

Summary by CodeRabbit

  • New Features

    • Added configurable terminal rendering options (line height and font family) and a command-line renderer for producing terminal SVG/PNG outputs.
    • Asciinema player now accepts terminalLineHeight and terminalFontFamily props for improved display control.
  • Documentation

    • Installation guide updated to demonstrate terminal display customization.
  • Tests

    • Added unit tests covering new terminalLineHeight and terminalFontFamily behaviors.
  • Chores

    • Build/script flow and CI steps adjusted to use the new renderer and updated install flow.

@AlexSkrypnyk AlexSkrypnyk self-assigned this Nov 13, 2025
@github-project-automation github-project-automation bot moved this to BACKLOG in Vortex Nov 13, 2025
@AlexSkrypnyk AlexSkrypnyk added this to the 25.11.0 milestone Nov 13, 2025
@coderabbitai
Copy link

coderabbitai bot commented Nov 13, 2025

Walkthrough

Adds configurable terminal styling (line-height and font-family) across docs rendering: new Node.js svg-term renderer, build-script swaps to that renderer, AsciinemaPlayer gains two props, tests added, and package dependency updated.

Changes

Cohort / File(s) Change Summary
Rendering utility
.vortex/docs/.utils/svg-term-render.js
New Node.js CLI that reads asciinema JSON/CAST, builds a theme including lineHeight and fontFamily, and renders SVG via svg-term; supports --at, --line-height, --font-family and exits non-zero on error.
Build process / scripts
.vortex/docs/.utils/update-installer-video.sh
Replaces npx svg-term calls with node svg-term-render.js, adds explicit --line-height 1.1 for SVG/poster extraction, adds pre-conversion existence check for the cast file, and updates invocation paths.
React component
.vortex/docs/src/components/AsciinemaPlayer/AsciinemaPlayer.js
Adds props terminalLineHeight (default 1.0) and terminalFontFamily (default monospace stack); props are included in player options on create/update and added to effect dependencies.
Content usage
.vortex/docs/content/getting-started/installation.mdx
Sets terminalLineHeight={1.0} on the AsciinemaPlayer usage.
Tests
.vortex/docs/tests/unit/AsciinemaPlayer/AsciinemaPlayer.test.js
Adds unit tests covering default and custom terminalLineHeight and terminalFontFamily, verifying propagation to player options in both script-load and pre-existing-player scenarios.
Dependencies & CI
.vortex/docs/package.json
.github/workflows/*.yml
Adds svg-term-cli: ^2.1.1 to docs package deps; CI workflow steps updated to use yarn, adjust working-directory to .vortex/docs, and change the installer-video generation step to call the updated script path and installation flow.

Sequence Diagram(s)

sequenceDiagram
    participant CI as Build script
    participant Renderer as svg-term-render.js
    participant FS as File system

    rect rgba(200,230,255,0.6)
    CI->>FS: ensure cast file exists
    CI->>Renderer: node svg-term-render.js cast.json output.svg --line-height 1.1 [--at 1000]
    Renderer->>Renderer: parse input, build theme (lineHeight,fontFamily)
    Renderer->>Renderer: invoke svg-term to render SVG
    Renderer-->>CI: SVG (+ status) / exit code
    end
Loading
sequenceDiagram
    participant MDX as installation.mdx
    participant Comp as AsciinemaPlayer
    participant Player as Asciinema Player lib
    participant User

    rect rgba(250,240,220,0.6)
    MDX->>Comp: terminalLineHeight=1.0, terminalFontFamily="..."
    Comp->>Comp: include props in options (create/update)
    Comp->>Player: Player.create(options)
    Player->>User: render terminal frames with configured styling
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Pay attention to:
    • CLI argument parsing, error handling, and theme construction in svg-term-render.js
    • Correct propagation and effect dependency correctness for the two new AsciinemaPlayer props
    • Shell quoting/path correctness and pre-check behavior in update-installer-video.sh
    • CI workflow changes (yarn install, working-directory) and the added dependency impact

Possibly related PRs

Poem

🐇 I nibble at pixels, hop through the stream,
I tweak line-height so terminals gleam.
From script to player, I stitch every part,
A tiny rabbit, rendering art. ✨

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: fixing terminal line height in the installer CLI video, which aligns with the primary modifications across multiple files.
Linked Issues check ✅ Passed The PR addresses issue #2092 by adding terminal line height configuration options to the AsciinemaPlayer component, updating rendering scripts, workflows, and tests to support this functionality.
Out of Scope Changes check ✅ Passed All changes are focused on fixing terminal line height rendering: new svg-term-render.js script, updated shell script, workflow changes, component prop additions, and corresponding test coverage.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/2092-fix-term-line-height

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

@github-actions github-actions bot temporarily deployed to commit November 13, 2025 12:02 Inactive
@AlexSkrypnyk
Copy link
Member Author

AlexSkrypnyk commented Nov 13, 2025

installer

installer

@codecov
Copy link

codecov bot commented Nov 13, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.04%. Comparing base (f177774) to head (47f91e2).
⚠️ Report is 2 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2093   +/-   ##
========================================
  Coverage    68.04%   68.04%           
========================================
  Files           96       96           
  Lines         4731     4731           
  Branches        44       44           
========================================
  Hits          3219     3219           
  Misses        1512     1512           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@AlexSkrypnyk AlexSkrypnyk force-pushed the feature/2092-fix-term-line-height branch from d5a1f85 to 47f91e2 Compare November 13, 2025 12:39
@github-actions github-actions bot temporarily deployed to commit November 13, 2025 12:41 Inactive
Copy link

@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: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d5a1f85 and 47f91e2.

⛔ Files ignored due to path filters (3)
  • .vortex/docs/static/img/installer.png is excluded by !**/*.png
  • .vortex/docs/static/img/installer.svg is excluded by !**/*.svg
  • .vortex/docs/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (8)
  • .github/workflows/vortex-release-docs.yml (1 hunks)
  • .github/workflows/vortex-test-installer.yml (1 hunks)
  • .vortex/docs/.utils/svg-term-render.js (1 hunks)
  • .vortex/docs/.utils/update-installer-video.sh (2 hunks)
  • .vortex/docs/content/getting-started/installation.mdx (1 hunks)
  • .vortex/docs/package.json (1 hunks)
  • .vortex/docs/src/components/AsciinemaPlayer/AsciinemaPlayer.js (4 hunks)
  • .vortex/docs/tests/unit/AsciinemaPlayer/AsciinemaPlayer.test.js (6 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
.vortex/docs/src/components/AsciinemaPlayer/AsciinemaPlayer.js (1)
.vortex/docs/.utils/svg-term-render.js (1)
  • theme (60-84)
.vortex/docs/tests/unit/AsciinemaPlayer/AsciinemaPlayer.test.js (1)
.vortex/docs/src/components/AsciinemaPlayer/AsciinemaPlayer.js (1)
  • AsciinemaPlayer (3-104)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
  • GitHub Check: build (1)
  • GitHub Check: build (0)
  • GitHub Check: vortex-test-installer (8.4)
  • GitHub Check: vortex-test-installer (8.3)
  • GitHub Check: vortex-test-common
  • GitHub Check: vortex-test-workflow (1)
  • GitHub Check: vortex-test-workflow (2)
  • GitHub Check: vortex-test-workflow (4)
  • GitHub Check: vortex-test-workflow (3)
  • GitHub Check: vortex-test-workflow (0)
  • GitHub Check: vortex-test-docs
🔇 Additional comments (11)
.vortex/docs/src/components/AsciinemaPlayer/AsciinemaPlayer.js (2)

12-13: LGTM! New props enhance terminal rendering control.

The addition of terminalLineHeight and terminalFontFamily props provides fine-grained control over terminal rendering appearance, directly addressing the line height issue mentioned in the PR objectives.


90-101: LGTM! Effect dependencies correctly updated.

The effect dependency array now includes terminalLineHeight and terminalFontFamily, ensuring the player reinitializes when these values change.

.vortex/docs/content/getting-started/installation.mdx (1)

35-35: LGTM! Documentation properly demonstrates the new prop.

The terminalLineHeight={1.0} prop is correctly applied to the AsciinemaPlayer component.

.github/workflows/vortex-release-docs.yml (1)

141-144: LGTM! Workflow correctly migrated to use project-local dependencies.

The workflow now uses yarn install --frozen-lockfile instead of global svg-term-cli installation, aligning with the new Node-based rendering approach. The script path and working directory are correctly updated.

.vortex/docs/.utils/svg-term-render.js (2)

38-39: LGTM! Default values match AsciinemaPlayer component.

The default values for lineHeight (1.0) and fontFamily are consistent with the AsciinemaPlayer component defaults, ensuring rendering consistency across documentation assets.


96-108: LGTM! Proper error handling and informative output.

The script includes proper try-catch error handling and outputs useful information including lineHeight, fontFamily, and timestamp values for debugging.

.github/workflows/vortex-test-installer.yml (1)

63-66: LGTM! Test workflow aligned with release workflow.

The changes mirror those in the release workflow, ensuring consistent installer video generation across both workflows.

.vortex/docs/.utils/update-installer-video.sh (2)

316-319: LGTM! Defensive early check for cast file existence.

The early existence check for the cast file provides better error reporting before attempting SVG conversion.


321-321: The review comment references files that do not exist in this codebase.

The verification found that:

  • AsciinemaPlayer.js (referenced at line 12) — not found
  • installation.mdx (referenced at line 35) — not found
  • update-installer-video.sh (referenced at line 321) — not found

The only line-height reference in the codebase is in web/modules/custom/ys_base/css/ys_base.css (line 99), which is unrelated to the SVG/terminal rendering concern raised in the review. The comment appears to reference code from a different repository or an outdated version.

Likely an incorrect or invalid review comment.

.vortex/docs/tests/unit/AsciinemaPlayer/AsciinemaPlayer.test.js (2)

210-285: LGTM! Comprehensive test coverage for new props.

The test suites thoroughly cover both terminalLineHeight and terminalFontFamily props, including:

  • Default values
  • Custom values
  • Multiple value variations

763-846: LGTM! Library integration tests verify proper prop propagation.

These tests confirm that both terminalLineHeight and terminalFontFamily are correctly passed to the external AsciinemaPlayer library, including default value handling.

Comment on lines +40 to +41
"react-dom": "^18.0.0",
"svg-term-cli": "^2.1.1"
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

🧩 Analysis chain

Verify that svg-term-cli provides the required 'svg-term' module.

The new utility script at .vortex/docs/.utils/svg-term-render.js (line 18) imports svg-term using require('svg-term'). Please confirm that the svg-term-cli package provides this module, or if a separate svg-term dependency is needed.


🏁 Script executed:

#!/bin/bash
# Check if svg-term-cli provides the svg-term module
npm view svg-term-cli

Length of output: 890


Add svg-term as an explicit dependency.

The [email protected] package includes svg-term: ^1.1.3 as a dependency, so the require('svg-term') call in .vortex/docs/.utils/svg-term-render.js will work. However, since the code directly requires svg-term (rather than svg-term-cli), it should be explicitly listed in package.json as a direct dependency rather than relying on a transitive dependency. Add "svg-term": "^1.1.3" to the dependencies in .vortex/docs/package.json.

🤖 Prompt for AI Agents
.vortex/docs/package.json around lines 40-41: the project requires svg-term
directly in .vortex/docs/.utils/svg-term-render.js but only depends on
svg-term-cli (which pulls svg-term transitively); add "svg-term": "^1.1.3" to
the dependencies object in .vortex/docs/package.json so svg-term is an explicit
direct dependency and will be installed reliably.

@AlexSkrypnyk AlexSkrypnyk merged commit ecd9eeb into develop Nov 13, 2025
28 checks passed
@AlexSkrypnyk AlexSkrypnyk deleted the feature/2092-fix-term-line-height branch November 13, 2025 13:00
@github-project-automation github-project-automation bot moved this from BACKLOG to Release queue in Vortex Nov 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Released in 1.34.0

Development

Successfully merging this pull request may close these issues.

[INSTALLER] Fix terminal line height in the installer CLI video

2 participants