Skip to content

Commit afde587

Browse files
lucharoclaude
andcommitted
Address PR feedback: filter invalid sort columns and remove artifacts
- Filter to valid columns instead of rejecting entire sort (fixes UI inconsistency) - Delete .claude/settings.local.json (not meant to be committed) - Delete P_empty test artifacts 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 573f6a6 commit afde587

File tree

8 files changed

+8
-11
lines changed

8 files changed

+8
-11
lines changed

.claude/settings.local.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

P_empty

Whitespace-only changes.

marimo/_plugins/ui/_impl/dataframes/dataframe.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -311,10 +311,10 @@ def _apply_filters_query_sort(
311311
result = result.search(query)
312312

313313
if sort:
314-
# Check that all columns exist
315314
existing_columns = set(result.get_column_names())
316-
if all(s.by in existing_columns for s in sort):
317-
result = result.sort_values(sort)
315+
valid_sort = [s for s in sort if s.by in existing_columns]
316+
if valid_sort:
317+
result = result.sort_values(valid_sort)
318318

319319
return result
320320

marimo/_plugins/ui/_impl/table.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,10 +1180,10 @@ def _apply_filters_query_sort(
11801180
result = result.search(query)
11811181

11821182
if sort:
1183-
# Check that all columns exist
11841183
existing_columns = set(result.get_column_names())
1185-
if all(s.by in existing_columns for s in sort):
1186-
result = result.sort_values(sort)
1184+
valid_sort = [s for s in sort if s.by in existing_columns]
1185+
if valid_sort:
1186+
result = result.sort_values(valid_sort)
11871187

11881188
return result
11891189

test/P_empty.json

Whitespace-only changes.

test/P_empty.pickle

Whitespace-only changes.

tests/_convert/snapshots/basic_marimo_example.py.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import marimo
22

3-
__generated_with = "0.0.0"
3+
__generated_with = "0.15.2"
44
app = marimo.App(width="medium")
55

66

tests/_utils/snapshots/complex_project_tree_from_raw.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@
322322
},
323323
{
324324
"name": "h11",
325-
"version": "0.16.0",
325+
"version": "0.0.0",
326326
"tags": [],
327327
"dependencies": []
328328
}

0 commit comments

Comments
 (0)