feat: support filtering app store composes - #13432
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a UI + API option to hide App Store–generated Docker Compose entries on the Compose page, addressing the request in #13425 to make it easier to find manually created composes when many exist.
Changes:
- Adds an “include/exclude App Store” toggle to the Compose list toolbar and persists the user preference in
localStorage. - Extends the search request model (
excludeAppStore) from frontend through to the agent API. - Implements server-side filtering of compose records when
excludeAppStoreis enabled.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| frontend/src/views/container/compose/index.vue | Adds toolbar toggle, stores preference, and sends excludeAppStore in compose searches. |
| frontend/src/api/interface/index.ts | Extends SearchWithPage to optionally include excludeAppStore. |
| agent/app/service/container_compose.go | Filters compose records to exclude App Store entries when requested. |
| agent/app/dto/common_req.go | Adds ExcludeAppStore to compose paging request DTO. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
567
to
569
| const searchName = ref(''); | ||
| const includeAppStore = ref(true); | ||
| const showType = ref('compose'); |
Comment on lines
+21
to
+23
| <el-tooltip | ||
| :content="includeAppStore ? $t('container.includeAppstore') : $t('container.excludeAppstore')" | ||
| > |
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.
Suppressed comments (2)
frontend/src/views/container/compose/index.vue:23
- Tooltip text reuses container-specific i18n keys (
container.includeAppstore/container.excludeAppstore), which translate to “Show/Hide App Store containers”. On the Compose page this becomes incorrect/misleading (it should refer to compositions). Consider adding compose-specific i18n keys (and translations) and using them here.
<el-tooltip
:content="includeAppStore ? $t('container.includeAppstore') : $t('container.excludeAppstore')"
>
agent/app/service/container_compose.go:165
- Filtering out app-store composes by repeatedly deleting from the slice (
append(records[:i], records[i+1:]...)) is O(n²) in the worst case due to repeated element shifting. This can be done in a single pass with an in-place filter to reduce allocations and improve readability.
if req.ExcludeAppStore {
length, count := len(records), 0
for count < length {
if records[count].CreatedBy == "Apps" {
records = append(records[:count], records[(count+1):]...)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #13425