rooibos 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. checksums.yaml +4 -4
  2. data/.builds/ruby-3.2.yml +9 -5
  3. data/.builds/ruby-3.3.yml +9 -5
  4. data/.builds/ruby-3.4.yml +9 -5
  5. data/.builds/ruby-4.0.0.yml +9 -5
  6. data/AGENTS.md +1 -1
  7. data/CHANGELOG.md +46 -0
  8. data/README.md +2 -2
  9. data/README.rdoc +374 -0
  10. data/REUSE.toml +5 -0
  11. data/Rakefile +1 -1
  12. data/doc/best_practices/forms_and_validation.md +20 -0
  13. data/doc/best_practices/http_workflows.md +20 -0
  14. data/doc/best_practices/index.md +26 -0
  15. data/doc/best_practices/lists_and_tables.md +20 -0
  16. data/doc/best_practices/modal_dialogs.md +20 -0
  17. data/doc/best_practices/no_stateful_widgets.md +184 -0
  18. data/doc/best_practices/orchestration.md +20 -0
  19. data/doc/best_practices/streaming_data.md +20 -0
  20. data/doc/contributors/design/commands_and_outlets.md +1 -1
  21. data/doc/contributors/documentation_plan.md +616 -0
  22. data/doc/contributors/documentation_stub_audit.md +112 -0
  23. data/doc/contributors/documentation_style.md +275 -0
  24. data/doc/contributors/e2e_pty.md +168 -0
  25. data/doc/contributors/specs/earliest_tutorial_steps_per_story.md +70 -0
  26. data/doc/contributors/specs/file_browser.md +789 -0
  27. data/doc/contributors/specs/file_browser_stories.md +774 -0
  28. data/doc/contributors/specs/tutorials_to_stories.rb +167 -0
  29. data/doc/contributors/todo/scrollbar.md +118 -0
  30. data/doc/contributors/tutorial_old/01_project_setup.md +20 -0
  31. data/doc/contributors/tutorial_old/02_hello_world.md +24 -0
  32. data/doc/contributors/tutorial_old/03_adding_state.md +26 -0
  33. data/doc/contributors/tutorial_old/06_organizing_your_code.md +20 -0
  34. data/doc/contributors/tutorial_old/07_your_first_command.md +21 -0
  35. data/doc/contributors/tutorial_old/08_the_preview_pane.md +20 -0
  36. data/doc/contributors/tutorial_old/09_loading_states.md +20 -0
  37. data/doc/contributors/tutorial_old/10_testing_your_app.md +20 -0
  38. data/doc/contributors/tutorial_old/11_polish_and_refine.md +20 -0
  39. data/doc/contributors/tutorial_old/12_going_further.md +20 -0
  40. data/doc/contributors/tutorial_old/index.md +20 -0
  41. data/doc/essentials/commands.md +20 -0
  42. data/doc/essentials/index.md +31 -0
  43. data/doc/essentials/messages.md +21 -0
  44. data/doc/essentials/models.md +21 -0
  45. data/doc/essentials/shortcuts.md +19 -0
  46. data/doc/essentials/the_elm_architecture.md +24 -0
  47. data/doc/essentials/the_runtime.md +21 -0
  48. data/doc/essentials/update_functions.md +20 -0
  49. data/doc/essentials/views.md +22 -0
  50. data/doc/getting_started/for_go_developers.md +16 -0
  51. data/doc/getting_started/for_python_developers.md +16 -0
  52. data/doc/getting_started/for_react_developers.md +17 -0
  53. data/doc/getting_started/index.md +52 -0
  54. data/doc/getting_started/install.md +20 -0
  55. data/doc/getting_started/quickstart.md +9 -45
  56. data/doc/getting_started/ruby_primer.md +19 -0
  57. data/doc/getting_started/why_rooibos.md +20 -0
  58. data/doc/index.md +79 -11
  59. data/doc/scaling_up/async_patterns.md +20 -0
  60. data/doc/scaling_up/command_composition.md +20 -0
  61. data/doc/scaling_up/custom_commands.md +21 -0
  62. data/doc/scaling_up/fractal_architecture.md +20 -0
  63. data/doc/scaling_up/index.md +30 -0
  64. data/doc/scaling_up/message_routing.md +20 -0
  65. data/doc/scaling_up/ractor_safety.md +20 -0
  66. data/doc/scaling_up/testing.md +21 -0
  67. data/doc/troubleshooting/common_errors.md +20 -0
  68. data/doc/troubleshooting/debugging.md +21 -0
  69. data/doc/troubleshooting/index.md +23 -0
  70. data/doc/troubleshooting/performance.md +20 -0
  71. data/doc/tutorial/01_project_setup.md +44 -0
  72. data/doc/tutorial/02_hello_world.md +45 -0
  73. data/doc/tutorial/03_static_file_list.md +44 -0
  74. data/doc/tutorial/04_arrow_navigation.md +47 -0
  75. data/doc/tutorial/05_real_files.md +45 -0
  76. data/doc/tutorial/06_safe_refactoring.md +21 -0
  77. data/doc/tutorial/07_red_first_tdd.md +26 -0
  78. data/doc/tutorial/08_file_metadata.md +42 -0
  79. data/doc/tutorial/09_text_preview.md +44 -0
  80. data/doc/tutorial/10_directory_tree.md +42 -0
  81. data/doc/tutorial/11_pane_focus.md +40 -0
  82. data/doc/tutorial/12_sorting.md +41 -0
  83. data/doc/tutorial/13_filtering.md +43 -0
  84. data/doc/tutorial/14_toggle_hidden.md +41 -0
  85. data/doc/tutorial/15_text_input_widget.md +43 -0
  86. data/doc/tutorial/16_rename_files.md +42 -0
  87. data/doc/tutorial/17_confirmation_dialogs.md +43 -0
  88. data/doc/tutorial/18_progress_indicators.md +43 -0
  89. data/doc/tutorial/19_atomic_operations.md +42 -0
  90. data/doc/tutorial/20_external_editor.md +42 -0
  91. data/doc/tutorial/21_modal_overlays.md +41 -0
  92. data/doc/tutorial/22_error_handling.md +43 -0
  93. data/doc/tutorial/23_terminal_capabilities.md +53 -0
  94. data/doc/tutorial/24_mouse_events.md +43 -0
  95. data/doc/tutorial/25_resize_events.md +43 -0
  96. data/doc/tutorial/26_loading_states.md +42 -0
  97. data/doc/tutorial/27_performance.md +43 -0
  98. data/doc/tutorial/28_color_schemes.md +47 -0
  99. data/doc/tutorial/29_configuration.md +124 -0
  100. data/doc/tutorial/30_going_further.md +17 -0
  101. data/doc/tutorial/index.md +17 -0
  102. data/examples/app_file_browser/app.rb +40 -0
  103. data/examples/app_fractal_dashboard/dashboard/update_manual.rb +7 -7
  104. data/examples/app_fractal_dashboard/fragments/custom_shell_input.rb +5 -5
  105. data/examples/app_fractal_dashboard/fragments/custom_shell_modal.rb +1 -1
  106. data/examples/app_fractal_dashboard/fragments/disk_usage.rb +2 -2
  107. data/examples/app_fractal_dashboard/fragments/network_panel.rb +4 -4
  108. data/examples/app_fractal_dashboard/fragments/ping.rb +2 -2
  109. data/examples/app_fractal_dashboard/fragments/stats_panel.rb +4 -4
  110. data/examples/app_fractal_dashboard/fragments/system_info.rb +2 -2
  111. data/examples/app_fractal_dashboard/fragments/uptime.rb +2 -2
  112. data/examples/verify_website_first_app/app.rb +85 -0
  113. data/examples/verify_website_hello_mvu/app.rb +31 -0
  114. data/examples/widget_command_system/app.rb +15 -13
  115. data/exe/rooibos +10 -0
  116. data/generate_tutorial_stubs.rb +126 -0
  117. data/lib/rooibos/cli/commands/new.rb +373 -0
  118. data/lib/rooibos/cli/commands/run.rb +98 -0
  119. data/lib/rooibos/cli.rb +78 -0
  120. data/lib/rooibos/command/all.rb +25 -20
  121. data/lib/rooibos/command/batch.rb +26 -25
  122. data/lib/rooibos/command/custom.rb +84 -1
  123. data/lib/rooibos/command/http.rb +59 -55
  124. data/lib/rooibos/command/lifecycle.rb +5 -5
  125. data/lib/rooibos/command/open.rb +86 -0
  126. data/lib/rooibos/command/outlet.rb +105 -3
  127. data/lib/rooibos/command/wait.rb +5 -5
  128. data/lib/rooibos/command.rb +57 -74
  129. data/lib/rooibos/message/batch.rb +39 -0
  130. data/lib/rooibos/message/canceled.rb +51 -0
  131. data/lib/rooibos/message/error.rb +48 -0
  132. data/lib/rooibos/message/open.rb +30 -0
  133. data/lib/rooibos/message.rb +84 -4
  134. data/lib/rooibos/router.rb +11 -14
  135. data/lib/rooibos/runtime.rb +40 -43
  136. data/lib/rooibos/shortcuts.rb +47 -0
  137. data/lib/rooibos/test_helper.rb +71 -6
  138. data/lib/rooibos/version.rb +1 -1
  139. data/lib/rooibos/welcome.rb +237 -0
  140. data/lib/rooibos.rb +4 -3
  141. data/mise.toml +1 -1
  142. data/rbs_collection.lock.yaml +2 -2
  143. data/sig/concurrent.rbs +3 -0
  144. data/sig/gem.rbs +20 -0
  145. data/sig/rooibos/cli.rbs +42 -0
  146. data/sig/rooibos/command.rbs +48 -0
  147. data/sig/rooibos/message.rbs +60 -0
  148. data/sig/rooibos/shortcuts.rbs +14 -0
  149. data/sig/rooibos/test_helper.rbs +6 -2
  150. data/sig/rooibos/welcome.rbs +75 -0
  151. data/tasks/install.rake +29 -0
  152. data/tasks/resources/build.yml.erb +2 -0
  153. metadata +272 -38
  154. data/doc/concepts/application_architecture.md +0 -197
  155. data/doc/concepts/application_testing.md +0 -49
  156. data/doc/concepts/async_work.md +0 -164
  157. data/doc/concepts/commands.md +0 -530
  158. data/doc/concepts/message_processing.md +0 -51
  159. data/doc/contributors/WIP/decomposition_strategies_analysis.md +0 -258
  160. data/doc/contributors/WIP/implementation_plan.md +0 -409
  161. data/doc/contributors/WIP/init_callable_proposal.md +0 -344
  162. data/doc/contributors/WIP/runtime_refactoring_status.md +0 -47
  163. data/doc/contributors/WIP/task.md +0 -36
  164. data/doc/contributors/WIP/v0.4.0_todo.md +0 -468
  165. data/doc/contributors/kit-no-outlet.md +0 -238
  166. data/doc/contributors/priorities.md +0 -38
  167. data/doc/images/.gitkeep +0 -0
  168. data/exe/.gitkeep +0 -0
  169. /data/doc/contributors/{WIP → design}/mvu_tea_implementations_research.md +0 -0
