rooibos 0.5.0 → 0.6.1

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