Skip to content

Akhil/optimise nosql - #215

Merged
itsmeakhil merged 7 commits into
mainfrom
akhil/optimise-nosql
Jun 17, 2026
Merged

Akhil/optimise nosql#215
itsmeakhil merged 7 commits into
mainfrom
akhil/optimise-nosql

Conversation

@itsmeakhil

Copy link
Copy Markdown
Collaborator

No description provided.

itsmeakhil and others added 7 commits June 18, 2026 01:07
Add SearchBar component for Redis Commander key search feature with:
- Mode indicator with icon (⚡ glob, 🔍 fuzzy, .* regex)
- Match count badge
- Clear button and Escape key support
- Advanced panel toggle
- Inline regex error display
- Full accessibility and keyboard support

Add SearchMode type definition to types.ts for use across search components.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Implements collapsible panel for Redis search mode override with:
- Current mode explanation with examples
- Toggle buttons for glob, fuzzy, and regex modes
- Reset to Auto-Detect functionality
- Styled with shadcn/ui Button and Tailwind CSS

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Add smart search (glob/regex/fuzzy) with auto-detection to the Redis key
browser. Introduces search-utils.ts with matching helpers and wires
SearchBar + AdvancedSearchPanel into KeyBrowser with debounced filtering,
allKeys/displayedKeys split, and per-mode override support.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Add visual highlighting showing which parts of Redis key names matched the search pattern. Implements HighlightedKeyText component that:
- For fuzzy mode: highlights individual matched characters with yellow background
- For glob/regex mode: highlights the matched segment with blue background
- Extends search-utils with mode-aware getMatchIndices() function
- Only displays highlighting when search is active

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Add useEffect hook to KeyBrowser component that clears search input and state whenever the Redis connection (redisUrl) changes. This ensures search filters are reset when switching between different Redis connections.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
handleClearSearch previously depended on `allKeys`, causing it to get a
new identity on every page load (whenever setAllKeys ran). The
`useEffect([redisUrl, handleClearSearch])` then re-fired on every scroll
page, wiping the active search query.

Fix: replace the `allKeys` closure reference with `allKeysRef` so
handleClearSearch has a stable identity (empty dep array). The clear
effect now only fires when `redisUrl` truly changes.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Add 67 comprehensive test cases covering all five exported functions:
- detectSearchMode: 23 tests for glob, regex, and fuzzy patterns
- globMatch: 10 tests for pattern matching with wildcards
- regexMatch: 7 tests for regex patterns and error handling
- fuzzyMatch: 9 tests for subsequence matching
- getFuzzyMatchIndices: 7 tests for character position detection
- getGlobMatchIndices: 5 tests for segment boundary detection
- getRegexMatchIndices: 5 tests for regex match positions
- getMatchIndices: 7 tests for mode-based matching

Setup Jest with ts-jest preset and configuration for the monorepo.
All 67 tests pass with no type errors or linting issues.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
mydevtools-tech Building Building Preview, Comment Jun 17, 2026 8:49pm

@itsmeakhil
itsmeakhil merged commit 2b8b37b into main Jun 17, 2026
1 of 2 checks passed
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.

1 participant