core-agent-ide/codex-cli/src/components
Jordan Docherty f6b12aa994
refactor(history-overlay): split into modular functions & add tests (fixes #402) (#403)
## What
This PR targets #402 and refactors the `history-overlay.tsx`component to
reduce cognitive complexity by splitting the `buildLists` function into
smaller, focused helper functions. It also adds comprehensive test
coverage to ensure the functionality remains intact.

## Why
The original `buildLists` function had high cognitive complexity due to
multiple nested conditionals, complex string manipulation, and mixed
responsibilities. This refactor makes the code more maintainable and
easier to understand while preserving all existing functionality.

## How
- Split `buildLists` into focused helper functions
- Added comprehensive test coverage for all functionality
- Maintained existing behavior and keyboard interactions
- Improved code organization and readability

## Testing
All tests pass, including:
- Command mode functionality
- File mode functionality
- Keyboard interactions
- Error handling
2025-04-20 22:27:06 -07:00
..
chat refactor(component): rename component to match its filename (#432) 2025-04-20 22:21:49 -07:00
onboarding Initial commit 2025-04-16 12:56:08 -04:00
select-input Fix: Change file name to start with small letter instead of captial l… (#356) 2025-04-18 16:55:49 -07:00
vendor Fix handling of Shift+Enter in e.g. Ghostty (#338) 2025-04-18 09:19:06 -07:00
approval-mode-overlay.tsx Initial commit 2025-04-16 12:56:08 -04:00
diff-overlay.tsx feat: /diff command to view git diff (#426) 2025-04-19 16:23:27 -07:00
help-overlay.tsx feat: /diff command to view git diff (#426) 2025-04-19 16:23:27 -07:00
history-overlay.tsx refactor(history-overlay): split into modular functions & add tests (fixes #402) (#403) 2025-04-20 22:27:06 -07:00
model-overlay.tsx feat: support multiple providers via Responses-Completion transformation (#247) 2025-04-20 20:59:34 -07:00
singlepass-cli-app.tsx feat: support multiple providers via Responses-Completion transformation (#247) 2025-04-20 20:59:34 -07:00
typeahead-overlay.tsx fix: duplicated message on model change (#276) 2025-04-17 16:34:35 -07:00