mirror of
https://github.com/supabase/supabase.git
synced 2026-10-08 19:05:06 +03:00
## Context Swaps out (and deprecates) the unified logs's own filter bar, for our existing design system's filter bar <img width="1450" height="355" alt="image" src="https://github.com/user-attachments/assets/c5e83bd1-4e67-4bb5-8f27-a3d9beacbbb5" /> Other changes involved for the FilterBar itself includes the following (more details in subsequent sections) - Add `onApply` param for `FilterBar` that will only trigger when an entered filter is "complete" (e.g on enter or blur) - Automatically select the operator if only one exists ## To test - Verify that the filter bar in general works BUT note there's some odd behaviour when searching on say the "status" column (more details under known issues) - likely something with the internal SQL i think, will need to investigate separately - afaict testing on the method seems to be working at least --- ### Add `onApply` parameter for `FilterBar` The search behaviour for the filter bar feels a bit awkward atm - referencing the table editor: - selecting the column triggers a search, which returns an error cause the search query is incorrect (operator and value not selected yet) - when typing the search value (after selecting the column + operator), the search triggers on debounce, which feels odd in this context as I'd expect the search to only trigger when i've hit enter (e.g to "finalize" my search parameters) - Am adding an `onApply` parameter gets called when a filter is "complete" -> column, operator, and value are finalized (e.g via Enter or onBlur) - Updated both Unified logs and table editor to use this behaviour ### Automatically select operator if only one exists in `FilterBar` This one's more specific to unified logs since there's only an `=` operator - but saves an unnecessary "enter" key event when filtering in unified logs ### Known issues - For some reason (even with the existing filter bar) - searching against status for e.g for postgres logs doesnt return the expected rows. e.g i've got rows with status as `00000`, but searching for `00000` doesnt return anything. Suspect its something to do with the SQL we're firing? <img width="1167" height="271" alt="image" src="https://github.com/user-attachments/assets/1dde74cf-8366-4cf1-8d8f-6907ba2473f6" /> <img width="1184" height="453" alt="image" src="https://github.com/user-attachments/assets/bf55f0fb-cb27-4e8f-b2d9-cd913d6ac6b9" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a dedicated Logs filter bar with an explicit "apply"/commit callback for filter UI. * **Bug Fixes** * Filter edits are buffered locally and only committed on apply to prevent aggressive data requests. * **Refactor** * Replaced legacy command-style table filter UI and removed related utilities. * Updated filter commit lifecycle and narrowed option value typing; adjusted top-level provider ordering. * **Style** * Small layout and trigger behavior tweaks for filter controls, timeline chart spacing, and download button. <!-- review_stack_entry_start --> [](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/46071?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Gildas Garcia <1122076+djhi@users.noreply.github.com>