Skip to content

Conversation

@tomkp
Copy link
Owner

@tomkp tomkp commented Dec 24, 2025

Summary

Addresses code quality improvements identified in a comprehensive code review.

Changes

  • Remove unused PaneState type - Removed vestigial type that was never used in codebase
  • Extract cn() utility - Created reusable className combination utility to reduce duplication across components (SplitPane, Pane, Divider)
  • Add usePersistence tests - Added 12 comprehensive tests for the persistence hook including error handling, debounce behavior, and key changes
  • SSR safety for announce() - Added typeof document !== 'undefined' check to prevent errors during server-side rendering
  • Document Escape key - Added missing Escape key documentation to keyboard navigation section in README
  • Move Tailwind section - Extracted Tailwind CSS/shadcn integration docs to separate TAILWIND.md file to reduce README size
  • React 19 compatibility - Refactored useResizer to use useEffect for prop synchronization instead of setting state during render

Test Results

  • Before: 78 tests
  • After: 99 tests (+21 new tests)
  • All tests passing
  • All checks (typecheck, lint, format, test) passing

Test plan

  • Run npm run checks - all pass
  • Verify new cn() utility works correctly in all components
  • Verify SSR safety in announce() function
  • Verify usePersistence tests cover all edge cases
  • Review TAILWIND.md contains all moved content

Closes #858

🤖 Generated with Claude Code

- Remove unused PaneState type from types and exports
- Extract cn() utility for className combination (reduces duplication)
- Add comprehensive tests for usePersistence hook (12 new tests)
- Add SSR safety check to announce() function
- Document Escape key in README keyboard navigation
- Move Tailwind/shadcn section to separate TAILWIND.md file
- Refactor useResizer to avoid state-during-render pattern (React 19 compatible)

Closes #858

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@tomkp tomkp merged commit 48ebdbe into master Dec 24, 2025
1 check passed
@tomkp tomkp deleted the fix/code-review-improvements branch December 24, 2025 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Code quality improvements from review

2 participants