@@ -0,0 +1,21 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
3
+ SPDX-License-Identifier: CC-BY-SA-4.0
4
+ -->
5
+
6
+ # The Runtime
7
+
8
+
9
+ By the end of this guide, you will:
10
+
11
+ - Describe how Rooibos orchestrates your Model, Update, and View
12
+ - Enable debug mode for Ractor shareability validation
13
+ - Explain when renders happen (after every UPDATE)
14
+ - Use the `Cmd` and `Msg` shorthand aliases
15
+ - Compare the runtime to Rails Rack request cycle
16
+
17
+ > ⚠️ **This page is a stub.** Help us write it! See the [Documentation Plan](../contributors/documentation_plan.md) and [Style Guide](../contributors/documentation_style.md).
18
+
19
+ ---
20
+
21
+ [**Previous:** Commands](./commands.md) | [**Next:** Shortcuts](./shortcuts.md)
@@ -0,0 +1,20 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
3
+ SPDX-License-Identifier: CC-BY-SA-4.0
4
+ -->
5
+
6
+ # Update Functions
7
+
8
+
9
+ By the end of this guide, you will:
10
+
11
+ - Write pure functions that return `[new_model, command]`
12
+ - Explain why side effects are forbidden in UPDATE
13
+ - Return `nil` when no async work is needed
14
+ - Structure complex UPDATE logic with helper methods
15
+
16
+ > ⚠️ **This page is a stub.** Help us write it! See the [Documentation Plan](../contributors/documentation_plan.md) and [Style Guide](../contributors/documentation_style.md).
17
+
18
+ ---
19
+
20
+ [**Previous:** Messages](./messages.md) | [**Next:** Views](./views.md)
@@ -0,0 +1,22 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
3
+ SPDX-License-Identifier: CC-BY-SA-4.0
4
+ -->
5
+
6
+ # Views
7
+
8
+
9
+ By the end of this guide, you will:
10
+
11
+ - Understand that VIEW receives `(model, tui)` arguments
12
+ - Explain what a VIEW callable returns (RatatuiRuby widgets)
13
+ - Compose layouts using Rect, Constraint, and Layout (see RatatuiRuby docs)
14
+ - Understand that VIEW is called on every render (keep it fast)
15
+ - Know that VIEWs can accept kwargs for advanced composition (see Scaling Up)
16
+ - Know when to link out to RatatuiRuby for widget details
17
+
18
+ > ⚠️ **This page is a stub.** Help us write it! See the [Documentation Plan](../contributors/documentation_plan.md) and [Style Guide](../contributors/documentation_style.md).
19
+
20
+ ---
21
+
22
+ [**Previous:** Update Functions](./update_functions.md) | [**Next:** Commands](./commands.md)
@@ -0,0 +1,16 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
3
+ SPDX-License-Identifier: CC-BY-SA-4.0
4
+ -->
5
+
6
+ # For Go Developers
7
+
8
+
9
+ By the end of this guide, you will:
10
+
11
+ - Translate BubbleTea Model/Update/View to Rooibos equivalents
12
+ - Identify Ruby syntax that differs from Go (blocks, symbols, no explicit types)
13
+ - Understand how Rooibos handles Cmd differently than BubbleTea
14
+ - Run the same counter example in both frameworks side-by-side
15
+
16
+ > ⚠️ **This page is a stub.** Help us write it! See the [Documentation Plan](../contributors/documentation_plan.md) and [Style Guide](../contributors/documentation_style.md).
@@ -0,0 +1,16 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
3
+ SPDX-License-Identifier: CC-BY-SA-4.0
4
+ -->
5
+
6
+ # For Python Developers
7
+
8
+
9
+ By the end of this guide, you will:
10
+
11
+ - Compare Rooibos to Textual approach (reactive vs. functional)
12
+ - Map Python concepts to Ruby equivalents (decorators → blocks, dataclasses → Data.define)
13
+ - Understand why immutable state simplifies async coordination
14
+ - Identify key syntax differences (indentation vs. end, snake_case conventions)
15
+
16
+ > ⚠️ **This page is a stub.** Help us write it! See the [Documentation Plan](../contributors/documentation_plan.md) and [Style Guide](../contributors/documentation_style.md).
@@ -0,0 +1,17 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
3
+ SPDX-License-Identifier: CC-BY-SA-4.0
4
+ -->
5
+
6
+ # For React Developers
7
+
8
+
9
+ By the end of this guide, you will:
10
+
11
+ - Map React concepts to Rooibos equivalents (useState → Model, useReducer → Update)
12
+ - Explain how Commands replace useEffect for side effects
13
+ - Understand why Rooibos has no component lifecycle (and why that is simpler)
14
+ - Translate "thinking in components" to "thinking in fragments"
15
+ - Read Ruby syntax confidently after seeing the JS equivalent
16
+
17
+ > ⚠️ **This page is a stub.** Help us write it! See the [Documentation Plan](../contributors/documentation_plan.md) and [Style Guide](../contributors/documentation_style.md).
@@ -0,0 +1,52 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
3
+ SPDX-License-Identifier: CC-BY-SA-4.0
4
+ -->
5
+
6
+ # Getting Started
7
+
8
+ By the end of this section, you will:
9
+
10
+ - Identify which learning path matches your background
11
+ - Know the prerequisites for building TUIs with Ruby
12
+ - Choose where to start based on your experience level
13
+
14
+ ---
15
+
16
+ ## Choose Your Path
17
+
18
+ ### I want to understand the philosophy first
19
+
20
+ → [**Why Rooibos?**](./why_rooibos.md) — Learn what TUIs are, why functional state management matters, and how Rooibos compares to alternatives.
21
+
22
+ ### I want to start coding immediately
23
+
24
+ → [**Quickstart**](./quickstart.md) — Build your first Rooibos app in 5 minutes.
25
+
26
+ ### I'm new to Ruby
27
+
28
+ → [**Installation**](./install.md) — Set up Ruby on your system, then check out the [Ruby Primer](./ruby_primer.md) for language basics.
29
+
30
+ ---
31
+
32
+ ## Coming From Another Ecosystem?
33
+
34
+ We've written guides that map familiar concepts to Rooibos:
35
+
36
+ | Your Background | Guide |
37
+ |-----------------|-------|
38
+ | React / Redux | [For React Developers](./for_react_developers.md) |
39
+ | Go / BubbleTea | [For Go Developers](./for_go_developers.md) |
40
+ | Python / Textual | [For Python Developers](./for_python_developers.md) |
41
+
42
+ ---
43
+
44
+ ## What's Next?
45
+
46
+ After getting started, continue to the **[Tutorial](../tutorial/index.md)** to build a complete File Browser application.
47
+
48
+ For deep conceptual understanding, explore the **[Essentials](../essentials/the_elm_architecture.md)**.
49
+
50
+ ---
51
+
52
+ [**Next:** Why Rooibos?](./why_rooibos.md)
@@ -0,0 +1,20 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
3
+ SPDX-License-Identifier: CC-BY-SA-4.0
4
+ -->
5
+
6
+ # Installation
7
+
8
+
9
+ By the end of this guide, you will:
10
+
11
+ - Install Ruby on macOS, Linux, or Windows (for non-Rubyists)
12
+ - Create a new Ruby project with Bundler
13
+ - Add Rooibos and RatatuiRuby as dependencies
14
+ - Verify your setup runs a minimal app
15
+
16
+ > ⚠️ **This page is a stub.** Help us write it! See the [Documentation Plan](../contributors/documentation_plan.md) and [Style Guide](../contributors/documentation_style.md).
17
+
18
+ ---
19
+
20
+ [**Previous:** Why Rooibos?](./why_rooibos.md) | [**Next:** Quickstart](./quickstart.md)
@@ -2,55 +2,19 @@
2
2
  SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
