Skip to content

Joshen/debug 110 default unified logs search to event message#46134

Merged
joshenlim merged 3 commits into
masterfrom
joshen/debug-110-default-unified-logs-search-to-event-message
May 20, 2026
Merged

Joshen/debug 110 default unified logs search to event message#46134
joshenlim merged 3 commits into
masterfrom
joshen/debug-110-default-unified-logs-search-to-event-message

Conversation

@joshenlim
Copy link
Copy Markdown
Member

@joshenlim joshenlim commented May 20, 2026

Context

Adjusts the filter bar component to accept a freeformDefaultProperty, in which entering any text in the filter bar will opt to search against that property by default. (Property must be defined within the filterProperties prop too)

Applies to unified logs, which for e.g "Event message" is a valid filter:
image

I've set freeformDefaultProperty to be event_message, and hence typing free text will opt the default action to just filtering against that property
image

Demo:

Screen.Recording.2026-05-20.at.12.35.44.mov

Other changes

  • Opt to deprecate truncateText util from unified logs -> preference for tailwind instead
  • Event message is added as a filter field, but hidden in the side nav (wouldn't make sense since the content is very dynamic, unlike something similar like pathname)
  • Fixes some console errors in unified logs because we were using .getColumn in DataTableSheetRowAction

Summary by CodeRabbit

  • New Features

    • Added an "Event message" filter (hidden by default) and set it as the default target for freeform searches.
  • UI Improvements

    • Filter sidebar resize constraints tightened.
    • Timeline chart spacing and x-axis tick behavior improved.
    • Action labels and command list items no longer truncate long input values.
  • Bug Fixes

    • More reliable resolution of target columns for row actions, improving available filter options.

Review Change Stack

@joshenlim joshenlim requested review from a team as code owners May 20, 2026 05:51
@vercel
Copy link
Copy Markdown

vercel Bot commented May 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
studio-self-hosted Ready Ready Preview, Comment May 20, 2026 6:03am
studio-staging Ready Ready Preview, Comment May 20, 2026 6:03am
5 Skipped Deployments
Project Deployment Actions Updated (UTC)
studio Ignored Ignored May 20, 2026 6:03am
design-system Skipped Skipped May 20, 2026 6:03am
docs Skipped Skipped May 20, 2026 6:03am
ui-library Skipped Skipped May 20, 2026 6:03am
zone-www-dot-com Skipped Skipped May 20, 2026 6:03am

Request Review

@supabase
Copy link
Copy Markdown

supabase Bot commented May 20, 2026

This pull request has been ignored for the connected project xguihxuzqibwxjnimxev because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 20, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: c5e52f54-caae-4640-8b84-3ac8070059f5

📥 Commits

Reviewing files that changed from the base of the PR and between 18ac4fc and 1bfbfeb.

📒 Files selected for processing (1)
  • apps/studio/components/ui/DataTable/TimelineChart.tsx

📝 Walkthrough

Walkthrough

Adds a configurable freeform-default property to FilterBar, supports hidden filter fields, integrates a hidden event_message field into UnifiedLogs as the freeform default, removes label truncation, and includes supporting UI and column-resolution fixes.

Changes

Freeform Search and Hidden Fields Integration

Layer / File(s) Summary
Type contracts for hidden fields and freeform search
apps/studio/components/ui/DataTable/DataTable.types.ts, packages/ui-patterns/src/FilterBar/types.ts
Base<TData> gains an optional hidden flag; MenuItem adds isFreeformSearch, freeformPropertyName, and freeformValue.
FilterBar prop and context threading
packages/ui-patterns/src/FilterBar/FilterBar.tsx, packages/ui-patterns/src/FilterBar/FilterBarContext.tsx
FilterBar accepts freeformDefaultProperty; FilterBarRoot forwards it into context and provider exposes it to consumers.
Menu generation with freeform search option
packages/ui-patterns/src/FilterBar/menuItems.ts
buildPropertyItems accepts freeformDefaultProperty and prepends a freeform-search menu item when user input is non-empty.
Freeform search command handling
packages/ui-patterns/src/FilterBar/useCommandHandling.ts
handleItemSelect handles freeform-search menu items by resolving the property, choosing a default operator (prefers =), committing a new filter, and clearing freeform text.
Filter group freeform integration and sizing
packages/ui-patterns/src/FilterBar/FilterGroup.tsx
FilterGroup resolves freeformDefaultProperty only for the root group, passes it into menu generation, and updates popover max-width to 360px.
Filter visibility control
apps/studio/components/ui/DataTable/DataTableFilters/DataTableFilterControls.tsx
Accordion items are rendered only for fields where hidden is not set.
Action label formatting and truncation removal
packages/ui-patterns/src/FilterBar/utils.ts, packages/ui-patterns/src/FilterBar/utils.test.ts, packages/ui-patterns/src/FilterBar/CommandListItem.tsx
Removes truncateText; getActionItemLabel shows full input; tests updated; CommandListItem adds overflow/truncation styling.
UnifiedLogs event_message field integration
apps/studio/components/interfaces/UnifiedLogs/UnifiedLogs.fields.tsx, apps/studio/components/interfaces/UnifiedLogs/components/LogsFilterBar.tsx
Adds a hidden event_message checkbox filter field with custom rendering and sets freeformDefaultProperty="event_message" on the filter bar.
Column resolution and UI sizing fixes
apps/studio/components/ui/DataTable/DataTableSheetRowAction.tsx, apps/studio/components/ui/DataTable/FilterSideBar.tsx, apps/studio/components/ui/DataTable/TimelineChart.tsx
Column lookup now resolves by id using table.getAllColumns().find(); ResizablePanel min/default sizes tightened; TimelineChart adds horizontal padding and sets XAxis interval to preserveStartEnd.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • jordienr
  • kemaldotearth
  • alaister

"🐰 I hopped through props and fields today,
I hid a filter where it could stay,
Freeform whispers find their way,
No more clipped labels in display,
Tiny tweaks to make UX sway."

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main feature: setting a default unified logs search property to event message. It accurately reflects the core change in the changeset.
Description check ✅ Passed The description addresses the template requirements: context is provided, new behavior is explained with screenshots and demo, and additional changes are clearly documented.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch joshen/debug-110-default-unified-logs-search-to-event-message

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown
Contributor

🎭 Playwright Test Results

passed  207 passed
flaky  1 flaky
skipped  5 skipped

Details

stats  213 tests across 23 suites
duration  6 minutes, 13 seconds
commit  1bfbfeb

Flaky tests

Features › queue-table-operations.spec.ts › Queue Table Operations › reverted cell edit clears the pending change

Skipped tests

Features › auth-users.spec.ts › should show web3 users as enabled when the matching web3 provider is enabled
Features › sql-editor.spec.ts › SQL Editor › snippet favourite works as expected
Features › sql-editor.spec.ts › SQL Editor › share with team works as expected
Features › sql-editor.spec.ts › SQL Editor › folders works as expected
Features › sql-editor.spec.ts › SQL Editor › other SQL snippets actions work as expected

Copy link
Copy Markdown
Member

@alaister alaister left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

  • Tested on preview

@joshenlim joshenlim merged commit e8af602 into master May 20, 2026
33 checks passed
@joshenlim joshenlim deleted the joshen/debug-110-default-unified-logs-search-to-event-message branch May 20, 2026 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants