← Back to PRs

#6308: feat(ui): add logsLevelFilters field to store log level filter settings

by Cassius0924 open 2026-02-01 14:23 View on GitHub →
app: web-ui cli
## Summary - Persist log level filters in browser session storage. - User log filter preferences (trace, debug, info, warn, error, fatal) now persist across browser sessions, improving user experience by maintaining their preferred log visibility settings. ## Changes - Storage: Add logsLevelFilters field to UiSettings with proper validation and backward compatibility. - State Management: Initialize log filters from stored settings instead of hardcoded defaults. - Persistence: Save filter changes immediately when users toggle log levels in the UI. <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR adds a new `logsLevelFilters` field to persisted UI settings and wires the Logs view so toggling log levels immediately saves the updated filter state to storage. It also removes the now-redundant hardcoded default log filter constant, and includes minor housekeeping changes (.gitignore IDE entry, docstring typo fix). Main integration points are `ui/src/ui/storage.ts` for default + validation/merge of persisted settings, and `ui/src/ui/app-render.ts`/`ui/src/ui/app.ts` for reading and writing the filter state during UI interactions. <h3>Confidence Score: 4/5</h3> - This PR is generally safe to merge; the main concern is potential state drift between `settings.logsLevelFilters` and the separate `logsLevelFilters` state field. - Changes are localized and mostly additive (storage schema + UI wiring). However, initializing `logsLevelFilters` once from `settings` creates a plausible inconsistency if settings are updated through other code paths, which could lead to confusing UI behavior. - ui/src/ui/app.ts <!-- greptile_other_comments_section --> <sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub> <!-- /greptile_comment -->

Most Similar PRs