Merged
Conversation
Implements hybrid filter system with AWS and client modes: - AWS mode: Uses CloudWatch filterPattern API (cost efficient) - Client mode: Local substring match (instant UX) Key features: - / key activates filter input (consistent with ResourceBrowser) - Client mode: real-time filtering as user types - AWS mode: applies filter on Enter (triggers API re-fetch) - Ctrl+F toggles between modes - c key clears filter (or buffer if no filter) - Visual indicators: 🔍 filter display, mode label [AWS]/[Client] - Filtered count display: (45/1,234 lines) Implementation: - Single file change: internal/view/log_view.go - Pure additive feature, no breaking changes - Follows existing patterns (textinput, ViewportState) Closes #120 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add HasActiveInput() method to LogView so app.go correctly handles input mode and doesn't treat Backspace as back navigation. Fixes issue where editing filter text with Backspace caused screen to go back instead of deleting characters. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Remove AWS mode complexity. Client-side substring match is sufficient for tail use case where logs are already fetched. Removed: - filterPattern (AWS server-side filtering) - filterMode toggle - Ctrl+F mode switching - Mode display [AWS]/[Client] - API FilterPattern parameter Simplified: - Single filterText field (client-side substring) - / to activate filter - Real-time filtering as user types - Enter to done (no-op, already filtered) - c to clear - Cleaner UI without mode indicators Rationale: Tail views logs already fetched. AWS filtering only useful for high-volume streams (rare case). Hybrid approach added unnecessary complexity and confusion (which filter is active?). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Eliminate duplication by extracting filter matching logic into dedicated matchesFilter() method, reused in updateViewportContent() and getDisplayedCount(). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This comment was marked as resolved.
This comment was marked as resolved.
Addresses PR review feedback: - Track width/height to recalc viewport when filter cleared - Add min width check (10 chars) for narrow terminals - Truncate long filter text in status line (>20 chars) - Add comprehensive test coverage (7 new tests) - Keep real-time filtering (1000 logs = negligible perf impact) Tests added: - TestLogViewFilterActivation - TestLogViewFilterMatching - TestLogViewFilterClear - TestLogViewFilteredCount - TestLogViewHasActiveInput - TestLogViewFilterSetSizeRecalculation - TestLogViewFilterStatusLine 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <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
Changes
Testing
Closes #120
🤖 Generated with Claude Code