Skip to content

Commit 8870c64

Browse files
0xrinegadeclaude
andcommitted
feat(tui): Implement REAL blockchain search with indexed data
**CRITICAL FIX:** Search now actually searches local indexed data! Previous implementation was just a UI shell with no backend. Now searches WalletGraph nodes, TransferEvents, and TokenVolumes. πŸ” New Search Results Tab (Press '4'): - Shows actual matches from locally indexed blockchain data - Displays wallets with balances and transfer counts - Shows token volumes and symbols - Lists transactions with timestamps and amounts - Match reasons explain why each result was found 🧠 Real Search Engine: - search_indexed_data() method searches ALL local data: * WalletGraph.nodes_iter() for wallet matches * transfer_events for transaction matches * token_volumes for token symbol matches - Fuzzy matching on addresses, labels, symbols, timestamps - Returns SearchResultsData with categorized results πŸ“Š Search Results Data Structures: - SearchResultsData: query, entity_type, total_matches, timestamp - WalletMatch: address, balance_sol, transfer_count, match_reason - TransactionMatch: signature, timestamp, amount_sol, from/to, reason - TokenMatch: symbol, volume, transfer_count, match_reason ⚑ Search Execution Flow: 1. User presses Ctrl+K, types query, selects suggestion 2. execute_search() calls search_indexed_data() 3. Searches WalletGraph, TransferEvents, TokenVolumes 4. Populates SearchResultsData with findings 5. Switches to SearchResults tab (Tab 4) 6. Displays categorized results with icons and stats 🎨 Search Results Tab UI: - Header: query, entity type, match count, timestamp - Wallets section: πŸ‘› address, balance, transfers - Tokens section: πŸͺ™ symbol, volume - Transactions section: πŸ“œ signature, amount, timestamp - Empty state with helpful hints - Scrollable results - Status bar with Ctrl+K reminder πŸš€ Tab Navigation Updated: - Tab 1: Dashboard - Tab 2: Graph - Tab 3: Logs - Tab 4: Search Results (NEW) - Press '4' or Tab through to access Technical Implementation: - Uses WalletGraph.nodes_iter() (respects private fields) - Mutex-locked access to shared data structures - Simplified transfer counting (future: use graph connections) - Case-insensitive substring matching - Results cloned from Arc<Mutex<>> for rendering This transforms the search from cosmetic to functional. Users can now actually find data in their local blockchain index! πŸ”§ Generated with Claude Code Co-Authored-By: Claude <[email protected]>
1 parent 86a4afc commit 8870c64

File tree

1 file changed

+306
-16
lines changed

1 file changed

+306
-16
lines changed

0 commit comments

Comments
Β (0)