fix: exclude app_theme resources from workspace tab

Theme resources (app_theme) were showing on the workspace tab alongside
regular resources. Now they are excluded from the workspace tab
(like cache and state) and the theme tab loads only app_theme resources.

Also includes review fixes:
- Remove bidirectional $effect sync in RawAppSidebar
- Avoid spreading new files object on every keystroke in FilesetEditor
- Simplify ?? undefined no-op
- Add backend validation for is_fileset + format_extension conflict
- Fix fileset alert title

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Ruben Fiszel
2026-02-23 22:49:24 +00:00
parent 7bb1d5e9cf
commit 8d9da0fa76

View File

@@ -80,6 +80,7 @@
let cacheResources: ResourceW[] | undefined = $state()
let stateResources: ResourceW[] | undefined = $state()
let themeResources: ResourceW[] | undefined = $state()
let resources: ResourceW[] | undefined = $state()
let resourceTypes: ResourceTypeW[] | undefined = $state()
@@ -149,7 +150,7 @@
let filters = useUrlSyncedFilterInstance(untrack(() => resourcesFilterSchema))
async function loadResources(): Promise<void> {
resources = await loadResourceInternal(undefined, 'cache,state')
resources = await loadResourceInternal(undefined, 'cache,state,app_theme')
loading.resources = false
}
@@ -163,6 +164,11 @@
loading.resources = false
}
async function loadTheme(): Promise<void> {
themeResources = await loadResourceInternal('app_theme', undefined)
loading.resources = false
}
async function loadResourceInternal(
resourceType: string | undefined,
resourceTypeExclude: string | undefined
@@ -490,7 +496,13 @@
// Current resources based on tab
let currentResources = $derived(
tab == 'cache' ? cacheResources : tab == 'states' ? stateResources : resources
tab == 'cache'
? cacheResources
: tab == 'states'
? stateResources
: tab == 'theme'
? themeResources
: resources
)
// Filter resources client-side for user folder filtering (admin feature)
@@ -512,8 +524,10 @@
filters.val
if ($workspaceStore) {
untrack(() => {
if (tab === 'workspace' || tab === 'theme') {
if (tab === 'workspace') {
loadResources()
} else if (tab === 'theme') {
loadTheme()
} else if (tab === 'cache') {
loadCache()
} else if (tab === 'states') {