Skip to content

Commit 71794bb

Browse files
committed
fix(resources): fix filter/sort correctness issues from audit
1 parent c8672f7 commit 71794bb

4 files changed

Lines changed: 4 additions & 7 deletions

File tree

apps/sim/app/workspace/[workspaceId]/files/files.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ const COLUMNS: ResourceColumn[] = [
9494
{ id: 'type', header: 'Type' },
9595
{ id: 'created', header: 'Created' },
9696
{ id: 'owner', header: 'Owner' },
97-
{ id: 'updated', header: 'Last Updated' },
9897
]
9998

10099
const MIME_TYPE_LABELS: Record<string, string> = {
@@ -255,7 +254,6 @@ export function Files() {
255254
cmp = formatFileType(a.type, a.name).localeCompare(formatFileType(b.type, b.name))
256255
break
257256
case 'created':
258-
case 'updated':
259257
cmp = new Date(a.uploadedAt).getTime() - new Date(b.uploadedAt).getTime()
260258
break
261259
}
@@ -297,7 +295,6 @@ export function Files() {
297295
},
298296
created: timeCell(file.uploadedAt),
299297
owner: ownerCell(file.uploadedBy, members),
300-
updated: timeCell(file.uploadedAt),
301298
},
302299
}
303300
nextCache.set(file.id, { row, file, members })

apps/sim/app/workspace/[workspaceId]/knowledge/[id]/base.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,7 @@ export function KnowledgeBase({
923923
.map((f) => ({
924924
label: `${f.tagName}: ${f.value}`,
925925
onRemove: () => {
926-
const updated = tagFilterEntries.filter((_, idx) => idx !== tagFilterEntries.indexOf(f))
926+
const updated = tagFilterEntries.filter((e) => e.id !== f.id)
927927
setTagFilterEntries(updated)
928928
setCurrentPage(1)
929929
setSelectedDocuments(new Set())

apps/sim/app/workspace/[workspaceId]/scheduled-tasks/scheduled-tasks.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export function ScheduledTasks() {
127127
})
128128
}
129129

130-
if (healthFilter.length > 0 && healthFilter.includes('has-failures')) {
130+
if (healthFilter.includes('has-failures')) {
131131
result = result.filter((item) => (item.failedCount ?? 0) > 0)
132132
}
133133

apps/sim/app/workspace/[workspaceId]/tables/tables.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ export function Tables() {
199199
const labels: Record<string, string> = {
200200
empty: 'Empty',
201201
small: 'Small (1–100)',
202-
large: 'Large (100+)',
202+
large: 'Large (101+)',
203203
}
204204
return labels[rowCountFilter[0]] ?? rowCountFilter[0]
205205
}
@@ -244,7 +244,7 @@ export function Tables() {
244244
options={[
245245
{ value: 'empty', label: 'Empty' },
246246
{ value: 'small', label: 'Small (1–100 rows)' },
247-
{ value: 'large', label: 'Large (100+ rows)' },
247+
{ value: 'large', label: 'Large (101+ rows)' },
248248
]}
249249
multiSelect
250250
multiSelectValues={rowCountFilter}

0 commit comments

Comments
 (0)