Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ui/src/components/view/SearchFilter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
v-for="filter in this.searchFilters"
:key="filter.key + filter.value"
>
<a-col v-if="!['page', 'pagesize', 'q', 'keyword', 'tags'].includes(filter.key)">
<a-col v-if="!['page', 'pagesize', 'q', 'keyword', 'tags', 'projectid'].includes(filter.key)">
<a-tag
v-if="!filter.isTag"
closable
Expand Down Expand Up @@ -175,6 +175,7 @@ export default {
immediate: true,
handler (newFilters) {
const clonedFilters = newFilters.map(filter => ({ ...filter }))
this.searchFilters = clonedFilters.map(f => ({ ...f }))
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

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

This assignment appears redundant as clonedFilters is already a cloned array from line 177. The extra cloning via map(f => ({ ...f })) could be simplified to just this.searchFilters = clonedFilters or this.searchFilters = [...clonedFilters] if a new array reference is needed. This would improve code clarity and reduce unnecessary object creation.

Suggested change
this.searchFilters = clonedFilters.map(f => ({ ...f }))
this.searchFilters = clonedFilters

Copilot uses AI. Check for mistakes.
const promises = []
for (let idx = 0; idx < clonedFilters.length; idx++) {
const filter = clonedFilters[idx]
Expand Down
13 changes: 10 additions & 3 deletions ui/src/views/AutogenView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@

<template>
<div>
<a-affix :offsetTop="this.$store.getters.shutdownTriggered ? 103 : 78">
<a-affix
:key="'affix-' + showSearchFilters"
:offsetTop="this.$store.getters.shutdownTriggered ? 103 : 78"
>
<a-card class="breadcrumb-card" style="z-index: 10">
<a-row>
<a-col :span="device === 'mobile' ? 24 : 12" style="padding-left: 12px; margin-top: 10px">
Expand Down Expand Up @@ -107,8 +110,8 @@
</a-col>
</a-row>
<a-row
v-if="!dataView && $config.showSearchFilters"
style="min-height: 36px; padding-top: 12px;"
v-if="showSearchFilters"
style="min-height: 36px; padding-top: 12px; padding-left: 12px;"
>
<search-filter
:filters="getActiveFilters()"
Expand Down Expand Up @@ -687,6 +690,10 @@ export default {
}
},
computed: {
showSearchFilters () {
const excludedKeys = ['page', 'pagesize', 'q', 'keyword', 'tags', 'projectid']
return !this.dataView && this.$config.showSearchFilters && this.getActiveFilters().some(f => !excludedKeys.includes(f.key))
},
hasSelected () {
return this.selectedRowKeys.length > 0
},
Expand Down
Loading