Skip to content

fix(resource): left-align table filter/sort when there's no search bar#5128

Merged
TheodoreSpeaks merged 1 commit into
stagingfrom
fix/table-filter-row
Jun 18, 2026
Merged

fix(resource): left-align table filter/sort when there's no search bar#5128
TheodoreSpeaks merged 1 commit into
stagingfrom
fix/table-filter-row

Conversation

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator

Summary

  • improvement(knowledge): align connected-sources rows and move source chip left of filter/sort #5117 wrapped the options-bar `aside + filter/sort` cluster in an unconditional `ml-auto`, which right-aligned the embedded table editor's filter/sort — that view has no search bar, so the controls used to sit left-aligned.
  • Only push the group right when a search occupies the left edge; without a search it stays left-aligned (the embedded table editor). All list pages (knowledge/tables/logs/files) have a search, so they're unchanged.
  • Updated the `aside` doc comment to match.

Type of Change

  • Bug fix

Testing

Tested manually. `bun run lint` and `bun run check:api-validation:strict` clean.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

The unconditional ml-auto from #5117 right-aligned the embedded table
editor's filter/sort cluster, which has no search bar. Only push the
aside + filter/sort group right when a search occupies the left; without
a search it stays left-aligned as before.
@vercel

vercel Bot commented Jun 18, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Jun 18, 2026 2:19am

Request Review

@cursor

cursor Bot commented Jun 18, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Single-component CSS class change with no logic, API, or data impact; list pages with search behave as before.

Overview
Fixes a layout regression in ResourceOptions: the aside + filter/sort cluster no longer always uses ml-auto. ml-auto applies only when a search bar is present, so list views (knowledge, tables, logs, files) still pin controls on the right opposite search, while search-less views like the embedded table editor stay left-aligned.

The aside prop doc comment is updated to describe this conditional alignment.

Reviewed by Cursor Bugbot for commit 01e2e1a. Bugbot is set up for automated code reviews on this repo. Configure here.

@greptile-apps

greptile-apps Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes a visual regression introduced in #5117 where the filter/sort control cluster inside ResourceOptions was unconditionally right-aligned via ml-auto, breaking the embedded table editor which has no search bar.

  • Applies ml-auto to the filter/sort cluster only when a search prop is present, so list pages (knowledge/tables/logs/files) remain unchanged while the embedded table editor regains its left-aligned layout.
  • Updates the aside JSDoc comment to accurately describe the new conditional alignment behaviour.

Confidence Score: 5/5

A one-line Tailwind class change with a correct guard — safe to merge.

The change is a single conditional class application (ml-auto only when search is truthy). It restores the original left-aligned layout for the embedded table editor while leaving every search-bearing view untouched. The updated JSDoc accurately documents the new behaviour. No logic, data flow, or API surface is affected.

No files require special attention.

Important Files Changed

Filename Overview
apps/sim/app/workspace/[workspaceId]/components/resource/components/resource-options/resource-options.tsx Conditional ml-auto on the filter/sort cluster — only applied when search is present. Fix is correct, targeted, and matches the updated JSDoc.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[ResourceOptions rendered] --> B{hasContent?}
    B -- No --> C[return null]
    B -- Yes --> D[Render outer div]
    D --> E{search prop present?}
    E -- Yes --> F[Render SearchSection\nleft-aligned + flex-1]
    E -- No --> G[No SearchSection]
    F --> H[Filter/Sort cluster\nwith ml-auto → pushed right]
    G --> I[Filter/Sort cluster\nno ml-auto → stays left]
    H --> J[aside + filterTags + Filter + Sort buttons]
    I --> J
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[ResourceOptions rendered] --> B{hasContent?}
    B -- No --> C[return null]
    B -- Yes --> D[Render outer div]
    D --> E{search prop present?}
    E -- Yes --> F[Render SearchSection\nleft-aligned + flex-1]
    E -- No --> G[No SearchSection]
    F --> H[Filter/Sort cluster\nwith ml-auto → pushed right]
    G --> I[Filter/Sort cluster\nno ml-auto → stays left]
    H --> J[aside + filterTags + Filter + Sort buttons]
    I --> J
Loading

Reviews (1): Last reviewed commit: "fix(resource): left-align table filter/s..." | Re-trigger Greptile

@TheodoreSpeaks TheodoreSpeaks merged commit badfbc3 into staging Jun 18, 2026
16 checks passed
@TheodoreSpeaks TheodoreSpeaks deleted the fix/table-filter-row branch June 18, 2026 02:26
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.

1 participant