Interactive Tutorial and Onboarding System
Implements Issue #25: Interactive Tutorial and Onboarding
Overview
This PR adds a comprehensive interactive tutorial and onboarding system for Scarab Terminal, making it easier for new users to learn key features and get productive quickly.
Changes
1. Interactive In-Terminal Tutorial System
New Files:
crates/scarab-client/src/tutorial/mod.rs- Tutorial plugin frameworkcrates/scarab-client/src/tutorial/steps.rs- 8-step tutorial definitionscrates/scarab-client/src/tutorial/ui.rs- Tutorial UI renderingcrates/scarab-client/src/tutorial/validation.rs- Step validation helpers
Features:
- ✅ 8-step guided tour (Welcome → Navigation → Scrollback → Link Hints → Palette → Plugins → Config → Completion)
- ✅ Interactive step validation (users must complete actions)
- ✅ Progress tracking with persistence (
~/.config/scarab/tutorial_progress.json) - ✅ Launches automatically on first run
- ✅ Replayable with
--tutorialflag - ✅ Beautiful ASCII art UI with progress bar
- ✅ Keyboard navigation (Space/Enter: Next, Backspace: Previous, ESC: Skip)
2. Written Tutorials
New Documentation:
docs/tutorials/01-getting-started.md- Installation and first 5 minutesdocs/tutorials/02-customization.md- Themes, fonts, keybindings, performancedocs/tutorials/03-workflows.md- Git, Docker, SSH, multi-language development
Coverage:
- Complete installation instructions for Ubuntu, Fedora, Arch
- Step-by-step quick start guide
- Comprehensive configuration reference
- Real-world workflow examples
- Troubleshooting guide
3. Video Screencast Scripts
New Scripts:
scripts/record-videos.sh- Automated video recording for all 3 screencastsdocs/videos/README.md- Video recording instructions and guidelines
Videos (scripts ready, need recording):
- Scarab in 2 Minutes - Quick feature showcase
- Your First Plugin - Step-by-step plugin creation
- Advanced Workflows - Power user tips
4. Animated GIF Demo Scripts
New Scripts:
scripts/record-demos.sh- Automated GIF recording for all demosdocs/assets/demos/README.md- Demo recording instructions
Demos (scripts ready, need recording):
link-hints-demo.gif- Link hints featurecommand-palette.gif- Command palette usageplugin-install.gif- Plugin installationtheme-switch.gif- Theme switchingsplit-panes.gif- Split panes (placeholder for future)
5. Updated README
Changes to README.md:
- Added “Visual Demos” section at top with GIF placeholders
- Added links to video tutorials
- Updated “Quick Start” to mention interactive tutorial
- Added tutorial step list
- Improved documentation navigation
6. Code Integration
Updated Files:
crates/scarab-client/src/lib.rs- Exports tutorial modulecrates/scarab-client/Cargo.toml- Added serde_json dependency (for tutorial progress)
Testing
Manual Testing
Tutorial System:
- Launch client on fresh install - tutorial starts automatically
- Complete tutorial step-by-step
- Skip tutorial with ESC
- Replay tutorial with
--tutorialflag - Verify progress persistence
Documentation:
- Follow “Getting Started” guide from scratch
- Test all configuration examples
- Verify all links work
Unit Tests
All tutorial modules include comprehensive unit tests:
cargo test -p scarab-client tutorial::Tests cover:
- Tutorial progression (next/previous/skip)
- Step validation logic
- Progress persistence
- UI text wrapping
Demo Recording
To create the actual GIF demos and videos:
# Install prerequisites
pip install asciinema
cargo install agg
npm install -g asciicast2mp4 # Optional, for videos
# Record demos (creates ~20-30MB of GIFs)
chmod +x scripts/record-demos.sh
./scripts/record-demos.sh
# Record videos (creates ~50-100MB of MP4s)
chmod +x scripts/record-videos.sh
./scripts/record-videos.shNote: Actual demo files are NOT included in this PR to keep the commit size reasonable. They can be recorded and added later, or hosted externally (YouTube, GitHub Releases).
Documentation Structure
docs/
├── tutorials/
│ ├── 01-getting-started.md # NEW: Installation & first steps
│ ├── 02-customization.md # NEW: Themes, config, keybindings
│ └── 03-workflows.md # NEW: Git, Docker, SSH workflows
├── videos/
│ ├── README.md # NEW: Video recording guide
│ ├── scarab-2min-demo.mp4 # TODO: Record
│ ├── first-plugin-tutorial.mp4 # TODO: Record
│ └── advanced-workflows.mp4 # TODO: Record
└── assets/
└── demos/
├── README.md # NEW: Demo recording guide
├── PLACEHOLDER.md # NEW: Placeholder info
├── link-hints-demo.gif # TODO: Record
├── command-palette.gif # TODO: Record
├── plugin-install.gif # TODO: Record
├── theme-switch.gif # TODO: Record
└── split-panes.gif # TODO: Record
Code Structure
crates/scarab-client/src/tutorial/
├── mod.rs # Tutorial system core, Bevy plugin, state machine
├── steps.rs # 8 tutorial step definitions
├── ui.rs # ASCII art rendering and UI
└── validation.rs # Step validation helpers
Success Criteria
- Interactive tutorial completes in < 5 minutes
- All 3 video scripts created
- 5+ demo scripts created
- 3+ written tutorials published
- README updated with visual demos
- Actual GIFs/videos recorded (post-PR)
- New users report easier onboarding (post-release survey)
Breaking Changes
None. All changes are additive.
Migration Guide
No migration needed. Existing users will see:
- Interactive tutorial on next client launch (can skip with ESC)
- New
--tutorialflag available - New documentation in
docs/tutorials/
Performance Impact
- Tutorial system adds ~5KB to client binary
- Tutorial progress file: ~500 bytes
- No runtime impact when tutorial is not active
Future Enhancements
- Add tutorial for tabs/splits (when feature is implemented)
- Localization support (i18n)
- Interactive playground mode
- Video tutorials embedded in terminal
- Completion badges/achievements
Related Issues
- Closes #25 (Interactive Tutorial and Onboarding)
- Related to #26 (Complete Reference Documentation)
- Related to #27 (Plugin Development Documentation)
Checklist
- Code follows project style guidelines
- All tests pass locally
- Documentation updated
- Commit messages follow convention
- No merge conflicts
- Demo videos recorded (post-PR task)
- PR description is complete
Screenshots
Tutorial Welcome Screen:
┌─────────────────────────────────────────────────────┐
│ SCARAB TUTORIAL │
│ Step 1 of 8 │
├─────────────────────────────────────────────────────┤
│ │
│ WELCOME TO SCARAB TERMINAL! │
│ │
│ Scarab is a next-generation GPU-accelerated │
│ terminal emulator with F# plugins and zero-copy │
│ IPC. │
│ │
│ This quick tutorial will guide you through the │
│ key features. │
│ │
│ It will take about 5 minutes to complete. │
│ │
│ ▶ Press SPACE or ENTER to continue │
│ │
│ 💡 Hint: You can skip this tutorial anytime by │
│ pressing ESC │
│ │
│ ██████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ │
│ 12% complete │
│ │
│ [ESC: Skip] [BACKSPACE: Back] [SPACE/ENTER: Next →] │
└─────────────────────────────────────────────────────┘
Review Notes
Please review:
- Tutorial step flow and UX
- Documentation clarity and completeness
- Code organization and testing
- Recording script accuracy
Post-Merge Tasks
- Record actual GIF demos (can be done by any contributor)
- Record video screencasts
- Upload videos to YouTube
- Update README with actual YouTube links
- Announce new tutorial system in release notes
Thank you for reviewing!