rooibos 0.6.2 → 0.7.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 (217) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSES/BSD-2-Clause.txt +9 -0
  3. data/REUSE.toml +5 -0
  4. data/exe/.gitkeep +0 -0
  5. data/lib/rooibos/cli/commands/new.rb +24 -0
  6. data/lib/rooibos/command/batch.rb +10 -0
  7. data/lib/rooibos/command/bubble.rb +34 -0
  8. data/lib/rooibos/command/custom.rb +3 -2
  9. data/lib/rooibos/command/deliver.rb +50 -0
  10. data/lib/rooibos/command/http.rb +1 -1
  11. data/lib/rooibos/command/lifecycle.rb +3 -1
  12. data/lib/rooibos/command/outlet.rb +19 -9
  13. data/lib/rooibos/command.rb +107 -3
  14. data/lib/rooibos/configuration.rb +29 -0
  15. data/lib/rooibos/message/bubbled.rb +29 -0
  16. data/lib/rooibos/message.rb +24 -6
  17. data/lib/rooibos/router/action.rb +36 -0
  18. data/lib/rooibos/router/flow/dispatch.rb +39 -0
  19. data/lib/rooibos/router/flow/inward.rb +41 -0
  20. data/lib/rooibos/router/flow/outward.rb +44 -0
  21. data/lib/rooibos/router/guard.rb +56 -0
  22. data/lib/rooibos/router/predicate.rb +65 -0
  23. data/lib/rooibos/router/registry/actions.rb +41 -0
  24. data/lib/rooibos/router/registry/forwards.rb +58 -0
  25. data/lib/rooibos/router/registry/observes.rb +57 -0
  26. data/lib/rooibos/router/registry/otherwises.rb +29 -0
  27. data/lib/rooibos/router/registry/receives.rb +57 -0
  28. data/lib/rooibos/router/registry/routes.rb +59 -0
  29. data/lib/rooibos/router/registry.rb +26 -0
  30. data/lib/rooibos/router/route.rb +42 -0
  31. data/lib/rooibos/router/router_update.rb +53 -0
  32. data/lib/rooibos/router/rule/forward.rb +39 -0
  33. data/lib/rooibos/router/rule/observe.rb +22 -0
  34. data/lib/rooibos/router/rule/otherwise.rb +26 -0
  35. data/lib/rooibos/router/rule/receive.rb +22 -0
  36. data/lib/rooibos/router/rule.rb +40 -0
  37. data/lib/rooibos/router.rb +424 -438
  38. data/lib/rooibos/runtime.rb +37 -52
  39. data/lib/rooibos/test_helper.rb +22 -0
  40. data/lib/rooibos/transition.rb +92 -0
  41. data/lib/rooibos/version.rb +1 -1
  42. data/lib/rooibos.rb +2 -57
  43. data/sig/rooibos/cli.rbs +1 -0
  44. data/sig/rooibos/command.rbs +44 -0
  45. data/sig/rooibos/configuration.rbs +20 -0
  46. data/sig/rooibos/message.rbs +12 -0
  47. data/sig/rooibos/router/action.rbs +33 -0
  48. data/sig/rooibos/router/actions.rbs +27 -0
  49. data/sig/rooibos/router/flow/dispatch.rbs +29 -0
  50. data/sig/rooibos/router/flow/inward.rbs +37 -0
  51. data/sig/rooibos/router/flow/outward.rbs +36 -0
  52. data/sig/rooibos/router/forward.rbs +35 -0
  53. data/sig/rooibos/router/forwards.rbs +34 -0
  54. data/sig/rooibos/router/guard.rbs +21 -0
  55. data/sig/rooibos/router/observe.rbs +20 -0
  56. data/sig/rooibos/router/observes.rbs +38 -0
  57. data/sig/rooibos/router/otherwise.rbs +22 -0
  58. data/sig/rooibos/router/otherwises.rbs +20 -0
  59. data/sig/rooibos/router/predicate.rbs +51 -0
  60. data/sig/rooibos/router/receive.rbs +20 -0
  61. data/sig/rooibos/router/receives.rbs +38 -0
  62. data/sig/rooibos/router/registry.rbs +24 -0
  63. data/sig/rooibos/router/route.rbs +46 -0
  64. data/sig/rooibos/router/router_update.rbs +33 -0
  65. data/sig/rooibos/router/routes.rbs +41 -0
  66. data/sig/rooibos/router/rule.rbs +36 -0
  67. data/sig/rooibos/router.rbs +216 -161
  68. data/sig/rooibos/runtime.rbs +0 -1
  69. data/sig/rooibos/test_helper.rbs +6 -0
  70. data/sig/rooibos/transition.rbs +33 -0
  71. data/sig/rooibos.rbs +0 -10
  72. metadata +144 -198
  73. data/.builds/ruby-3.2.yml +0 -55
  74. data/.builds/ruby-3.3.yml +0 -55
  75. data/.builds/ruby-3.4.yml +0 -55
  76. data/.builds/ruby-4.0.0.yml +0 -55
  77. data/.pre-commit-config.yaml +0 -16
  78. data/.rubocop.yml +0 -8
  79. data/AGENTS.md +0 -108
  80. data/CHANGELOG.md +0 -308
  81. data/README.md +0 -183
  82. data/README.rdoc +0 -374
  83. data/Rakefile +0 -16
  84. data/Steepfile +0 -13
  85. data/doc/best_practices/forms_and_validation.md +0 -20
  86. data/doc/best_practices/http_workflows.md +0 -20
  87. data/doc/best_practices/index.md +0 -26
  88. data/doc/best_practices/lists_and_tables.md +0 -20
  89. data/doc/best_practices/modal_dialogs.md +0 -20
  90. data/doc/best_practices/no_stateful_widgets.md +0 -184
  91. data/doc/best_practices/orchestration.md +0 -20
  92. data/doc/best_practices/streaming_data.md +0 -20
  93. data/doc/contributors/design/commands_and_outlets.md +0 -214
  94. data/doc/contributors/design/mvu_tea_implementations_research.md +0 -373
  95. data/doc/contributors/documentation_plan.md +0 -616
  96. data/doc/contributors/documentation_stub_audit.md +0 -112
  97. data/doc/contributors/documentation_style.md +0 -275
  98. data/doc/contributors/e2e_pty.md +0 -168
  99. data/doc/contributors/maybe_stateful_router.md +0 -56
  100. data/doc/contributors/specs/earliest_tutorial_steps_per_story.md +0 -70
  101. data/doc/contributors/specs/file_browser.md +0 -789
  102. data/doc/contributors/specs/file_browser_stories.md +0 -784
  103. data/doc/contributors/specs/tutorials_to_stories.rb +0 -167
  104. data/doc/contributors/todo/scrollbar.md +0 -118
  105. data/doc/contributors/tutorial_old/01_project_setup.md +0 -20
  106. data/doc/contributors/tutorial_old/02_hello_world.md +0 -24
  107. data/doc/contributors/tutorial_old/03_adding_state.md +0 -26
  108. data/doc/contributors/tutorial_old/06_organizing_your_code.md +0 -20
  109. data/doc/contributors/tutorial_old/07_your_first_command.md +0 -21
  110. data/doc/contributors/tutorial_old/08_the_preview_pane.md +0 -20
  111. data/doc/contributors/tutorial_old/09_loading_states.md +0 -20
  112. data/doc/contributors/tutorial_old/10_testing_your_app.md +0 -20
  113. data/doc/contributors/tutorial_old/11_polish_and_refine.md +0 -20
  114. data/doc/contributors/tutorial_old/12_going_further.md +0 -20
  115. data/doc/contributors/tutorial_old/index.md +0 -20
  116. data/doc/custom.css +0 -22
  117. data/doc/essentials/commands.md +0 -20
  118. data/doc/essentials/index.md +0 -31
  119. data/doc/essentials/messages.md +0 -21
  120. data/doc/essentials/models.md +0 -21
  121. data/doc/essentials/shortcuts.md +0 -19
  122. data/doc/essentials/the_elm_architecture.md +0 -24
  123. data/doc/essentials/the_runtime.md +0 -21
  124. data/doc/essentials/update_functions.md +0 -20
  125. data/doc/essentials/views.md +0 -22
  126. data/doc/getting_started/for_go_developers.md +0 -16
  127. data/doc/getting_started/for_python_developers.md +0 -16
  128. data/doc/getting_started/for_rails_developers.md +0 -17
  129. data/doc/getting_started/for_ratatui_ruby_developers.md +0 -17
  130. data/doc/getting_started/for_react_developers.md +0 -17
  131. data/doc/getting_started/index.md +0 -52
  132. data/doc/getting_started/install.md +0 -20
  133. data/doc/getting_started/quickstart.md +0 -20
  134. data/doc/getting_started/ruby_primer.md +0 -19
  135. data/doc/getting_started/why_rooibos.md +0 -20
  136. data/doc/images/verify_readme_usage.png +0 -0
  137. data/doc/images/widget_cmd_exec.png +0 -0
  138. data/doc/index.md +0 -93
  139. data/doc/scaling_up/async_patterns.md +0 -20
  140. data/doc/scaling_up/command_composition.md +0 -20
  141. data/doc/scaling_up/custom_commands.md +0 -21
  142. data/doc/scaling_up/fractal_architecture.md +0 -20
  143. data/doc/scaling_up/index.md +0 -30
  144. data/doc/scaling_up/message_routing.md +0 -20
  145. data/doc/scaling_up/ractor_safety.md +0 -20
  146. data/doc/scaling_up/testing.md +0 -21
  147. data/doc/troubleshooting/common_errors.md +0 -20
  148. data/doc/troubleshooting/debugging.md +0 -21
  149. data/doc/troubleshooting/index.md +0 -23
  150. data/doc/troubleshooting/performance.md +0 -20
  151. data/doc/tutorial/01_project_setup.md +0 -44
  152. data/doc/tutorial/02_hello_world.md +0 -45
  153. data/doc/tutorial/03_static_file_list.md +0 -44
  154. data/doc/tutorial/04_arrow_navigation.md +0 -47
  155. data/doc/tutorial/05_real_files.md +0 -45
  156. data/doc/tutorial/06_safe_refactoring.md +0 -21
  157. data/doc/tutorial/07_red_first_tdd.md +0 -26
  158. data/doc/tutorial/08_file_metadata.md +0 -42
  159. data/doc/tutorial/09_text_preview.md +0 -44
  160. data/doc/tutorial/10_directory_tree.md +0 -42
  161. data/doc/tutorial/11_pane_focus.md +0 -40
  162. data/doc/tutorial/12_sorting.md +0 -41
  163. data/doc/tutorial/13_filtering.md +0 -43
  164. data/doc/tutorial/14_toggle_hidden.md +0 -41
  165. data/doc/tutorial/15_text_input_widget.md +0 -43
  166. data/doc/tutorial/16_rename_files.md +0 -42
  167. data/doc/tutorial/17_confirmation_dialogs.md +0 -43
  168. data/doc/tutorial/18_progress_indicators.md +0 -43
  169. data/doc/tutorial/19_atomic_operations.md +0 -42
  170. data/doc/tutorial/20_external_editor.md +0 -42
  171. data/doc/tutorial/21_modal_overlays.md +0 -41
  172. data/doc/tutorial/22_error_handling.md +0 -43
  173. data/doc/tutorial/23_terminal_capabilities.md +0 -53
  174. data/doc/tutorial/24_mouse_events.md +0 -43
  175. data/doc/tutorial/25_resize_events.md +0 -43
  176. data/doc/tutorial/26_loading_states.md +0 -42
  177. data/doc/tutorial/27_performance.md +0 -43
  178. data/doc/tutorial/28_color_schemes.md +0 -47
  179. data/doc/tutorial/29_configuration.md +0 -124
  180. data/doc/tutorial/30_going_further.md +0 -17
  181. data/doc/tutorial/index.md +0 -17
  182. data/examples/app_fractal_dashboard/README.md +0 -60
  183. data/examples/app_fractal_dashboard/app.rb +0 -63
  184. data/examples/app_fractal_dashboard/dashboard/base.rb +0 -73
  185. data/examples/app_fractal_dashboard/dashboard/update_helpers.rb +0 -86
  186. data/examples/app_fractal_dashboard/dashboard/update_manual.rb +0 -87
  187. data/examples/app_fractal_dashboard/dashboard/update_router.rb +0 -43
  188. data/examples/app_fractal_dashboard/fragments/custom_shell_input.rb +0 -81
  189. data/examples/app_fractal_dashboard/fragments/custom_shell_modal.rb +0 -82
  190. data/examples/app_fractal_dashboard/fragments/custom_shell_output.rb +0 -90
  191. data/examples/app_fractal_dashboard/fragments/disk_usage.rb +0 -47
  192. data/examples/app_fractal_dashboard/fragments/network_panel.rb +0 -45
  193. data/examples/app_fractal_dashboard/fragments/ping.rb +0 -47
  194. data/examples/app_fractal_dashboard/fragments/stats_panel.rb +0 -45
  195. data/examples/app_fractal_dashboard/fragments/system_info.rb +0 -47
  196. data/examples/app_fractal_dashboard/fragments/uptime.rb +0 -47
  197. data/examples/tutorial/01/app.rb +0 -50
  198. data/examples/tutorial/02/app.rb +0 -64
  199. data/examples/tutorial/03/app.rb +0 -91
  200. data/examples/tutorial/06_safe_refactoring/app.rb +0 -124
  201. data/examples/verify_readme_usage/README.md +0 -54
  202. data/examples/verify_readme_usage/app.rb +0 -47
  203. data/examples/verify_website_first_app/app.rb +0 -85
  204. data/examples/verify_website_hello_mvu/app.rb +0 -31
  205. data/examples/widget_command_system/README.md +0 -70
  206. data/examples/widget_command_system/app.rb +0 -134
  207. data/generate_tutorial_stubs.rb +0 -126
  208. data/mise.toml +0 -8
  209. data/rbs_collection.lock.yaml +0 -108
  210. data/rbs_collection.yaml +0 -15
  211. data/tasks/example_viewer.html.erb +0 -172
  212. data/tasks/install.rake +0 -29
  213. data/tasks/resources/build.yml.erb +0 -55
  214. data/tasks/resources/index.html.erb +0 -44
  215. data/tasks/resources/rubies.yml +0 -7
  216. data/tasks/steep.rake +0 -11
  217. /data/{vendor/goodcop/base.yml → lib/rooibos/rubocop.yml} +0 -0
