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,20 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
3
+ SPDX-License-Identifier: CC-BY-SA-4.0
4
+ -->
5
+
6
+ # Performance
7
+
8
+
9
+ By the end of this guide, you will:
10
+
11
+ - Use `Benchmark` or `TracePoint` to identify slow VIEW, UPDATE, and Command callables
12
+ - Adjust `fps:` parameter to balance responsiveness and CPU usage
13
+ - Store expensive calculations in your Model so VIEW doesn't recalculate them every frame
14
+ - Use `Benchmark` to profile bottlenecks in your application
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:** [Common Errors](./common_errors.md) | [Debugging](./debugging.md)
@@ -0,0 +1,44 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
3
+ SPDX-License-Identifier: CC-BY-SA-4.0
4
+ -->
5
+
6
+ # Project Setup
7
+
8
+
9
+ By the end of this guide, you will:
10
+
11
+ - Install Ruby (if you don't have it already)
12
+ - Verify your Ruby installation works
13
+ - Install the `rooibos` gem
14
+ - Use `rooibos new` to create a new project with proper structure
15
+ - Understand the files that `rooibos new` creates for you
16
+ - Run your first Rooibos application to verify everything works
17
+ - Understand the difference between application code and test code directories
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).
20
+
21
+ ## User Stories
22
+
23
+ ## Story -4: Project Setup
24
+
25
+ **As a** developer
26
+ **I want to** set up a new Ruby project with proper dependencies
27
+ **So that** I have a foundation to build the file browser
28
+
29
+ ### Acceptance Criteria
30
+ - Project directory exists with proper structure
31
+ - Dependencies are installed
32
+ - Application can be started without errors
33
+
34
+ ### Notes
35
+ - Absolute starting point for the tutorial
36
+ - Establishes project foundation
37
+
38
+ ---
39
+
40
+
41
+
42
+ ---
43
+
44
+ [**Previous:** Tutorial: Build a File Browser](./index.md) | [**Next:** Hello World](./02_hello_world.md)
@@ -0,0 +1,45 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
3
+ SPDX-License-Identifier: CC-BY-SA-4.0
4
+ -->
5
+
6
+ # Hello World
7
+
8
+
9
+ By the end of this guide, you will:
10
+
11
+ - Write your first VIEW callable that renders text to the terminal
12
+ - Write your first UPDATE callable that handles keyboard events
13
+ - Use predicate helpers (`.q?`, `.ctrl_c?`) to check which key was pressed
14
+ - Return `Command.exit` from UPDATE to quit the application
15
+ - Understand what `Rooibos.run` does to start your app
16
+ - Understand what a VIEW returns (RatatuiRuby widgets like `paragraph`)
17
+ - Understand what an UPDATE returns (model or command)
18
+ - Run your app and see it respond to keyboard input
19
+
20
+ > ⚠️ **This page is a stub.** Help us write it! See the [Documentation Plan](../contributors/documentation_plan.md) and [Style Guide](../contributors/documentation_style.md).
21
+
22
+ ## User Stories
23
+
24
+ ## Story -3: Hello World + Quit
25
+
26
+ **As a** terminal user
27
+ **I want to** launch a minimal TUI application that I can quit
28
+ **So that** I can verify the application runs
29
+
30
+ ### Acceptance Criteria
31
+ - Application displays "Hello, File Browser!" text
32
+ - Application displays "Press 'q' to quit" instruction
33
+ - Pressing 'q' or Ctrl+C exits the application cleanly
34
+
35
+ ### Notes
36
+ - First runnable TUI application
37
+ - Demonstrates basic rendering and quit functionality
38
+
39
+ ---
40
+
41
+
42
+
43
+ ---
44
+
45
+ [**Previous:** Project Setup](./01_project_setup.md) | [**Next:** Static File List](./03_static_file_list.md)
@@ -0,0 +1,44 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
3
+ SPDX-License-Identifier: CC-BY-SA-4.0
4
+ -->
5
+
6
+ # Static File List
7
+
8
+
9
+ By the end of this guide, you will:
10
+
11
+ - Define a Model using `Data.define` to hold your application state
12
+ - Understand why state is immutable (Data objects, not instance variables)
13
+ - Write an INIT callable that returns your initial model
14
+ - Display a static list of example files in your VIEW
15
+ - Write your first test using `Rooibos::TestHelper`
16
+ - Use `assert_snapshots` to verify your VIEW renders correctly
17
+ - Understand why tests with static data are fast and reliable
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).
20
+
21
+ ## User Stories
22
+
23
+ ## Story -2: Static File List
24
+
25
+ **As a** terminal user
26
+ **I want to** see a list of example files displayed
27
+ **So that** I can understand the basic file browser interface
28
+
29
+ ### Acceptance Criteria
30
+ - Application displays a list of example filenames
31
+ - One file is visually highlighted
32
+ - Application can be quit with 'q'
33
+
34
+ ### Notes
35
+ - Uses hardcoded example data ("README.md", "Gemfile", "lib/", "test/")
36
+ - No navigation yet - always highlights first item
37
+
38
+ ---
39
+
40
+
41
+
42
+ ---
43
+
44
+ [**Previous:** Hello World](./02_hello_world.md) | [**Next:** Arrow Navigation](./04_arrow_navigation.md)
@@ -0,0 +1,47 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
3
+ SPDX-License-Identifier: CC-BY-SA-4.0
4
+ -->
5
+
6
+ # Arrow Navigation
7
+
8
+
9
+ By the end of this guide, you will:
10
+
11
+ - Add a `selected` field to your Model to track which file is highlighted
12
+ - Use `model.with(...)` to create updated state immutably
13
+ - Use pattern matching (`case message`) to handle multiple keys
14
+ - Combine pattern matching with predicate guards (`in _ if message.up?`)
15
+ - Handle arrow keys (up/down) and vim keys (j/k) in one UPDATE
16
+ - Scroll through the file list when it's longer than the screen
17
+ - Return an updated model from UPDATE to change state
18
+ - Write tests that verify state transitions (selected: 0 → selected: 1)
19
+ - Understand when to use pattern matching vs simple if/else
20
+
21
+ > ⚠️ **This page is a stub.** Help us write it! See the [Documentation Plan](../contributors/documentation_plan.md) and [Style Guide](../contributors/documentation_style.md).
22
+
23
+ ## User Stories
24
+
25
+ ## Story -1: Arrow Key Navigation
26
+
27
+ **As a** terminal user
28
+ **I want to** navigate through the file list with arrow keys
29
+ **So that** I can select different files
30
+
31
+ ### Acceptance Criteria
32
+ - Up/Down arrow keys change which file is highlighted
33
+ - 'j'/'k' vim keys also work for navigation
34
+ - Selection wraps at top/bottom of list
35
+ - Visual highlight follows selection
36
+
37
+ ### Notes
38
+ - Still using hardcoded file list
39
+ - Adds interactive navigation
40
+
41
+ ---
42
+
43
+
44
+
45
+ ---
46
+
47
+ [**Previous:** Static File List](./03_static_file_list.md) | [**Next:** Real Files](./05_real_files.md)
@@ -0,0 +1,45 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
3
+ SPDX-License-Identifier: CC-BY-SA-4.0
4
+ -->
5
+
6
+ # Real Files
7
+
8
+
9
+ By the end of this guide, you will:
10
+
11
+ - Load real files from your current directory instead of static examples
12
+ - See your tests fail and understand why
13
+ - Fix your tests by telling them what files to expect
14
+ - Understand why good tests don't depend on the filesystem
15
+ - Know when to use fake data in tests
16
+ - Have a file browser that works with your files
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
+ ## User Stories
21
+
22
+ ## Story 0: Real Files
23
+
24
+ **As a** terminal user
25
+ **I want to** see my actual files instead of example data
26
+ **So that** the file browser is useful for real work
27
+
28
+ ### Acceptance Criteria
29
+ - Application shows actual files from the current directory
30
+ - File list reflects real filesystem contents
31
+ - Can navigate through real files with arrow keys
32
+ - All previous keyboard shortcuts still work
33
+
34
+ ### Notes
35
+ - **Critical transition** - from example data to real filesystem
36
+ - Transforms toy example into functional tool
37
+ - After this story, Story 1 is COMPLETE
38
+
39
+ ---
40
+
41
+
42
+
43
+ ---
44
+
45
+ [**Previous:** Arrow Navigation](./04_arrow_navigation.md) | [**Next:** Safe Refactoring](./06_safe_refactoring.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
+ # Safe Refactoring
7
+
8
+
9
+ By the end of this guide, you will:
10
+
11
+ - Extract your file list code into a separate module (a Fragment)
12
+ - Understand what a Fragment is (a module with Model, Init, Update, View)
13
+ - Use the Router DSL to route messages and events to your Fragment
14
+ - Run your tests and see them still pass (refactor fearlessly)
15
+ - Know when to extract code vs keep it inline
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:** Real Files](./05_real_files.md) | [**Next:** Red-First TDD](./07_red_first_tdd.md)
@@ -0,0 +1,26 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
3
+ SPDX-License-Identifier: CC-BY-SA-4.0
4
+ -->
5
+
6
+ # Red-First TDD
7
+
8
+
9
+ By the end of this guide, you will:
10
+
11
+ - Understand the red-green-refactor cycle
12
+ - Know why writing tests first leads to better design
13
+ - Write a failing test for your second Fragment's View (red)
14
+ - Implement the View to make the test pass (green)
15
+ - Write a failing test for your Fragment's Update (red)
16
+ - Implement the Update to make the test pass (green)
17
+ - Use RatatuiRuby layouts to arrange Fragments side-by-side
18
+ - Coordinate state between two Fragments
19
+ - Understand when to split UI into separate Fragments
20
+ - Refactor your code while tests keep you safe
21
+
22
+ > ⚠️ **This page is a stub.** Help us write it! See the [Documentation Plan](../contributors/documentation_plan.md) and [Style Guide](../contributors/documentation_style.md).
23
+
24
+ ---
25
+
26
+ [**Previous:** Safe Refactoring](./06_safe_refactoring.md) | [**Next:** File Metadata](./08_file_metadata.md)
@@ -0,0 +1,42 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
3
+ SPDX-License-Identifier: CC-BY-SA-4.0
4
+ -->
5
+
6
+ # File Metadata
7
+
8
+
9
+ By the end of this guide, you will:
10
+
11
+ - Display file sizes and permissions in your file list
12
+ - Understand the pre-calculation pattern
13
+
14
+ > ⚠️ **This page is a stub.** Help us write it! See the [Documentation Plan](../contributors/documentation_plan.md) and [Style Guide](../contributors/documentation_style.md).
15
+
16
+ ## User Stories
17
+
18
+ ## Story 5: File Metadata Display
19
+
20
+ **As a** terminal user
21
+ **I want to** see file sizes and modification dates
22
+ **So that** I can make informed decisions about files
23
+
24
+ ### Acceptance Criteria
25
+ - File list shows: name, size, modification date
26
+ - Sizes displayed in human-readable format (KB, MB, GB)
27
+ - Dates displayed in consistent format
28
+ - Columns aligned properly
29
+ - Directories show "-" for size
30
+
31
+ ### Notes
32
+ - Introduces file metadata reading
33
+ - Introduces formatting utilities
34
+ - Introduces column layout
35
+
36
+ ---
37
+
38
+
39
+
40
+ ---
41
+
42
+ [**Previous:** Red-First TDD](./07_red_first_tdd.md) | [**Next:** Text Preview](./09_text_preview.md)
@@ -0,0 +1,44 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
3
+ SPDX-License-Identifier: CC-BY-SA-4.0
4
+ -->
5
+
6
+ # Text Preview
7
+
8
+
9
+ By the end of this guide, you will:
10
+
11
+ - Build a third Fragment for the preview pane
12
+ - Read file contents using Ruby's File API
13
+ - Detect whether a file is text or binary
14
+
15
+ > ⚠️ **This page is a stub.** Help us write it! See the [Documentation Plan](../contributors/documentation_plan.md) and [Style Guide](../contributors/documentation_style.md).
16
+
17
+ ## User Stories
18
+
19
+ ## Story 6: Text File Preview
20
+
21
+ **As a** terminal user
22
+ **I want to** see a preview of text files in the preview pane
23
+ **So that** I can verify file contents before opening
24
+
25
+ ### Acceptance Criteria
26
+ - When text file is selected, preview pane shows first ~20 lines
27
+ - Preview updates as selection changes
28
+ - Binary files show "Binary file" message
29
+ - Preview pane scrolls if content is long
30
+ - File type is detected (text vs binary)
31
+
32
+ ### Notes
33
+ - Introduces file reading
34
+ - Introduces text detection
35
+ - Introduces preview scrolling
36
+ - Limit to first 1000 lines for performance
37
+
38
+ ---
39
+
40
+
41
+
42
+ ---
43
+
44
+ [**Previous:** File Metadata](./08_file_metadata.md) | [**Next:** Directory Tree](./10_directory_tree.md)
@@ -0,0 +1,42 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
3
+ SPDX-License-Identifier: CC-BY-SA-4.0
4
+ -->
5
+
6
+ # Directory Tree
7
+
8
+
9
+ By the end of this guide, you will:
10
+
11
+ - TODO: Write learning objectives
12
+
13
+ > ⚠️ **This page is a stub.** Help us write it! See the [Documentation Plan](../contributors/documentation_plan.md) and [Style Guide](../contributors/documentation_style.md).
14
+
15
+ ## User Stories
16
+
17
+ ## Story 7: Directory Tree Expansion
18
+
19
+ **As a** terminal user
20
+ **I want to** expand and collapse directories in the tree pane
21
+ **So that** I can see the directory structure at a glance
22
+
23
+ ### Acceptance Criteria
24
+ - Directories show expand/collapse indicator (▶/▼)
25
+ - Arrow right/left or `l`/`h` expands/collapses
26
+ - Tree shows nested structure with indentation
27
+ - Expanded state persists during session
28
+ - Tree scrolls if structure is large
29
+
30
+ ### Notes
31
+ - Introduces tree data structure
32
+ - Introduces recursive directory reading
33
+ - Introduces tree rendering logic
34
+ - Major complexity increase
35
+
36
+ ---
37
+
38
+
39
+
40
+ ---
41
+
42
+ [**Previous:** Text Preview](./09_text_preview.md) | [**Next:** Pane Focus](./11_pane_focus.md)
@@ -0,0 +1,40 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
3
+ SPDX-License-Identifier: CC-BY-SA-4.0
4
+ -->
5
+
6
+ # Pane Focus
7
+
8
+
9
+ By the end of this guide, you will:
10
+
11
+ - TODO: Write learning objectives
12
+
13
+ > ⚠️ **This page is a stub.** Help us write it! See the [Documentation Plan](../contributors/documentation_plan.md) and [Style Guide](../contributors/documentation_style.md).
14
+
15
+ ## User Stories
16
+
17
+ ## Story 8: Pane Focus Switching
18
+
19
+ **As a** terminal user
20
+ **I want to** switch focus between panes with Tab
21
+ **So that** I can navigate the tree or scroll the preview
22
+
23
+ ### Acceptance Criteria
24
+ - Tab key cycles focus: tree → list → preview → tree
25
+ - Active pane has visual indicator (highlighted border)
26
+ - Keyboard shortcuts work in context of focused pane
27
+ - Arrow keys navigate within focused pane
28
+
29
+ ### Notes
30
+ - Introduces focus management
31
+ - Introduces context-sensitive key handling
32
+ - Preview pane becomes interactive (scrollable)
33
+
34
+ ---
35
+
36
+
37
+
38
+ ---
39
+
40
+ [**Previous:** Directory Tree](./10_directory_tree.md) | [**Next:** Sorting](./12_sorting.md)
@@ -0,0 +1,41 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
3
+ SPDX-License-Identifier: CC-BY-SA-4.0
4
+ -->
5
+
6
+ # Sorting
7
+
8
+
9
+ By the end of this guide, you will:
10
+
11
+ - TODO: Write learning objectives
12
+
13
+ > ⚠️ **This page is a stub.** Help us write it! See the [Documentation Plan](../contributors/documentation_plan.md) and [Style Guide](../contributors/documentation_style.md).
14
+
15
+ ## User Stories
16
+
17
+ ## Story 9: Sort Files
18
+
19
+ **As a** terminal user
20
+ **I want to** sort files by name, size, or date
21
+ **So that** I can find files more easily
22
+
23
+ ### Acceptance Criteria
24
+ - `s` key cycles through sort options
25
+ - Sort options: name (asc/desc), size (asc/desc), date (asc/desc), type
26
+ - Status bar shows current sort order
27
+ - Directories can be sorted first or mixed with files
28
+ - Sort persists during session
29
+
30
+ ### Notes
31
+ - Introduces sorting logic
32
+ - Introduces sort state management
33
+ - Introduces status bar messaging
34
+
35
+ ---
36
+
37
+
38
+
39
+ ---
40
+
41
+ [**Previous:** Pane Focus](./11_pane_focus.md) | [**Next:** Filtering](./13_filtering.md)
@@ -0,0 +1,43 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
3
+ SPDX-License-Identifier: CC-BY-SA-4.0
4
+ -->
5
+
6
+ # Filtering
7
+
8
+
9
+ By the end of this guide, you will:
10
+
11
+ - TODO: Write learning objectives
12
+
13
+ > ⚠️ **This page is a stub.** Help us write it! See the [Documentation Plan](../contributors/documentation_plan.md) and [Style Guide](../contributors/documentation_style.md).
14
+
15
+ ## User Stories
16
+
17
+ ## Story 10: Filter Files by Name
18
+
19
+ **As a** terminal user
20
+ **I want to** filter the file list by typing a pattern
21
+ **So that** I can quickly find specific files
22
+
23
+ ### Acceptance Criteria
24
+ - `f` key opens filter input
25
+ - User types pattern (supports * and ? wildcards)
26
+ - File list updates to show only matching items
27
+ - Status bar shows filter pattern and match count
28
+ - Esc clears filter
29
+ - Filter is case-insensitive
30
+
31
+ ### Notes
32
+ - Introduces text input mode
33
+ - Introduces filtering logic
34
+ - Introduces wildcard matching
35
+ - Introduces mode switching (normal vs input)
36
+
37
+ ---
38
+
39
+
40
+
41
+ ---
42
+
43
+ [**Previous:** Sorting](./12_sorting.md) | [**Next:** Toggle Hidden Files](./14_toggle_hidden.md)
@@ -0,0 +1,41 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
3
+ SPDX-License-Identifier: CC-BY-SA-4.0
4
+ -->
5
+
6
+ # Toggle Hidden Files
7
+
8
+
9
+ By the end of this guide, you will:
10
+
11
+ - TODO: Write learning objectives
12
+
13
+ > ⚠️ **This page is a stub.** Help us write it! See the [Documentation Plan](../contributors/documentation_plan.md) and [Style Guide](../contributors/documentation_style.md).
14
+
15
+ ## User Stories
16
+
17
+ ## Story 11: Toggle Hidden Files
18
+
19
+ **As a** terminal user
20
+ **I want to** show or hide files starting with `.`
21
+ **So that** I can reduce clutter or see configuration files
22
+
23
+ ### Acceptance Criteria
24
+ - `.` key toggles hidden file visibility
25
+ - Hidden files are dimmed/grayed when shown
26
+ - Status bar indicates when hidden files are shown
27
+ - Preference persists during session
28
+ - Default is to hide hidden files
29
+
30
+ ### Notes
31
+ - Introduces filtering by file attribute
32
+ - Introduces visual styling variations
33
+ - Simple toggle state
34
+
35
+ ---
36
+
37
+
38
+
39
+ ---
40
+
41
+ [**Previous:** Filtering](./13_filtering.md) | [**Next:** Text Input Widget](./15_text_input_widget.md)
@@ -0,0 +1,43 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
3
+ SPDX-License-Identifier: CC-BY-SA-4.0
4
+ -->
5
+
6
+ # Text Input Widget
7
+
8
+
9
+ By the end of this guide, you will:
10
+
11
+ - TODO: Write learning objectives
12
+
13
+ > ⚠️ **This page is a stub.** Help us write it! See the [Documentation Plan](../contributors/documentation_plan.md) and [Style Guide](../contributors/documentation_style.md).
14
+
15
+ ## User Stories
16
+
17
+ ## Story 12: Create New Directory
18
+
19
+ **As a** terminal user
20
+ **I want to** create a new directory
21
+ **So that** I can organize files
22
+
23
+ ### Acceptance Criteria
24
+ - `n` key prompts for directory name
25
+ - User types name and presses Enter to create
26
+ - Directory is created in current location
27
+ - File list refreshes to show new directory
28
+ - Error message shown if creation fails
29
+ - Esc cancels operation
30
+
31
+ ### Notes
32
+ - First file operation
33
+ - Introduces filesystem mutation
34
+ - Introduces input validation
35
+ - Introduces error handling
36
+
37
+ ---
38
+
39
+
40
+
41
+ ---
42
+
43
+ [**Previous:** Toggle Hidden Files](./14_toggle_hidden.md) | [**Next:** Rename Files](./16_rename_files.md)
@@ -0,0 +1,42 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
3
+ SPDX-License-Identifier: CC-BY-SA-4.0
4
+ -->
5
+
6
+ # Rename Files
7
+
8
+
9
+ By the end of this guide, you will:
10
+
11
+ - TODO: Write learning objectives
12
+
13
+ > ⚠️ **This page is a stub.** Help us write it! See the [Documentation Plan](../contributors/documentation_plan.md) and [Style Guide](../contributors/documentation_style.md).
14
+
15
+ ## User Stories
16
+
17
+ ## Story 13: Rename Files and Directories
18
+
19
+ **As a** terminal user
20
+ **I want to** rename the selected file or directory
21
+ **So that** I can fix typos or improve organization
22
+
23
+ ### Acceptance Criteria
24
+ - `r` key prompts for new name
25
+ - Input pre-populated with current name
26
+ - Enter confirms rename
27
+ - File list updates to show new name
28
+ - Error shown if name conflicts or is invalid
29
+ - Esc cancels operation
30
+
31
+ ### Notes
32
+ - Introduces pre-populated input
33
+ - Introduces conflict detection
34
+ - Introduces name validation
35
+
36
+ ---
37
+
38
+
39
+
40
+ ---
41
+
42
+ [**Previous:** Text Input Widget](./15_text_input_widget.md) | [**Next:** Confirmation Dialogs](./17_confirmation_dialogs.md)