3
3
  SPDX-License-Identifier: CC-BY-SA-4.0
4
4
  -->
5
- # Quickstart
6
-
7
- Welcome to **rooibos**! This guide will help you get up and running with your first Terminal User Interface in Ruby.
8
-
9
- ## Installation
10
-
11
- See [Installation in the README](../README.md#installation) for setup instructions.
12
-
13
-
14
- ## Tutorials
15
-
16
- ### Basic Application
17
-
18
- Here is a "Hello World" application that demonstrates the core lifecycle of a **rooibos** app.
19
-
20
- _Because this gem is in pre-release, it lacks documentation. Please check the source files.
21
5
 
22
- #### How it works
23
-
24
- _Because this gem is in pre-release, it lacks documentation. Please check the source files.
25
-
26
- ## Examples
27
-
28
- These examples showcase the full power of **rooibos**. You can find their source code in the [examples directory](../examples).
29
-
30
- ### Widget Demos
31
-
32
- Focused examples for individual concepts. Each demonstrates a single concept and ways to interact with it.
33
-
34
- | Widget | What it demonstrates |
35
- |--------|---------------------|
36
- | _Automated Tests_ | _Because this gem is in pre-release, it lacks documentation. Please check the automated tests for details._ |
37
-
38
- ### Sample Applications
6
+ # Quickstart
39
7
 
40
- These larger examples combine concepts into complete applications, demonstrating real-world TUI patterns and architectures.
41
8
 
42
- | Application | Architecture | What you'll learn |
43
- |-------------|--------------|-------------------|
44
- | _Automated Tests_ | _Because this gem is in pre-release, it lacks documentation. Please check the automated tests for details._ |
9
+ By the end of this guide, you will:
45
10
 
11
+ - Run your first Rooibos application
12
+ - Identify the three parts of an MVU app (Model, Update, View)
13
+ - Make a change and see it reflected immediately
14
+ - Know where to go next for deeper learning
46
15
 
47
- ## Next Steps
16
+ > ⚠️ **This page is a stub.** Help us write it! See the [Documentation Plan](../contributors/documentation_plan.md) and [Style Guide](../contributors/documentation_style.md).
48
17
 
49
- Now that you've seen what **rooibos** can do:
18
+ ---
50
19
 
51
- - **Deep dive**: Read the [Application Architecture](../concepts/application_architecture.md) guide for scaling patterns
52
- - **Test your TUI**: See the [Testing Guide](../concepts/application_testing.md) for snapshot and style assertions
53
- - **Avoid common mistakes**: See [Terminal Output During TUI Sessions](https://man.sr.ht/~kerrick/ratatui_ruby/troubleshooting/tui_output.md) to prevent screen corruption
54
- - **Explore the API**: Browse the [full documentation](../index.md)
55
- - **Learn the philosophy**: Read [Why RatatuiRuby?](https://man.sr.ht/~kerrick/ratatui_ruby/why.md) for comparisons and design decisions
56
- - **Get help**: Join the [discussion mailing list](https://lists.sr.ht/~kerrick/ratatui_ruby-discuss)
20
+ [**Previous:** Installation](./install.md)
@@ -0,0 +1,19 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
3
+ SPDX-License-Identifier: CC-BY-SA-4.0
4
+ -->
5
+
6
+ # Ruby Primer
7
+
8
+
9
+ By the end of this guide, you will:
10
+
11
+ - Read and write basic Ruby syntax (variables, methods, classes)
12
+ - Explain Ruby object model: everything is an object
13
+ - Distinguish between symbols (`:key`) and strings (`"key"`)
14
+ - Use blocks, procs, and lambdas for callbacks
15
+ - Create immutable structs with `Data.define`
16
+ - Handle nil safely (Ruby equivalent of null/None)
17
+ - Call methods with keyword arguments
18
+
19
+ > ⚠️ **This page is a stub.** Help us write it! See the [Documentation Plan](../contributors/documentation_plan.md) and [Style Guide](../contributors/documentation_style.md).
@@ -0,0 +1,20 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
3
+ SPDX-License-Identifier: CC-BY-SA-4.0
4
+ -->
5
+
6
+ # Why Rooibos?
7
+
8
+
9
+ By the end of this guide, you will:
10
+
11
+ - Explain what a TUI (terminal user interface) is and why you would build one
12
+ - Describe The Elm Architecture in one sentence
13
+ - Compare Rooibos to alternatives (callbacks, threads, BubbleTea, Textual)
14
+ - Articulate why functional state management prevents common bugs
15
+
16
+ > ⚠️ **This page is a stub.** Help us write it! See the [Documentation Plan](../contributors/documentation_plan.md) and [Style Guide](../contributors/documentation_style.md).
17
+
18
+ ---
19
+
20
+ [**Previous:** Getting Started](./index.md) | [**Next:** Installation](./install.md)
data/doc/index.md CHANGED
@@ -2,24 +2,92 @@
2
2
  SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
3
3
  SPDX-License-Identifier: CC-BY-SA-4.0
4
4
  -->
5
- # Start Here
6
5
 
6
+ # Rooibos Documentation
7
7
 
8
- ## Documentation for Users
8
+ Build terminal user interfaces with Ruby using The Elm Architecture.
9
9
 
10
- - [README](../README.md): Project overview and installation
10
+ ---
11
11
 
12
- ### Getting Started
12
+ ## Getting Started
13
13
 
14
- - [Why RatatuiRuby?](https://man.sr.ht/~kerrick/ratatui_ruby/why.md): Philosophy, comparisons, and what makes us different
15
- - [Quickstart](./getting_started/quickstart.md): Build your first TUI app
14
+ New to Rooibos? Start here.
16
15
 
17
- ### Concepts
16
+ - [**Why Rooibos?**](./getting_started/why_rooibos.md) — What is a TUI? Why functional state management?
17
+ - [**Installation**](./getting_started/install.md) — Set up Ruby and add Rooibos to your project
18
+ - [**Quickstart**](./getting_started/quickstart.md) — Build your first app in 5 minutes
18
19
 
19
- - [Application Architecture](./concepts/application_architecture.md): Lifecycle patterns and API choices
20
- - [Testing Your Application](./concepts/application_testing.md): Snapshot testing and style assertions
20
+ ### Coming from another ecosystem?
21
21
 
22
+ - [For React Developers](./getting_started/for_react_developers.md) — Redux → Rooibos mental model
23
+ - [For Go Developers](./getting_started/for_go_developers.md) — BubbleTea → Rooibos translation
24
+ - [For Python Developers](./getting_started/for_python_developers.md) — Textual → Rooibos translation
25
+ - [Ruby Primer](./getting_started/ruby_primer.md) — Ruby basics for polyglots
22
26
 
23
- ## Documentation for Contributors
27
+ ---
24
28
 
25
- - [Contributing Guidelines](https://man.sr.ht/~kerrick/ratatui_ruby/contributing.md): How to contribute patches and features
29
+ ## Tutorial
30
+
31
+ Learn by building a complete **File Browser** application.
32
+
33
+ → [**Start the Tutorial**](./tutorial/index.md)
34
+
35
+ ---
36
+
37
+ ## Essentials
38
+
39
+ Deep-dive into core concepts.
40
+
41
+ - [The Elm Architecture](./essentials/the_elm_architecture.md) — Model-View-Update explained
42
+ - [Models](./essentials/models.md) — Designing state with `Data.define`
43
+ - [Messages](./essentials/messages.md) — Events and pattern matching
44
+ - [Update Functions](./essentials/update_functions.md) — Pure state transitions
45
+ - [Views](./essentials/views.md) — Rendering with RatatuiRuby
46
+ - [Commands](./essentials/commands.md) — Async operations and side effects
47
+ - [The Runtime](./essentials/the_runtime.md) — How Rooibos runs your app
48
+ - [Shortcuts](./essentials/shortcuts.md) — `Cmd` and `Msg` aliases
49
+
50
+ ---
51
+
52
+ ## Scaling Up
53
+
54
+ Advanced patterns for larger applications.
55
+
56
+ - [Custom Commands](./scaling_up/custom_commands.md) — Write your own async commands
57
+ - [Command Composition](./scaling_up/command_composition.md) — Chain and parallelize work
58
+ - [Fractal Architecture](./scaling_up/fractal_architecture.md) — Nested fragments with `Cmd.map`
59
+ - [Message Routing](./scaling_up/message_routing.md) — The Router DSL
60
+ - [Ractor Safety](./scaling_up/ractor_safety.md) — Future-proof your app
61
+ - [Async Patterns](./scaling_up/async_patterns.md) — Streaming, polling, websockets
62
+ - [Testing](./scaling_up/testing.md) — Comprehensive testing strategies
63
+
64
+ ---
65
+
66
+ ## Best Practices
67
+
68
+ Common UI patterns and recipes.
69
+
70
+ - [Modal Dialogs](./best_practices/modal_dialogs.md)
71
+ - [Forms and Validation](./best_practices/forms_and_validation.md)
72
+ - [Lists and Tables](./best_practices/lists_and_tables.md)
73
+ - [HTTP Workflows](./best_practices/http_workflows.md)
74
+ - [Streaming Data](./best_practices/streaming_data.md)
75
+ - [Orchestration](./best_practices/orchestration.md)
76
+
77
+ ---
78
+
79
+ ## Troubleshooting
80
+
81
+ When things go wrong.
82
+
83
+ - [Common Errors](./troubleshooting/common_errors.md) — Error messages and fixes
84
+ - [Debugging](./troubleshooting/debugging.md) — Tracing and inspection
85
+ - [Performance](./troubleshooting/performance.md) — Optimization tips
86
+
87
+ ---
88
+
89
+ ## For Contributors
90
+
91
+ - [Documentation Plan](./contributors/documentation_plan.md) — The roadmap for these docs
92
+ - [Documentation Style Guide](./contributors/documentation_style.md) — How to write docs
93
+ - [Design Documents](./contributors/design/) — Architecture decisions
@@ -0,0 +1,20 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
3
+ SPDX-License-Identifier: CC-BY-SA-4.0
4
+ -->
5
+
6
+ # Async Patterns
7
+
8
+
9
+ By the end of this guide, you will:
10
+
11
+ - Handle streaming data from SSE or websockets
12
+ - Implement polling with `Command.wait` and timers
13
+ - Coordinate multiple async sources without race conditions
14
+ - Clean up connections when your app exits
15
+
16
+ > ⚠️ **This page is a stub.** Help us write it! See the [Documentation Plan](../contributors/documentation_plan.md) and [Style Guide](../contributors/documentation_style.md).
17
+
18
+ ---
19
+
20
+ [**Previous:** Ractor Safety](./ractor_safety.md) | [**Next:** Testing](./testing.md)
@@ -0,0 +1,20 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
3
+ SPDX-License-Identifier: CC-BY-SA-4.0
4
+ -->
5
+
6
+ # Command Composition
7
+
8
+
9
+ By the end of this guide, you will:
10
+
11
+ - Chain dependent operations with `out.source`
12
+ - Run parallel work with `out.standing`
13
+ - Block until async commands complete with `out.wait`
14
+ - Design multi-step async workflows
15
+
16
+ > ⚠️ **This page is a stub.** Help us write it! See the [Documentation Plan](../contributors/documentation_plan.md) and [Style Guide](../contributors/documentation_style.md).
17
+
18
+ ---
19
+
20
+ [**Previous:** Custom Commands](./custom_commands.md) | [**Next:** Fractal Architecture](./fractal_architecture.md)
@@ -0,0 +1,21 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
3
+ SPDX-License-Identifier: CC-BY-SA-4.0
4
+ -->
5
+
6
+ # Custom Commands
7
+
8
+
9
+ By the end of this guide, you will:
10
+
11
+ - Write a custom command using the `out` parameter
12
+ - Implement cooperative cancellation with `token`
13
+ - Define the correct call signature for your command
14
+ - Override `rooibos_cancellation_grace_period` for cleanup time
15
+ - Decide when to write a custom command vs. using built-ins
16
+
17
+ > ⚠️ **This page is a stub.** Help us write it! See the [Documentation Plan](../contributors/documentation_plan.md) and [Style Guide](../contributors/documentation_style.md).
18
+
19
+ ---
20
+
21
+ [**Next:** Command Composition](./command_composition.md)
@@ -0,0 +1,20 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
3
+ SPDX-License-Identifier: CC-BY-SA-4.0
4
+ -->
5
+
6
+ # Fractal Architecture
7
+
8
+
9
+ By the end of this guide, you will:
10
+
11
+ - Compose child fragments using `Command.map`
12
+ - Route parent messages to the correct child
13
+ - Use the Router DSL to simplify complex routing
14
+ - Decide when fractal architecture is worth the complexity
15
+
16
+ > ⚠️ **This page is a stub.** Help us write it! See the [Documentation Plan](../contributors/documentation_plan.md) and [Style Guide](../contributors/documentation_style.md).
17
+
18
+ ---
19
+
20
+ [**Previous:** Command Composition](./command_composition.md) | [**Next:** Message Routing](./message_routing.md)
@@ -0,0 +1,30 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
3
+ SPDX-License-Identifier: CC-BY-SA-4.0
4
+ -->
5
+
6
+ # Scaling Up
7
+
8
+ Advanced patterns for building larger Rooibos applications.
9
+
10
+ ---
11
+
12
+ ## Custom Async Work
13
+
14
+ - [**Custom Commands**](./custom_commands.md) — Write your own async commands with `out` and `token`
15
+ - [**Command Composition**](./command_composition.md) — Chain and parallelize with `out.source`, `out.standing`
16
+
17
+ ## Application Architecture
18
+
19
+ - [**Fractal Architecture**](./fractal_architecture.md) — Nested fragments with `Cmd.map`
20
+ - [**Message Routing**](./message_routing.md) — The Router DSL for complex apps
21
+
22
+ ## Production Concerns
23
+
24
+ - [**Ractor Safety**](./ractor_safety.md) — Future-proof your app for Ruby 4
25
+ - [**Async Patterns**](./async_patterns.md) — Streaming, polling, websockets
26
+ - [**Testing**](./testing.md) — Comprehensive testing strategies
27
+
28
+ ---
29
+
30
+ **Looking for recipes?** Check out [Best Practices](../best_practices/modal_dialogs.md).
@@ -0,0 +1,20 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
3
+ SPDX-License-Identifier: CC-BY-SA-4.0
4
+ -->
5
+
6
+ # Message Routing
7
+
8
+
9
+ By the end of this guide, you will:
10
+
11
+ - Use the Router DSL (`include Rooibos::Router` then `route :prefix, to: Module`)
12
+ - Delegate messages to child fragments cleanly
13
+ - Handle cross-cutting concerns (logging, analytics) centrally
14
+ - Debug message routing with logging
15
+
16
+ > ⚠️ **This page is a stub.** Help us write it! See the [Documentation Plan](../contributors/documentation_plan.md) and [Style Guide](../contributors/documentation_style.md).
17
+
18
+ ---
19
+
20
+ [**Previous:** Fractal Architecture](./fractal_architecture.md) | [**Next:** Ractor Safety](./ractor_safety.md)
@@ -0,0 +1,20 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
3
+ SPDX-License-Identifier: CC-BY-SA-4.0
4
+ -->
5
+
6
+ # Ractor Safety
7
+
8
+
9
+ By the end of this guide, you will:
10
+
11
+ - Explain why Rooibos requires shareable state (future-proofing for Ruby 4)
12
+ - Identify what makes an object shareable
13
+ - Use the Callable pattern to capture data safely
14
+ - Debug "not shareable" errors in tests and debug mode
15
+
16
+ > ⚠️ **This page is a stub.** Help us write it! See the [Documentation Plan](../contributors/documentation_plan.md) and [Style Guide](../contributors/documentation_style.md).
17
+
18
+ ---
19
+
20
+ [**Previous:** Message Routing](./message_routing.md) | [**Next:** Async Patterns](./async_patterns.md)
@@ -0,0 +1,21 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
3
+ SPDX-License-Identifier: CC-BY-SA-4.0
4
+ -->
5
+
6
+ # Testing
7
+
8
+
9
+ By the end of this guide, you will:
10
+
11
+ - Test UPDATE functions as pure functions (input → output)
12
+ - Mock or stub commands to avoid touching network/filesystem
13
+ - Use `inject_key`/`inject_sync` helpers to test with real commands
14
+ - Assert VIEW output using TestHelper
15
+ - Structure test files for maintainability
16
+
17
+ > ⚠️ **This page is a stub.** Help us write it! See the [Documentation Plan](../contributors/documentation_plan.md) and [Style Guide](../contributors/documentation_style.md).
18
+
19
+ ---
20
+
21
+ [**Previous:** Async Patterns](./async_patterns.md)
@@ -0,0 +1,20 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
3
+ SPDX-License-Identifier: CC-BY-SA-4.0
4
+ -->
5
+
6
+ # Common Errors
7
+
8
+
9
+ By the end of this guide, you will:
10
+
11
+ - Recognize all Rooibos & RatatuiRuby error messages
12
+ - Identify the root cause for each error
13
+ - Apply the fix and verify it works
14
+ - Know where to ask for help if you are stuck
15
+
16
+ > ⚠️ **This page is a stub.** Help us write it! See the [Documentation Plan](../contributors/documentation_plan.md) and [Style Guide](../contributors/documentation_style.md).
17
+
18
+ ---
19
+
20
+ **Troubleshooting:** [Debugging](./debugging.md) | [Performance](./performance.md)
@@ -0,0 +1,21 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
3
+ SPDX-License-Identifier: CC-BY-SA-4.0
4
+ -->
5
+
6
+ # Debugging
7
+
8
+
9
+ By the end of this guide, you will:
10
+
11
+ - Enable `debug: true` to validate Ractor shareability and warn about callables missing Command::Custom
12
+ - Use RatatuiRuby's breakpoint debugging features in an MVU context
13
+ - Inspect Model state at any point in execution
14
+ - Use Ruby's Logger gem for file logging when stdout is unavailable
15
+ - Log messages in your Update function to trace application flow
16
+
17
+ > ⚠️ **This page is a stub.** Help us write it! See the [Documentation Plan](../contributors/documentation_plan.md) and [Style Guide](../contributors/documentation_style.md).
18
+
19
+ ---
20
+
21
+ **Troubleshooting:** [Common Errors](./common_errors.md) | [Performance](./performance.md)
@@ -0,0 +1,23 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
3
+ SPDX-License-Identifier: CC-BY-SA-4.0
4
+ -->
5
+
6
+ # Troubleshooting
7
+
8
+ When things go wrong.
9
+
10
+ ---
11
+
12
+ ## Guides
13
+
14
+ - [**Common Errors**](./common_errors.md) — Error messages, causes, and fixes
15
+ - [**Debugging**](./debugging.md) — Tracing, logging, and inspection
16
+ - [**Performance**](./performance.md) — Identifying and fixing bottlenecks
17
+
18
+ ---
19
+
20
+ ## Still Stuck?
21
+
22
+ - Check the [RatatuiRuby Troubleshooting](https://ratatui-ruby.dev/docs) for widget-related issues
23
+ - Open an issue on [GitHub](https://github.com/your-org/rooibos/issues)