Skip to content

Joshen/fe 3789 unified logs filters click area is too small - #47675

Merged
joshenlim merged 2 commits into
masterfrom
joshen/fe-3789-unified-logs-filters-click-area-is-too-small
Jul 8, 2026
Merged

joshenlim merged 2 commits into
masterfrom
joshen/fe-3789-unified-logs-filters-click-area-is-too-small

Conversation

@joshenlim

@joshenlim joshenlim commented Jul 7, 2026 •

Copy link
Copy Markdown
Member

Context

Increases the click area of unified logs filter

Before

image

After

image

Summary by CodeRabbit

  • Style
    • Improved spacing and alignment in filter checkbox rows.
    • Adjusted the expand/collapse control and “only” button positioning for a cleaner layout.
    • Refined nested option connector placement and sizing for better visual consistency.

@joshenlim
joshenlim requested a review from a team as a code owner July 7, 2026 09:07
@vercel

vercel Bot commented Jul 7, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
studio-self-hosted Ready Ready Preview, Comment Jul 7, 2026 9:11am
studio-staging Ready Ready Preview, Comment Jul 7, 2026 9:11am
5 Skipped Deployments
Project Deployment Actions Updated (UTC)
studio Ignored Ignored Jul 7, 2026 9:11am
design-system Skipped Skipped Jul 7, 2026 9:11am
docs Skipped Skipped Open in v0 Jul 7, 2026 9:11am
ui-library Skipped Skipped Jul 7, 2026 9:11am
zone-www-dot-com Skipped Skipped Open in v0 Jul 7, 2026 9:11am

Request Review

@supabase

supabase Bot commented Jul 7, 2026

Copy link
Copy Markdown

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

coderabbitai Bot commented Jul 7, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adjusts CSS class names controlling spacing, padding, and absolute positioning within the DataTableFilterCheckbox component, affecting the option row wrapper, label, expand/collapse control, "only" button, and nested option connector indicators.

Changes

Filter Checkbox Styling

Layer / File(s) Summary
Row and label spacing
apps/studio/components/ui/DataTable/DataTableFilters/DataTableFilterCheckbox.tsx
Outer row container padding changed from px-2/py-2 to pl-2, and py-2 moved onto the label element with layout adjustments.
Controls and nested geometry
apps/studio/components/ui/DataTable/DataTableFilters/DataTableFilterCheckbox.tsx
Expand/collapse control repositioned from top-0 to top-2, "only" button offset/padding adjusted, and nested option connector left/top/height values updated for first vs. subsequent items.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description omits the required template sections and only provides context with screenshots. Add the CONTRIBUTING.md acknowledgment, change type, current behavior or issue link, new behavior, and additional context sections.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: enlarging the unified logs filter click area.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ 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/fe-3789-unified-logs-filters-click-area-is-too-small

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
apps/studio/components/ui/DataTable/DataTableFilters/DataTableFilterCheckbox.tsx (2)

123-137: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Fixed top-2 offset for expand/collapse button is fragile to content-height changes.

The button is hardcoded at top-2 to align with the label's new py-2. If the custom Component renders taller/multi-line content, or padding is retuned again, this offset will need manual re-adjustment. Vertical centering via transform would be robust regardless of label height.

♻️ Proposed fix
                         className={cn(
                           'flex h-4 w-4 shrink-0 items-center justify-center rounded-sm text-foreground-lighter',
                           'hover:bg-selection hover:text-foreground',
-                          'absolute top-2 right-10'
+                          'absolute top-1/2 -translate-y-1/2 right-10'
                         )}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@apps/studio/components/ui/DataTable/DataTableFilters/DataTableFilterCheckbox.tsx`
around lines 123 - 137, The expand/collapse control in DataTableFilterCheckbox
is positioned with a fixed top offset, which makes it fragile when the option
content height changes. Update the button positioning in the checkbox option
rendering so the icon is vertically centered relative to the row content instead
of relying on a hardcoded offset, keeping the logic in DataTableFilterCheckbox
and the hasNested / isExpanded button block intact.

172-183: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Unreachable condition in nested connector geometry.

option.options?.length === 1 inside the else branch (line 180) can never be true: a single-item array always has nestedIndex === 0, which already resolves via the outer ternary's nestedIndex === 0 branch (line 176-177). This else path only executes when nestedIndex !== 0, meaning length is always > 1. The condition is effectively dead code and can be simplified to h-1/2 unconditionally.

♻️ Proposed simplification
                                 className={cn(
                                   'absolute left-[0.95rem] w-3 rounded-bl-sm border-b border-l border-border',
                                   nestedIndex === 0
                                     ? 'top-[-8px] h-[calc(60%+8px)]'
-                                    : cn(
-                                        'top-0',
-                                        option.options?.length === 1 ? 'h-[60%]' : 'h-1/2'
-                                      )
+                                    : 'top-0 h-1/2'
                                 )}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@apps/studio/components/ui/DataTable/DataTableFilters/DataTableFilterCheckbox.tsx`
