Feature: add recent directories selector for working directory selection #231
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Feature: add recent directories selector for working directory selection
Problem
Currently, users must manually type or browse for working directories every time they start a new Claude Code session. This is inefficient for developers who frequently work with the same projects and slows down the workflow when switching between multiple projects.
Solution
Added a "Recent (X)" dropdown button next to the directory input that allows users to quickly select from their last 10 used working directories.
Changes Made
Core Implementation
useRecentDirectories
hook (src/hooks/useRecentDirectories.ts
): Manages up to 10 recent directories with persistence in Claude settingsRecentDirectoriesDropdown
component (src/components/RecentDirectoriesDropdown.tsx
): UI component with dropdown menu, timestamps, and management featuresClaudeCodeSession
(src/components/ClaudeCodeSession.tsx
): Added dropdown between directory input and browse button with automatic trackingKey Features
~/.claude/settings.json
across app restartsTesting
Automated Tests (34 tests - all passing ✅)
Manual Testing
TEST_PLAN.md
Quality Assurance
bunx tsc --noEmit
)cargo test
)bun run build
)Dependencies
No new runtime dependencies added. Development dependencies added for testing:
vitest
- Testing framework optimized for Vite@testing-library/react
- Component testing utilities@testing-library/jest-dom
- Testing assertions@testing-library/user-event
- User interaction simulationjsdom
- DOM environment for testsDocumentation
TEST_PLAN.md
) with manual testing proceduresBackward Compatibility
✅ Fully backward compatible - no breaking changes to existing functionality
✅ Progressive enhancement - feature works alongside existing directory selection methods
✅ Safe defaults - graceful degradation if settings are unavailable
Screenshots/Demo
The feature integrates seamlessly into the existing UI:
Checklist
Code Quality
Testing
Documentation
Security & Performance
This feature significantly improves developer productivity by reducing the friction of starting new Claude Code sessions, especially for users who work with multiple projects regularly.