feat: native CloudWatch Logs viewer (issue #29)#86
Merged
Conversation
Replace external 'aws logs tail' dependency with internal TUI log viewer. - Add LogView with FilterLogEvents polling (3s interval) - Support both log-groups and log-streams - Space to pause/resume, g/G for top/bottom, c to clear - Remove AWS CLI and less dependencies
Move log viewing from Action menu to Navigation shortcut: - Press 't' directly from log-groups/log-streams to open LogView - Remove ActionTypeView handling from action_menu - Cleaner UX: no action menu step needed
- Add ready flag to LogView to prevent uninitialized viewport access - Remove ActionTypeView constant and related IsAllowedInReadOnly case - Remove obsolete ActionTypeView test cases - Remove beads issue tracking setup (not using)
- LogView: use apperrors.Wrap instead of fmt.Errorf - LogView: use appaws.* helpers instead of raw aws.* - LogStreamDAO.Delete: add IsNotFound check for idempotency - helpers.go: add Int64Ptr for consistency with Int32Ptr
This comment was marked as resolved.
This comment was marked as resolved.
- Add 10s timeout for FilterLogEvents API calls - Add exponential backoff on throttling (up to 30s) - Reset poll interval on success - Add godoc for LogView struct
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
- Check parent context before starting fetch to prevent resource leaks - Extract buffer sizes and fetch limit to named constants
This comment was marked as resolved.
This comment was marked as resolved.
Only continue polling with backoff on throttling errors. Other errors (access denied, etc.) stop polling to avoid spamming.
This comment was marked as resolved.
This comment was marked as resolved.
- Check context cancellation before initializing AWS client - Show throttle status with backoff interval in StatusLine
This comment was marked as outdated.
This comment was marked as outdated.
Fixes multi-region mode where resources are wrapped with RegionalDAOWrapper. Without unwrapping, type assertions for logGroupProvider/logStreamProvider fail.
This comment was marked as outdated.
This comment was marked as outdated.
- Add 'p' key to load 1 hour of older logs (prepends to buffer) - For log streams, use lastEventTimestamp as starting point - Track oldestEventTime to enable backward navigation - Fixes issue where old streams showed 'no log events'
This comment was marked as outdated.
This comment was marked as outdated.
- Use ui.NewSpinner() for consistent spinner initialization - Extract doFetchLogs() to eliminate code duplication (75% reduction) - Add LogFetchTimeout to config system (default: 10s) - Add IsNotFound/IsAccessDenied error classification for better UX - Replace errors.New() with apperrors.Wrap() for consistency - Document viewportHeaderOffset magic number
- Remove unused Action.Target field - Remove unused LogView.width/height fields - Add LogFetch to DefaultFileConfig for consistency - Restore doc comments for Navigation, ViewTypeLogView, HandleKey
- Add width/height fields for consistency with DetailView, DiffView, etc. - Remove HasActiveInput() since views without filter don't implement it
This comment was marked as resolved.
This comment was marked as resolved.
This was referenced Jan 3, 2026
Merged
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
tkey from log-groups/log-streams (replaces action menu approach)ActionTypeViewdead code in favor of Navigation-based view switchingChanges
internal/view/log_view.go- Bubbletea view with 3s polling, pause/resume, scrollinternal/view/log_view_test.go- Comprehensive tests (298 lines)render.ViewTypeLogViewconstant +Navigation.ViewTypefieldappaws.Int64Ptr()helper for consistencyActionTypeViewconstant and related exec actions (Tail Logs, View Recent)Code Quality
Closes #29