around lines 172 - 183, The nested connector sizing logic in
DataTableFilterCheckbox is redundant because the option.options?.length === 1
check inside the non-first nested branch can never be true. Simplify the
geometry logic in the isLastNested span by removing that dead condition and
using the half-height class unconditionally in the nestedIndex !== 0 path,
keeping the outer nestedIndex === 0 branch intact.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In
`@apps/studio/components/ui/DataTable/DataTableFilters/DataTableFilterCheckbox.tsx`:
- Around line 123-137: The expand/collapse control in DataTableFilterCheckbox is
positioned with a fixed top offset, which makes it fragile when the option
content height changes. Update the button positioning in the checkbox option
rendering so the icon is vertically centered relative to the row content instead
of relying on a hardcoded offset, keeping the logic in DataTableFilterCheckbox
and the hasNested / isExpanded button block intact.
- Around line 172-183: The nested connector sizing logic in
DataTableFilterCheckbox is redundant because the option.options?.length === 1
check inside the non-first nested branch can never be true. Simplify the
geometry logic in the isLastNested span by removing that dead condition and
using the half-height class unconditionally in the nestedIndex !== 0 path,
keeping the outer nestedIndex === 0 branch intact.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ac5760fb-42b5-48d7-9fa9-4fccf596e088

📥 Commits

Reviewing files that changed from the base of the PR and between 2f5a5e9 and 1845c2d.

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

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

🎭 Playwright Test Results

passed  230 passed
flaky  1 flaky
skipped  5 skipped

Details

stats  236 tests across 26 suites
duration  3 minutes, 56 seconds
commit  1845c2d

Flaky tests

Features › sql-editor.spec.ts › SQL Editor › should check if SQL editor is working as expected

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

@djhi

djhi commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Tested on staging

@joshenlim
joshenlim merged commit 511a780 into master Jul 8, 2026
33 checks passed
@joshenlim
joshenlim deleted the joshen/fe-3789-unified-logs-filters-click-area-is-too-small branch July 8, 2026 06:16
@github-actions

github-actions Bot commented Jul 8, 2026 •

Copy link
Copy Markdown
Contributor

Braintrust eval report

Assistant (master-1783491551)

Score Average Improvements Regressions
Knowledge Usage 97.4% (+5pp) 2 🟢 1 🔴
Tool Usage 76.5% (+4pp) 2 🟢 1 🔴
SQL Identifier Quoting 100% (+0pp) - -
SQL Validity 100% (+0pp) - -
Time_to_first_token 2.98tok (-1.24tok) 28 🟢 1 🔴
Llm_calls 2.91 (+0.18) 14 🟢 12 🔴
Tool_calls 3.05 (+0.23) 13 🟢 9 🔴
Errors 5.3 (+0.06) 2 🟢 4 🔴
Llm_errors 0 (+0) - -
Tool_errors 0 (+0) - -
Prompt_tokens 25931.08tok (-144.6tok) 10 🟢 15 🔴
Prompt_cached_tokens 7727.08tok (-1041.66tok) 15 🟢 10 🔴
Prompt_cache_creation_tokens 0tok (+0tok) - -
Prompt_cache_creation_5m_tokens 0tok (+0tok) - -
Prompt_cache_creation_1h_tokens 0tok (+0tok) - -
Completion_tokens 593.89tok (+1.49tok) 15 🟢 14 🔴
Completion_reasoning_tokens 104.2tok (+9.16tok) 9 🟢 17 🔴
Total_tokens 26524.97tok (-143.1tok) 14 🟢 15 🔴
Estimated_cost 0$ (+0$) 11 🟢 15 🔴
Duration 17.69s (-0.46s) 20 🟢 9 🔴
Llm_duration 11.83s (-0.72s) 21 🟢 8 🔴

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.

2 participants