feat(sessions): add sort options and message preview (#606)#610
Merged
feat(sessions): add sort options and message preview (#606)#610
Conversation
…#606) - Add SORT_KEYS const array and derive SortKey type (including lastSent) - Add isValidSortKey() and compareByTimestamp() utility functions - Add lastSent + default case to sortBranches() switch - Extract SortSelectorBase presentational component from SortSelector - Refactor SortSelector as thin wrapper around SortSelectorBase - Add localStorage validation for sortKey in SidebarContext - Implement Sessions page sort (lastSent/repositoryName/status) - Add message preview with sanitization and PC/SP truncation - Add MESSAGE_PREVIEW_MAX_LENGTH_PC/SP constants - All tests pass (5953 passed), coverage target met - ESLint: 0 errors, TypeScript: 0 errors Resolves #606 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move sanitizePreview from sessions/page.tsx to config/message-preview-config.ts for better testability and reusability. Add comprehensive unit tests covering control character removal, bidi mark stripping, zero-width char handling, and whitespace normalization (28 test cases). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Closes #606
Test plan
🤖 Generated with Claude Code