@@ -1,784 +0,0 @@
1
- <!--
2
- SPDX-FileCopyrightText: 2026 Kerrick Long <me@kerricklong.com>
3
- SPDX-License-Identifier: CC-BY-SA-4.0
4
- -->
5
-
6
- # File Browser User Stories
7
-
8
- **Project:** File Browser TUI Application
9
- **Format:** Mike Cohn's User Stories Applied (2004)
10
- **Approach:** Incremental delivery of value, starting with walking skeleton
11
-
12
- ---
13
-
14
- ## Story -4: Project Setup
15
-
16
- **As a** developer
17
- **I want to** set up a new Ruby project with proper dependencies
18
- **So that** I have a foundation to build the file browser
19
-
20
- ### Acceptance Criteria
21
- - Project directory exists with proper structure
22
- - Dependencies are installed
23
- - Application can be started without errors
24
-
25
- ### Notes
26
- - Absolute starting point for the tutorial
27
- - Establishes project foundation
28
-
29
- ---
30
-
31
- ## Story -3: Hello World + Quit
32
-
33
- **As a** terminal user
34
- **I want to** launch a minimal TUI application that I can quit
35
- **So that** I can verify the application runs
36
-
37
- ### Acceptance Criteria
38
- - Application displays "Hello, File Browser!" text
39
- - Application displays "Press 'q' to quit" instruction
40
- - Pressing 'q' or Ctrl+C exits the application cleanly
41
-
42
- ### Notes
43
- - First runnable TUI application
44
- - Demonstrates basic rendering and quit functionality
45
-
46
- ---
47
-
48
- ## Story -2: Static File List
49
-
50
- **As a** terminal user
51
- **I want to** see a list of example files displayed
52
- **So that** I can understand the basic file browser interface
53
-
54
- ### Acceptance Criteria
55
- - Application displays a list of example filenames
56
- - One file is visually highlighted
57
- - Application can be quit with 'q'
58
-
59
- ### Notes
60
- - Uses hardcoded example data ("README.md", "Gemfile", "lib/", "test/")
61
- - No navigation yet - always highlights first item
62
-
63
- ---
64
-
65
- ## Story -1: Arrow Key Navigation
66
-
67
- **As a** terminal user
68
- **I want to** navigate through the file list with arrow keys
69
- **So that** I can select different files
70
-
71
- ### Acceptance Criteria
72
- - Up/Down arrow keys change which file is highlighted
73
- - 'j'/'k' vim keys also work for navigation
74
- - Selection wraps at top/bottom of list
75
- - Visual highlight follows selection
76
-
77
- ### Notes
78
- - Still using hardcoded file list
79
- - Adds interactive navigation
80
-
81
- ---
82
-
83
- ## Story 0: Real Files
84
-
85
- **As a** terminal user
86
- **I want to** see my actual files instead of example data
87
- **So that** the file browser is useful for real work
88
-
89
- ### Acceptance Criteria
90
- - Application shows actual files from the current directory
91
- - File list reflects real filesystem contents
92
- - Can navigate through real files with arrow keys
93
- - All previous keyboard shortcuts still work
94
-
95
- ### Notes
96
- - **Critical transition** - from example data to real filesystem
97
- - Transforms toy example into functional tool
98
- - After this story, Story 1 is COMPLETE
99
-
100
- ---
101
-
102
- ## Story 1: Walking Skeleton - View Current Directory
103
-
104
- _Note: If you started with negative-numbered stories, this happened in Story 0._
105
-
106
- **As a** terminal user
107
- **I want to** see a list of files in my current directory
108
- **So that** I know what files exist without using `ls`
109
-
110
- ### Acceptance Criteria
111
- - Application launches and displays current directory path
112
- - Files and directories are listed with names
113
- - Application can be quit with `q` or Ctrl+C
114
- - Basic TUI layout renders (single pane, no borders yet)
115
-
116
- ### Notes
117
- - This is our tracer bullet - proves we can render TUI and read filesystem
118
- - No navigation, no preview, just a static list
119
- - Tests the entire stack: TUI rendering, file I/O, event handling
120
-
121
- ---
122
-
123
- ## Story 2: Basic Navigation - Move Through List
124
-
125
- _Note: If you started with negative-numbered stories, this happened in Story 0._
126
-
127
- **As a** terminal user
128
- **I want to** move up and down through the file list with arrow keys
129
- **So that** I can select different files
130
-
131
- ### Acceptance Criteria
132
- - Arrow up/down keys move selection
133
- - Selected item is visually highlighted
134
- - Selection wraps at top/bottom of list
135
- - `j`/`k` vim keys also work
136
- - `Home`/`g` jumps to first item
137
- - `End`/`G` jumps to last item
138
-
139
- ### Notes
140
- - Introduces state management (current selection index)
141
- - Introduces keyboard event handling
142
- - Still single pane, but now interactive
143
-
144
- ---
145
-
146
- ## Story 3: Enter Directories
147
-
148
- **As a** terminal user
149
- **I want to** press Enter on a directory to navigate into it
150
- **So that** I can explore subdirectories
151
-
152
- ### Acceptance Criteria
153
- - Enter key on directory changes current directory
154
- - File list updates to show new directory contents
155
- - Current path display updates
156
- - Enter on regular file does nothing (for now)
157
- - Backspace or `←`/`h` goes to parent directory
158
- - `→`/`l` enters directory (same as Enter)
159
- - `~` jumps to home directory
160
- - `/` jumps to root directory
161
- - `R` refreshes current view
162
-
163
- ### Notes
164
- - Introduces directory traversal
165
- - Introduces path state management
166
- - Introduces distinguishing files from directories
167
-
168
- ---
169
-
170
- ## Story 4: Three-Pane Layout
171
-
172
- **As a** terminal user
173
- **I want to** see a directory tree, file list, and preview pane
174
- **So that** I have better context while browsing
175
-
176
- ### Acceptance Criteria
177
- - Screen divided into three panes with borders
178
- - Left pane shows directory tree (current path only, not expanded yet)
179
- - Center pane shows file list (existing functionality)
180
- - Right pane shows "Preview" placeholder
181
- - Title bar shows application name
182
- - Status bar shows current path and item count
183
-
184
- ### Notes
185
- - Major UI refactoring
186
- - Introduces layout management
187
- - Introduces box-drawing characters
188
- - Preview pane is empty for now
189
-
190
- ---
191
-
192
- ## Story 5: File Metadata Display
193
-
194
- **As a** terminal user
195
- **I want to** see file sizes and modification dates
196
- **So that** I can make informed decisions about files
197
-
198
- ### Acceptance Criteria
199
- - File list shows: name, size, modification date
200
- - Sizes displayed in human-readable format (KB, MB, GB)
201
- - Dates displayed in consistent format
202
- - Columns aligned properly
203
- - Directories show "-" for size
204
-
205
- ### Notes
206
- - Introduces file metadata reading
207
- - Introduces formatting utilities
208
- - Introduces column layout
209
-
210
- ---
211
-
212
- ## Story 6: Text File Preview
213
-
214
- **As a** terminal user
215
- **I want to** see a preview of text files in the preview pane
216
- **So that** I can verify file contents before opening
217
-
218
- ### Acceptance Criteria
219
- - When text file is selected, preview pane shows first ~20 lines
220
- - Preview updates as selection changes
221
- - Binary files show "Binary file" message
222
- - Preview pane scrolls if content is long
223
- - File type is detected (text vs binary)
224
- - `Space` toggles preview pane visibility
225
- - `PgUp`/`PgDn` pages through preview content (when focused)
226
-
227
- ### Notes
228
- - Introduces file reading
229
- - Introduces text detection
230
- - Introduces preview scrolling
231
- - Limit to first 1000 lines for performance
232
-
233
- ---
234
-
235
- ## Story 7: Directory Tree Expansion
236
-
237
- **As a** terminal user
238
- **I want to** expand and collapse directories in the tree pane
239
- **So that** I can see the directory structure at a glance
240
-
241
- ### Acceptance Criteria
242
- - Directories show expand/collapse indicator (▶/▼)
243
- - Arrow right/left or `l`/`h` expands/collapses
244
- - Tree shows nested structure with indentation
245
- - Expanded state persists during session
246
- - Tree scrolls if structure is large
247
-
248
- ### Notes
249
- - Introduces tree data structure
250
- - Introduces recursive directory reading
251
- - Introduces tree rendering logic
252
- - Major complexity increase
253
-
254
- ---
255
-
256
- ## Story 8: Pane Focus Switching
257
-
258
- **As a** terminal user
259
- **I want to** switch focus between panes with Tab
260
- **So that** I can navigate the tree or scroll the preview
261
-
262
- ### Acceptance Criteria
263
- - Tab key cycles focus: tree → list → preview → tree
264
- - Active pane has visual indicator (highlighted border)
265
- - Keyboard shortcuts work in context of focused pane
266
- - Arrow keys navigate within focused pane
267
- - `PgUp`/`PgDn` pages by visible height
268
-
269
- ### Notes
270
- - Introduces focus management
271
- - Introduces context-sensitive key handling
272
- - Introduces cached layout pattern (store pane dimensions for dynamic paging)
273
- - Preview pane becomes interactive (scrollable)
274
-
275
- ---
276
-
277
- ## Story 9: Sort Files
278
-
279
- **As a** terminal user
280
- **I want to** sort files by name, size, or date
281
- **So that** I can find files more easily
282
-
283
- ### Acceptance Criteria
284
- - `s` key cycles through sort options
285
- - Sort options: name (asc/desc), size (asc/desc), date (asc/desc), type
286
- - Status bar shows current sort order
287
- - Directories can be sorted first or mixed with files
288
- - Sort persists during session
289
-
290
- ### Notes
291
- - Introduces sorting logic
292
- - Introduces sort state management
293
- - Introduces status bar messaging
294
-
295
- ---
296
-
297
- ## Story 10: Filter Files by Name
298
-
299
- **As a** terminal user
300
- **I want to** filter the file list by typing a pattern
301
- **So that** I can quickly find specific files
302
-
303
- ### Acceptance Criteria
304
- - `f` key opens filter input
305
- - User types pattern (supports * and ? wildcards)
306
- - File list updates to show only matching items
307
- - Status bar shows filter pattern and match count
308
- - Esc clears filter
309
- - Filter is case-insensitive
310
-
311
- ### Notes
312
- - Introduces text input mode
313
- - Introduces filtering logic
314
- - Introduces wildcard matching
315
- - Introduces mode switching (normal vs input)
316
-
317
- ---
318
-
319
- ## Story 11: Toggle Hidden Files
320
-
321
- **As a** terminal user
322
- **I want to** show or hide files starting with `.`
323
- **So that** I can reduce clutter or see configuration files
324
-
325
- ### Acceptance Criteria
326
- - `.` key toggles hidden file visibility
327
- - Hidden files are dimmed/grayed when shown
328
- - Status bar indicates when hidden files are shown
329
- - Preference persists during session
330
- - Default is to hide hidden files
331
-
332
- ### Notes
333
- - Introduces filtering by file attribute
334
- - Introduces visual styling variations
335
- - Simple toggle state
336
-
337
- ---
338
-
339
- ## Story 12: Create New Directory
340
-
341
- **As a** terminal user
342
- **I want to** create a new directory
343
- **So that** I can organize files
344
-
345
- ### Acceptance Criteria
346
- - `n` key prompts for directory name
347
- - User types name and presses Enter to create
348
- - Directory is created in current location
349
- - File list refreshes to show new directory
350
- - Error message shown if creation fails
351
- - Esc cancels operation
352
-
353
- ### Notes
354
- - First file operation
355
- - Introduces filesystem mutation
356
- - Introduces input validation
357
- - Introduces error handling
358
-
359
- ---
360
-
361
- ## Story 13: Rename Files and Directories
362
-
363
- **As a** terminal user
364
- **I want to** rename the selected file or directory
365
- **So that** I can fix typos or improve organization
366
-
367
- ### Acceptance Criteria
368
- - `r` key prompts for new name
369
- - Input pre-populated with current name
370
- - Enter confirms rename
371
- - File list updates to show new name
372
- - Error shown if name conflicts or is invalid
373
- - Esc cancels operation
374
-
375
- ### Notes
376
- - Introduces pre-populated input
377
- - Introduces conflict detection
378
- - Introduces name validation
379
-
380
- ---
381
-
382
- ## Story 14: Delete Files and Directories
383
-
384
- **As a** terminal user
385
- **I want to** delete the selected file or directory
386
- **So that** I can remove unwanted items
387
-
388
- ### Acceptance Criteria
389
- - `d` key prompts for confirmation
390
- - Confirmation dialog shows item name and size
391
- - `Y` confirms deletion, `N` cancels
392
- - Warning message for directory deletion
393
- - File list refreshes after deletion
394
- - Error shown if deletion fails
395
-
396
- ### Notes
397
- - Introduces confirmation dialogs
398
- - Introduces destructive operations
399
- - Introduces modal UI elements
400
- - Critical to get right - no undo!
401
-
402
- ---
403
-
404
- ## Story 15: Copy Files and Directories
405
-
406
- **As a** terminal user
407
- **I want to** copy files to another location
408
- **So that** I can duplicate content
409
-
410
- ### Acceptance Criteria
411
- - `c` key prompts for destination path
412
- - User types destination and presses Enter
413
- - File/directory copied to destination
414
- - Progress indicator for large operations
415
- - Error shown if copy fails
416
- - File list refreshes if copying to current directory
417
-
418
- ### Notes
419
- - Introduces path input
420
- - Introduces progress indicators
421
- - Introduces recursive directory copying
422
- - Performance considerations for large files
423
-
424
- ---
425
-
426
- ## Story 16: Move Files and Directories
427
-
428
- **As a** terminal user
429
- **I want to** move files to another location
430
- **So that** I can reorganize my filesystem
431
-
432
- ### Acceptance Criteria
433
- - `m` key prompts for destination path
434
- - User types destination and presses Enter
435
- - File/directory moved to destination
436
- - File list refreshes to remove moved item
437
- - Error shown if move fails
438
- - Handles cross-filesystem moves
439
-
440
- ### Notes
441
- - Similar to copy but removes source
442
- - May need to fall back to copy+delete for cross-filesystem
443
- - Introduces atomic operation handling
444
-
445
- ---
446
-
447
- ## Story 17: Open in External Editor
448
-
449
- **As a** terminal user
450
- **I want to** open the selected file in my $EDITOR
451
- **So that** I can edit files
452
-
453
- ### Acceptance Criteria
454
- - `e` key opens file in $EDITOR
455
- - File browser suspends while editor runs
456
- - File browser resumes when editor closes
457
- - File list refreshes to show any changes
458
- - Error shown if $EDITOR not set or fails
459
-
460
- ### Notes
461
- - Introduces external process spawning
462
- - Introduces suspend/resume cycle
463
- - Introduces environment variable reading
464
- - Tests integration with external tools
465
-
466
- ---
467
-
468
- ## Story 18: Help Overlay
469
-
470
- **As a** terminal user
471
- **I want to** see a list of keyboard shortcuts
472
- **So that** I can learn how to use the application
473
-
474
- ### Acceptance Criteria
475
- - `?` key shows help overlay
476
- - Help displays all keyboard shortcuts organized by category
477
- - Help overlay is modal (blocks other input)
478
- - Any key closes help overlay
479
- - Help is scrollable if content is long
480
-
481
- ### Notes
482
- - Introduces modal overlays
483
- - Introduces help content management
484
- - Critical for discoverability
485
-
486
- ---
487
-
488
- ## Story 19: Error Handling and Messages
489
-
490
- **As a** terminal user
491
- **I want to** see clear error messages when operations fail
492
- **So that** I understand what went wrong and how to fix it
493
-
494
- ### Acceptance Criteria
495
- - Permission errors show specific message and suggestion
496
- - File not found errors are handled gracefully
497
- - Invalid input shows validation errors
498
- - Errors displayed in status bar or dialog
499
- - Errors auto-dismiss after 5 seconds or on next action
500
- - Error messages are actionable, not generic
501
-
502
- ### Notes
503
- - Introduces comprehensive error handling
504
- - Introduces error message system
505
- - Introduces auto-dismiss timers
506
- - Polish pass on all error paths
507
-
508
- ---
509
-
510
- ## Story 20: Mouse Support
511
-
512
- **As a** terminal user with mouse-enabled terminal
513
- **I want to** use my mouse to click and scroll
514
- **So that** I have an alternative to keyboard navigation
515
-
516
- ### Acceptance Criteria
517
- - Click on pane to focus it
518
- - Click on item to select it
519
- - Click on expand/collapse indicators
520
- - Mouse wheel scrolls in focused pane
521
- - All functionality remains keyboard-accessible
522
- - Mouse events don't break text selection
523
-
524
- ### Notes
525
- - Optional enhancement
526
- - Introduces mouse event handling
527
- - Must not compromise keyboard experience
528
- - Terminal capability detection
529
-
530
- ---
531
-
532
- ## Story 21: Terminal Resize Handling
533
-
534
- **As a** terminal user
535
- **I want to** resize my terminal window
536
- **So that** the application adapts to the new size
537
-
538
- ### Acceptance Criteria
539
- - Application detects terminal resize events
540
- - Layout adjusts proportionally to new size
541
- - Content reflows to fit new dimensions
542
- - Selection and scroll position preserved
543
- - No flickering during resize
544
- - Graceful degradation at small sizes (hide panes)
545
-
546
- ### Notes
547
- - Introduces resize event handling
548
- - Introduces responsive layout logic
549
- - Introduces graceful degradation
550
- - Performance critical - must be smooth
551
-
552
- ---
553
-
554
- ## Story 22: Loading States for Large Directories
555
-
556
- **As a** terminal user
557
- **I want to** see a loading indicator for large directories
558
- **So that** I know the application is working
559
-
560
- ### Acceptance Criteria
561
- - Loading indicator shown when reading large directories
562
- - Spinner animation with item count
563
- - User can cancel loading with Esc
564
- - Partial results shown as they load
565
- - Performance remains responsive during load
566
-
567
- ### Notes
568
- - Introduces async loading
569
- - Introduces loading indicators
570
- - Introduces cancellation
571
- - Performance optimization for 10,000+ files
572
-
573
- ---
574
-
575
- ## Story 23: Visual Polish and Theming
576
-
577
- **As a** terminal user
578
- **I want to** see a polished, professional interface
579
- **So that** the application is pleasant to use
580
-
581
- ### Acceptance Criteria
582
- - Consistent color scheme throughout:
583
- - Directories: Blue (bold)
584
- - Regular files: Default terminal color
585
- - Executable files: Green
586
- - Hidden files: Dim/gray when shown
587
- - Selected item: Inverted colors or highlighted background
588
- - Error messages: Red
589
- - Success messages: Green
590
- - Information messages: Yellow
591
- - File type icons (📁 📄 🔗) where appropriate
592
- - Smooth animations for state transitions
593
- - Proper spacing and alignment
594
- - Visual hierarchy clear
595
- - Works in both light and dark terminal themes
596
-
597
- ### Notes
598
- - Polish pass on all UI elements
599
- - Introduces color management
600
- - Introduces Unicode symbols
601
- - Introduces animation system
602
- - Final aesthetic improvements
603
- - Implements all color requirements from specification section 2.2
604
-
605
- ---
606
-
607
- ## Story 24: Performance Optimization
608
-
609
- **As a** terminal user
610
- **I want to** experience fast, responsive performance
611
- **So that** the application doesn't slow me down
612
-
613
- ### Acceptance Criteria
614
- - Startup time under 500ms
615
- - Keyboard input response under 50ms
616
- - Directory listing under 200ms for typical directories
617
- - Preview rendering under 100ms
618
- - No memory leaks during extended use
619
- - Efficient rendering (only redraw changed areas)
620
-
621
- ### Notes
622
- - Performance profiling and optimization
623
- - Introduces benchmarking
624
- - Introduces efficient rendering strategies
625
- - May require caching and memoization
626
-
627
- ---
628
-
629
- ## Story 25: Comprehensive Test Coverage
630
-
631
- **As a** developer
632
- **I want to** have comprehensive test coverage
633
- **So that** I can refactor confidently
634
-
635
- ### Acceptance Criteria
636
- - Unit tests for all core logic
637
- - Integration tests for file operations
638
- - UI tests for rendering and interaction
639
- - Test coverage above 80%
640
- - Tests run in CI
641
- - Tests are fast (under 5 seconds total)
642
- - All public methods have YARD documentation
643
- - README with architecture overview
644
- - CONTRIBUTING guide with development setup
645
-
646
- ### Notes
647
- - Testing infrastructure
648
- - Introduces test helpers
649
- - Introduces mocking for filesystem
650
- - Critical for maintainability
651
- - Includes code documentation requirements from specification section 6.5
652
-
653
- ---
654
-
655
- ## Story 26: Configurable Color Schemes
656
-
657
- **As a** user with color blindness
658
- **I want to** configure the color scheme
659
- **So that** I can distinguish different file types
660
-
661
- ### Acceptance Criteria
662
- - Configuration file for color preferences (~/.config/file_browser/colors.yml)
663
- - Multiple built-in themes:
664
- - Default (current colors)
665
- - High contrast (black/white with bold)
666
- - Colorblind-friendly (uses patterns + colors)
667
- - Monochrome (no colors, uses bold/dim/underline)
668
- - Colors can be customized per file type
669
- - Theme selection persists between sessions
670
- - Theme can be changed via command-line flag
671
- - Preview of theme before applying
672
-
673
- ### Notes
674
- - Addresses specification section 2.3 (Accessibility)
675
- - Introduces configuration file system
676
- - May be deferred to 1.1 release
677
- - Should validate color values
678
-
679
- ---
680
-
681
- ## Story 27: Configuration Management
682
-
683
- **As a** power user
684
- **I want to** save my preferences
685
- **So that** my settings persist between sessions
686
-
687
- ### Acceptance Criteria
688
- - Config file in ~/.config/file_browser/config.yml
689
- - Configurable preferences:
690
- - Default sort order
691
- - Hidden files visibility default
692
- - Color scheme/theme
693
- - Default editor (overrides $EDITOR)
694
- - Pane width ratios
695
- - Mouse support enabled/disabled
696
- - Config file created on first run with defaults
697
- - Invalid config handled gracefully with warnings
698
- - Command-line flags override config file
699
- - `--config-path` flag to use alternate config location
700
-
701
- ### Notes
702
- - Addresses specification section 5.3 (Configuration)
703
- - Introduces YAML parsing
704
- - May be deferred to 1.1 release
705
- - Should have schema validation
706
-
707
- ---
708
-
709
- ## Future Enhancements (Deferred)
710
-
711
- **As a** product owner
712
- **I want to** track future enhancement ideas
713
- **So that** we have a roadmap for post-1.0 releases
714
-
715
- ### Deferred Features
716
-
717
- The following features are explicitly deferred to future versions:
718
-
719
- - **Bookmarks/Favorites:** Quick access to frequently used directories
720
- - **Multi-file Selection:** Select multiple files with Space, operate on batch
721
- - **File Content Search:** Integrate grep for searching within files
722
- - **Git Integration:** Show file status (modified, untracked, etc.)
723
- - **Trash/Recycle Bin:** Soft delete instead of permanent deletion
724
- - **Dual-Pane Mode:** Side-by-side panes for easier copying
725
- - **Archive Preview:** View contents of zip, tar, etc.
726
- - **Image Preview:** ASCII art representation of images
727
- - **Custom File Type Icons:** User-defined icons for extensions
728
- - **External Tool Integration:** Diff, merge, etc.
729
- - **Plugins/Extensions:** Allow third-party extensions
730
- - **Remote Filesystem Support:** SFTP, S3, etc.
731
-
732
- ### Notes
733
- - These align with specification section 9 (Future Enhancements)
734
- - Not stories yet - just ideas for future planning
735
- - May become stories in 1.1, 1.2, etc.
736
- - Community feedback will help prioritize
737
-
738
- ---
739
-
740
- ## Implementation Notes
741
-
742
- ### Story Sequencing
743
-
744
- Stories are ordered to:
745
- 1. **Start with tutorial foundation** (Stories -4 to 0) - teaches Rooibos concepts incrementally
746
- 2. **Build walking skeleton** (Story 1) - proves end-to-end integration with real files
747
- 3. **Build core navigation** (Stories 2-3) - essential functionality
748
- 4. **Add UI structure** (Stories 4-6) - professional appearance
749
- 5. **Enable exploration** (Stories 7-8) - power user features
750
- 6. **Add organization** (Stories 9-11) - finding and filtering
751
- 7. **Enable modification** (Stories 12-17) - file operations
752
- 8. **Improve usability** (Stories 18-19) - help and errors
753
- 9. **Add enhancements** (Stories 20-21) - mouse and resize
754
- 10. **Optimize and polish** (Stories 22-24) - performance and aesthetics
755
- 11. **Ensure quality** (Story 25) - testing and documentation
756
- 12. **Advanced features** (Stories 26-27) - color schemes and configuration
757
- 13. **Future planning** - deferred enhancements
758
-
759
- ### Story Sizing
760
-
761
- - Stories -4 to -1: Extra Small (tutorial foundation)
762
- - Story 0: Small (critical transition)
763
- - Stories 1-3: Small
764
- - Stories 4-8: Medium
765
- - Stories 9-17: Small-Medium
766
- - Stories 18-21: Medium
767
- - Stories 22-24: Large
768
- - Story 25: Ongoing (parallel with all stories)
769
- - Story 26: Medium
770
- - Story 27: Small-Medium
771
-
772
- ### Dependencies
773
-
774
- - Story -3 depends on Story -4 (need project setup)
775
- - Story -2 depends on Story -3 (need runnable app)
776
- - Story -1 depends on Story -2 (need model and state)
777
- - Story 0 depends on Story -1 (need navigation working with fake data)
778
- - Story 1 depends on Story 0 (Story 0 completes Story 1)
779
- - Story 4 depends on Stories 1-3 (need basic functionality before layout)
780
- - Story 6 depends on Story 4 (need preview pane)
781
- - Story 8 depends on Story 4 (need multiple panes)
782
- - Stories 12-17 can be done in any order after Story 11
783
- - Story 21 depends on Story 4 (need layout to resize)
784
- - Story 24 should be done after most features complete