Modern Docker Management, Designed for Everyone
Go composecontainer-managementcontainersdockerdocker-composedocker-managementgoself-hostedsveltekittypescriptweb-ui
refactor: consolidate frontend types and utils
Kyle Mendell0d579faebcf2
diff --git a/frontend/src/hooks.client.ts b/frontend/src/hooks.client.tsindex fd0ec0471..9e7c2994b 100644--- a/frontend/src/hooks.client.ts+++ b/frontend/src/hooks.client.ts@@ -1,5 +1,5 @@import type { HandleClientError } from '@sveltejs/kit';-import { extractApiErrorMessage } from '$lib/utils/api.util';+import { extractApiErrorMessage } from '$lib/utils/api';export const handleError: HandleClientError = async ({ error, message, status }) => {if (error && typeof error === 'object' && 'response' in error) {diff --git a/frontend/src/lib/components/accent-color/accent-color-picker.svelte b/frontend/src/lib/components/accent-color/accent-color-picker.svelteindex 5d3fbd96c..608367726 100644--- a/frontend/src/lib/components/accent-color/accent-color-picker.svelte+++ b/frontend/src/lib/components/accent-color/accent-color-picker.svelte@@ -1,7 +1,7 @@<script lang="ts">import { Label } from '$lib/components/ui/label/index.js';import * as RadioGroup from '$lib/components/ui/radio-group/index.js';- import { applyAccentColor } from '$lib/utils/accent-color-util';+ import { applyAccentColor } from '$lib/utils/theme';import CustomColorDialog from './custom-color.svelte';import { CheckIcon, AddIcon } from '$lib/icons';diff --git a/frontend/src/lib/components/accent-color/custom-color.svelte b/frontend/src/lib/components/accent-color/custom-color.svelteindex 925517261..d3066fa3b 100644--- a/frontend/src/lib/components/accent-color/custom-color.svelte+++ b/frontend/src/lib/components/accent-color/custom-color.svelte@@ -4,7 +4,7 @@import { Input } from '$lib/components/ui/input';import { Label } from '$lib/components/ui/label/index.js';import { m } from '$lib/paraglide/messages';- import { preventDefault } from '$lib/utils/form.utils';+ import { preventDefault } from '$lib/utils/settings';let {open = $bindable(false),diff --git a/frontend/src/lib/components/action-buttons.svelte b/frontend/src/lib/components/action-buttons.svelteindex 027ab873b..dd79913f6 100644--- a/frontend/src/lib/components/action-buttons.svelte+++ b/frontend/src/lib/components/action-buttons.svelte@@ -3,8 +3,8 @@import { openConfirmDialog } from './confirm-dialog';import { goto, invalidateAll } from '$app/navigation';import { toast } from 'svelte-sonner';- import { tryCatch } from '$lib/utils/try-catch';- import { handleApiResultWithCallbacks } from '$lib/utils/api.util';+ import { tryCatch } from '$lib/utils/api';+ import { handleApiResultWithCallbacks } from '$lib/utils/api';import { ArcaneButton } from '$lib/components/arcane-button/index.js';import DeploySplitButton from '$lib/components/deploy-split-button/deploy-split-button.svelte';import ProgressPopover from '$lib/components/progress-popover.svelte';@@ -14,12 +14,12 @@import { deployOptionsStore } from '$lib/stores/deploy-options.store.svelte';import { containerService, type ContainerDetailsResponse } from '$lib/services/container-service';import { projectService, type DeployProjectOptions } from '$lib/services/project-service';- import type { Project } from '$lib/types/project.type';- import { isDownloadingLine, calculateOverallProgress, areAllLayersComplete } from '$lib/utils/pull-progress';- import { sanitizeLogText } from '$lib/utils/log-text';+ import type { Project } from '$lib/types/swarm';+ import { isDownloadingLine, calculateOverallProgress, areAllLayersComplete } from '$lib/utils/docker';+ import { sanitizeLogText } from '$lib/utils/formatting';import { EllipsisIcon, DownloadIcon, HammerIcon } from '$lib/icons';import { createMutation } from '@tanstack/svelte-query';- import { hasPermission } from '$lib/utils/permissions.util';+ import { hasPermission } from '$lib/utils/auth';import { environmentStore } from '$lib/stores/environment.store.svelte';type TargetType = 'container' | 'project';diff --git a/frontend/src/lib/components/application-theme/application-theme-picker.svelte b/frontend/src/lib/components/application-theme/application-theme-picker.svelteindex 0be92e830..0042c442d 100644--- a/frontend/src/lib/components/application-theme/application-theme-picker.svelte+++ b/frontend/src/lib/components/application-theme/application-theme-picker.svelte@@ -5,9 +5,9 @@import * as RadioGroup from '$lib/components/ui/radio-group/index.js';import { mode } from 'mode-watcher';import { m } from '$lib/paraglide/messages';- import { APPLICATION_THEME_OPTIONS, applyApplicationTheme, resolveApplicationTheme } from '$lib/utils/application-theme-util';+ import { APPLICATION_THEME_OPTIONS, applyApplicationTheme, resolveApplicationTheme } from '$lib/utils/theme';import type { CarouselAPI } from '$lib/components/ui/carousel/context.js';- import type { ApplicationTheme } from '$lib/types/settings.type';+ import type { ApplicationTheme } from '$lib/types/settings';let {selectedTheme = $bindable(),diff --git a/frontend/src/lib/components/arcane-table/arcane-table-pagination.svelte b/frontend/src/lib/components/arcane-table/arcane-table-pagination.svelteindex 0a21829ee..ce4898971 100644--- a/frontend/src/lib/components/arcane-table/arcane-table-pagination.svelte+++ b/frontend/src/lib/components/arcane-table/arcane-table-pagination.svelte@@ -5,7 +5,7 @@import { m } from '$lib/paraglide/messages';import { ArrowRightIcon, ArrowLeftIcon, DoubleArrowRightIcon, DoubleArrowLeftIcon } from '$lib/icons';import { TABLE_PAGE_SIZE_ALL, TABLE_PAGE_SIZE_OPTIONS } from '$lib/constants/table-pagination';- import type { Paginated } from '$lib/types/pagination.type';+ import type { Paginated } from '$lib/types/shared';let {items,diff --git a/frontend/src/lib/components/arcane-table/arcane-table-toolbar.svelte b/frontend/src/lib/components/arcane-table/arcane-table-toolbar.svelteindex 730ff351a..f997a5341 100644--- a/frontend/src/lib/components/arcane-table/arcane-table-toolbar.svelte+++ b/frontend/src/lib/components/arcane-table/arcane-table-toolbar.svelte@@ -9,7 +9,7 @@vulnerabilitySeverityFilters,projectStatusFilters} from './data.js';- import { debounced } from '$lib/utils/utils.js';+ import { debounced } from '$lib/utils/ws';import { ArcaneButton } from '$lib/components/arcane-button';import { m } from '$lib/paraglide/messages';import type { Snippet } from 'svelte';diff --git a/frontend/src/lib/components/arcane-table/arcane-table.svelte b/frontend/src/lib/components/arcane-table/arcane-table.svelteindex 039f936dd..ad57bc327 100644--- a/frontend/src/lib/components/arcane-table/arcane-table.svelte+++ b/frontend/src/lib/components/arcane-table/arcane-table.svelte@@ -13,7 +13,7 @@import DataTableToolbar from './arcane-table-toolbar.svelte';import { renderComponent, renderSnippet } from '$lib/components/ui/data-table/render-helpers.js';import { onMount, untrack } from 'svelte';- import type { Paginated, SearchPaginationSortRequest } from '$lib/types/pagination.type';+ import type { Paginated, SearchPaginationSortRequest } from '$lib/types/shared';import type { Snippet } from 'svelte';import type { ColumnSpec } from './arcane-table.types.svelte';import TableCheckbox from './arcane-table-checkbox.svelte';diff --git a/frontend/src/lib/components/arcane-table/arcane-table.utils.ts b/frontend/src/lib/components/arcane-table/arcane-table.utils.tsindex 1a77b5264..eb26ef09b 100644--- a/frontend/src/lib/components/arcane-table/arcane-table.utils.ts+++ b/frontend/src/lib/components/arcane-table/arcane-table.utils.ts@@ -1,5 +1,5 @@import type { ColumnFiltersState } from '@tanstack/table-core';-import type { FilterMap } from '$lib/types/pagination.type';+import type { FilterMap } from '$lib/types/shared';import type { CompactTablePrefs } from './arcane-table.types.svelte';import { decodeFilters, decodeSort } from './arcane-table.types.svelte';diff --git a/frontend/src/lib/components/badges/port-badge.svelte b/frontend/src/lib/components/badges/port-badge.svelteindex 1f6c71eea..057119bca 100644--- a/frontend/src/lib/components/badges/port-badge.svelte+++ b/frontend/src/lib/components/badges/port-badge.svelte@@ -1,9 +1,9 @@<script lang="ts">- import type { ContainerPorts } from '$lib/types/container.type';+ import type { ContainerPorts } from '$lib/types/docker';import { m } from '$lib/paraglide/messages';import * as ArcaneTooltip from '$lib/components/arcane-tooltip';import settingsStore from '$lib/stores/config-store';- import { toPortHref } from '$lib/utils/url';+ import { toPortHref } from '$lib/utils/navigation';let {ports = [] as ContainerPorts[],diff --git a/frontend/src/lib/components/dialogs/create-container-dialog.svelte b/frontend/src/lib/components/dialogs/create-container-dialog.svelteindex 46ac3f555..9aba01bee 100644--- a/frontend/src/lib/components/dialogs/create-container-dialog.svelte+++ b/frontend/src/lib/components/dialogs/create-container-dialog.svelte@@ -8,9 +8,9 @@import { Label } from '$lib/components/ui/label/index.js';import { Input } from '$lib/components/ui/input/index.js';import { Textarea } from '$lib/components/ui/textarea/index.js';- import type { ContainerCreateRequest } from '$lib/types/container.type';+ import type { ContainerCreateRequest } from '$lib/types/docker';import { z } from 'zod/v4';- import { createForm, preventDefault } from '$lib/utils/form.utils';+ import { createForm, preventDefault } from '$lib/utils/settings';import SelectWithLabel from '../form/select-with-label.svelte';import { m } from '$lib/paraglide/messages';import {diff --git a/frontend/src/lib/components/dialogs/create-service-dialog.svelte b/frontend/src/lib/components/dialogs/create-service-dialog.svelteindex 03c5c4863..881796fe3 100644--- a/frontend/src/lib/components/dialogs/create-service-dialog.svelte+++ b/frontend/src/lib/components/dialogs/create-service-dialog.svelte@@ -4,12 +4,12 @@import { Input } from '$lib/components/ui/input/index.js';import * as Select from '$lib/components/ui/select/index.js';import { z } from 'zod/v4';- import { createForm, preventDefault } from '$lib/utils/form.utils';+ import { createForm, preventDefault } from '$lib/utils/settings';import { m } from '$lib/paraglide/messages';import { AddIcon, TrashIcon } from '$lib/icons';import * as Accordion from '$lib/components/ui/accordion/index.js';import FormInput from '$lib/components/form/form-input.svelte';- import type { SwarmServiceCreateSpec } from '$lib/types/swarm.type';+ import type { SwarmServiceCreateSpec } from '$lib/types/swarm';type CreateServiceDialogProps = {open: boolean;diff --git a/frontend/src/lib/components/dialogs/docker-info-dialog.svelte b/frontend/src/lib/components/dialogs/docker-info-dialog.svelteindex 1aab50279..d68ff5cf9 100644--- a/frontend/src/lib/components/dialogs/docker-info-dialog.svelte+++ b/frontend/src/lib/components/dialogs/docker-info-dialog.svelte@@ -4,10 +4,10 @@import { Badge } from '$lib/components/ui/badge';import { CopyButton } from '$lib/components/ui/copy-button';import { Spinner } from '$lib/components/ui/spinner';- import type { DockerInfo } from '$lib/types/docker-info.type';+ import type { DockerInfo } from '$lib/types/docker';import { m } from '$lib/paraglide/messages';- import bytes from '$lib/utils/bytes';- import { formatDateTimeShort } from '$lib/utils/locale.util';+ import { bytes } from '$lib/utils/formatting';+ import { formatDateTimeShort } from '$lib/utils/formatting';interface Props {open: boolean;diff --git a/frontend/src/lib/components/dialogs/environment-switcher-dialog.svelte b/frontend/src/lib/components/dialogs/environment-switcher-dialog.svelteindex cb8674819..a249e0e6e 100644--- a/frontend/src/lib/components/dialogs/environment-switcher-dialog.svelte+++ b/frontend/src/lib/components/dialogs/environment-switcher-dialog.svelte@@ -6,14 +6,14 @@import { environmentStore } from '$lib/stores/environment.store.svelte';import { environmentManagementService } from '$lib/services/env-mgmt-service';import { queryKeys } from '$lib/query/query-keys';- import type { Environment } from '$lib/types/environment.type';+ import type { Environment } from '$lib/types/environment';import { goto } from '$app/navigation';import { toast } from 'svelte-sonner';import { m } from '$lib/paraglide/messages';import { cn } from '$lib/utils';import settingsStore from '$lib/stores/config-store';- import { debounced } from '$lib/utils/utils';- import type { SearchPaginationSortRequest } from '$lib/types/pagination.type';+ import { debounced } from '$lib/utils/ws';+ import type { SearchPaginationSortRequest } from '$lib/types/shared';import { tick } from 'svelte';import { EnvironmentsIcon, RemoteEnvironmentIcon, AddIcon, SearchIcon, CloseIcon, SettingsIcon } from '$lib/icons';import { useQueryClient } from '@tanstack/svelte-query';diff --git a/frontend/src/lib/components/dialogs/event-details-dialog.svelte b/frontend/src/lib/components/dialogs/event-details-dialog.svelteindex 09fed333f..e723e36b2 100644--- a/frontend/src/lib/components/dialogs/event-details-dialog.svelte+++ b/frontend/src/lib/components/dialogs/event-details-dialog.svelte@@ -3,11 +3,11 @@import { ArcaneButton } from '$lib/components/arcane-button/index.js';import { Badge } from '$lib/components/ui/badge';import { CopyButton } from '$lib/components/ui/copy-button';- import type { Event } from '$lib/types/event.type';+ import type { Event } from '$lib/types/shared';import { m } from '$lib/paraglide/messages';import { environmentStore, LOCAL_DOCKER_ENVIRONMENT_ID } from '$lib/stores/environment.store.svelte';import { AlertIcon, InfoIcon, EnvironmentsIcon, UserIcon, ClockIcon } from '$lib/icons';- import { formatDateTime } from '$lib/utils/locale.util';+ import { formatDateTime } from '$lib/utils/formatting';type Severity = 'success' | 'warning' | 'error' | 'info';diff --git a/frontend/src/lib/components/dialogs/file-browser-dialog.svelte b/frontend/src/lib/components/dialogs/file-browser-dialog.svelteindex 8d50f084c..4c7999afe 100644--- a/frontend/src/lib/components/dialogs/file-browser-dialog.svelte+++ b/frontend/src/lib/components/dialogs/file-browser-dialog.svelte@@ -5,7 +5,7 @@import { ScrollArea } from '$lib/components/ui/scroll-area/index.js';import { gitRepositoryService } from '$lib/services/git-repository-service';import { queryKeys } from '$lib/query/query-keys';- import type { FileTreeNode } from '$lib/types/gitops.type';+ import type { FileTreeNode } from '$lib/types/automation';import { FolderOpenIcon, FileTextIcon, ArrowRightIcon } from '$lib/icons';import { m } from '$lib/paraglide/messages';import { createQuery } from '@tanstack/svelte-query';diff --git a/frontend/src/lib/components/dialogs/gitops-import-dialog.svelte b/frontend/src/lib/components/dialogs/gitops-import-dialog.svelteindex 98fd1ce8a..64625771c 100644--- a/frontend/src/lib/components/dialogs/gitops-import-dialog.svelte+++ b/frontend/src/lib/components/dialogs/gitops-import-dialog.svelte@@ -4,7 +4,7 @@import { Spinner } from '$lib/components/ui/spinner/index.js';import { Label } from '$lib/components/ui/label/index.js';import { Textarea } from '$lib/components/ui/textarea/index.js';- import type { ImportGitOpsSyncRequest } from '$lib/types/gitops.type';+ import type { ImportGitOpsSyncRequest } from '$lib/types/automation';import { m } from '$lib/paraglide/messages';type GitOpsImportFormProps = {diff --git a/frontend/src/lib/components/dialogs/gitops-sync-dialog.svelte b/frontend/src/lib/components/dialogs/gitops-sync-dialog.svelteindex d269576b6..623d4a295 100644--- a/frontend/src/lib/components/dialogs/gitops-sync-dialog.svelte+++ b/frontend/src/lib/components/dialogs/gitops-sync-dialog.svelte@@ -10,11 +10,11 @@import { Switch } from '$lib/components/ui/switch/index.js';import { Input } from '$lib/components/ui/input/index.js';import FileBrowserDialog from '$lib/components/dialogs/file-browser-dialog.svelte';- import type { GitOpsSync, GitOpsSyncCreateDto, GitOpsSyncUpdateDto, GitRepository, BranchInfo } from '$lib/types/gitops.type';+ import type { GitOpsSync, GitOpsSyncCreateDto, GitOpsSyncUpdateDto, GitRepository, BranchInfo } from '$lib/types/automation';import { gitRepositoryService } from '$lib/services/git-repository-service';import { settingsService } from '$lib/services/settings-service';import { z } from 'zod/v4';- import { createForm, preventDefault } from '$lib/utils/form.utils';+ import { createForm, preventDefault } from '$lib/utils/settings';import { queryKeys } from '$lib/query/query-keys';import { m } from '$lib/paraglide/messages';import { ArrowRightIcon, FolderOpenIcon, InfoIcon } from '$lib/icons';diff --git a/frontend/src/lib/components/dialogs/prune-confirmation-dialog-content.svelte b/frontend/src/lib/components/dialogs/prune-confirmation-dialog-content.svelteindex 36a3ea754..287be51ca 100644--- a/frontend/src/lib/components/dialogs/prune-confirmation-dialog-content.svelte+++ b/frontend/src/lib/components/dialogs/prune-confirmation-dialog-content.svelte@@ -2,8 +2,8 @@import { ArcaneButton } from '$lib/components/arcane-button/index.js';import PruneModeCard from '$lib/components/prune/prune-mode-card.svelte';import { m } from '$lib/paraglide/messages';- import type { SystemPruneRequest } from '$lib/types/prune.type';- import type { Settings } from '$lib/types/settings.type';+ import type { SystemPruneRequest } from '$lib/types/automation';+ import type { Settings } from '$lib/types/settings';interface Props {defaults?: Settings | null;diff --git a/frontend/src/lib/components/dialogs/prune-confirmation-dialog.svelte b/frontend/src/lib/components/dialogs/prune-confirmation-dialog.svelteindex 624582597..05e7afaf2 100644--- a/frontend/src/lib/components/dialogs/prune-confirmation-dialog.svelte+++ b/frontend/src/lib/components/dialogs/prune-confirmation-dialog.svelte@@ -2,8 +2,8 @@import PruneConfirmationDialogContent from '$lib/components/dialogs/prune-confirmation-dialog-content.svelte';import { ResponsiveDialog } from '$lib/components/ui/responsive-dialog/index.js';import { m } from '$lib/paraglide/messages';- import type { SystemPruneRequest } from '$lib/types/prune.type';- import type { Settings } from '$lib/types/settings.type';+ import type { SystemPruneRequest } from '$lib/types/automation';+ import type { Settings } from '$lib/types/settings';interface Props {open: boolean;diff --git a/frontend/src/lib/components/dialogs/rbac-migration-banner.svelte b/frontend/src/lib/components/dialogs/rbac-migration-banner.svelteindex 5e8ad4435..1e263d436 100644--- a/frontend/src/lib/components/dialogs/rbac-migration-banner.svelte+++ b/frontend/src/lib/components/dialogs/rbac-migration-banner.svelte@@ -2,10 +2,10 @@import * as Alert from '$lib/components/ui/alert';import { ArcaneButton } from '$lib/components/arcane-button/index.js';import userStore from '$lib/stores/user-store';- import { BUILT_IN_ROLE_VIEWER } from '$lib/types/role.type';+ import { BUILT_IN_ROLE_VIEWER } from '$lib/types/auth';import { CloseIcon } from '$lib/icons';import { m } from '$lib/paraglide/messages';- import type { User } from '$lib/types/user.type';+ import type { User } from '$lib/types/auth';const STORAGE_KEY = 'rbac-migration-banner-dismissed';diff --git a/frontend/src/lib/components/dialogs/template-selection-dialog.svelte b/frontend/src/lib/components/dialogs/template-selection-dialog.svelteindex 0848f43c1..45987fbcd 100644--- a/frontend/src/lib/components/dialogs/template-selection-dialog.svelte+++ b/frontend/src/lib/components/dialogs/template-selection-dialog.svelte@@ -4,7 +4,7 @@import { Card } from '$lib/components/ui/card/index.js';import { Badge } from '$lib/components/ui/badge/index.js';import { ScrollArea } from '$lib/components/ui/scroll-area/index.js';- import type { Template } from '$lib/types/template.type';+ import type { Template } from '$lib/types/swarm';import { Label } from '$lib/components/ui/label/index.js';import * as Select from '$lib/components/ui/select/index.js';import * as Collapsible from '$lib/components/ui/collapsible/index.js';diff --git a/frontend/src/lib/components/dialogs/update-center-dialog.svelte b/frontend/src/lib/components/dialogs/update-center-dialog.svelteindex 3298f3240..776c74b64 100644--- a/frontend/src/lib/components/dialogs/update-center-dialog.svelte+++ b/frontend/src/lib/components/dialogs/update-center-dialog.svelte@@ -9,7 +9,7 @@import systemUpgradeService from '$lib/services/api/system-upgrade-service';import { cn } from '$lib/utils';import { ExternalLinkIcon, SuccessIcon } from '$lib/icons';- import type { AppVersionInformation } from '$lib/types/application-configuration';+ import type { AppVersionInformation } from '$lib/types/settings';import { createQuery, useQueryClient } from '@tanstack/svelte-query';import { marked } from 'marked';import DOMPurify from 'isomorphic-dompurify';diff --git a/frontend/src/lib/components/dialogs/version-info-dialog.svelte b/frontend/src/lib/components/dialogs/version-info-dialog.svelteindex 93b8c678b..ee032173d 100644--- a/frontend/src/lib/components/dialogs/version-info-dialog.svelte+++ b/frontend/src/lib/components/dialogs/version-info-dialog.svelte@@ -1,11 +1,11 @@<script lang="ts">import { ResponsiveDialog } from '$lib/components/ui/responsive-dialog/index.js';import { ArcaneButton } from '$lib/components/arcane-button/index.js';- import type { AppVersionInformation } from '$lib/types/application-configuration';+ import type { AppVersionInformation } from '$lib/types/settings';import { m } from '$lib/paraglide/messages';import { CopyButton } from '$lib/components/ui/copy-button';- import { getApplicationLogo } from '$lib/utils/image.util';- import { accentColorPreviewStore } from '$lib/utils/accent-color-util';+ import { getApplicationLogo } from '$lib/utils/docker';+ import { accentColorPreviewStore } from '$lib/utils/theme';import { ExternalLinkIcon, GithubIcon, BookOpenIcon } from '$lib/icons';interface Props {diff --git a/frontend/src/lib/components/file-browser/FileList.svelte b/frontend/src/lib/components/file-browser/FileList.svelteindex 6e780856f..608ea4201 100644--- a/frontend/src/lib/components/file-browser/FileList.svelte+++ b/frontend/src/lib/components/file-browser/FileList.svelte@@ -1,5 +1,5 @@<script lang="ts">- import type { FileEntry } from '$lib/types/file-browser.type';+ import type { FileEntry } from '$lib/types/shared';import {FolderOpenIcon,FileTextIcon,@@ -14,13 +14,13 @@import { toast } from 'svelte-sonner';import * as m from '$lib/paraglide/messages.js';import ArcaneTable from '$lib/components/arcane-table/arcane-table.svelte';- import type { Paginated, SearchPaginationSortRequest } from '$lib/types/pagination.type';+ import type { Paginated, SearchPaginationSortRequest } from '$lib/types/shared';import { UniversalMobileCard, type ColumnSpec, type MobileFieldVisibility } from '$lib/components/arcane-table';import * as DropdownMenu from '$lib/components/ui/dropdown-menu';import * as Tooltip from '$lib/components/ui/tooltip';import { openConfirmDialog } from '$lib/components/confirm-dialog';import { ArcaneButton } from '$lib/components/arcane-button';- import bytes from '$lib/utils/bytes';+ import { bytes } from '$lib/utils/formatting';import { format } from 'date-fns';let {diff --git a/frontend/src/lib/components/file-browser/FilePreview.svelte b/frontend/src/lib/components/file-browser/FilePreview.svelteindex 8b7af4c78..fd4fae37d 100644--- a/frontend/src/lib/components/file-browser/FilePreview.svelte+++ b/frontend/src/lib/components/file-browser/FilePreview.svelte@@ -1,5 +1,5 @@<script lang="ts">- import type { FileEntry } from '$lib/types/file-browser.type';+ import type { FileEntry } from '$lib/types/shared';import { onMount } from 'svelte';import * as Sheet from '$lib/components/ui/sheet';import { LoadingSpinnerIcon } from '$lib/icons';diff --git a/frontend/src/lib/components/file-browser/GenericFileBrowser.svelte b/frontend/src/lib/components/file-browser/GenericFileBrowser.svelteindex 216cf9d96..c4f3c27ac 100644--- a/frontend/src/lib/components/file-browser/GenericFileBrowser.svelte+++ b/frontend/src/lib/components/file-browser/GenericFileBrowser.svelte@@ -1,5 +1,5 @@<script lang="ts" module>- import type { BackupEntry, FileEntry } from '$lib/types/file-browser.type';+ import type { BackupEntry, FileEntry } from '$lib/types/shared';export interface FileProvider {list: (path: string) => Promise<FileEntry[]>;@@ -30,10 +30,10 @@import * as Alert from '$lib/components/ui/alert';import { Label } from '$lib/components/ui/label';import { toast } from 'svelte-sonner';- import bytes from '$lib/utils/bytes';+ import { bytes } from '$lib/utils/formatting';import { format } from 'date-fns';import { environmentStore } from '$lib/stores/environment.store.svelte';- import { hasPermission } from '$lib/utils/permissions.util';+ import { hasPermission } from '$lib/utils/auth';import IfPermitted from '$lib/components/if-permitted.svelte';let { provider, rootLabel, persistKey }: { provider: FileProvider; rootLabel?: string; persistKey?: string } = $props();diff --git a/frontend/src/lib/components/form/form-input.svelte b/frontend/src/lib/components/form/form-input.svelteindex c39782205..3d66ad258 100644--- a/frontend/src/lib/components/form/form-input.svelte+++ b/frontend/src/lib/components/form/form-input.svelte@@ -7,7 +7,7 @@import { Label } from '$lib/components/ui/label';import type { Snippet } from 'svelte';import type { HTMLAttributes } from 'svelte/elements';- import type { FormInput } from '$lib/utils/form.utils';+ import type { FormInput } from '$lib/utils/settings';let {input = $bindable(),diff --git a/frontend/src/lib/components/form/mobile-floating-form-actions.svelte b/frontend/src/lib/components/form/mobile-floating-form-actions.svelteindex a5d039be7..ed1cf2ba7 100644--- a/frontend/src/lib/components/form/mobile-floating-form-actions.svelte+++ b/frontend/src/lib/components/form/mobile-floating-form-actions.svelte@@ -1,6 +1,6 @@<script lang="ts">import { ArcaneButton } from '$lib/components/arcane-button/index.js';- import { getEffectiveNavigationSettings } from '$lib/utils/navigation.utils';+ import { getEffectiveNavigationSettings } from '$lib/utils/navigation';import { IsMobile } from '$lib/hooks/is-mobile.svelte.js';import { IsTablet } from '$lib/hooks/is-tablet.svelte.js';import { cn } from '$lib/utils';diff --git a/frontend/src/lib/components/forms/role-assignments-editor.svelte b/frontend/src/lib/components/forms/role-assignments-editor.svelteindex f2855c404..a0a63b368 100644--- a/frontend/src/lib/components/forms/role-assignments-editor.svelte+++ b/frontend/src/lib/components/forms/role-assignments-editor.svelte@@ -8,8 +8,8 @@BUILT_IN_ROLE_EDITOR,BUILT_IN_ROLE_DEPLOYER,BUILT_IN_ROLE_VIEWER- } from '$lib/types/role.type';- import type { Environment } from '$lib/types/environment.type';+ } from '$lib/types/auth';+ import type { Environment } from '$lib/types/environment';import { CloseIcon } from '$lib/icons';import { m } from '$lib/paraglide/messages';diff --git a/frontend/src/lib/components/if-permitted.svelte b/frontend/src/lib/components/if-permitted.svelteindex 5b1e7316c..c8851405b 100644--- a/frontend/src/lib/components/if-permitted.svelte+++ b/frontend/src/lib/components/if-permitted.svelte@@ -7,12 +7,12 @@guard reactive to environment switches: when the user picks a different env,this component re-evaluates and shows/hides its children without a remount.- Permission logic lives in `$lib/utils/permissions.util` — this component is+ Permission logic lives in `$lib/utils/auth` — this component isa thin presentational wrapper around `hasPermission`, `hasAnyPermission`,and `isGlobalAdmin`.--><script lang="ts">- import { hasPermission, hasAnyPermission, isGlobalAdmin } from '$lib/utils/permissions.util';+ import { hasPermission, hasAnyPermission, isGlobalAdmin } from '$lib/utils/auth';import { environmentStore } from '$lib/stores/environment.store.svelte';import type { Snippet } from 'svelte';diff --git a/frontend/src/lib/components/image-update-item.svelte b/frontend/src/lib/components/image-update-item.svelteindex 9b032a8ba..b0dd21404 100644--- a/frontend/src/lib/components/image-update-item.svelte+++ b/frontend/src/lib/components/image-update-item.svelte@@ -1,7 +1,7 @@<script lang="ts">import { Spinner } from '$lib/components/ui/spinner/index.js';import { toast } from 'svelte-sonner';- import type { ImageUpdateData } from '$lib/types/image.type';+ import type { ImageUpdateData } from '$lib/types/docker';import { m } from '$lib/paraglide/messages';import { imageService } from '$lib/services/image-service';import { queryKeys } from '$lib/query/query-keys';diff --git a/frontend/src/lib/components/job-card/job-card.svelte b/frontend/src/lib/components/job-card/job-card.svelteindex 6ee1e8a40..259930e50 100644--- a/frontend/src/lib/components/job-card/job-card.svelte+++ b/frontend/src/lib/components/job-card/job-card.svelte@@ -7,9 +7,9 @@import { Spinner } from '$lib/components/ui/spinner';import { jobScheduleService } from '$lib/services/job-schedule-service';import { formatDistanceToNow } from 'date-fns';- import { formatDateTimeShort } from '$lib/utils/locale.util';+ import { formatDateTimeShort } from '$lib/utils/formatting';import type { Snippet } from 'svelte';- import type { JobStatus } from '$lib/types/job-schedule.type';+ import type { JobStatus } from '$lib/types/settings';import JobScheduleDialog from './job-schedule-dialog.svelte';import { createMutation } from '@tanstack/svelte-query';diff --git a/frontend/src/lib/components/job-card/job-schedule-dialog.svelte b/frontend/src/lib/components/job-card/job-schedule-dialog.svelteindex 0d0edd5c7..d492c0168 100644--- a/frontend/src/lib/components/job-card/job-schedule-dialog.svelte+++ b/frontend/src/lib/components/job-card/job-schedule-dialog.svelte@@ -6,7 +6,7 @@import { Label } from '$lib/components/ui/label';import { Input } from '$lib/components/ui/input';import { jobScheduleService } from '$lib/services/job-schedule-service';- import type { JobStatus } from '$lib/types/job-schedule.type';+ import type { JobStatus } from '$lib/types/settings';import { createMutation } from '@tanstack/svelte-query';let {diff --git a/frontend/src/lib/components/locale-picker.svelte b/frontend/src/lib/components/locale-picker.svelteindex f071f804d..8854e316f 100644--- a/frontend/src/lib/components/locale-picker.svelte+++ b/frontend/src/lib/components/locale-picker.svelte@@ -3,7 +3,7 @@import { getLocale, type Locale } from '$lib/paraglide/runtime';import { m } from '$lib/paraglide/messages';import userStore from '$lib/stores/user-store';- import { setLocale } from '$lib/utils/locale.util';+ import { setLocale } from '$lib/utils/formatting';import { Label } from '$lib/components/ui/label/index.js';import { queryKeys } from '$lib/query/query-keys';import { userService } from '$lib/services/user-service';diff --git a/frontend/src/lib/components/logs/log-viewer.svelte b/frontend/src/lib/components/logs/log-viewer.svelteindex 4ab370b19..f1d463ac8 100644--- a/frontend/src/lib/components/logs/log-viewer.svelte+++ b/frontend/src/lib/components/logs/log-viewer.svelte@@ -8,7 +8,7 @@import { m } from '$lib/paraglide/messages';import { ReconnectingWebSocket } from '$lib/utils/ws';import { cn } from '$lib/utils';- import { ansiToHtml } from '$lib/utils/ansi';+ import { ansiToHtml } from '$lib/utils/formatting';import { onDestroy } from 'svelte';import {buildLogDisplayEntries,diff --git a/frontend/src/lib/components/logs/log-viewer.utils.ts b/frontend/src/lib/components/logs/log-viewer.utils.tsindex 5ef7c47ce..c0302f5bd 100644--- a/frontend/src/lib/components/logs/log-viewer.utils.ts+++ b/frontend/src/lib/components/logs/log-viewer.utils.ts@@ -1,4 +1,4 @@-import { sanitizeLogText } from '$lib/utils/log-text';+import { sanitizeLogText } from '$lib/utils/formatting';export interface LogViewerEntry {id: number;diff --git a/frontend/src/lib/components/mobile-nav/mobile-nav-sheet.svelte b/frontend/src/lib/components/mobile-nav/mobile-nav-sheet.svelteindex e796da417..9b4f6f6b9 100644--- a/frontend/src/lib/components/mobile-nav/mobile-nav-sheet.svelte+++ b/frontend/src/lib/components/mobile-nav/mobile-nav-sheet.svelte@@ -12,9 +12,9 @@import systemUpgradeService from '$lib/services/api/system-upgrade-service';import UpdateCenterDialog from '$lib/components/dialogs/update-center-dialog.svelte';import { toast } from 'svelte-sonner';- import { extractApiErrorMessage } from '$lib/utils/api.util';- import { hasPermission } from '$lib/utils/permissions.util';- import type { AppVersionInformation } from '$lib/types/application-configuration';+ import { extractApiErrorMessage } from '$lib/utils/api';+ import { hasPermission } from '$lib/utils/auth';+ import type { AppVersionInformation } from '$lib/types/settings';import { createMutation, createQuery } from '@tanstack/svelte-query';let {diff --git a/frontend/src/lib/components/mobile-nav/mobile-nav.svelte b/frontend/src/lib/components/mobile-nav/mobile-nav.svelteindex 5c2f18e9f..218f24470 100644--- a/frontend/src/lib/components/mobile-nav/mobile-nav.svelte+++ b/frontend/src/lib/components/mobile-nav/mobile-nav.svelte@@ -9,7 +9,7 @@import { m } from '$lib/paraglide/messages';import { MobileNavGestures } from './gestures.svelte';import './styles.css';- import type { AppVersionInformation } from '$lib/types/application-configuration';+ import type { AppVersionInformation } from '$lib/types/settings';let {navigationSettings,diff --git a/frontend/src/lib/components/mobile-nav/mobile-user-card.svelte b/frontend/src/lib/components/mobile-nav/mobile-user-card.svelteindex 6af1473fe..311103e08 100644--- a/frontend/src/lib/components/mobile-nav/mobile-user-card.svelte+++ b/frontend/src/lib/components/mobile-nav/mobile-user-card.svelte@@ -3,7 +3,7 @@import { environmentStore } from '$lib/stores/environment.store.svelte';import { mode, toggleMode } from 'mode-watcher';import { m } from '$lib/paraglide/messages';- import type { User } from '$lib/types/user.type';+ import type { User } from '$lib/types/auth';import LocalePicker from '$lib/components/locale-picker.svelte';import EnvironmentSwitcherDialog from '$lib/components/dialogs/environment-switcher-dialog.svelte';import settingsStore from '$lib/stores/config-store';diff --git a/frontend/src/lib/components/network-diagram/network-diagram.svelte b/frontend/src/lib/components/network-diagram/network-diagram.svelteindex 15c4e0eb2..e7d765bb1 100644--- a/frontend/src/lib/components/network-diagram/network-diagram.svelte+++ b/frontend/src/lib/components/network-diagram/network-diagram.svelte@@ -6,7 +6,7 @@import * as DropdownMenu from '$lib/components/ui/dropdown-menu';import { EyeOnIcon } from '$lib/icons';import { m } from '$lib/paraglide/messages';- import type { NetworkTopologyDto, TopologyEdgeDto, TopologyNodeDto } from '$lib/types/network.type';+ import type { NetworkTopologyDto, TopologyEdgeDto, TopologyNodeDto } from '$lib/types/docker';import { cn } from '$lib/utils';import { mode } from 'mode-watcher';import { PersistedState } from 'runed';diff --git a/frontend/src/lib/components/progress-popover.svelte b/frontend/src/lib/components/progress-popover.svelteindex 4ef6dc569..de1a925b1 100644--- a/frontend/src/lib/components/progress-popover.svelte+++ b/frontend/src/lib/components/progress-popover.svelte@@ -9,7 +9,7 @@import { ArcaneButton } from '$lib/components/arcane-button/index.js';import type { Snippet } from 'svelte';import { m } from '$lib/paraglide/messages';- import { sanitizeLogText } from '$lib/utils/log-text';+ import { sanitizeLogText } from '$lib/utils/formatting';import {type LayerProgress,type PullPhase,@@ -19,7 +19,7 @@isIndeterminatePhase,getAggregatePullPhase,getAggregateStatus- } from '$lib/utils/pull-progress';+ } from '$lib/utils/docker';import { DownloadIcon, BoxIcon, ArrowDownIcon, VerifiedCheckIcon, CloseIcon } from '$lib/icons';import { IsMobile } from '$lib/hooks/is-mobile.svelte.js';diff --git a/frontend/src/lib/components/project-update-item.svelte b/frontend/src/lib/components/project-update-item.svelteindex e963ea0fe..3f9b00f94 100644--- a/frontend/src/lib/components/project-update-item.svelte+++ b/frontend/src/lib/components/project-update-item.svelte@@ -1,6 +1,6 @@<script lang="ts">- import type { ProjectUpdateInfo } from '$lib/types/project.type';- import { getProjectUpdateStatus, getProjectUpdateText } from '$lib/utils/project-update.util';+ import type { ProjectUpdateInfo } from '$lib/types/swarm';+ import { getProjectUpdateStatus, getProjectUpdateText } from '$lib/utils/docker';import { m } from '$lib/paraglide/messages';import UpdateStatusPopover from '$lib/components/update-status-popover.svelte';import { Spinner } from '$lib/components/ui/spinner/index.js';diff --git a/frontend/src/lib/components/quick-actions.svelte b/frontend/src/lib/components/quick-actions.svelteindex befbc6a05..b3c27fbbd 100644--- a/frontend/src/lib/components/quick-actions.svelte+++ b/frontend/src/lib/components/quick-actions.svelte@@ -5,7 +5,7 @@import { m } from '$lib/paraglide/messages';import { StartIcon, StopIcon, TrashIcon } from '$lib/icons';import { cn } from '$lib/utils';- import { hasAnyPermission, hasPermission } from '$lib/utils/permissions.util';+ import { hasAnyPermission, hasPermission } from '$lib/utils/auth';import { environmentStore } from '$lib/stores/environment.store.svelte';type IsLoadingFlags = {diff --git a/frontend/src/lib/components/role-editor/permission-picker.svelte b/frontend/src/lib/components/role-editor/permission-picker.svelteindex 39f221d09..b38fa7654 100644--- a/frontend/src/lib/components/role-editor/permission-picker.svelte+++ b/frontend/src/lib/components/role-editor/permission-picker.svelte@@ -3,7 +3,7 @@import { Checkbox } from '$lib/components/ui/checkbox';import { Input } from '$lib/components/ui/input';import StatusBadge from '$lib/components/badges/status-badge.svelte';- import type { PermissionsManifest, PermissionResource, PermissionAction } from '$lib/types/role.type';+ import type { PermissionsManifest, PermissionResource, PermissionAction } from '$lib/types/auth';import { m } from '$lib/paraglide/messages';type Props = {diff --git a/frontend/src/lib/components/role-editor/role-editor.svelte b/frontend/src/lib/components/role-editor/role-editor.svelteindex 167dd6002..b2c744fcc 100644--- a/frontend/src/lib/components/role-editor/role-editor.svelte+++ b/frontend/src/lib/components/role-editor/role-editor.svelte@@ -4,10 +4,10 @@import FormInput from '$lib/components/form/form-input.svelte';import StatusBadge from '$lib/components/badges/status-badge.svelte';import PermissionPicker from './permission-picker.svelte';- import type { Role, PermissionsManifest } from '$lib/types/role.type';+ import type { Role, PermissionsManifest } from '$lib/types/auth';import { CopyIcon } from '$lib/icons';import { z } from 'zod/v4';- import { createForm, preventDefault } from '$lib/utils/form.utils';+ import { createForm, preventDefault } from '$lib/utils/settings';import { m } from '$lib/paraglide/messages';type Props = {diff --git a/frontend/src/lib/components/settings/trivy-security-settings.svelte b/frontend/src/lib/components/settings/trivy-security-settings.svelteindex 798750f36..99d64d56d 100644--- a/frontend/src/lib/components/settings/trivy-security-settings.svelte+++ b/frontend/src/lib/components/settings/trivy-security-settings.svelte@@ -10,7 +10,7 @@import { m } from '$lib/paraglide/messages';import { toast } from 'svelte-sonner';import { networkService } from '$lib/services/network-service';- import type { SearchPaginationSortRequest } from '$lib/types/pagination.type';+ import type { SearchPaginationSortRequest } from '$lib/types/shared';import type { Readable } from 'svelte/store';type TrivySecurityFormValues = {diff --git a/frontend/src/lib/components/sheets/add-template-registry-sheet.svelte b/frontend/src/lib/components/sheets/add-template-registry-sheet.svelteindex 68f8fbd30..c9a0fd697 100644--- a/frontend/src/lib/components/sheets/add-template-registry-sheet.svelte+++ b/frontend/src/lib/components/sheets/add-template-registry-sheet.svelte@@ -4,7 +4,7 @@import FormInput from '$lib/components/form/form-input.svelte';import SwitchWithLabel from '$lib/components/form/labeled-switch.svelte';import { z } from 'zod/v4';- import { createForm, preventDefault } from '$lib/utils/form.utils';+ import { createForm, preventDefault } from '$lib/utils/settings';import * as Alert from '$lib/components/ui/alert/index.js';import { m } from '$lib/paraglide/messages';import { templateService } from '$lib/services/template-service';diff --git a/frontend/src/lib/components/sheets/api-key-form-sheet.svelte b/frontend/src/lib/components/sheets/api-key-form-sheet.svelteindex 679930a64..91e2e4b88 100644--- a/frontend/src/lib/components/sheets/api-key-form-sheet.svelte+++ b/frontend/src/lib/components/sheets/api-key-form-sheet.svelte@@ -3,10 +3,10 @@import { ArcaneButton } from '$lib/components/arcane-button/index.js';import FormInput from '$lib/components/form/form-input.svelte';import PermissionPicker from '$lib/components/role-editor/permission-picker.svelte';- import type { ApiKey } from '$lib/types/api-key.type';- import type { PermissionsManifest, ApiKeyPermissionGrant } from '$lib/types/role.type';+ import type { ApiKey } from '$lib/types/auth';+ import type { PermissionsManifest, ApiKeyPermissionGrant } from '$lib/types/auth';import { z } from 'zod/v4';- import { createForm, preventDefault } from '$lib/utils/form.utils';+ import { createForm, preventDefault } from '$lib/utils/settings';import * as m from '$lib/paraglide/messages.js';type ApiKeyFormProps = {diff --git a/frontend/src/lib/components/sheets/container-registry-sheet.svelte b/frontend/src/lib/components/sheets/container-registry-sheet.svelteindex c25d03b7d..25c873954 100644--- a/frontend/src/lib/components/sheets/container-registry-sheet.svelte+++ b/frontend/src/lib/components/sheets/container-registry-sheet.svelte@@ -9,9 +9,9 @@ContainerRegistryCreateDto,ContainerRegistryUpdateDto,RegistryType- } from '$lib/types/container-registry.type';+ } from '$lib/types/docker';import { z } from 'zod/v4';- import { createForm, preventDefault } from '$lib/utils/form.utils';+ import { createForm, preventDefault } from '$lib/utils/settings';import { m } from '$lib/paraglide/messages';type ContainerRegistryFormProps = {diff --git a/frontend/src/lib/components/sheets/create-network-sheet.svelte b/frontend/src/lib/components/sheets/create-network-sheet.svelteindex c75d47f3d..2d044aacf 100644--- a/frontend/src/lib/components/sheets/create-network-sheet.svelte+++ b/frontend/src/lib/components/sheets/create-network-sheet.svelte@@ -6,9 +6,9 @@import { Label } from '$lib/components/ui/label/index.js';import { Input } from '$lib/components/ui/input/index.js';import { Textarea } from '$lib/components/ui/textarea/index.js';- import type { NetworkCreateOptions } from '$lib/types/network.type';+ import type { NetworkCreateOptions } from '$lib/types/docker';import { z } from 'zod/v4';- import { createForm, preventDefault } from '$lib/utils/form.utils';+ import { createForm, preventDefault } from '$lib/utils/settings';import SelectWithLabel from '../form/select-with-label.svelte';import { m } from '$lib/paraglide/messages';import { CloseIcon } from '$lib/icons';diff --git a/frontend/src/lib/components/sheets/create-volume-sheet.svelte b/frontend/src/lib/components/sheets/create-volume-sheet.svelteindex b0e43f253..46dd59c69 100644--- a/frontend/src/lib/components/sheets/create-volume-sheet.svelte+++ b/frontend/src/lib/components/sheets/create-volume-sheet.svelte@@ -3,9 +3,9 @@import { ArcaneButton } from '$lib/components/arcane-button/index.js';import FormInput from '$lib/components/form/form-input.svelte';import * as Accordion from '$lib/components/ui/accordion/index.js';- import type { VolumeCreateRequest } from '$lib/types/volume.type';+ import type { VolumeCreateRequest } from '$lib/types/docker';import { z } from 'zod/v4';- import { createForm, preventDefault } from '$lib/utils/form.utils';+ import { createForm, preventDefault } from '$lib/utils/settings';import SelectWithLabel from '../form/select-with-label.svelte';import { m } from '$lib/paraglide/messages';diff --git a/frontend/src/lib/components/sheets/git-repository-sheet.svelte b/frontend/src/lib/components/sheets/git-repository-sheet.svelteindex 0eb5d39e9..516a1b7c1 100644--- a/frontend/src/lib/components/sheets/git-repository-sheet.svelte+++ b/frontend/src/lib/components/sheets/git-repository-sheet.svelte@@ -6,9 +6,9 @@import * as Select from '$lib/components/ui/select/index.js';import { Textarea } from '$lib/components/ui/textarea/index.js';import { Label } from '$lib/components/ui/label/index.js';- import type { GitRepository, GitRepositoryCreateDto, GitRepositoryUpdateDto } from '$lib/types/gitops.type';+ import type { GitRepository, GitRepositoryCreateDto, GitRepositoryUpdateDto } from '$lib/types/automation';import { z } from 'zod/v4';- import { createForm, preventDefault } from '$lib/utils/form.utils';+ import { createForm, preventDefault } from '$lib/utils/settings';import { m } from '$lib/paraglide/messages';type GitRepositoryFormProps = {diff --git a/frontend/src/lib/components/sheets/image-pull-sheet.svelte b/frontend/src/lib/components/sheets/image-pull-sheet.svelteindex 93d022325..c7603e169 100644--- a/frontend/src/lib/components/sheets/image-pull-sheet.svelte+++ b/frontend/src/lib/components/sheets/image-pull-sheet.svelte@@ -5,7 +5,7 @@import { Progress } from '$lib/components/ui/progress/index.js';import * as Collapsible from '$lib/components/ui/collapsible/index.js';import { z } from 'zod/v4';- import { createForm, preventDefault } from '$lib/utils/form.utils';+ import { createForm, preventDefault } from '$lib/utils/settings';import { toast } from 'svelte-sonner';import { environmentStore } from '$lib/stores/environment.store.svelte';import { m } from '$lib/paraglide/messages';@@ -22,7 +22,7 @@showImageLayersState,isIndeterminatePhase,getAggregateStatus- } from '$lib/utils/pull-progress';+ } from '$lib/utils/docker';import { ArrowDownIcon } from '$lib/icons';type ImagePullFormProps = {diff --git a/frontend/src/lib/components/sheets/new-environment-sheet.svelte b/frontend/src/lib/components/sheets/new-environment-sheet.svelteindex 1cbdf3901..27d30df77 100644--- a/frontend/src/lib/components/sheets/new-environment-sheet.svelte+++ b/frontend/src/lib/components/sheets/new-environment-sheet.svelte@@ -8,15 +8,15 @@import UrlInput from '$lib/components/form/url-input.svelte';import { Spinner } from '$lib/components/ui/spinner/index.js';import { CopyButton } from '$lib/components/ui/copy-button';- import type { CreateEnvironmentDTO, DeploymentSnippetFile } from '$lib/types/environment.type';+ import type { CreateEnvironmentDTO, DeploymentSnippetFile } from '$lib/types/environment';import { z } from 'zod/v4';- import { createForm, preventDefault } from '$lib/utils/form.utils';+ import { createForm, preventDefault } from '$lib/utils/settings';import { m } from '$lib/paraglide/messages';import { environmentManagementService } from '$lib/services/env-mgmt-service';import { queryKeys } from '$lib/query/query-keys';import { RemoteEnvironmentIcon, EdgeConnectionIcon, DownloadIcon } from '$lib/icons';import { createMutation, useQueryClient } from '@tanstack/svelte-query';- import { downloadTextFile } from '$lib/utils/download-text-file';+ import { downloadTextFile } from '$lib/utils/formatting';type NewEnvironmentSheetProps = {open: boolean;diff --git a/frontend/src/lib/components/sheets/oidc-mapping-form-sheet.svelte b/frontend/src/lib/components/sheets/oidc-mapping-form-sheet.svelteindex 69a80da10..6eba49e36 100644--- a/frontend/src/lib/components/sheets/oidc-mapping-form-sheet.svelte+++ b/frontend/src/lib/components/sheets/oidc-mapping-form-sheet.svelte@@ -4,10 +4,10 @@import { ArcaneButton } from '$lib/components/arcane-button/index.js';import FormInput from '$lib/components/form/form-input.svelte';import { Label } from '$lib/components/ui/label';- import type { OidcRoleMapping, Role } from '$lib/types/role.type';- import type { Environment } from '$lib/types/environment.type';+ import type { OidcRoleMapping, Role } from '$lib/types/auth';+ import type { Environment } from '$lib/types/environment';import { z } from 'zod/v4';- import { createForm, preventDefault } from '$lib/utils/form.utils';+ import { createForm, preventDefault } from '$lib/utils/settings';import { m } from '$lib/paraglide/messages';type Props = {diff --git a/frontend/src/lib/components/sheets/user-form-sheet.svelte b/frontend/src/lib/components/sheets/user-form-sheet.svelteindex 75047764d..41cce335a 100644--- a/frontend/src/lib/components/sheets/user-form-sheet.svelte+++ b/frontend/src/lib/components/sheets/user-form-sheet.svelte@@ -4,12 +4,12 @@import { ArcaneButton } from '$lib/components/arcane-button/index.js';import FormInput from '$lib/components/form/form-input.svelte';import RoleAssignmentsEditor from '$lib/components/forms/role-assignments-editor.svelte';- import type { User } from '$lib/types/user.type';- import type { Role } from '$lib/types/role.type';- import type { Environment } from '$lib/types/environment.type';+ import type { User } from '$lib/types/auth';+ import type { Role } from '$lib/types/auth';+ import type { Environment } from '$lib/types/environment';import { z } from 'zod/v4';- import { createForm, preventDefault } from '$lib/utils/form.utils';- import { isValidUserEmail } from '$lib/utils/email.utils';+ import { createForm, preventDefault } from '$lib/utils/settings';+ import { isValidUserEmail } from '$lib/utils/formatting';import { m } from '$lib/paraglide/messages';import IfPermitted from '$lib/components/if-permitted.svelte';diff --git a/frontend/src/lib/components/sheets/webhook-form-sheet.svelte b/frontend/src/lib/components/sheets/webhook-form-sheet.svelteindex fb1b6c204..21c9ce43b 100644--- a/frontend/src/lib/components/sheets/webhook-form-sheet.svelte+++ b/frontend/src/lib/components/sheets/webhook-form-sheet.svelte@@ -3,13 +3,13 @@import { ArcaneButton } from '$lib/components/arcane-button/index.js';import FormInput from '$lib/components/form/form-input.svelte';import SelectWithLabel from '$lib/components/form/select-with-label.svelte';- import type { WebhookActionType, WebhookTargetType, CreateWebhook } from '$lib/types/webhook.type';+ import type { WebhookActionType, WebhookTargetType, CreateWebhook } from '$lib/types/environment';import { containerService } from '$lib/services/container-service';import { projectService } from '$lib/services/project-service';import { gitOpsSyncService } from '$lib/services/gitops-sync-service';import { environmentStore } from '$lib/stores/environment.store.svelte';import { z } from 'zod/v4';- import { createForm, preventDefault } from '$lib/utils/form.utils';+ import { createForm, preventDefault } from '$lib/utils/settings';import * as m from '$lib/paraglide/messages.js';type WebhookFormProps = {diff --git a/frontend/src/lib/components/sidebar/sidebar-collapsible-item.svelte b/frontend/src/lib/components/sidebar/sidebar-collapsible-item.svelteindex 183cbca67..3bd61347e 100644--- a/frontend/src/lib/components/sidebar/sidebar-collapsible-item.svelte+++ b/frontend/src/lib/components/sidebar/sidebar-collapsible-item.svelte@@ -4,7 +4,7 @@import * as Sidebar from '$lib/components/ui/sidebar/index.js';import { ArrowRightIcon } from '$lib/icons';import SidebarItemTooltipContent from './sidebar-item-tooltip-content.svelte';- import type { ShortcutKey } from '$lib/utils/keyboard-shortcut.utils';+ import type { ShortcutKey } from '$lib/utils/navigation';let {item,diff --git a/frontend/src/lib/components/sidebar/sidebar-item-tooltip-content.svelte b/frontend/src/lib/components/sidebar/sidebar-item-tooltip-content.svelteindex 3fdc69844..a1c990f35 100644--- a/frontend/src/lib/components/sidebar/sidebar-item-tooltip-content.svelte+++ b/frontend/src/lib/components/sidebar/sidebar-item-tooltip-content.svelte@@ -1,6 +1,6 @@<script lang="ts">import * as Kbd from '$lib/components/ui/kbd/index.js';- import { formatShortcutKeys, type ShortcutKey } from '$lib/utils/keyboard-shortcut.utils';+ import { formatShortcutKeys, type ShortcutKey } from '$lib/utils/navigation';import settingsStore from '$lib/stores/config-store';let {diff --git a/frontend/src/lib/components/sidebar/sidebar-itemgroup.svelte b/frontend/src/lib/components/sidebar/sidebar-itemgroup.svelteindex 49f4add91..075c0a201 100644--- a/frontend/src/lib/components/sidebar/sidebar-itemgroup.svelte+++ b/frontend/src/lib/components/sidebar/sidebar-itemgroup.svelte@@ -3,7 +3,7 @@import * as Sidebar from '$lib/components/ui/sidebar/index.js';import { page } from '$app/state';import { useSidebar } from '$lib/components/ui/sidebar/context.svelte.js';- import type { ShortcutKey } from '$lib/utils/keyboard-shortcut.utils';+ import type { ShortcutKey } from '$lib/utils/navigation';import { ArrowRightIcon } from '$lib/icons';import SidebarCollapsibleItem from './sidebar-collapsible-item.svelte';import SidebarItemTooltipContent from './sidebar-item-tooltip-content.svelte';diff --git a/frontend/src/lib/components/sidebar/sidebar-logo.svelte b/frontend/src/lib/components/sidebar/sidebar-logo.svelteindex 69c6c0239..67d0bb666 100644--- a/frontend/src/lib/components/sidebar/sidebar-logo.svelte+++ b/frontend/src/lib/components/sidebar/sidebar-logo.svelte@@ -1,8 +1,8 @@<script lang="ts">import { cn } from '$lib/utils';import { m } from '$lib/paraglide/messages';- import { getApplicationLogo } from '$lib/utils/image.util';- import { accentColorPreviewStore } from '$lib/utils/accent-color-util';+ import { getApplicationLogo } from '$lib/utils/docker';+ import { accentColorPreviewStore } from '$lib/utils/theme';let { isCollapsed }: { isCollapsed: boolean } = $props();diff --git a/frontend/src/lib/components/sidebar/sidebar-updatebanner.svelte b/frontend/src/lib/components/sidebar/sidebar-updatebanner.svelteindex 0df960c39..0284fb000 100644--- a/frontend/src/lib/components/sidebar/sidebar-updatebanner.svelte+++ b/frontend/src/lib/components/sidebar/sidebar-updatebanner.svelte@@ -3,16 +3,16 @@import * as Separator from '$lib/components/ui/separator/index.js';import * as Tooltip from '$lib/components/ui/tooltip/index.js';import { useSidebar } from '$lib/components/ui/sidebar/index.js';- import type { AppVersionInformation } from '$lib/types/application-configuration';+ import type { AppVersionInformation } from '$lib/types/settings';import { m } from '$lib/paraglide/messages';import { queryKeys } from '$lib/query/query-keys';import systemUpgradeService from '$lib/services/api/system-upgrade-service';import UpdateCenterDialog from '$lib/components/dialogs/update-center-dialog.svelte';import { toast } from 'svelte-sonner';import { DownloadIcon } from '$lib/icons';- import { extractApiErrorMessage } from '$lib/utils/api.util';+ import { extractApiErrorMessage } from '$lib/utils/api';import { createMutation, createQuery } from '@tanstack/svelte-query';- import { hasPermission } from '$lib/utils/permissions.util';+ import { hasPermission } from '$lib/utils/auth';let {isCollapsed,diff --git a/frontend/src/lib/components/sidebar/sidebar-user.svelte b/frontend/src/lib/components/sidebar/sidebar-user.svelteindex 95846aa52..4e8adcf10 100644--- a/frontend/src/lib/components/sidebar/sidebar-user.svelte+++ b/frontend/src/lib/components/sidebar/sidebar-user.svelte@@ -4,13 +4,13 @@import * as Sidebar from '$lib/components/ui/sidebar/index.js';import { ArcaneButton } from '$lib/components/arcane-button/index.js';import { useSidebar } from '$lib/components/ui/sidebar/index.js';- import type { User } from '$lib/types/user.type';+ import type { User } from '$lib/types/auth';import { mode, toggleMode } from 'mode-watcher';import { cn } from '$lib/utils';import settingsStore from '$lib/stores/config-store';import { m } from '$lib/paraglide/messages';import LocalePicker from '$lib/components/locale-picker.svelte';- import { getDefaultProfilePicture } from '$lib/utils/image.util';+ import { getDefaultProfilePicture } from '$lib/utils/docker';import { SunIcon, MoonIcon } from '$lib/icons';let { user, isCollapsed }: { user: User; isCollapsed: boolean } = $props();diff --git a/frontend/src/lib/components/sidebar/sidebar.svelte b/frontend/src/lib/components/sidebar/sidebar.svelteindex 683dbe2cb..b7d12a05f 100644--- a/frontend/src/lib/components/sidebar/sidebar.svelte+++ b/frontend/src/lib/components/sidebar/sidebar.svelte@@ -15,8 +15,8 @@import * as Sidebar from '$lib/components/ui/sidebar/index.js';import { useSidebar } from '$lib/components/ui/sidebar/index.js';import type { ComponentProps } from 'svelte';- import type { User } from '$lib/types/user.type';- import type { AppVersionInformation } from '$lib/types/application-configuration';+ import type { User } from '$lib/types/auth';+ import type { AppVersionInformation } from '$lib/types/settings';import SidebarLogo from './sidebar-logo.svelte';import SidebarUpdatebanner from './sidebar-updatebanner.svelte';import SidebarPinButton from './sidebar-pin-button.svelte';diff --git a/frontend/src/lib/components/vulnerability/vulnerability-scan-item.svelte b/frontend/src/lib/components/vulnerability/vulnerability-scan-item.svelteindex 262dde193..75a8acf6b 100644--- a/frontend/src/lib/components/vulnerability/vulnerability-scan-item.svelte+++ b/frontend/src/lib/components/vulnerability/vulnerability-scan-item.svelte@@ -4,16 +4,16 @@import { ArcaneButton } from '$lib/components/arcane-button';import { toast } from 'svelte-sonner';import { onDestroy } from 'svelte';- import type { VulnerabilityScanSummary } from '$lib/types/vulnerability.type';+ import type { VulnerabilityScanSummary } from '$lib/types/environment';import { m } from '$lib/paraglide/messages';- import { formatTime } from '$lib/utils/locale.util';+ import { formatTime } from '$lib/utils/formatting';import { queryKeys } from '$lib/query/query-keys';import { vulnerabilityService } from '$lib/services/vulnerability-service';import {startVulnerabilityScanPolling,stabilizeFailedVulnerabilitySummary,isVulnerabilityScanInProgress- } from '$lib/utils/vulnerability-scan.util';+ } from '$lib/utils/docker';import { ShieldCheckIcon, ShieldAlertIcon, ScanIcon, ShieldXIcon } from '$lib/icons';import { createMutation, useQueryClient } from '@tanstack/svelte-query';diff --git a/frontend/src/lib/components/vulnerability/vulnerability-scan-panel.svelte b/frontend/src/lib/components/vulnerability/vulnerability-scan-panel.svelteindex c63397e8a..92c65da01 100644--- a/frontend/src/lib/components/vulnerability/vulnerability-scan-panel.svelte+++ b/frontend/src/lib/components/vulnerability/vulnerability-scan-panel.svelte@@ -9,10 +9,10 @@import { m } from '$lib/paraglide/messages';import { vulnerabilityService } from '$lib/services/vulnerability-service.js';import type { ColumnSpec } from '$lib/components/arcane-table/arcane-table.types.svelte';- import type { VulnerabilityScanResult, Vulnerability as VulnType, SeveritySummary } from '$lib/types/vulnerability.type';- import type { Paginated, SearchPaginationSortRequest } from '$lib/types/pagination.type';+ import type { VulnerabilityScanResult, Vulnerability as VulnType, SeveritySummary } from '$lib/types/environment';+ import type { Paginated, SearchPaginationSortRequest } from '$lib/types/shared';import { ShieldCheckIcon, ShieldAlertIcon, ShieldXIcon, ScanIcon, CodeIcon, CheckIcon } from '$lib/icons';- import { formatDateTime } from '$lib/utils/locale.util';+ import { formatDateTime } from '$lib/utils/formatting';import { useQueryClient } from '@tanstack/svelte-query';interface Props {diff --git a/frontend/src/lib/config/navigation-config.ts b/frontend/src/lib/config/navigation-config.tsindex 1a1246ce8..d0e664976 100644--- a/frontend/src/lib/config/navigation-config.ts+++ b/frontend/src/lib/config/navigation-config.ts@@ -28,9 +28,9 @@ import {VariableIcon} from '$lib/icons';import { m } from '$lib/paraglide/messages';-import type { ShortcutKey } from '$lib/utils/keyboard-shortcut.utils';-import type { User } from '$lib/types/user.type';-import { GLOBAL_SCOPE, SUDO_PERMISSION } from '$lib/types/role.type';+import type { ShortcutKey } from '$lib/utils/navigation';+import type { User } from '$lib/types/auth';+import { GLOBAL_SCOPE, SUDO_PERMISSION } from '$lib/types/auth';export type NavigationItem = {title: string;diff --git a/frontend/src/lib/hooks/use-settings-form.svelte.ts b/frontend/src/lib/hooks/use-settings-form.svelte.tsindex 94528ac94..4d4467b1e 100644--- a/frontend/src/lib/hooks/use-settings-form.svelte.ts+++ b/frontend/src/lib/hooks/use-settings-form.svelte.ts@@ -1,8 +1,8 @@import { getContext } from 'svelte';import settingsStore from '$lib/stores/config-store';import { settingsService } from '$lib/services/settings-service';-import type { Settings } from '$lib/types/settings.type';-import { tryCatch } from '$lib/utils/try-catch';+import type { Settings } from '$lib/types/settings';+import { tryCatch } from '$lib/utils/api';import type { Readable } from 'svelte/store';type SettingsFormState = {diff --git a/frontend/src/lib/query/query-keys.ts b/frontend/src/lib/query/query-keys.tsindex 788ae3fac..26ea15136 100644--- a/frontend/src/lib/query/query-keys.ts+++ b/frontend/src/lib/query/query-keys.ts@@ -1,4 +1,4 @@-import type { SearchPaginationSortRequest } from '$lib/types/pagination.type';+import type { SearchPaginationSortRequest } from '$lib/types/shared';function stableSerialize(value: unknown): string {if (value === null || value === undefined) return 'null';diff --git a/frontend/src/lib/services/api-key-service.ts b/frontend/src/lib/services/api-key-service.tsindex 69ce758e6..96ac92c53 100644--- a/frontend/src/lib/services/api-key-service.ts+++ b/frontend/src/lib/services/api-key-service.ts@@ -1,7 +1,7 @@import BaseAPIService from './api-service';-import type { ApiKey, ApiKeyCreated, CreateApiKey, UpdateApiKey } from '$lib/types/api-key.type';-import type { Paginated, SearchPaginationSortRequest } from '$lib/types/pagination.type';-import { transformPaginationParams } from '$lib/utils/params.util';+import type { ApiKey, ApiKeyCreated, CreateApiKey, UpdateApiKey } from '$lib/types/auth';+import type { Paginated, SearchPaginationSortRequest } from '$lib/types/shared';+import { transformPaginationParams } from '$lib/utils/tables';export default class ApiKeyAPIService extends BaseAPIService {async getApiKeys(options?: SearchPaginationSortRequest): Promise<Paginated<ApiKey>> {diff --git a/frontend/src/lib/services/api/system-upgrade-service.ts b/frontend/src/lib/services/api/system-upgrade-service.tsindex c2ab19bef..1016d8ce5 100644--- a/frontend/src/lib/services/api/system-upgrade-service.ts+++ b/frontend/src/lib/services/api/system-upgrade-service.ts@@ -1,5 +1,5 @@import { apiClient } from '../api-service';-import type { AppVersionInformation } from '$lib/types/application-configuration';+import type { AppVersionInformation } from '$lib/types/settings';export interface UpgradeCheckResponse {canUpgrade: boolean;diff --git a/frontend/src/lib/services/auth-service.ts b/frontend/src/lib/services/auth-service.tsindex e58ef0ceb..98a257a41 100644--- a/frontend/src/lib/services/auth-service.ts+++ b/frontend/src/lib/services/auth-service.ts@@ -1,9 +1,9 @@import { goto, invalidateAll } from '$app/navigation';import BaseAPIService from './api-service';import userStore from '$lib/stores/user-store';-import type { User } from '$lib/types/user.type';-import type { OidcStatusInfo } from '$lib/types/settings.type';-import type { OidcUserInfo, LoginCredentials, LoginResponseData, AutoLoginConfig } from '$lib/types/auth.type';+import type { User } from '$lib/types/auth';+import type { OidcStatusInfo } from '$lib/types/settings';+import type { OidcUserInfo, LoginCredentials, LoginResponseData, AutoLoginConfig } from '$lib/types/auth';const REFRESH_TOKEN_KEY = 'arcane_refresh_token';const TOKEN_EXPIRY_KEY = 'arcane_token_expiry';diff --git a/frontend/src/lib/services/build-workspace-service.ts b/frontend/src/lib/services/build-workspace-service.tsindex 9f56e50f6..5e7d03ee5 100644--- a/frontend/src/lib/services/build-workspace-service.ts+++ b/frontend/src/lib/services/build-workspace-service.ts@@ -1,6 +1,6 @@import BaseAPIService from './api-service';import { environmentStore } from '$lib/stores/environment.store.svelte';-import type { FileEntry, FileContentResponse } from '$lib/types/file-browser.type';+import type { FileEntry, FileContentResponse } from '$lib/types/shared';export class BuildWorkspaceService extends BaseAPIService {async listDirectory(path: string = '/'): Promise<FileEntry[]> {diff --git a/frontend/src/lib/services/container-registry-service.ts b/frontend/src/lib/services/container-registry-service.tsindex df348f8e9..5542f3e88 100644--- a/frontend/src/lib/services/container-registry-service.ts+++ b/frontend/src/lib/services/container-registry-service.ts@@ -3,10 +3,10 @@ import type {ContainerRegistryCreateDto,ContainerRegistryPullUsageResponse,ContainerRegistryUpdateDto-} from '$lib/types/container-registry.type';-import type { ContainerRegistry } from '$lib/types/container-registry.type';-import type { Paginated, SearchPaginationSortRequest } from '$lib/types/pagination.type';-import { transformPaginationParams } from '$lib/utils/params.util';+} from '$lib/types/docker';+import type { ContainerRegistry } from '$lib/types/docker';+import type { Paginated, SearchPaginationSortRequest } from '$lib/types/shared';+import { transformPaginationParams } from '$lib/utils/tables';export default class ContainerRegistryService extends BaseAPIService {async getRegistries(options?: SearchPaginationSortRequest): Promise<Paginated<ContainerRegistry>> {diff --git a/frontend/src/lib/services/container-service.ts b/frontend/src/lib/services/container-service.tsindex 30fb0a240..e4f622778 100644--- a/frontend/src/lib/services/container-service.ts+++ b/frontend/src/lib/services/container-service.ts@@ -6,9 +6,9 @@ import type {ContainerSummaryGroupDto,ContainerCreateRequest,ContainerDetailsDto-} from '$lib/types/container.type';-import type { SearchPaginationSortRequest, Paginated } from '$lib/types/pagination.type';-import { transformPaginationParams } from '$lib/utils/params.util';+} from '$lib/types/docker';+import type { SearchPaginationSortRequest, Paginated } from '$lib/types/shared';+import { transformPaginationParams } from '$lib/utils/tables';export type ContainersPaginatedResponse = Paginated<ContainerSummaryDto, ContainerStatusCounts> & {groups?: ContainerSummaryGroupDto[];diff --git a/frontend/src/lib/services/customize-search.ts b/frontend/src/lib/services/customize-search.tsindex 6c2558d3d..98bae77e6 100644--- a/frontend/src/lib/services/customize-search.ts+++ b/frontend/src/lib/services/customize-search.ts@@ -1,5 +1,5 @@import { apiClient } from './api-service';-import type { CustomizeSearchResponse, CustomizeCategory } from '$lib/types/customize-search.type';+import type { CustomizeSearchResponse, CustomizeCategory } from '$lib/types/shared';export class CustomizeSearchService {private baseUrl = '/customize';diff --git a/frontend/src/lib/services/dashboard-service.ts b/frontend/src/lib/services/dashboard-service.tsindex c9300a626..b375f8391 100644--- a/frontend/src/lib/services/dashboard-service.ts+++ b/frontend/src/lib/services/dashboard-service.ts@@ -1,6 +1,6 @@import BaseAPIService from './api-service';import { environmentStore } from '$lib/stores/environment.store.svelte';-import type { DashboardActionItems, DashboardEnvironmentsOverview, DashboardSnapshot } from '$lib/types/dashboard.type';+import type { DashboardActionItems, DashboardEnvironmentsOverview, DashboardSnapshot } from '$lib/types/shared';interface GetDashboardActionItemsOptions {debugAllGood?: boolean;diff --git a/frontend/src/lib/services/env-mgmt-service.ts b/frontend/src/lib/services/env-mgmt-service.tsindex fa108f10b..97e197e2a 100644--- a/frontend/src/lib/services/env-mgmt-service.ts+++ b/frontend/src/lib/services/env-mgmt-service.ts@@ -1,8 +1,8 @@import BaseAPIService from './api-service';-import type { CreateEnvironmentDTO, DeploymentSnippets, Environment, UpdateEnvironmentDTO } from '$lib/types/environment.type';-import type { Paginated, SearchPaginationSortRequest } from '$lib/types/pagination.type';-import type { AppVersionInformation } from '$lib/types/application-configuration';-import { transformPaginationParams } from '$lib/utils/params.util';+import type { CreateEnvironmentDTO, DeploymentSnippets, Environment, UpdateEnvironmentDTO } from '$lib/types/environment';+import type { Paginated, SearchPaginationSortRequest } from '$lib/types/shared';+import type { AppVersionInformation } from '$lib/types/settings';+import { transformPaginationParams } from '$lib/utils/tables';export default class EnvironmentManagementService extends BaseAPIService {async create(dto: CreateEnvironmentDTO): Promise<Environment> {diff --git a/frontend/src/lib/services/event-service.ts b/frontend/src/lib/services/event-service.tsindex bbe8ea99f..9f8c01b14 100644--- a/frontend/src/lib/services/event-service.ts+++ b/frontend/src/lib/services/event-service.ts@@ -1,7 +1,7 @@import BaseAPIService from './api-service';-import type { SearchPaginationSortRequest, Paginated } from '$lib/types/pagination.type';-import type { Event } from '$lib/types/event.type';-import { transformPaginationParams } from '$lib/utils/params.util';+import type { SearchPaginationSortRequest, Paginated } from '$lib/types/shared';+import type { Event } from '$lib/types/shared';+import { transformPaginationParams } from '$lib/utils/tables';export default class EventService extends BaseAPIService {async getEvents(options?: SearchPaginationSortRequest): Promise<Paginated<Event>> {diff --git a/frontend/src/lib/services/git-repository-service.ts b/frontend/src/lib/services/git-repository-service.tsindex 490a41ab1..a655965d4 100644--- a/frontend/src/lib/services/git-repository-service.ts+++ b/frontend/src/lib/services/git-repository-service.ts@@ -6,9 +6,9 @@ import type {GitRepositoryTestResponse,BranchesResponse,BrowseResponse-} from '$lib/types/gitops.type';-import type { Paginated, SearchPaginationSortRequest } from '$lib/types/pagination.type';-import { transformPaginationParams } from '$lib/utils/params.util';+} from '$lib/types/automation';+import type { Paginated, SearchPaginationSortRequest } from '$lib/types/shared';+import { transformPaginationParams } from '$lib/utils/tables';export default class GitRepositoryService extends BaseAPIService {async getRepositories(options?: SearchPaginationSortRequest): Promise<Paginated<GitRepository>> {diff --git a/frontend/src/lib/services/gitops-sync-service.ts b/frontend/src/lib/services/gitops-sync-service.tsindex 5a4b7b927..a80068482 100644--- a/frontend/src/lib/services/gitops-sync-service.ts+++ b/frontend/src/lib/services/gitops-sync-service.ts@@ -9,9 +9,9 @@ import type {BrowseResponse,ImportGitOpsSyncRequest,ImportGitOpsSyncResponse-} from '$lib/types/gitops.type';-import type { Paginated, SearchPaginationSortRequest } from '$lib/types/pagination.type';-import { transformPaginationParams } from '$lib/utils/params.util';+} from '$lib/types/automation';+import type { Paginated, SearchPaginationSortRequest } from '$lib/types/shared';+import { transformPaginationParams } from '$lib/utils/tables';export default class GitOpsSyncService extends BaseAPIService {async getSyncs(environmentId: string, options?: SearchPaginationSortRequest): Promise<Paginated<GitOpsSync, GitOpsSyncCounts>> {diff --git a/frontend/src/lib/services/image-service.ts b/frontend/src/lib/services/image-service.tsindex e149d82d7..7dd45303c 100644--- a/frontend/src/lib/services/image-service.ts+++ b/frontend/src/lib/services/image-service.ts@@ -1,10 +1,10 @@import BaseAPIService from './api-service';import { environmentStore } from '$lib/stores/environment.store.svelte';-import type { ImageSummaryDto, ImageUsageCounts, ImageUpdateInfoDto, ImageBuildRecord } from '$lib/types/image.type';-import type { SearchPaginationSortRequest, Paginated } from '$lib/types/pagination.type';-import type { AutoUpdateCheck, AutoUpdateResult } from '$lib/types/auto-update.type';-import type { PruneImagesOptions } from '$lib/types/prune.type';-import { transformPaginationParams } from '$lib/utils/params.util';+import type { ImageSummaryDto, ImageUsageCounts, ImageUpdateInfoDto, ImageBuildRecord } from '$lib/types/docker';+import type { SearchPaginationSortRequest, Paginated } from '$lib/types/shared';+import type { AutoUpdateCheck, AutoUpdateResult } from '$lib/types/automation';+import type { PruneImagesOptions } from '$lib/types/automation';+import { transformPaginationParams } from '$lib/utils/tables';export class ImageService extends BaseAPIService {private async resolveEnvironmentId(environmentId?: string): Promise<string> {diff --git a/frontend/src/lib/services/job-schedule-service.ts b/frontend/src/lib/services/job-schedule-service.tsindex 77a8dd361..3e17d3fd3 100644--- a/frontend/src/lib/services/job-schedule-service.ts+++ b/frontend/src/lib/services/job-schedule-service.ts@@ -1,5 +1,5 @@import BaseAPIService from './api-service';-import type { JobSchedules, JobSchedulesUpdate, JobListResponse, JobRunResponse } from '$lib/types/job-schedule.type';+import type { JobSchedules, JobSchedulesUpdate, JobListResponse, JobRunResponse } from '$lib/types/settings';class JobScheduleService extends BaseAPIService {async getJobSchedules(environmentId: string = '0'): Promise<JobSchedules> {diff --git a/frontend/src/lib/services/network-service.ts b/frontend/src/lib/services/network-service.tsindex be827c9fd..ff14fd691 100644--- a/frontend/src/lib/services/network-service.ts+++ b/frontend/src/lib/services/network-service.ts@@ -7,9 +7,9 @@ import type {NetworkCreateOptions,NetworkInspectDto,NetworkTopologyDto-} from '$lib/types/network.type';-import type { SearchPaginationSortRequest, Paginated } from '$lib/types/pagination.type';-import { transformPaginationParams } from '$lib/utils/params.util';+} from '$lib/types/docker';+import type { SearchPaginationSortRequest, Paginated } from '$lib/types/shared';+import { transformPaginationParams } from '$lib/utils/tables';export type NetworksPaginatedResponse = Paginated<NetworkSummaryDto, NetworkUsageCounts>;diff --git a/frontend/src/lib/services/notification-service.ts b/frontend/src/lib/services/notification-service.tsindex d40f8acad..15b767200 100644--- a/frontend/src/lib/services/notification-service.ts+++ b/frontend/src/lib/services/notification-service.ts@@ -1,5 +1,5 @@import BaseAPIService from './api-service';-import type { NotificationSettings, TestNotificationResponse } from '$lib/types/notification.type';+import type { NotificationSettings, TestNotificationResponse } from '$lib/types/notifications';import { environmentStore } from '$lib/stores/environment.store.svelte';export default class NotificationService extends BaseAPIService {diff --git a/frontend/src/lib/services/oidc-mapping-service.ts b/frontend/src/lib/services/oidc-mapping-service.tsindex 74c72184e..74a86b73e 100644--- a/frontend/src/lib/services/oidc-mapping-service.ts+++ b/frontend/src/lib/services/oidc-mapping-service.ts@@ -1,5 +1,5 @@import BaseAPIService from './api-service';-import type { OidcRoleMapping, CreateOidcRoleMapping, UpdateOidcRoleMapping } from '$lib/types/role.type';+import type { OidcRoleMapping, CreateOidcRoleMapping, UpdateOidcRoleMapping } from '$lib/types/auth';export default class OidcMappingAPIService extends BaseAPIService {async list(): Promise<OidcRoleMapping[]> {diff --git a/frontend/src/lib/services/port-service.ts b/frontend/src/lib/services/port-service.tsindex 947a3d2df..3c3df8445 100644--- a/frontend/src/lib/services/port-service.ts+++ b/frontend/src/lib/services/port-service.ts@@ -1,8 +1,8 @@import BaseAPIService from './api-service';import { environmentStore } from '$lib/stores/environment.store.svelte';-import type { SearchPaginationSortRequest, Paginated } from '$lib/types/pagination.type';-import type { PortMappingDto } from '$lib/types/port.type';-import { transformPaginationParams } from '$lib/utils/params.util';+import type { SearchPaginationSortRequest, Paginated } from '$lib/types/shared';+import type { PortMappingDto } from '$lib/types/docker';+import { transformPaginationParams } from '$lib/utils/tables';export type PortsPaginatedResponse = Paginated<PortMappingDto>;diff --git a/frontend/src/lib/services/project-service.ts b/frontend/src/lib/services/project-service.tsindex 3a41304e1..67a213529 100644--- a/frontend/src/lib/services/project-service.ts+++ b/frontend/src/lib/services/project-service.ts@@ -1,8 +1,8 @@import { m } from '$lib/paraglide/messages';import { environmentStore } from '$lib/stores/environment.store.svelte';-import type { Paginated, SearchPaginationSortRequest } from '$lib/types/pagination.type';-import type { IncludeFile, Project, ProjectStatusCounts } from '$lib/types/project.type';-import { transformPaginationParams } from '$lib/utils/params.util';+import type { Paginated, SearchPaginationSortRequest } from '$lib/types/shared';+import type { IncludeFile, Project, ProjectStatusCounts } from '$lib/types/swarm';+import { transformPaginationParams } from '$lib/utils/tables';import BaseAPIService from './api-service';export type DeployProjectOptions = {diff --git a/frontend/src/lib/services/role-service.ts b/frontend/src/lib/services/role-service.tsindex 57dcf49f0..8951cd9e9 100644--- a/frontend/src/lib/services/role-service.ts+++ b/frontend/src/lib/services/role-service.ts@@ -1,7 +1,7 @@import BaseAPIService from './api-service';-import type { Role, CreateRole, UpdateRole, RoleAssignment, SetUserAssignments, PermissionsManifest } from '$lib/types/role.type';-import type { Paginated, SearchPaginationSortRequest } from '$lib/types/pagination.type';-import { transformPaginationParams } from '$lib/utils/params.util';+import type { Role, CreateRole, UpdateRole, RoleAssignment, SetUserAssignments, PermissionsManifest } from '$lib/types/auth';+import type { Paginated, SearchPaginationSortRequest } from '$lib/types/shared';+import { transformPaginationParams } from '$lib/utils/tables';export default class RoleAPIService extends BaseAPIService {async getRoles(options?: SearchPaginationSortRequest): Promise<Paginated<Role>> {diff --git a/frontend/src/lib/services/settings-search.ts b/frontend/src/lib/services/settings-search.tsindex e0b91a09b..323d9bf77 100644--- a/frontend/src/lib/services/settings-search.ts+++ b/frontend/src/lib/services/settings-search.ts@@ -1,5 +1,5 @@import { apiClient } from './api-service';-import type { SettingsSearchResponse, SettingsCategory } from '$lib/types/settings-search.type';+import type { SettingsSearchResponse, SettingsCategory } from '$lib/types/shared';export class SettingsSearchService {private baseUrl = '/settings';diff --git a/frontend/src/lib/services/settings-service.ts b/frontend/src/lib/services/settings-service.tsindex 39cafa5ce..d7e9efc6e 100644--- a/frontend/src/lib/services/settings-service.ts+++ b/frontend/src/lib/services/settings-service.ts@@ -1,7 +1,7 @@import BaseAPIService from './api-service';-import type { Settings, OidcStatusInfo } from '$lib/types/settings.type';+import type { Settings, OidcStatusInfo } from '$lib/types/settings';import { environmentStore } from '$lib/stores/environment.store.svelte';-import { isLocalSetting, extractLocalSettings, extractEnvironmentSettings } from '$lib/utils/settings.util';+import { isLocalSetting, extractLocalSettings, extractEnvironmentSettings } from '$lib/utils/settings';type KeyValuePair = { key: string; value: string };diff --git a/frontend/src/lib/services/swarm-service.ts b/frontend/src/lib/services/swarm-service.tsindex c5c49ad8c..541a72c02 100644--- a/frontend/src/lib/services/swarm-service.ts+++ b/frontend/src/lib/services/swarm-service.ts@@ -1,7 +1,7 @@import BaseAPIService from './api-service';import { environmentStore } from '$lib/stores/environment.store.svelte';-import type { SearchPaginationSortRequest, Paginated } from '$lib/types/pagination.type';-import { transformPaginationParams } from '$lib/utils/params.util';+import type { SearchPaginationSortRequest, Paginated } from '$lib/types/shared';+import { transformPaginationParams } from '$lib/utils/tables';import type {SwarmServiceSummary,SwarmNodeSummary,@@ -39,7 +39,7 @@ import type {SwarmConfigUpdateRequest,SwarmSecretCreateRequest,SwarmSecretUpdateRequest-} from '$lib/types/swarm.type';+} from '$lib/types/swarm';export type SwarmServicesPaginatedResponse = Paginated<SwarmServiceSummary>;export type SwarmNodesPaginatedResponse = Paginated<SwarmNodeSummary>;diff --git a/frontend/src/lib/services/system-service.ts b/frontend/src/lib/services/system-service.tsindex 53f8fb880..a6c191b80 100644--- a/frontend/src/lib/services/system-service.ts+++ b/frontend/src/lib/services/system-service.ts@@ -1,7 +1,7 @@import BaseAPIService from './api-service';import { environmentStore } from '$lib/stores/environment.store.svelte';-import type { DockerInfo } from '$lib/types/docker-info.type';-import type { SystemPruneRequest } from '$lib/types/prune.type';+import type { DockerInfo } from '$lib/types/docker';+import type { SystemPruneRequest } from '$lib/types/automation';export class SystemService extends BaseAPIService {async pruneAll(options: SystemPruneRequest) {diff --git a/frontend/src/lib/services/template-service.ts b/frontend/src/lib/services/template-service.tsindex f7d33c153..857ae80de 100644--- a/frontend/src/lib/services/template-service.ts+++ b/frontend/src/lib/services/template-service.ts@@ -1,8 +1,8 @@import BaseAPIService from './api-service';-import type { TemplateRegistry, Template, RemoteRegistry, TemplateContentData } from '$lib/types/template.type';-import type { Variable } from '$lib/types/variable.type';-import type { SearchPaginationSortRequest, Paginated } from '$lib/types/pagination.type';-import { transformPaginationParams } from '$lib/utils/params.util';+import type { TemplateRegistry, Template, RemoteRegistry, TemplateContentData } from '$lib/types/swarm';+import type { Variable } from '$lib/types/shared';+import type { SearchPaginationSortRequest, Paginated } from '$lib/types/shared';+import { transformPaginationParams } from '$lib/utils/tables';import { environmentStore } from '$lib/stores/environment.store.svelte';export default class TemplateService extends BaseAPIService {diff --git a/frontend/src/lib/services/user-service.ts b/frontend/src/lib/services/user-service.tsindex fd63123c7..1e3a8a4b5 100644--- a/frontend/src/lib/services/user-service.ts+++ b/frontend/src/lib/services/user-service.ts@@ -1,7 +1,7 @@import BaseAPIService from './api-service';-import type { User, CreateUser } from '$lib/types/user.type';-import type { Paginated, SearchPaginationSortRequest } from '$lib/types/pagination.type';-import { transformPaginationParams } from '$lib/utils/params.util';+import type { User, CreateUser } from '$lib/types/auth';+import type { Paginated, SearchPaginationSortRequest } from '$lib/types/shared';+import { transformPaginationParams } from '$lib/utils/tables';export default class UserAPIService extends BaseAPIService {async getUsers(options?: SearchPaginationSortRequest): Promise<Paginated<User>> {diff --git a/frontend/src/lib/services/version-service.ts b/frontend/src/lib/services/version-service.tsindex b5d9b8453..02b9afdbf 100644--- a/frontend/src/lib/services/version-service.ts+++ b/frontend/src/lib/services/version-service.ts@@ -1,6 +1,6 @@import { version as currentVersion } from '$app/environment';import { apiClient } from './api-service';-import type { AppVersionInformation } from '$lib/types/application-configuration';+import type { AppVersionInformation } from '$lib/types/settings';function getCurrentVersion() {return currentVersion;diff --git a/frontend/src/lib/services/volume-backup-service.ts b/frontend/src/lib/services/volume-backup-service.tsindex 6fddad623..15b89acff 100644--- a/frontend/src/lib/services/volume-backup-service.ts+++ b/frontend/src/lib/services/volume-backup-service.ts@@ -1,8 +1,8 @@import BaseAPIService from './api-service';import { environmentStore } from '$lib/stores/environment.store.svelte';-import type { BackupEntry } from '$lib/types/file-browser.type';-import type { SearchPaginationSortRequest, Paginated } from '$lib/types/pagination.type';-import { transformPaginationParams } from '$lib/utils/params.util';+import type { BackupEntry } from '$lib/types/shared';+import type { SearchPaginationSortRequest, Paginated } from '$lib/types/shared';+import { transformPaginationParams } from '$lib/utils/tables';export type VolumeBackupListResponse = Paginated<BackupEntry> & { warnings?: string[] };diff --git a/frontend/src/lib/services/volume-browser-service.ts b/frontend/src/lib/services/volume-browser-service.tsindex b93275746..29a35b93b 100644--- a/frontend/src/lib/services/volume-browser-service.ts+++ b/frontend/src/lib/services/volume-browser-service.ts@@ -1,6 +1,6 @@import BaseAPIService from './api-service';import { environmentStore } from '$lib/stores/environment.store.svelte';-import type { FileEntry, FileContentResponse } from '$lib/types/file-browser.type';+import type { FileEntry, FileContentResponse } from '$lib/types/shared';export class VolumeBrowserService extends BaseAPIService {async listDirectory(volumeName: string, path: string = '/'): Promise<FileEntry[]> {diff --git a/frontend/src/lib/services/volume-service.ts b/frontend/src/lib/services/volume-service.tsindex ae0f84709..9ef5f5f92 100644--- a/frontend/src/lib/services/volume-service.ts+++ b/frontend/src/lib/services/volume-service.ts@@ -7,9 +7,9 @@ import type {VolumeUsageCounts,VolumeCreateRequest,VolumeSizeInfo-} from '$lib/types/volume.type';-import type { SearchPaginationSortRequest, Paginated } from '$lib/types/pagination.type';-import { transformPaginationParams } from '$lib/utils/params.util';+} from '$lib/types/docker';+import type { SearchPaginationSortRequest, Paginated } from '$lib/types/shared';+import { transformPaginationParams } from '$lib/utils/tables';export type VolumesPaginatedResponse = Paginated<VolumeSummaryDto, VolumeUsageCounts>;diff --git a/frontend/src/lib/services/vulnerability-service.ts b/frontend/src/lib/services/vulnerability-service.tsindex bc690ddcb..c24c0aad0 100644--- a/frontend/src/lib/services/vulnerability-service.ts+++ b/frontend/src/lib/services/vulnerability-service.ts@@ -11,9 +11,9 @@ import type {EnvironmentVulnerabilitySummary,IgnoredVulnerability,IgnoreVulnerabilityPayload-} from '$lib/types/vulnerability.type';-import type { Paginated, SearchPaginationSortRequest } from '$lib/types/pagination.type';-import { transformPaginationParams } from '$lib/utils/params.util';+} from '$lib/types/environment';+import type { Paginated, SearchPaginationSortRequest } from '$lib/types/shared';+import { transformPaginationParams } from '$lib/utils/tables';export class VulnerabilityService extends BaseAPIService {private async resolveEnvironmentId(environmentId?: string): Promise<string> {diff --git a/frontend/src/lib/services/webhook-service.ts b/frontend/src/lib/services/webhook-service.tsindex 88e371689..eed8a640d 100644--- a/frontend/src/lib/services/webhook-service.ts+++ b/frontend/src/lib/services/webhook-service.ts@@ -1,6 +1,6 @@import BaseAPIService from './api-service';import { environmentStore } from '$lib/stores/environment.store.svelte';-import type { Webhook, WebhookCreated, CreateWebhook, UpdateWebhook } from '$lib/types/webhook.type';+import type { Webhook, WebhookCreated, CreateWebhook, UpdateWebhook } from '$lib/types/environment';export default class WebhookAPIService extends BaseAPIService {private async resolveEnvironmentId(environmentId?: string): Promise<string> {diff --git a/frontend/src/lib/stores/config-store.ts b/frontend/src/lib/stores/config-store.tsindex ab18ba1f6..d90dae04f 100644--- a/frontend/src/lib/stores/config-store.ts+++ b/frontend/src/lib/stores/config-store.ts@@ -1,8 +1,8 @@import { settingsService } from '$lib/services/settings-service';-import type { Settings } from '$lib/types/settings.type';-import { applyAccentColor } from '$lib/utils/accent-color-util';-import { applyApplicationTheme } from '$lib/utils/application-theme-util';-import { applyOledMode } from '$lib/utils/oled-mode-util';+import type { Settings } from '$lib/types/settings';+import { applyAccentColor } from '$lib/utils/theme';+import { applyApplicationTheme } from '$lib/utils/theme';+import { applyOledMode } from '$lib/utils/theme';import { get, writable } from 'svelte/store';const settingsStore = writable<Settings>();diff --git a/frontend/src/lib/stores/environment.store.svelte.ts b/frontend/src/lib/stores/environment.store.svelte.tsindex 2ceff39b5..715bf7adf 100644--- a/frontend/src/lib/stores/environment.store.svelte.ts+++ b/frontend/src/lib/stores/environment.store.svelte.ts@@ -1,8 +1,8 @@import { PersistedState } from 'runed';import { goto, invalidateAll } from '$app/navigation';import { page } from '$app/state';-import type { Environment } from '$lib/types/environment.type';-import { isEnvironmentOnline } from '$lib/utils/environment-status';+import type { Environment } from '$lib/types/environment';+import { isEnvironmentOnline } from '$lib/utils/docker';export const LOCAL_DOCKER_ENVIRONMENT_ID = '0';diff --git a/frontend/src/lib/stores/user-store.ts b/frontend/src/lib/stores/user-store.tsindex 27ee98894..2edd4f3f2 100644--- a/frontend/src/lib/stores/user-store.ts+++ b/frontend/src/lib/stores/user-store.ts@@ -1,7 +1,7 @@-import type { User } from '$lib/types/user.type';-import { GLOBAL_SCOPE, SUDO_PERMISSION, BUILT_IN_ROLE_ADMIN } from '$lib/types/role.type';+import type { User } from '$lib/types/auth';+import { GLOBAL_SCOPE, SUDO_PERMISSION, BUILT_IN_ROLE_ADMIN } from '$lib/types/auth';import { writable, get } from 'svelte/store';-import { setLocale } from '$lib/utils/locale.util';+import { setLocale } from '$lib/utils/formatting';const userStore = writable<User | null>(null);diff --git a/frontend/src/lib/types/api-key.type.ts b/frontend/src/lib/types/api-key.type.tsdeleted file mode 100644index c6d730337..000000000--- a/frontend/src/lib/types/api-key.type.ts+++ /dev/null@@ -1,34 +0,0 @@-import type { ApiKeyPermissionGrant } from '$lib/types/role.type';--export type ApiKey = {- id: string;- name: string;- description?: string;- keyPrefix: string;- userId: string;- isStatic: boolean;- isBootstrap: boolean;- expiresAt?: string;- lastUsedAt?: string;- createdAt: string;- updatedAt?: string;- permissions?: ApiKeyPermissionGrant[];-};--export type ApiKeyCreated = ApiKey & {- key: string;-};--export type CreateApiKey = {- name: string;- description?: string;- expiresAt?: string;- permissions: ApiKeyPermissionGrant[];-};--export type UpdateApiKey = {- name?: string;- description?: string;- expiresAt?: string;- permissions?: ApiKeyPermissionGrant[];-};diff --git a/frontend/src/lib/types/application-configuration.ts b/frontend/src/lib/types/application-configuration.tsdeleted file mode 100644index 1dad9a8dd..000000000--- a/frontend/src/lib/types/application-configuration.ts+++ /dev/null@@ -1,18 +0,0 @@-export interface AppVersionInformation {- currentVersion: string;- currentTag?: string;- currentDigest?: string;- displayVersion: string;- revision: string;- shortRevision: string;- goVersion: string;- enabledFeatures?: string[];- buildTime?: string;- isSemverVersion: boolean;- newestVersion?: string;- newestDigest?: string;- updateAvailable?: boolean;- releaseUrl?: string;- releaseNotes?: string;- releasedAt?: string;-}diff --git a/frontend/src/lib/types/auth.ts b/frontend/src/lib/types/auth.tsnew file mode 100644index 000000000..c008fbe52--- /dev/null+++ b/frontend/src/lib/types/auth.ts@@ -0,0 +1,200 @@+import type { Locale } from '$lib/paraglide/runtime';++// --- RBAC: roles, permissions, assignments ---++export type RoleScope = 'global' | 'env';++export type Role = {+ id: string;+ name: string;+ description?: string;+ permissions: string[];+ builtIn: boolean;+ assignedUserCount: number;+ createdAt: string;+ updatedAt?: string;+};++export type CreateRole = {+ name: string;+ description?: string;+ permissions: string[];+};++export type UpdateRole = {+ name: string;+ description?: string;+ permissions: string[];+};++export type RoleAssignment = {+ id: string;+ userId: string;+ roleId: string;+ environmentId?: string;+ source: 'manual' | 'oidc';+ createdAt: string;+};++export type RoleAssignmentSummary = {+ roleId: string;+ environmentId?: string;+ source: 'manual' | 'oidc';+};++export type SetUserAssignments = {+ assignments: { roleId: string; environmentId?: string }[];+};++export type OidcMappingSource = 'manual' | 'env';++export type OidcRoleMapping = {+ id: string;+ claimValue: string;+ roleId: string;+ environmentId?: string;+ source: OidcMappingSource;+ createdAt: string;+ updatedAt?: string;+};++export type CreateOidcRoleMapping = {+ claimValue: string;+ roleId: string;+ environmentId?: string;+};++export type UpdateOidcRoleMapping = CreateOidcRoleMapping;++export type PermissionsManifest = {+ resources: PermissionResource[];+};++export type PermissionResource = {+ key: string;+ label: string;+ scope: RoleScope;+ actions: PermissionAction[];+};++export type PermissionAction = {+ key: string;+ permission: string;+ label: string;+ description?: string;+};++export type ApiKeyPermissionGrant = {+ permission: string;+ environmentId?: string;+};++export const BUILT_IN_ROLE_ADMIN = 'role_admin';+export const BUILT_IN_ROLE_EDITOR = 'role_editor';+export const BUILT_IN_ROLE_DEPLOYER = 'role_deployer';+export const BUILT_IN_ROLE_VIEWER = 'role_viewer';++export const SUDO_PERMISSION = '*';++export const GLOBAL_SCOPE = 'global';++// --- User ---++export type User = {+ id: string;+ username: string;+ passwordHash?: string;+ displayName?: string;+ email?: string;+ roleAssignments: RoleAssignmentSummary[];+ permissionsByEnv: Record<string, string[]>;+ canDelete?: boolean;+ createdAt: string;+ lastLogin?: string;+ updatedAt?: string;+ oidcSubjectId?: string;+ locale?: Locale;+ requiresPasswordChange?: boolean;+};++export type CreateUser = Omit<+ User,+ | 'id'+ | 'createdAt'+ | 'updatedAt'+ | 'lastLogin'+ | 'oidcSubjectId'+ | 'passwordHash'+ | 'requiresPasswordChange'+ | 'roleAssignments'+ | 'permissionsByEnv'+> & {+ password: string;+};++// --- Auth: login, OIDC ---++export interface OidcUserInfo {+ sub: string;+ email: string;+ name?: string;+ displayName?: string;+ preferred_username?: string;+ given_name?: string;+ family_name?: string;+ picture?: string;+ groups?: string[];+}++export interface LoginCredentials {+ username: string;+ password: string;+}++export type LoginResponseData = {+ token: string;+ refreshToken: string;+ expiresAt: string;+ user: User;+ requirePasswordChange?: boolean;+};++export interface AutoLoginConfig {+ enabled: boolean;+ username: string;+}++// --- API keys ---++export type ApiKey = {+ id: string;+ name: string;+ description?: string;+ keyPrefix: string;+ userId: string;+ isStatic: boolean;+ isBootstrap: boolean;+ expiresAt?: string;+ lastUsedAt?: string;+ createdAt: string;+ updatedAt?: string;+ permissions?: ApiKeyPermissionGrant[];+};++export type ApiKeyCreated = ApiKey & {+ key: string;+};++export type CreateApiKey = {+ name: string;+ description?: string;+ expiresAt?: string;+ permissions: ApiKeyPermissionGrant[];+};++export type UpdateApiKey = {+ name?: string;+ description?: string;+ expiresAt?: string;+ permissions?: ApiKeyPermissionGrant[];+};diff --git a/frontend/src/lib/types/auth.type.ts b/frontend/src/lib/types/auth.type.tsdeleted file mode 100644index 2c824441f..000000000--- a/frontend/src/lib/types/auth.type.ts+++ /dev/null@@ -1,35 +0,0 @@-import type { User } from '$lib/types/user.type';--export interface OidcUserInfo {- sub: string;- email: string;- name?: string;- displayName?: string;- preferred_username?: string;- given_name?: string;- family_name?: string;- picture?: string;- groups?: string[];-}--export interface LoginCredentials {- username: string;- password: string;-}--export type LoginResponseData = {- token: string;- refreshToken: string;- expiresAt: string;- user: User;- requirePasswordChange?: boolean;-};--/**- * Auto-login configuration returned by the backend.- * Password is never included in this response.- */-export interface AutoLoginConfig {- enabled: boolean;- username: string;-}diff --git a/frontend/src/lib/types/auto-update.type.ts b/frontend/src/lib/types/auto-update.type.tsdeleted file mode 100644index 01524d659..000000000--- a/frontend/src/lib/types/auto-update.type.ts+++ /dev/null@@ -1,31 +0,0 @@-export type AutoUpdateResourceType = 'image' | 'container' | 'project';--export interface AutoUpdateCheck {- type?: 'containers' | 'projects' | 'all';- resourceIds?: string[];- forceUpdate?: boolean;- dryRun?: boolean;- resourceType?: AutoUpdateResourceType;-}--export interface AutoUpdateResult {- checked: number;- updated: number;- skipped: number;- failed: number;- items: AutoUpdateResourceResult[];- duration: string;-}--export interface AutoUpdateResourceResult {- resourceId: string;- resourceName: string;- resourceType: AutoUpdateResourceType;- status: 'checked' | 'up_to_date' | 'update_available' | 'updated' | 'failed' | 'skipped';- updateAvailable: boolean;- updateApplied: boolean;- oldImages?: Record<string, string>;- newImages?: Record<string, string>;- error?: string;- details?: Record<string, any>;-}diff --git a/frontend/src/lib/types/gitops.type.ts b/frontend/src/lib/types/automation.tssimilarity index 58%rename from frontend/src/lib/types/gitops.type.tsrename to frontend/src/lib/types/automation.tsindex b0bd2b169..bca9bca7d 100644--- a/frontend/src/lib/types/gitops.type.ts+++ b/frontend/src/lib/types/automation.ts@@ -1,3 +1,81 @@+// --- Auto-update ---++export type AutoUpdateResourceType = 'image' | 'container' | 'project';++export interface AutoUpdateCheck {+ type?: 'containers' | 'projects' | 'all';+ resourceIds?: string[];+ forceUpdate?: boolean;+ dryRun?: boolean;+ resourceType?: AutoUpdateResourceType;+}++export interface AutoUpdateResult {+ checked: number;+ updated: number;+ skipped: number;+ failed: number;+ items: AutoUpdateResourceResult[];+ duration: string;+}++export interface AutoUpdateResourceResult {+ resourceId: string;+ resourceName: string;+ resourceType: AutoUpdateResourceType;+ status: 'checked' | 'up_to_date' | 'update_available' | 'updated' | 'failed' | 'skipped';+ updateAvailable: boolean;+ updateApplied: boolean;+ oldImages?: Record<string, string>;+ newImages?: Record<string, string>;+ error?: string;+ details?: Record<string, any>;+}++// --- Pruning ---++export type PruneContainerMode = 'none' | 'stopped' | 'olderThan';+export type PruneImageMode = 'none' | 'dangling' | 'all' | 'olderThan';+export type PruneVolumeMode = 'none' | 'anonymous' | 'all';+export type PruneNetworkMode = 'none' | 'unused' | 'olderThan';+export type PruneBuildCacheMode = 'none' | 'unused' | 'all' | 'olderThan';++export interface PruneContainersOptions {+ mode: Exclude<PruneContainerMode, 'none'>;+ until?: string;+}++export interface PruneImagesOptions {+ mode: Exclude<PruneImageMode, 'none'>;+ until?: string;+}++export interface PruneVolumesOptions {+ mode: Exclude<PruneVolumeMode, 'none'>;+}++export interface PruneNetworksOptions {+ mode: Exclude<PruneNetworkMode, 'none'>;+ until?: string;+}++export interface PruneBuildCacheOptions {+ mode: Exclude<PruneBuildCacheMode, 'none'>;+ until?: string;+}++export interface SystemPruneRequest {+ containers?: PruneContainersOptions;+ images?: PruneImagesOptions;+ volumes?: PruneVolumesOptions;+ networks?: PruneNetworksOptions;+ buildCache?: PruneBuildCacheOptions;+}++export type PruneType = 'containers' | 'images' | 'networks' | 'volumes' | 'buildCache';++// --- GitOps: repositories, syncs, browsing ---+export interface GitRepositoryCreateDto {name: string;url: string;diff --git a/frontend/src/lib/types/container-registry.type.ts b/frontend/src/lib/types/container-registry.type.tsdeleted file mode 100644index 90f5d6024..000000000--- a/frontend/src/lib/types/container-registry.type.ts+++ /dev/null@@ -1,64 +0,0 @@-export type RegistryType = 'generic' | 'ecr';--export interface ContainerRegistryCreateDto {- url: string;- username?: string;- token?: string;- description?: string;- insecure?: boolean;- enabled?: boolean;- registryType?: RegistryType;- awsAccessKeyId?: string;- awsSecretAccessKey?: string;- awsRegion?: string;-}--export interface ContainerRegistryUpdateDto {- url?: string;- username?: string;- token?: string;- description?: string;- insecure?: boolean;- enabled?: boolean;- registryType?: RegistryType;- awsAccessKeyId?: string;- awsSecretAccessKey?: string;- awsRegion?: string;-}--export interface ContainerRegistry {- id: string;- url: string;- username: string;- token: string;- description?: string;- insecure?: boolean;- enabled?: boolean;- registryType?: RegistryType;- awsAccessKeyId?: string;- awsRegion?: string;- createdAt?: string;- updatedAt?: string;-}--export interface ContainerRegistryPullUsageResponse {- registries: ContainerRegistryPullUsage[];-}--export interface ContainerRegistryPullUsage {- registryId: string;- provider: string;- registry: string;- displayName: string;- repository?: string;- limit?: number;- remaining?: number;- used?: number;- windowSeconds?: number;- observedPulls: number;- authMethod: 'anonymous' | 'credential' | 'unknown';- authUsername?: string;- source?: string;- checkedAt: string;- error?: string;-}diff --git a/frontend/src/lib/types/container.type.ts b/frontend/src/lib/types/container.type.tsdeleted file mode 100644index 0e99f86d9..000000000--- a/frontend/src/lib/types/container.type.ts+++ /dev/null@@ -1,330 +0,0 @@-// Base Container Types--import type { ImageUpdateInfoDto } from './image.type';--export interface BaseContainer {- id: string;- names: string[];- image: string;- imageId: string;- command: string;- created: number;- labels: Record<string, string>;- state: string;- status: string;-}--// Container creation types-export interface PortBinding {- hostIp?: string;- hostPort: string;-}--export interface RestartPolicy {- name: 'no' | 'always' | 'on-failure' | 'unless-stopped';- maximumRetryCount?: number;-}--export interface HostConfigCreate {- binds?: string[];- portBindings?: Record<string, PortBinding[]>;- restartPolicy?: RestartPolicy;- networkMode?: string;- privileged?: boolean;- autoRemove?: boolean;- readonlyRootfs?: boolean;- publishAllPorts?: boolean;- memory?: number;- memorySwap?: number;- nanoCpus?: number;- cpuShares?: number;-}--export interface NetworkingConfig {- endpointsConfig?: Record<string, { aliases?: string[] }>;-}--export interface ContainerCreateRequest {- name: string;- image: string;- cmd?: string[];- entrypoint?: string[];- env?: string[];- exposedPorts?: Record<string, {}>;- hostConfig?: HostConfigCreate;- networkingConfig?: NetworkingConfig;- labels?: Record<string, string>;- workingDir?: string;- user?: string;- hostname?: string;- domainname?: string;- attachStdout?: boolean;- attachStderr?: boolean;- attachStdin?: boolean;- networkDisabled?: boolean;- tty?: boolean;- openStdin?: boolean;- stdinOnce?: boolean;-}--export interface ContainerSummaryDto extends BaseContainer {- ports: ContainerPorts[];- hostConfig: ContainerHostConfig;- networkSettings: ContainerNetworkSettings;- mounts: ContainerMounts[];- updateInfo?: ImageUpdateInfoDto;- redeployDisabled?: boolean;-}--export interface ContainerSummaryGroupDto {- groupName: string;- items: ContainerSummaryDto[];-}--export interface ContainerPorts {- ip?: string;- privatePort: number;- publicPort?: number;- type: string;-}--export interface ContainerHostConfig {- networkMode: string;- restartPolicy?: string;- privileged?: boolean;- autoRemove?: boolean;- nanoCpus?: number;- memory?: number;-}--export interface ContainerNetworkSettings {- networks: Record<string, ContainerNetwork>;-}--export interface ContainerMounts {- type: string;- name?: string;- source?: string;- destination: string;- driver?: string;- mode?: string;- rw?: boolean;- propagation?: string;-}--export interface ContainerNetwork {- ipamConfig: any | null;- links: string[] | null;- aliases: string[] | null;- macAddress: string;- driverOpts: Record<string, string> | null;- gwPriority: number;- networkId: string;- endpointId: string;- gateway: string;- ipAddress: string;- ipPrefixLen: number;- ipv6Gateway: string;- globalIPv6Address: string;- globalIPv6PrefixLen: number;- dnsNames: string[] | null;-}--// End Base Container Types--export interface ContainerStatusCounts {- runningContainers: number;- stoppedContainers: number;- totalContainers: number;-}--export interface ContainerHealthLogEntry {- start?: string;- end?: string;- exitCode?: number;- output?: string;-}--export interface ContainerHealthDto {- status: string;- failingStreak?: number;- log?: ContainerHealthLogEntry[];-}--export interface ContainerStateDto {- status: string;- running: boolean;- startedAt: string;- finishedAt: string;- health?: ContainerHealthDto;-}--// Healthcheck configuration. Durations are in nanoseconds (Docker SDK convention).-export interface ContainerHealthcheckDto {- test?: string[];- interval?: number;- timeout?: number;- startPeriod?: number;- startInterval?: number;- retries?: number;-}--export interface ContainerConfigDto {- env?: string[];- cmd?: string[];- entrypoint?: string[];- workingDir?: string;- user?: string;- healthcheck?: ContainerHealthcheckDto;-}--export interface ComposeInfo {- projectName: string;- serviceName: string;- workingDir?: string;- configFiles?: string;-}--export interface ContainerDetailsDto {- id: string;- name: string;- image: string;- imageId: string;- created: string;- state: ContainerStateDto;- config: ContainerConfigDto;- hostConfig: ContainerHostConfig;- networkSettings: ContainerNetworkSettings;- ports: ContainerPorts[];- mounts: ContainerMounts[];- labels: Record<string, string>;- composeInfo?: ComposeInfo;- redeployDisabled?: boolean;-}--// Container Stats Types--export interface BlkioStatEntry {- major: number;- minor: number;- op: string;- value: number;-}--export interface BlkioStats {- io_merged_recursive: BlkioStatEntry[] | null;- io_queue_recursive: BlkioStatEntry[] | null;- io_service_bytes_recursive: BlkioStatEntry[] | null;- io_service_time_recursive: BlkioStatEntry[] | null;- io_serviced_recursive: BlkioStatEntry[] | null;- io_time_recursive: BlkioStatEntry[] | null;- io_wait_time_recursive: BlkioStatEntry[] | null;- sectors_recursive: BlkioStatEntry[] | null;-}--export interface ThrottlingData {- periods: number;- throttled_periods: number;- throttled_time: number;-}--export interface CPUUsage {- total_usage: number;- usage_in_kernelmode: number;- usage_in_usermode: number;- percpu_usage?: number[];-}--export interface CPUStats {- cpu_usage: CPUUsage;- online_cpus: number;- system_cpu_usage: number;- throttling_data: ThrottlingData;-}--export interface MemoryStats {- limit: number;- usage: number;- max_usage?: number;- stats?: {- active_anon?: number;- active_file?: number;- anon?: number;- anon_thp?: number;- file?: number;- file_dirty?: number;- file_mapped?: number;- file_writeback?: number;- inactive_anon?: number;- inactive_file?: number;- kernel_stack?: number;- pgactivate?: number;- pgdeactivate?: number;- pgfault?: number;- pglazyfree?: number;- pglazyfreed?: number;- pgmajfault?: number;- pgrefill?: number;- pgscan?: number;- pgsteal?: number;- shmem?: number;- slab?: number;- slab_reclaimable?: number;- slab_unreclaimable?: number;- sock?: number;- thp_collapse_alloc?: number;- thp_fault_alloc?: number;- unevictable?: number;- workingset_activate?: number;- workingset_nodereclaim?: number;- workingset_refault?: number;- [key: string]: number | undefined;- };- failcnt?: number;-}--export interface NetworkStats {- rx_bytes: number;- rx_dropped: number;- rx_errors: number;- rx_packets: number;- tx_bytes: number;- tx_dropped: number;- tx_errors: number;- tx_packets: number;-}--export interface PidsStats {- current: number;- limit: number;-}--export interface StorageStats {- read_count_normalized?: number;- read_size_bytes?: number;- write_count_normalized?: number;- write_size_bytes?: number;-}--export interface ContainerStatsHistorySample {- cpuTenths: number;- memoryTenths: number;- memoryUsageBytes: number;-}--export interface ContainerStats {- id: string;- name: string;- read: string;- preread: string;- num_procs: number;- pids_stats: PidsStats;- blkio_stats: BlkioStats;- cpu_stats: CPUStats;- precpu_stats: CPUStats;- memory_stats: MemoryStats;- networks: Record<string, NetworkStats>;- storage_stats: StorageStats;- statsHistory?: ContainerStatsHistorySample[];- currentHistorySample?: ContainerStatsHistorySample;-}diff --git a/frontend/src/lib/types/customize-search.type.ts b/frontend/src/lib/types/customize-search.type.tsdeleted file mode 100644index 2f5734013..000000000--- a/frontend/src/lib/types/customize-search.type.ts+++ /dev/null@@ -1,25 +0,0 @@-export interface CustomizationMeta {- key: string;- label: string;- type: string;- keywords?: string[];- description?: string;-}--export interface CustomizeCategory {- id: string;- title: string;- description: string;- icon: string;- url: string;- keywords: string[];- customizations: CustomizationMeta[];- matchingCustomizations?: CustomizationMeta[];- relevanceScore?: number;-}--export interface CustomizeSearchResponse {- results: CustomizeCategory[];- query: string;- count: number;-}diff --git a/frontend/src/lib/types/dashboard.type.ts b/frontend/src/lib/types/dashboard.type.tsdeleted file mode 100644index c212f14f5..000000000--- a/frontend/src/lib/types/dashboard.type.ts+++ /dev/null@@ -1,78 +0,0 @@-import type { ContainerStatusCounts, ContainerSummaryDto } from './container.type';-import type { AppVersionInformation } from './application-configuration';-import type { Environment } from './environment.type';-import type { ImageSummaryDto, ImageUsageCounts } from './image.type';-import type { Paginated } from './pagination.type';--export type DashboardActionItemKind = 'stopped_containers' | 'image_updates' | 'actionable_vulnerabilities' | 'expiring_keys';--export type DashboardActionItemSeverity = 'warning' | 'critical';--export interface DashboardActionItem {- kind: DashboardActionItemKind;- count: number;- severity: DashboardActionItemSeverity;-}--export interface DashboardActionItems {- items: DashboardActionItem[];-}--export interface DashboardSnapshotSettings {}--export interface DashboardSnapshot {- containers: Paginated<ContainerSummaryDto, ContainerStatusCounts>;- images: Paginated<ImageSummaryDto>;- imageUsageCounts: ImageUsageCounts;- actionItems: DashboardActionItems;- settings: DashboardSnapshotSettings;-}--export type EnvironmentDashboardSnapshotState = 'ready' | 'skipped' | 'error';--export interface DashboardEnvironmentOverview {- environment: Environment;- containers: ContainerStatusCounts;- imageUsageCounts: ImageUsageCounts;- actionItems: DashboardActionItems;- settings: DashboardSnapshotSettings;- versionInfo?: AppVersionInformation;- snapshotState: EnvironmentDashboardSnapshotState;- snapshotError?: string;-}--export interface DashboardEnvironmentsSummary {- totalEnvironments: number;- onlineEnvironments: number;- standbyEnvironments: number;- offlineEnvironments: number;- pendingEnvironments: number;- errorEnvironments: number;- disabledEnvironments: number;- containers: ContainerStatusCounts;- imageUsageCounts: ImageUsageCounts;- environmentsWithActionItems: number;-}--export interface DashboardEnvironmentsOverview {- summary: DashboardEnvironmentsSummary;- environments: DashboardEnvironmentOverview[];-}--export interface DashboardOverviewSummary {- totalEnvironments: number;- reachableEnvironments: number;- unavailableEnvironments: number;- disabledEnvironments: number;- totalContainers: number;- runningContainers: number;- stoppedContainers: number;- totalImages: number;- imagesInUse: number;- imagesUnused: number;- totalImageSize: number;-}--export interface DashboardEnvironmentCardState {- environment: Environment;-}diff --git a/frontend/src/lib/types/docker-info.type.ts b/frontend/src/lib/types/docker-info.type.tsdeleted file mode 100644index acd6f9c93..000000000--- a/frontend/src/lib/types/docker-info.type.ts+++ /dev/null@@ -1,93 +0,0 @@-export interface DockerInfo {- success: boolean;- apiVersion: string;- gitCommit: string;- goVersion: string;- os: string;- arch: string;- buildTime: string;-- // System Info fields (from embedded system.Info)- ID: string;- Containers: number;- ContainersRunning: number;- ContainersPaused: number;- ContainersStopped: number;- Images: number;- Driver: string;- DriverStatus: string[][];- SystemStatus?: string[][];- Plugins: PluginsInfo;- MemoryLimit: boolean;- SwapLimit: boolean;- KernelMemory?: boolean;- KernelMemoryTCP?: boolean;- CpuCfsPeriod: boolean;- CpuCfsQuota: boolean;- CPUShares: boolean;- CPUSet: boolean;- PidsLimit: boolean;- IPv4Forwarding: boolean;- Debug: boolean;- NFd: number;- OomKillDisable: boolean;- NGoroutines: number;- SystemTime: string;- LoggingDriver: string;- CgroupDriver: string;- CgroupVersion?: string;- NEventsListener: number;- KernelVersion: string;- OperatingSystem: string;- OSVersion: string;- OSType: string;- Architecture: string;- IndexServerAddress: string;- RegistryConfig: any;- NCPU: number;- MemTotal: number;- GenericResources: any[];- DockerRootDir: string;- HttpProxy: string;- HttpsProxy: string;- NoProxy: string;- Name: string;- Labels: string[];- ExperimentalBuild: boolean;- ServerVersion: string;- Runtimes: Record<string, RuntimeWithStatus>;- DefaultRuntime: string;- Swarm: any;- LiveRestoreEnabled: boolean;- Isolation: string;- InitBinary: string;- ContainerdCommit: Commit;- RuncCommit: Commit;- InitCommit: Commit;- SecurityOptions: string[];- ProductLicense?: string;- DefaultAddressPools?: any[];- FirewallBackend?: any;- CDISpecDirs: string[];- DiscoveredDevices?: any[];- Containerd?: any;- Warnings: string[];-}--export interface PluginsInfo {- Volume?: string[];- Network?: string[];- Authorization?: string[];- Log?: string[];-}--export interface RuntimeWithStatus {- path: string;- runtimeArgs?: string[];- status?: Record<string, string>;-}--export interface Commit {- ID: string;- Expected: string;-}diff --git a/frontend/src/lib/types/docker.ts b/frontend/src/lib/types/docker.tsnew file mode 100644index 000000000..f3bcf3b80--- /dev/null+++ b/frontend/src/lib/types/docker.ts@@ -0,0 +1,822 @@+import type { VulnerabilityScanSummary } from './environment';++// --- Container DTOs ---++export interface BaseContainer {+ id: string;+ names: string[];+ image: string;+ imageId: string;+ command: string;+ created: number;+ labels: Record<string, string>;+ state: string;+ status: string;+}++export interface PortBinding {+ hostIp?: string;+ hostPort: string;+}++export interface RestartPolicy {+ name: 'no' | 'always' | 'on-failure' | 'unless-stopped';+ maximumRetryCount?: number;+}++export interface HostConfigCreate {+ binds?: string[];+ portBindings?: Record<string, PortBinding[]>;+ restartPolicy?: RestartPolicy;+ networkMode?: string;+ privileged?: boolean;+ autoRemove?: boolean;+ readonlyRootfs?: boolean;+ publishAllPorts?: boolean;+ memory?: number;+ memorySwap?: number;+ nanoCpus?: number;+ cpuShares?: number;+}++export interface NetworkingConfig {+ endpointsConfig?: Record<string, { aliases?: string[] }>;+}++export interface ContainerCreateRequest {+ name: string;+ image: string;+ cmd?: string[];+ entrypoint?: string[];+ env?: string[];+ exposedPorts?: Record<string, {}>;+ hostConfig?: HostConfigCreate;+ networkingConfig?: NetworkingConfig;+ labels?: Record<string, string>;+ workingDir?: string;+ user?: string;+ hostname?: string;+ domainname?: string;+ attachStdout?: boolean;+ attachStderr?: boolean;+ attachStdin?: boolean;+ networkDisabled?: boolean;+ tty?: boolean;+ openStdin?: boolean;+ stdinOnce?: boolean;+}++export interface ContainerSummaryDto extends BaseContainer {+ ports: ContainerPorts[];+ hostConfig: ContainerHostConfig;+ networkSettings: ContainerNetworkSettings;+ mounts: ContainerMounts[];+ updateInfo?: ImageUpdateInfoDto;+ redeployDisabled?: boolean;+}++export interface ContainerSummaryGroupDto {+ groupName: string;+ items: ContainerSummaryDto[];+}++export interface ContainerPorts {+ ip?: string;+ privatePort: number;+ publicPort?: number;+ type: string;+}++export interface ContainerHostConfig {+ networkMode: string;+ restartPolicy?: string;+ privileged?: boolean;+ autoRemove?: boolean;+ nanoCpus?: number;+ memory?: number;+}++export interface ContainerNetworkSettings {+ networks: Record<string, ContainerNetwork>;+}++export interface ContainerMounts {+ type: string;+ name?: string;+ source?: string;+ destination: string;+ driver?: string;+ mode?: string;+ rw?: boolean;+ propagation?: string;+}++export interface ContainerNetwork {+ ipamConfig: any | null;+ links: string[] | null;+ aliases: string[] | null;+ macAddress: string;+ driverOpts: Record<string, string> | null;+ gwPriority: number;+ networkId: string;+ endpointId: string;+ gateway: string;+ ipAddress: string;+ ipPrefixLen: number;+ ipv6Gateway: string;+ globalIPv6Address: string;+ globalIPv6PrefixLen: number;+ dnsNames: string[] | null;+}++export interface ContainerStatusCounts {+ runningContainers: number;+ stoppedContainers: number;+ totalContainers: number;+}++export interface ContainerHealthLogEntry {+ start?: string;+ end?: string;+ exitCode?: number;+ output?: string;+}++export interface ContainerHealthDto {+ status: string;+ failingStreak?: number;+ log?: ContainerHealthLogEntry[];+}++export interface ContainerStateDto {+ status: string;+ running: boolean;+ startedAt: string;+ finishedAt: string;+ health?: ContainerHealthDto;+}++export interface ContainerHealthcheckDto {+ test?: string[];+ interval?: number;+ timeout?: number;+ startPeriod?: number;+ startInterval?: number;+ retries?: number;+}++export interface ContainerConfigDto {+ env?: string[];+ cmd?: string[];+ entrypoint?: string[];+ workingDir?: string;+ user?: string;+ healthcheck?: ContainerHealthcheckDto;+}++export interface ComposeInfo {+ projectName: string;+ serviceName: string;+ workingDir?: string;+ configFiles?: string;+}++export interface ContainerDetailsDto {+ id: string;+ name: string;+ image: string;+ imageId: string;+ created: string;+ state: ContainerStateDto;+ config: ContainerConfigDto;+ hostConfig: ContainerHostConfig;+ networkSettings: ContainerNetworkSettings;+ ports: ContainerPorts[];+ mounts: ContainerMounts[];+ labels: Record<string, string>;+ composeInfo?: ComposeInfo;+ redeployDisabled?: boolean;+}++// --- Container stats ---++export interface BlkioStatEntry {+ major: number;+ minor: number;+ op: string;+ value: number;+}++export interface BlkioStats {+ io_merged_recursive: BlkioStatEntry[] | null;+ io_queue_recursive: BlkioStatEntry[] | null;+ io_service_bytes_recursive: BlkioStatEntry[] | null;+ io_service_time_recursive: BlkioStatEntry[] | null;+ io_serviced_recursive: BlkioStatEntry[] | null;+ io_time_recursive: BlkioStatEntry[] | null;+ io_wait_time_recursive: BlkioStatEntry[] | null;+ sectors_recursive: BlkioStatEntry[] | null;+}++export interface ThrottlingData {+ periods: number;+ throttled_periods: number;+ throttled_time: number;+}++export interface CPUUsage {+ total_usage: number;+ usage_in_kernelmode: number;+ usage_in_usermode: number;+ percpu_usage?: number[];+}++export interface CPUStats {+ cpu_usage: CPUUsage;+ online_cpus: number;+ system_cpu_usage: number;+ throttling_data: ThrottlingData;+}++export interface MemoryStats {+ limit: number;+ usage: number;+ max_usage?: number;+ stats?: {+ active_anon?: number;+ active_file?: number;+ anon?: number;+ anon_thp?: number;+ file?: number;+ file_dirty?: number;+ file_mapped?: number;+ file_writeback?: number;+ inactive_anon?: number;+ inactive_file?: number;+ kernel_stack?: number;+ pgactivate?: number;+ pgdeactivate?: number;+ pgfault?: number;+ pglazyfree?: number;+ pglazyfreed?: number;+ pgmajfault?: number;+ pgrefill?: number;+ pgscan?: number;+ pgsteal?: number;+ shmem?: number;+ slab?: number;+ slab_reclaimable?: number;+ slab_unreclaimable?: number;+ sock?: number;+ thp_collapse_alloc?: number;+ thp_fault_alloc?: number;+ unevictable?: number;+ workingset_activate?: number;+ workingset_nodereclaim?: number;+ workingset_refault?: number;+ [key: string]: number | undefined;+ };+ failcnt?: number;+}++export interface NetworkStats {+ rx_bytes: number;+ rx_dropped: number;+ rx_errors: number;+ rx_packets: number;+ tx_bytes: number;+ tx_dropped: number;+ tx_errors: number;+ tx_packets: number;+}++export interface PidsStats {+ current: number;+ limit: number;+}++export interface StorageStats {+ read_count_normalized?: number;+ read_size_bytes?: number;+ write_count_normalized?: number;+ write_size_bytes?: number;+}++export interface ContainerStatsHistorySample {+ cpuTenths: number;+ memoryTenths: number;+ memoryUsageBytes: number;+}++export interface ContainerStats {+ id: string;+ name: string;+ read: string;+ preread: string;+ num_procs: number;+ pids_stats: PidsStats;+ blkio_stats: BlkioStats;+ cpu_stats: CPUStats;+ precpu_stats: CPUStats;+ memory_stats: MemoryStats;+ networks: Record<string, NetworkStats>;+ storage_stats: StorageStats;+ statsHistory?: ContainerStatsHistorySample[];+ currentHistorySample?: ContainerStatsHistorySample;+}++// --- Image DTOs ---++export interface ImageUpdateInfoDto {+ hasUpdate: boolean;+ updateType: string;+ currentVersion: string;+ latestVersion: string;+ currentDigest: string;+ latestDigest: string;+ checkTime: string;+ responseTimeMs: number;+ error: string;+ authMethod?: 'none' | 'anonymous' | 'credential' | 'unknown';+ authUsername?: string;+ authRegistry?: string;+ usedCredential?: boolean;+}++export interface ImageUsageCounts {+ imagesInuse: number;+ imagesUnused: number;+ totalImages: number;+ totalImageSize: number;+}++export interface ImageUsedByDto {+ type: 'project' | 'container';+ name: string;+ id?: string;+}++export interface ImageSummaryDto {+ id: string;+ repoTags: string[];+ repoDigests: string[];+ created: number;+ size: number;+ virtualSize: number;+ labels: Record<string, unknown> | null;+ inUse: boolean;+ usedBy?: ImageUsedByDto[];+ repo: string;+ tag: string;+ updateInfo?: ImageUpdateInfoDto;+ vulnerabilityScan?: VulnerabilityScanSummary;+}++export interface ImageDetailSummaryDto {+ id: string;+ repoTags: string[];+ repoDigests: string[];+ parent: string;+ comment: string;+ created: string;+ dockerVersion: string;+ author: string;+ config: {+ exposedPorts?: Record<string, unknown>;+ env?: string[];+ cmd?: string[];+ volumes?: Record<string, unknown>;+ workingDir?: string;+ argsEscaped?: boolean;+ };+ architecture: string;+ os: string;+ size: number;+ graphDriver: {+ data: unknown | null;+ name: string;+ };+ rootFs: {+ type: string;+ layers: string[];+ };+ metadata: {+ lastTagTime: string;+ };+ descriptor: {+ mediaType: string;+ digest: string;+ size: number;+ };+}++export type ImageUpdateData = ImageUpdateInfoDto;++export type ImageBuildStatus = 'running' | 'success' | 'failed';++export interface ImageBuildRecord {+ id: string;+ environmentId: string;+ userId?: string;+ username?: string;+ status: ImageBuildStatus;+ provider?: string;+ contextDir: string;+ dockerfile?: string;+ target?: string;+ tags?: string[];+ platforms?: string[];+ buildArgs?: Record<string, string>;+ labels?: Record<string, string>;+ cacheFrom?: string[];+ cacheTo?: string[];+ noCache: boolean;+ pull: boolean;+ network?: string;+ isolation?: string;+ shmSize?: number;+ ulimits?: Record<string, string>;+ entitlements?: string[];+ privileged: boolean;+ extraHosts?: string[];+ push: boolean;+ load: boolean;+ digest?: string;+ errorMessage?: string;+ output?: string;+ outputTruncated: boolean;+ completedAt?: string;+ durationMs?: number;+ createdAt: string;+}++// --- Networks ---++export interface IPAMConfig {+ subnet?: string;+ gateway?: string;+ ipRange?: string;+ auxAddress?: Record<string, string>;+}++export interface IPAM {+ driver?: string;+ options?: Record<string, string>;+ config?: IPAMConfig[];+}++export interface NetworkCreateOptions {+ driver?: string;+ checkDuplicate?: boolean;+ internal?: boolean;+ attachable?: boolean;+ ingress?: boolean;+ ipam?: IPAM;+ enableIPv6?: boolean;+ options?: Record<string, string>;+ labels?: Record<string, string>;+}++export interface NetworkCreateRequest {+ name: string;+ options: NetworkCreateOptions;+}++export interface NetworkUsageCounts {+ inuse: number;+ unused: number;+ total: number;+}++export interface ContainerEndpointDto {+ id?: string;+ name: string;+ endpointId: string;+ macAddress: string;+ ipv4Address: string;+ ipv6Address: string;+}++export interface IPAMSubnetDto {+ subnet: string;+ gateway?: string;+ ipRange?: string;+ auxAddress?: Record<string, string>;+}++export interface IPAMDto {+ driver: string;+ options?: Record<string, string>;+ config?: IPAMSubnetDto[];+}++export interface NetworkSummaryDto {+ id: string;+ name: string;+ driver: string;+ scope: string;+ created: string;+ options?: Record<string, string> | null;+ labels?: Record<string, string> | null;+ inUse: boolean;+ isDefault?: boolean;+}++export interface ConfigReference {+ Network?: string;+}++export interface PeerInfo {+ Name?: string;+ IP?: string;+}++export interface Task {+ Name?: string;+ EndpointID?: string;+ EndpointIP?: string;+ Info?: Record<string, string>;+}++export interface ServiceInfo {+ VIP?: string;+ Ports?: string[];+ LocalLBIndex?: number;+ Tasks?: Task[];+}++export interface NetworkInspectDto {+ id: string;+ name: string;+ driver: string;+ scope: string;+ created: string;+ options?: Record<string, string> | null;+ labels?: Record<string, string> | null;+ containers?: Record<string, ContainerEndpointDto> | null;+ containersList?: ContainerEndpointDto[];+ ipam?: IPAMDto;+ internal: boolean;+ attachable: boolean;+ ingress: boolean;+ enableIPv6?: boolean;+ enableIPv4?: boolean;+ configFrom?: ConfigReference;+ configOnly?: boolean;+ peers?: PeerInfo[];+ services?: Record<string, ServiceInfo>;+}++export type TopologyNodeType = 'network' | 'container';++export interface TopologyNodeMetadata {+ driver?: string;+ scope?: string;+ status?: string;+ image?: string;+ isDefault?: boolean;+}++export interface TopologyNodeDto {+ id: string;+ name: string;+ type: TopologyNodeType;+ metadata: TopologyNodeMetadata;+}++export interface TopologyEdgeDto {+ id: string;+ source: string;+ target: string;+ ipv4Address?: string;+ ipv6Address?: string;+}++export interface NetworkTopologyDto {+ nodes: TopologyNodeDto[];+ edges: TopologyEdgeDto[];+}++// --- Volumes ---++export interface VolumeUsageData {+ size: number;+ refCount: number;+}++export interface VolumeCreateRequest {+ name: string;+ driver?: string;+ driverOpts?: Record<string, string>;+ labels?: Record<string, string>;+}++export interface VolumeSummaryDto {+ id: string;+ name: string;+ driver: string;+ mountpoint: string;+ scope: string;+ options: Record<string, string> | null;+ labels: Record<string, string>;+ createdAt: string;+ inUse: boolean;+ usageData?: VolumeUsageData;+ size: number;+}++export interface VolumeDetailDto extends VolumeSummaryDto {+ containers: string[];+}++export interface VolumeUsageDto {+ inUse: boolean;+ containers: string[];+}++export interface VolumeUsageCounts {+ inuse: number;+ unused: number;+ total: number;+}++export interface VolumeSizeInfo {+ name: string;+ size: number;+ refCount: number;+}++// --- Ports ---++export interface PortMappingDto {+ id: string;+ containerId: string;+ containerName: string;+ hostIp?: string;+ hostPort?: number;+ containerPort: number;+ protocol: string;+ isPublished: boolean;+}++// --- Docker engine info ---++export interface DockerInfo {+ success: boolean;+ apiVersion: string;+ gitCommit: string;+ goVersion: string;+ os: string;+ arch: string;+ buildTime: string;++ ID: string;+ Containers: number;+ ContainersRunning: number;+ ContainersPaused: number;+ ContainersStopped: number;+ Images: number;+ Driver: string;+ DriverStatus: string[][];+ SystemStatus?: string[][];+ Plugins: PluginsInfo;+ MemoryLimit: boolean;+ SwapLimit: boolean;+ KernelMemory?: boolean;+ KernelMemoryTCP?: boolean;+ CpuCfsPeriod: boolean;+ CpuCfsQuota: boolean;+ CPUShares: boolean;+ CPUSet: boolean;+ PidsLimit: boolean;+ IPv4Forwarding: boolean;+ Debug: boolean;+ NFd: number;+ OomKillDisable: boolean;+ NGoroutines: number;+ SystemTime: string;+ LoggingDriver: string;+ CgroupDriver: string;+ CgroupVersion?: string;+ NEventsListener: number;+ KernelVersion: string;+ OperatingSystem: string;+ OSVersion: string;+ OSType: string;+ Architecture: string;+ IndexServerAddress: string;+ RegistryConfig: any;+ NCPU: number;+ MemTotal: number;+ GenericResources: any[];+ DockerRootDir: string;+ HttpProxy: string;+ HttpsProxy: string;+ NoProxy: string;+ Name: string;+ Labels: string[];+ ExperimentalBuild: boolean;+ ServerVersion: string;+ Runtimes: Record<string, RuntimeWithStatus>;+ DefaultRuntime: string;+ Swarm: any;+ LiveRestoreEnabled: boolean;+ Isolation: string;+ InitBinary: string;+ ContainerdCommit: Commit;+ RuncCommit: Commit;+ InitCommit: Commit;+ SecurityOptions: string[];+ ProductLicense?: string;+ DefaultAddressPools?: any[];+ FirewallBackend?: any;+ CDISpecDirs: string[];+ DiscoveredDevices?: any[];+ Containerd?: any;+ Warnings: string[];+}++export interface PluginsInfo {+ Volume?: string[];+ Network?: string[];+ Authorization?: string[];+ Log?: string[];+}++export interface RuntimeWithStatus {+ path: string;+ runtimeArgs?: string[];+ status?: Record<string, string>;+}++export interface Commit {+ ID: string;+ Expected: string;+}++// --- Container registries ---++export type RegistryType = 'generic' | 'ecr';++export interface ContainerRegistryCreateDto {+ url: string;+ username?: string;+ token?: string;+ description?: string;+ insecure?: boolean;+ enabled?: boolean;+ registryType?: RegistryType;+ awsAccessKeyId?: string;+ awsSecretAccessKey?: string;+ awsRegion?: string;+}++export interface ContainerRegistryUpdateDto {+ url?: string;+ username?: string;+ token?: string;+ description?: string;+ insecure?: boolean;+ enabled?: boolean;+ registryType?: RegistryType;+ awsAccessKeyId?: string;+ awsSecretAccessKey?: string;+ awsRegion?: string;+}++export interface ContainerRegistry {+ id: string;+ url: string;+ username: string;+ token: string;+ description?: string;+ insecure?: boolean;+ enabled?: boolean;+ registryType?: RegistryType;+ awsAccessKeyId?: string;+ awsRegion?: string;+ createdAt?: string;+ updatedAt?: string;+}++export interface ContainerRegistryPullUsageResponse {+ registries: ContainerRegistryPullUsage[];+}++export interface ContainerRegistryPullUsage {+ registryId: string;+ provider: string;+ registry: string;+ displayName: string;+ repository?: string;+ limit?: number;+ remaining?: number;+ used?: number;+ windowSeconds?: number;+ observedPulls: number;+ authMethod: 'anonymous' | 'credential' | 'unknown';+ authUsername?: string;+ source?: string;+ checkedAt: string;+ error?: string;+}diff --git a/frontend/src/lib/types/environment.ts b/frontend/src/lib/types/environment.tsnew file mode 100644index 000000000..def2279d4--- /dev/null+++ b/frontend/src/lib/types/environment.ts@@ -0,0 +1,209 @@+// --- Environments & deployment snippets ---++export type EnvironmentStatus = 'online' | 'standby' | 'offline' | 'error' | 'pending';++export type EdgeMTLSCertificate = {+ commonName?: string;+ expiresAt?: string;+ daysRemaining?: number;+ expired: boolean;+ expiringSoon: boolean;+};++export type Environment = {+ id: string;+ name: string;+ apiUrl: string;+ status: EnvironmentStatus;+ enabled: boolean;+ isEdge: boolean;+ edgeTransport?: 'grpc' | 'websocket';+ edgeSecurityMode?: 'token' | 'mtls';+ connected?: boolean;+ connectedAt?: string;+ lastHeartbeat?: string;+ lastPollAt?: string;+ lastSeen?: string;+ edgeMTLSCertificate?: EdgeMTLSCertificate;+ apiKey?: string;+};++export interface CreateEnvironmentDTO {+ apiUrl: string;+ name: string;+ bootstrapToken?: string;+ useApiKey?: boolean;+ isEdge?: boolean;+}++export interface UpdateEnvironmentDTO {+ apiUrl?: string;+ name?: string;+ enabled?: boolean;+ isEdge?: boolean;+ bootstrapToken?: string;+ regenerateApiKey?: boolean;+}++export interface DeploymentSnippetFile {+ name: string;+ content?: string;+ downloadUrl?: string;+ sensitive?: boolean;+ containerPath: string;+ permissions: string;+}++export interface DeploymentSnippetMTLS {+ dockerRun: string;+ dockerCompose: string;+ files: DeploymentSnippetFile[];+ hostDirHint: string;+}++export interface DeploymentSnippets {+ dockerRun: string;+ dockerCompose: string;+ mtls?: DeploymentSnippetMTLS;+}++// --- Webhooks ---++export type WebhookTargetType = 'container' | 'project' | 'updater' | 'gitops';+export type WebhookActionType = 'update' | 'start' | 'stop' | 'restart' | 'redeploy' | 'up' | 'down' | 'run' | 'sync';++export type Webhook = {+ id: string;+ name: string;+ tokenPrefix: string;+ targetType: WebhookTargetType;+ actionType: WebhookActionType;+ targetId: string;+ targetName?: string;+ environmentId: string;+ enabled: boolean;+ lastTriggeredAt?: string;+ createdAt: string;+};++export type WebhookCreated = {+ id: string;+ name: string;+ token: string;+ targetType: WebhookTargetType;+ actionType: WebhookActionType;+ targetId: string;+ createdAt: string;+};++export type CreateWebhook = {+ name: string;+ targetType: WebhookTargetType;+ actionType: WebhookActionType;+ targetId: string;+};++export type UpdateWebhook = {+ enabled: boolean;+};++// --- Vulnerability scanning ---++export type VulnerabilitySeverity = 'UNKNOWN' | 'LOW' | 'MEDIUM' | 'HIGH' | 'CRITICAL';+export type VulnerabilityScanStatus = 'pending' | 'scanning' | 'completed' | 'failed';++export interface CVSSInfo {+ v2Score?: number;+ v3Score?: number;+ v2Vector?: string;+ v3Vector?: string;+}++export interface Vulnerability {+ vulnerabilityId: string;+ pkgName: string;+ installedVersion: string;+ fixedVersion?: string;+ severity: VulnerabilitySeverity;+ title?: string;+ description?: string;+ references?: string[];+ cvss?: CVSSInfo;+ publishedDate?: string;+ lastModifiedDate?: string;+}++export interface VulnerabilityWithImage extends Vulnerability {+ imageId: string;+ imageName: string;+}++export interface SeveritySummary {+ critical: number;+ high: number;+ medium: number;+ low: number;+ unknown: number;+ total: number;+}++export interface EnvironmentVulnerabilitySummary {+ totalImages: number;+ scannedImages: number;+ summary?: SeveritySummary;+}++export interface VulnerabilityScanResult {+ imageId: string;+ imageName: string;+ scanTime: string;+ status: VulnerabilityScanStatus;+ scanPhase?: 'creating_container' | 'scanning_image' | 'storing_results';+ summary?: SeveritySummary;+ vulnerabilities?: Vulnerability[];+ error?: string;+ duration?: number;+ scannerVersion?: string;+}++export interface VulnerabilityScanSummary {+ imageId: string;+ scanTime: string;+ status: VulnerabilityScanStatus;+ scanPhase?: 'creating_container' | 'scanning_image' | 'storing_results';+ summary?: SeveritySummary;+ error?: string;+}++export interface ScanSummariesRequest {+ imageIds: string[];+}++export interface ScanSummariesResponse {+ summaries: Record<string, VulnerabilityScanSummary | undefined>;+}++export interface ScannerStatus {+ available: boolean;+ version?: string;+}++export interface IgnoreVulnerabilityPayload {+ imageId: string;+ vulnerabilityId: string;+ pkgName: string;+ installedVersion: string;+ reason?: string;+}++export interface IgnoredVulnerability {+ id: string;+ environmentId: string;+ imageId: string;+ vulnerabilityId: string;+ pkgName: string;+ installedVersion: string;+ reason?: string;+ createdBy: string;+ createdAt: string;+}diff --git a/frontend/src/lib/types/environment.type.ts b/frontend/src/lib/types/environment.type.tsdeleted file mode 100644index 5ce75b2c4..000000000--- a/frontend/src/lib/types/environment.type.ts+++ /dev/null@@ -1,66 +0,0 @@-export type EnvironmentStatus = 'online' | 'standby' | 'offline' | 'error' | 'pending';--export type EdgeMTLSCertificate = {- commonName?: string;- expiresAt?: string;- daysRemaining?: number;- expired: boolean;- expiringSoon: boolean;-};--export type Environment = {- id: string;- name: string;- apiUrl: string;- status: EnvironmentStatus;- enabled: boolean;- isEdge: boolean;- edgeTransport?: 'grpc' | 'websocket';- edgeSecurityMode?: 'token' | 'mtls';- connected?: boolean;- connectedAt?: string;- lastHeartbeat?: string;- lastPollAt?: string;- lastSeen?: string;- edgeMTLSCertificate?: EdgeMTLSCertificate;- apiKey?: string;-};--export interface CreateEnvironmentDTO {- apiUrl: string;- name: string;- bootstrapToken?: string;- useApiKey?: boolean;- isEdge?: boolean;-}--export interface UpdateEnvironmentDTO {- apiUrl?: string;- name?: string;- enabled?: boolean;- isEdge?: boolean;- bootstrapToken?: string;- regenerateApiKey?: boolean;-}--export interface DeploymentSnippetFile {- name: string;- content?: string;- downloadUrl?: string;- sensitive?: boolean;- containerPath: string;- permissions: string;-}--export interface DeploymentSnippetMTLS {- dockerRun: string;- dockerCompose: string;- files: DeploymentSnippetFile[];- hostDirHint: string;-}--export interface DeploymentSnippets {- dockerRun: string;- dockerCompose: string;- mtls?: DeploymentSnippetMTLS;-}diff --git a/frontend/src/lib/types/event.type.ts b/frontend/src/lib/types/event.type.tsdeleted file mode 100644index d288e9d2d..000000000--- a/frontend/src/lib/types/event.type.ts+++ /dev/null@@ -1,17 +0,0 @@-export interface Event {- id: string;- type: string;- severity: 'info' | 'warning' | 'error' | 'success';- title: string;- description?: string;- resourceType?: string;- resourceId?: string;- resourceName?: string;- userId?: string;- username?: string;- environmentId?: string;- metadata?: Record<string, any>;- timestamp: string;- createdAt: string;- updatedAt?: string;-}diff --git a/frontend/src/lib/types/file-browser.type.ts b/frontend/src/lib/types/file-browser.type.tsdeleted file mode 100644index 74d73d5d3..000000000--- a/frontend/src/lib/types/file-browser.type.ts+++ /dev/null@@ -1,22 +0,0 @@-export interface FileEntry {- name: string;- path: string;- isDirectory: boolean;- size: number;- modTime: string;- mode: string;- isSymlink: boolean;- linkTarget?: string;-}--export interface FileContentResponse {- content: string; // Base64 encoded bytes from Go- mimeType: string;-}--export interface BackupEntry {- id: string;- volumeName: string;- size: number;- createdAt: string;-}diff --git a/frontend/src/lib/types/image.type.ts b/frontend/src/lib/types/image.type.tsdeleted file mode 100644index 38b5b5556..000000000--- a/frontend/src/lib/types/image.type.ts+++ /dev/null@@ -1,124 +0,0 @@-import type { VulnerabilityScanSummary } from './vulnerability.type';--export interface ImageUpdateInfoDto {- hasUpdate: boolean;- updateType: string;- currentVersion: string;- latestVersion: string;- currentDigest: string;- latestDigest: string;- checkTime: string;- responseTimeMs: number;- error: string;- authMethod?: 'none' | 'anonymous' | 'credential' | 'unknown';- authUsername?: string;- authRegistry?: string;- usedCredential?: boolean;-}--export interface ImageUsageCounts {- imagesInuse: number;- imagesUnused: number;- totalImages: number;- totalImageSize: number;-}--export interface ImageUsedByDto {- type: 'project' | 'container';- name: string;- id?: string;-}--export interface ImageSummaryDto {- id: string;- repoTags: string[];- repoDigests: string[];- created: number;- size: number;- virtualSize: number;- labels: Record<string, unknown> | null;- inUse: boolean;- usedBy?: ImageUsedByDto[];- repo: string;- tag: string;- updateInfo?: ImageUpdateInfoDto;- vulnerabilityScan?: VulnerabilityScanSummary;-}--export interface ImageDetailSummaryDto {- id: string;- repoTags: string[];- repoDigests: string[];- parent: string;- comment: string;- created: string; // ISO string- dockerVersion: string;- author: string;- config: {- exposedPorts?: Record<string, unknown>;- env?: string[];- cmd?: string[];- volumes?: Record<string, unknown>;- workingDir?: string;- argsEscaped?: boolean;- };- architecture: string;- os: string;- size: number;- graphDriver: {- data: unknown | null;- name: string;- };- rootFs: {- type: string;- layers: string[];- };- metadata: {- lastTagTime: string;- };- descriptor: {- mediaType: string;- digest: string;- size: number;- };-}--export type ImageUpdateData = ImageUpdateInfoDto;--export type ImageBuildStatus = 'running' | 'success' | 'failed';--export interface ImageBuildRecord {- id: string;- environmentId: string;- userId?: string;- username?: string;- status: ImageBuildStatus;- provider?: string;- contextDir: string;- dockerfile?: string;- target?: string;- tags?: string[];- platforms?: string[];- buildArgs?: Record<string, string>;- labels?: Record<string, string>;- cacheFrom?: string[];- cacheTo?: string[];- noCache: boolean;- pull: boolean;- network?: string;- isolation?: string;- shmSize?: number;- ulimits?: Record<string, string>;- entitlements?: string[];- privileged: boolean;- extraHosts?: string[];- push: boolean;- load: boolean;- digest?: string;- errorMessage?: string;- output?: string;- outputTruncated: boolean;- completedAt?: string;- durationMs?: number;- createdAt: string;-}diff --git a/frontend/src/lib/types/job-schedule.type.ts b/frontend/src/lib/types/job-schedule.type.tsdeleted file mode 100644index f825cfabd..000000000--- a/frontend/src/lib/types/job-schedule.type.ts+++ /dev/null@@ -1,46 +0,0 @@-export type JobSchedules = {- environmentHealthInterval: string;- eventCleanupInterval: string;- expiredSessionsCleanupInterval: string;- autoUpdateInterval: string;- dockerClientRefreshInterval: string;- pollingInterval: string;- scheduledPruneInterval: string;- gitopsSyncInterval: string;- vulnerabilityScanInterval: string;- autoHealInterval: string;-};--export type JobSchedulesUpdate = Partial<JobSchedules>;--export type JobPrerequisite = {- settingKey: string;- label: string;- isMet: boolean;- settingsUrl?: string;-};--export type JobStatus = {- id: string;- name: string;- description: string;- category: string;- schedule: string;- nextRun?: string;- enabled: boolean;- managerOnly: boolean;- isContinuous: boolean;- canRunManually: boolean;- prerequisites: JobPrerequisite[];- settingsKey?: string;-};--export type JobListResponse = {- jobs: JobStatus[];- isAgent: boolean;-};--export type JobRunResponse = {- success: boolean;- message: string;-};diff --git a/frontend/src/lib/types/network.type.ts b/frontend/src/lib/types/network.type.tsdeleted file mode 100644index 469a2896b..000000000--- a/frontend/src/lib/types/network.type.ts+++ /dev/null@@ -1,145 +0,0 @@-export interface IPAMConfig {- subnet?: string;- gateway?: string;- ipRange?: string;- auxAddress?: Record<string, string>;-}--export interface IPAM {- driver?: string;- options?: Record<string, string>;- config?: IPAMConfig[];-}--export interface NetworkCreateOptions {- driver?: string;- checkDuplicate?: boolean;- internal?: boolean;- attachable?: boolean;- ingress?: boolean;- ipam?: IPAM;- enableIPv6?: boolean;- options?: Record<string, string>;- labels?: Record<string, string>;-}--// Request sent to backend-export interface NetworkCreateRequest {- name: string;- options: NetworkCreateOptions;-}--export interface NetworkUsageCounts {- inuse: number;- unused: number;- total: number;-}--export interface ContainerEndpointDto {- id?: string;- name: string;- endpointId: string;- macAddress: string;- ipv4Address: string;- ipv6Address: string;-}--export interface IPAMSubnetDto {- subnet: string;- gateway?: string;- ipRange?: string;- auxAddress?: Record<string, string>;-}--export interface IPAMDto {- driver: string;- options?: Record<string, string>;- config?: IPAMSubnetDto[];-}--export interface NetworkSummaryDto {- id: string;- name: string;- driver: string;- scope: string;- created: string;- options?: Record<string, string> | null;- labels?: Record<string, string> | null;- inUse: boolean;- isDefault?: boolean;-}--export interface ConfigReference {- Network?: string;-}--export interface PeerInfo {- Name?: string;- IP?: string;-}--export interface Task {- Name?: string;- EndpointID?: string;- EndpointIP?: string;- Info?: Record<string, string>;-}--export interface ServiceInfo {- VIP?: string;- Ports?: string[];- LocalLBIndex?: number;- Tasks?: Task[];-}--export interface NetworkInspectDto {- id: string;- name: string;- driver: string;- scope: string;- created: string;- options?: Record<string, string> | null;- labels?: Record<string, string> | null;- containers?: Record<string, ContainerEndpointDto> | null;- containersList?: ContainerEndpointDto[];- ipam?: IPAMDto;- internal: boolean;- attachable: boolean;- ingress: boolean;- enableIPv6?: boolean;- enableIPv4?: boolean;- configFrom?: ConfigReference;- configOnly?: boolean;- peers?: PeerInfo[];- services?: Record<string, ServiceInfo>;-}--export type TopologyNodeType = 'network' | 'container';--export interface TopologyNodeMetadata {- driver?: string;- scope?: string;- status?: string;- image?: string;- isDefault?: boolean;-}--export interface TopologyNodeDto {- id: string;- name: string;- type: TopologyNodeType;- metadata: TopologyNodeMetadata;-}--export interface TopologyEdgeDto {- id: string;- source: string;- target: string;- ipv4Address?: string;- ipv6Address?: string;-}--export interface NetworkTopologyDto {- nodes: TopologyNodeDto[];- edges: TopologyEdgeDto[];-}diff --git a/frontend/src/lib/types/notification.type.ts b/frontend/src/lib/types/notification.type.tsdeleted file mode 100644index 7bcc35a1e..000000000--- a/frontend/src/lib/types/notification.type.ts+++ /dev/null@@ -1,25 +0,0 @@-export type NotificationProvider =- | 'discord'- | 'email'- | 'telegram'- | 'signal'- | 'slack'- | 'ntfy'- | 'pushover'- | 'gotify'- | 'matrix'- | 'generic';-export type EmailTLSMode = 'none' | 'starttls' | 'ssl';-export type EmailAuthMode = 'auto' | 'plain' | 'login' | 'crammd5';--export interface NotificationSettings {- provider: NotificationProvider;- enabled: boolean;- config?: Record<string, any>;-}--export interface TestNotificationResponse {- success: boolean;- message?: string;- error?: string;-}diff --git a/frontend/src/lib/types/notification-providers.ts b/frontend/src/lib/types/notifications.tssimilarity index 96%rename from frontend/src/lib/types/notification-providers.tsrename to frontend/src/lib/types/notifications.tsindex 1ee01d281..028b023eb 100644--- a/frontend/src/lib/types/notification-providers.ts+++ b/frontend/src/lib/types/notifications.ts@@ -1,6 +1,33 @@-import type { NotificationSettings, EmailTLSMode, EmailAuthMode } from './notification.type';+// --- Notification settings ---++export type NotificationProvider =+ | 'discord'+ | 'email'+ | 'telegram'+ | 'signal'+ | 'slack'+ | 'ntfy'+ | 'pushover'+ | 'gotify'+ | 'matrix'+ | 'generic';+export type EmailTLSMode = 'none' | 'starttls' | 'ssl';+export type EmailAuthMode = 'auto' | 'plain' | 'login' | 'crammd5';++export interface NotificationSettings {+ provider: NotificationProvider;+ enabled: boolean;+ config?: Record<string, any>;+}++export interface TestNotificationResponse {+ success: boolean;+ message?: string;+ error?: string;+}++// --- Provider keys (source of truth, alphabetical) ----// Provider keys - this is the source of truth for all providers (alphabetically sorted)export const NOTIFICATION_PROVIDER_KEYS = ['discord','email',@@ -15,7 +42,8 @@ export const NOTIFICATION_PROVIDER_KEYS = [] as const;export type NotificationProviderKey = (typeof NOTIFICATION_PROVIDER_KEYS)[number];-// Base form values that all providers share+// --- Provider form value shapes ---+export interface BaseProviderFormValues {enabled: boolean;eventImageUpdate: boolean;@@ -25,7 +53,6 @@ export interface BaseProviderFormValues {eventAutoHeal: boolean;}-// Provider-specific form value typesexport interface DiscordFormValues extends BaseProviderFormValues {webhookId: string;token: string;@@ -124,7 +151,6 @@ export interface GenericFormValues extends BaseProviderFormValues {customHeaders: string;}-// Map provider keys to their form value typesexport type ProviderFormValuesMap = {discord: DiscordFormValues;email: EmailFormValues;@@ -138,6 +164,8 @@ export type ProviderFormValuesMap = {generic: GenericFormValues;};+// --- Settings <-> form-values conversion ---+type ProviderConfig = Record<string, unknown>;type ProviderEvents = Partial<Record<'image_update' | 'container_update' | 'vulnerability_found' | 'prune_report' | 'auto_heal', boolean>@@ -194,7 +222,6 @@ function eventFlagsToFormValues(};}-// Helper to convert settings to form valuesexport function discordSettingsToFormValues(settings?: NotificationSettings): DiscordFormValues {const cfg = getConfig(settings);const events = getEvents(cfg);@@ -272,7 +299,6 @@ export function slackSettingsToFormValues(settings?: NotificationSettings): Slac};}-// Helper to convert form values back to API formatexport function discordFormValuesToSettings(values: DiscordFormValues): NotificationSettings {return {provider: 'discord',@@ -465,7 +491,6 @@ export function genericSettingsToFormValues(settings?: NotificationSettings): Geconst events = getEvents(cfg);const customHeaders = getStringRecord(cfg, 'customHeaders');- // Convert customHeaders object to string format (key1:value1, key2:value2)const customHeadersStr = Object.entries(customHeaders).map(([key, value]) => `${key}:${value}`).join(', ');@@ -583,7 +608,6 @@ export function matrixFormValuesToSettings(values: MatrixFormValues): Notificati}export function genericFormValuesToSettings(values: GenericFormValues): NotificationSettings {- // Parse customHeaders string (format: "key1:value1, key2:value2") into objectconst customHeaders: Record<string, string> = {};if (values.customHeaders) {const headerPairs = values.customHeadersdiff --git a/frontend/src/lib/types/pagination.type.ts b/frontend/src/lib/types/pagination.type.tsdeleted file mode 100644index 239560eee..000000000--- a/frontend/src/lib/types/pagination.type.ts+++ /dev/null@@ -1,51 +0,0 @@-export type PaginationRequest = {- page: number;- limit: number;-};--export type SortRequest = {- column: string;- direction: 'asc' | 'desc';-};--export type FilterValue = string | number | boolean | (string | number | boolean)[];-export type FilterMap = Record<string, FilterValue>;--export type SearchPaginationSortRequest = {- search?: string;- pagination?: PaginationRequest;- sort?: SortRequest;- filters?: FilterMap;- includeInternal?: boolean;-};--export type PaginationResponse = {- totalPages: number;- totalItems: number;- currentPage: number;- itemsPerPage: number;- grandTotalItems?: number;-};--export type Paginated<T, C = unknown> = {- data: T[];- pagination: PaginationResponse;- counts?: C;-};--// export interface PaginatedApiResponse<T> {-// success: boolean;-// data: T[];-// pagination: PaginationResponse;-// }--// export interface SortedPaginationRequest {-// pagination: {-// page: number;-// limit: number;-// };-// sort: {-// column: string;-// direction: 'asc' | 'desc';-// };-// }diff --git a/frontend/src/lib/types/port.type.ts b/frontend/src/lib/types/port.type.tsdeleted file mode 100644index b4af1a04e..000000000--- a/frontend/src/lib/types/port.type.ts+++ /dev/null@@ -1,10 +0,0 @@-export interface PortMappingDto {- id: string;- containerId: string;- containerName: string;- hostIp?: string;- hostPort?: number;- containerPort: number;- protocol: string;- isPublished: boolean;-}diff --git a/frontend/src/lib/types/project.type.ts b/frontend/src/lib/types/project.type.tsdeleted file mode 100644index be0b14ad7..000000000--- a/frontend/src/lib/types/project.type.ts+++ /dev/null@@ -1,107 +0,0 @@-export interface ServicePort {- mode?: string;- target: number;- published?: string;- protocol?: string;-}--export interface ServiceVolume {- type: string;- source: string;- target: string;- read_only?: boolean;- volume?: Record<string, any>;- bind?: Record<string, any>;-}--export interface ProjectService {- name?: string;- image?: string;- build?: string | Record<string, any>;- container_name?: string;- command?: string[] | string | null;- entrypoint?: string[] | string | null;- environment?: Record<string, string>;- env_file?: string[];- ports?: ServicePort[];- volumes?: ServiceVolume[];- networks?: Record<string, any>;- restart?: string;- depends_on?: Record<string, any>;- labels?: Record<string, string>;- healthcheck?: Record<string, any>;- deploy?: Record<string, any>;- [key: string]: any;-}--export interface IncludeFile {- path: string;- relativePath: string;- content?: string;-}--// RuntimeService contains live container status information-export interface RuntimeService {- name: string;- image: string;- status: string;- containerId?: string;- containerName?: string;- ports?: string[];- health?: string;- iconUrl?: string;- serviceConfig?: ProjectService;- redeployDisabled?: boolean;-}--export interface ProjectUpdateInfo {- status: 'has_update' | 'up_to_date' | 'unknown' | 'error';- hasUpdate: boolean;- imageCount: number;- checkedImageCount: number;- imagesWithUpdates: number;- errorCount: number;- errorMessage?: string;- imageRefs?: string[];- updatedImageRefs?: string[];- lastCheckedAt?: string;-}--export interface Project {- id: string;- name: string;- dirName?: string;- relativePath?: string;- path: string;- iconUrl?: string;- urls?: string[];- runningCount: string;- serviceCount: string;- status: string;- statusReason?: string;- updatedAt: string;- createdAt: string;- isArchived?: boolean;- isDiscovered?: boolean;- archivedAt?: string;- gitOpsManagedBy?: string;- lastSyncCommit?: string;- gitRepositoryURL?: string;- hasBuildDirective?: boolean;- redeployDisabled?: boolean;- updateInfo?: ProjectUpdateInfo;- services?: ProjectService[];- runtimeServices?: RuntimeService[];- composeContent?: string;- composeFileName?: string;- envContent?: string;- includeFiles?: IncludeFile[];- directoryFiles?: IncludeFile[];-}--export interface ProjectStatusCounts {- runningProjects: number;- stoppedProjects: number;- totalProjects: number;- archivedProjects: number;-}diff --git a/frontend/src/lib/types/prune.type.ts b/frontend/src/lib/types/prune.type.tsdeleted file mode 100644index d15d22a73..000000000--- a/frontend/src/lib/types/prune.type.ts+++ /dev/null@@ -1,39 +0,0 @@-export type PruneContainerMode = 'none' | 'stopped' | 'olderThan';-export type PruneImageMode = 'none' | 'dangling' | 'all' | 'olderThan';-export type PruneVolumeMode = 'none' | 'anonymous' | 'all';-export type PruneNetworkMode = 'none' | 'unused' | 'olderThan';-export type PruneBuildCacheMode = 'none' | 'unused' | 'all' | 'olderThan';--export interface PruneContainersOptions {- mode: Exclude<PruneContainerMode, 'none'>;- until?: string;-}--export interface PruneImagesOptions {- mode: Exclude<PruneImageMode, 'none'>;- until?: string;-}--export interface PruneVolumesOptions {- mode: Exclude<PruneVolumeMode, 'none'>;-}--export interface PruneNetworksOptions {- mode: Exclude<PruneNetworkMode, 'none'>;- until?: string;-}--export interface PruneBuildCacheOptions {- mode: Exclude<PruneBuildCacheMode, 'none'>;- until?: string;-}--export interface SystemPruneRequest {- containers?: PruneContainersOptions;- images?: PruneImagesOptions;- volumes?: PruneVolumesOptions;- networks?: PruneNetworksOptions;- buildCache?: PruneBuildCacheOptions;-}--export type PruneType = 'containers' | 'images' | 'networks' | 'volumes' | 'buildCache';diff --git a/frontend/src/lib/types/role.type.ts b/frontend/src/lib/types/role.type.tsdeleted file mode 100644index 4ae7c0f4f..000000000--- a/frontend/src/lib/types/role.type.ts+++ /dev/null@@ -1,106 +0,0 @@-// Public RBAC types — mirrors backend types/role/role.go.--export type RoleScope = 'global' | 'env';--/** A named permission set. Built-in roles are immutable. */-export type Role = {- id: string;- name: string;- description?: string;- permissions: string[];- builtIn: boolean;- assignedUserCount: number;- createdAt: string;- updatedAt?: string;-};--export type CreateRole = {- name: string;- description?: string;- permissions: string[];-};--export type UpdateRole = {- name: string;- description?: string;- permissions: string[];-};--/** One row in a user's role assignments. EnvironmentID omitted = global scope. */-export type RoleAssignment = {- id: string;- userId: string;- roleId: string;- environmentId?: string;- source: 'manual' | 'oidc';- createdAt: string;-};--/** Compact assignment shape returned on the User payload. */-export type RoleAssignmentSummary = {- roleId: string;- environmentId?: string;- source: 'manual' | 'oidc';-};--/** Payload for replacing a user's manual role assignments. */-export type SetUserAssignments = {- assignments: { roleId: string; environmentId?: string }[];-};--export type OidcMappingSource = 'manual' | 'env';--export type OidcRoleMapping = {- id: string;- claimValue: string;- roleId: string;- environmentId?: string;- source: OidcMappingSource;- createdAt: string;- updatedAt?: string;-};--export type CreateOidcRoleMapping = {- claimValue: string;- roleId: string;- environmentId?: string;-};--export type UpdateOidcRoleMapping = CreateOidcRoleMapping;--/** The permission manifest from GET /roles/available-permissions. */-export type PermissionsManifest = {- resources: PermissionResource[];-};--export type PermissionResource = {- key: string;- label: string;- scope: RoleScope;- actions: PermissionAction[];-};--export type PermissionAction = {- key: string;- permission: string;- label: string;- description?: string;-};--/** One permission grant on an API key. EnvironmentID omitted = global grant. */-export type ApiKeyPermissionGrant = {- permission: string;- environmentId?: string;-};--/** Built-in role IDs, stable across migrations. */-export const BUILT_IN_ROLE_ADMIN = 'role_admin';-export const BUILT_IN_ROLE_EDITOR = 'role_editor';-export const BUILT_IN_ROLE_DEPLOYER = 'role_deployer';-export const BUILT_IN_ROLE_VIEWER = 'role_viewer';--/** Sentinel used in PermissionsByEnv['global'] to mean "every permission". */-export const SUDO_PERMISSION = '*';--/** Map key used for global-scope permissions in PermissionsByEnv. */-export const GLOBAL_SCOPE = 'global';diff --git a/frontend/src/lib/types/settings-search.type.ts b/frontend/src/lib/types/settings-search.type.tsdeleted file mode 100644index ae7f2b4f3..000000000--- a/frontend/src/lib/types/settings-search.type.ts+++ /dev/null@@ -1,25 +0,0 @@-export interface SettingMeta {- key: string;- label: string;- type: string;- keywords?: string[];- description?: string;-}--export interface SettingsCategory {- id: string;- title: string;- description: string;- icon: string;- url: string;- keywords: string[];- settings: SettingMeta[];- matchingSettings?: SettingMeta[];- relevanceScore?: number;-}--export interface SettingsSearchResponse {- results: SettingsCategory[];- query: string;- count: number;-}diff --git a/frontend/src/lib/types/settings.type.ts b/frontend/src/lib/types/settings.tssimilarity index 69%rename from frontend/src/lib/types/settings.type.tsrename to frontend/src/lib/types/settings.tsindex 93047690a..7f73169db 100644--- a/frontend/src/lib/types/settings.type.ts+++ b/frontend/src/lib/types/settings.ts@@ -1,4 +1,6 @@-import type { TemplateRegistryConfig } from './template.type';+import type { TemplateRegistryConfig } from './swarm';++// --- Application settings ---export type ApplicationTheme = 'default' | 'graphite' | 'ocean' | 'amber' | 'github' | 'nord' | 'everforest' | 'rosepine';@@ -115,3 +117,73 @@ export interface OidcStatusInfo {providerName: string;providerLogoUrl: string;}++// --- App version info ---++export interface AppVersionInformation {+ currentVersion: string;+ currentTag?: string;+ currentDigest?: string;+ displayVersion: string;+ revision: string;+ shortRevision: string;+ goVersion: string;+ enabledFeatures?: string[];+ buildTime?: string;+ isSemverVersion: boolean;+ newestVersion?: string;+ newestDigest?: string;+ updateAvailable?: boolean;+ releaseUrl?: string;+ releaseNotes?: string;+ releasedAt?: string;+}++// --- Job schedules ---++export type JobSchedules = {+ environmentHealthInterval: string;+ eventCleanupInterval: string;+ expiredSessionsCleanupInterval: string;+ autoUpdateInterval: string;+ dockerClientRefreshInterval: string;+ pollingInterval: string;+ scheduledPruneInterval: string;+ gitopsSyncInterval: string;+ vulnerabilityScanInterval: string;+ autoHealInterval: string;+};++export type JobSchedulesUpdate = Partial<JobSchedules>;++export type JobPrerequisite = {+ settingKey: string;+ label: string;+ isMet: boolean;+ settingsUrl?: string;+};++export type JobStatus = {+ id: string;+ name: string;+ description: string;+ category: string;+ schedule: string;+ nextRun?: string;+ enabled: boolean;+ managerOnly: boolean;+ isContinuous: boolean;+ canRunManually: boolean;+ prerequisites: JobPrerequisite[];+ settingsKey?: string;+};++export type JobListResponse = {+ jobs: JobStatus[];+ isAgent: boolean;+};++export type JobRunResponse = {+ success: boolean;+ message: string;+};diff --git a/frontend/src/lib/types/shared.ts b/frontend/src/lib/types/shared.tsnew file mode 100644index 000000000..ba62b5a77--- /dev/null+++ b/frontend/src/lib/types/shared.ts@@ -0,0 +1,246 @@+// --- Pagination, sort, filters ---++export type PaginationRequest = {+ page: number;+ limit: number;+};++export type SortRequest = {+ column: string;+ direction: 'asc' | 'desc';+};++export type FilterValue = string | number | boolean | (string | number | boolean)[];+export type FilterMap = Record<string, FilterValue>;++export type SearchPaginationSortRequest = {+ search?: string;+ pagination?: PaginationRequest;+ sort?: SortRequest;+ filters?: FilterMap;+ includeInternal?: boolean;+};++export type PaginationResponse = {+ totalPages: number;+ totalItems: number;+ currentPage: number;+ itemsPerPage: number;+ grandTotalItems?: number;+};++export type Paginated<T, C = unknown> = {+ data: T[];+ pagination: PaginationResponse;+ counts?: C;+};++// --- Events ---++export interface Event {+ id: string;+ type: string;+ severity: 'info' | 'warning' | 'error' | 'success';+ title: string;+ description?: string;+ resourceType?: string;+ resourceId?: string;+ resourceName?: string;+ userId?: string;+ username?: string;+ environmentId?: string;+ metadata?: Record<string, any>;+ timestamp: string;+ createdAt: string;+ updatedAt?: string;+}++// --- Variables (key/value form helper) ---++export interface Variable {+ key: string;+ value: string;+}++// --- System stats ---++export interface SystemStats {+ cpuUsage: number;+ memoryUsage: number;+ memoryTotal: number;+ diskUsage?: number;+ diskTotal?: number;+ cpuCount: number;+ architecture: string;+ platform: string;+ hostname?: string;+ gpuCount: number;+ gpus?: GPUStats[];+}++export interface GPUStats {+ name: string;+ index: number;+ memoryUsed: number;+ memoryTotal: number;+}++// --- File browser ---++export interface FileEntry {+ name: string;+ path: string;+ isDirectory: boolean;+ size: number;+ modTime: string;+ mode: string;+ isSymlink: boolean;+ linkTarget?: string;+}++export interface FileContentResponse {+ content: string;+ mimeType: string;+}++export interface BackupEntry {+ id: string;+ volumeName: string;+ size: number;+ createdAt: string;+}++// --- Customize search ---++export interface CustomizationMeta {+ key: string;+ label: string;+ type: string;+ keywords?: string[];+ description?: string;+}++export interface CustomizeCategory {+ id: string;+ title: string;+ description: string;+ icon: string;+ url: string;+ keywords: string[];+ customizations: CustomizationMeta[];+ matchingCustomizations?: CustomizationMeta[];+ relevanceScore?: number;+}++export interface CustomizeSearchResponse {+ results: CustomizeCategory[];+ query: string;+ count: number;+}++// --- Settings search ---++export interface SettingMeta {+ key: string;+ label: string;+ type: string;+ keywords?: string[];+ description?: string;+}++export interface SettingsCategory {+ id: string;+ title: string;+ description: string;+ icon: string;+ url: string;+ keywords: string[];+ settings: SettingMeta[];+ matchingSettings?: SettingMeta[];+ relevanceScore?: number;+}++export interface SettingsSearchResponse {+ results: SettingsCategory[];+ query: string;+ count: number;+}++// --- Dashboard ---++import type { ContainerStatusCounts, ContainerSummaryDto, ImageSummaryDto, ImageUsageCounts } from './docker';+import type { AppVersionInformation } from './settings';+import type { Environment } from './environment';++export type DashboardActionItemKind = 'stopped_containers' | 'image_updates' | 'actionable_vulnerabilities' | 'expiring_keys';++export type DashboardActionItemSeverity = 'warning' | 'critical';++export interface DashboardActionItem {+ kind: DashboardActionItemKind;+ count: number;+ severity: DashboardActionItemSeverity;+}++export interface DashboardActionItems {+ items: DashboardActionItem[];+}++export interface DashboardSnapshotSettings {}++export interface DashboardSnapshot {+ containers: Paginated<ContainerSummaryDto, ContainerStatusCounts>;+ images: Paginated<ImageSummaryDto>;+ imageUsageCounts: ImageUsageCounts;+ actionItems: DashboardActionItems;+ settings: DashboardSnapshotSettings;+}++export type EnvironmentDashboardSnapshotState = 'ready' | 'skipped' | 'error';++export interface DashboardEnvironmentOverview {+ environment: Environment;+ containers: ContainerStatusCounts;+ imageUsageCounts: ImageUsageCounts;+ actionItems: DashboardActionItems;+ settings: DashboardSnapshotSettings;+ versionInfo?: AppVersionInformation;+ snapshotState: EnvironmentDashboardSnapshotState;+ snapshotError?: string;+}++export interface DashboardEnvironmentsSummary {+ totalEnvironments: number;+ onlineEnvironments: number;+ standbyEnvironments: number;+ offlineEnvironments: number;+ pendingEnvironments: number;+ errorEnvironments: number;+ disabledEnvironments: number;+ containers: ContainerStatusCounts;+ imageUsageCounts: ImageUsageCounts;+ environmentsWithActionItems: number;+}++export interface DashboardEnvironmentsOverview {+ summary: DashboardEnvironmentsSummary;+ environments: DashboardEnvironmentOverview[];+}++export interface DashboardOverviewSummary {+ totalEnvironments: number;+ reachableEnvironments: number;+ unavailableEnvironments: number;+ disabledEnvironments: number;+ totalContainers: number;+ runningContainers: number;+ stoppedContainers: number;+ totalImages: number;+ imagesInUse: number;+ imagesUnused: number;+ totalImageSize: number;+}++export interface DashboardEnvironmentCardState {+ environment: Environment;+}diff --git a/frontend/src/lib/types/swarm.type.ts b/frontend/src/lib/types/swarm.tssimilarity index 71%rename from frontend/src/lib/types/swarm.type.tsrename to frontend/src/lib/types/swarm.tsindex 6f9ac0249..05f8ae274 100644--- a/frontend/src/lib/types/swarm.type.ts+++ b/frontend/src/lib/types/swarm.ts@@ -1,3 +1,5 @@+// --- Swarm services, ports, mounts ---+export interface SwarmServicePort {protocol: string;targetPort: number;@@ -441,3 +443,190 @@ export interface SwarmSecretUpdateRequest {version?: number;spec: Record<string, unknown>;}++// --- Compose projects ---++export interface ServicePort {+ mode?: string;+ target: number;+ published?: string;+ protocol?: string;+}++export interface ServiceVolume {+ type: string;+ source: string;+ target: string;+ read_only?: boolean;+ volume?: Record<string, any>;+ bind?: Record<string, any>;+}++export interface ProjectService {+ name?: string;+ image?: string;+ build?: string | Record<string, any>;+ container_name?: string;+ command?: string[] | string | null;+ entrypoint?: string[] | string | null;+ environment?: Record<string, string>;+ env_file?: string[];+ ports?: ServicePort[];+ volumes?: ServiceVolume[];+ networks?: Record<string, any>;+ restart?: string;+ depends_on?: Record<string, any>;+ labels?: Record<string, string>;+ healthcheck?: Record<string, any>;+ deploy?: Record<string, any>;+ [key: string]: any;+}++export interface IncludeFile {+ path: string;+ relativePath: string;+ content?: string;+}++export interface RuntimeService {+ name: string;+ image: string;+ status: string;+ containerId?: string;+ containerName?: string;+ ports?: string[];+ health?: string;+ iconUrl?: string;+ serviceConfig?: ProjectService;+ redeployDisabled?: boolean;+}++export interface ProjectUpdateInfo {+ status: 'has_update' | 'up_to_date' | 'unknown' | 'error';+ hasUpdate: boolean;+ imageCount: number;+ checkedImageCount: number;+ imagesWithUpdates: number;+ errorCount: number;+ errorMessage?: string;+ imageRefs?: string[];+ updatedImageRefs?: string[];+ lastCheckedAt?: string;+}++export interface Project {+ id: string;+ name: string;+ dirName?: string;+ relativePath?: string;+ path: string;+ iconUrl?: string;+ urls?: string[];+ runningCount: string;+ serviceCount: string;+ status: string;+ statusReason?: string;+ updatedAt: string;+ createdAt: string;+ isArchived?: boolean;+ isDiscovered?: boolean;+ archivedAt?: string;+ gitOpsManagedBy?: string;+ lastSyncCommit?: string;+ gitRepositoryURL?: string;+ hasBuildDirective?: boolean;+ redeployDisabled?: boolean;+ updateInfo?: ProjectUpdateInfo;+ services?: ProjectService[];+ runtimeServices?: RuntimeService[];+ composeContent?: string;+ composeFileName?: string;+ envContent?: string;+ includeFiles?: IncludeFile[];+ directoryFiles?: IncludeFile[];+}++export interface ProjectStatusCounts {+ runningProjects: number;+ stoppedProjects: number;+ totalProjects: number;+ archivedProjects: number;+}++// --- Compose templates ---++export interface TemplateRegistry {+ id: string;+ name: string;+ url: string;+ enabled: boolean;+ description: string;+ createdAt?: string;+ updatedAt?: string;+ lastFetchError?: string;+}++export interface Template {+ id: string;+ name: string;+ description: string;+ content: string;+ envContent?: string;+ isCustom: boolean;+ isRemote: boolean;+ registryId?: string;+ registry?: TemplateRegistry;+ metadata?: {+ version?: string;+ author?: string;+ tags?: string[];+ remoteUrl?: string;+ envUrl?: string;+ documentationUrl?: string;+ iconUrl?: string;+ updatedAt?: string;+ };+ createdAt: string;+ updatedAt: string;+}++export interface EnvVariable {+ key: string;+ value: string;+}++export interface TemplateContentData {+ template: Template;+ content: string;+ envContent: string;+ services: string[];+ envVariables: EnvVariable[];+}++export interface RemoteTemplate {+ id: string;+ name: string;+ description: string;+ version: string;+ author: string;+ tags: string[];+ compose_url: string;+ env_url?: string;+ documentation_url?: string;+}++export interface RemoteRegistry {+ $schema?: string;+ name: string;+ description: string;+ version: string;+ author: string;+ url: string;+ templates: RemoteTemplate[];+}++export interface TemplateRegistryConfig {+ url: string;+ name: string;+ enabled: boolean;+}diff --git a/frontend/src/lib/types/system-stats.type.ts b/frontend/src/lib/types/system-stats.type.tsdeleted file mode 100644index ae4783d54..000000000--- a/frontend/src/lib/types/system-stats.type.ts+++ /dev/null@@ -1,20 +0,0 @@-export interface SystemStats {- cpuUsage: number;- memoryUsage: number;- memoryTotal: number;- diskUsage?: number;- diskTotal?: number;- cpuCount: number;- architecture: string;- platform: string;- hostname?: string;- gpuCount: number;- gpus?: GPUStats[];-}--export interface GPUStats {- name: string;- index: number;- memoryUsed: number; // in MB- memoryTotal: number; // in MB-}diff --git a/frontend/src/lib/types/template.type.ts b/frontend/src/lib/types/template.type.tsdeleted file mode 100644index 9e284df56..000000000--- a/frontend/src/lib/types/template.type.ts+++ /dev/null@@ -1,75 +0,0 @@-export interface TemplateRegistry {- id: string;- name: string;- url: string;- enabled: boolean;- description: string;- createdAt?: string;- updatedAt?: string;- lastFetchError?: string;-}--export interface Template {- id: string;- name: string;- description: string;- content: string;- envContent?: string;- isCustom: boolean;- isRemote: boolean;- registryId?: string;- registry?: TemplateRegistry;- metadata?: {- version?: string;- author?: string;- tags?: string[];- remoteUrl?: string;- envUrl?: string;- documentationUrl?: string;- iconUrl?: string;- updatedAt?: string;- };- createdAt: string;- updatedAt: string;-}--export interface EnvVariable {- key: string;- value: string;-}--export interface TemplateContentData {- template: Template;- content: string;- envContent: string;- services: string[];- envVariables: EnvVariable[];-}--export interface RemoteTemplate {- id: string;- name: string;- description: string;- version: string;- author: string;- tags: string[];- compose_url: string;- env_url?: string;- documentation_url?: string;-}--export interface RemoteRegistry {- $schema?: string;- name: string;- description: string;- version: string;- author: string;- url: string;- templates: RemoteTemplate[];-}--export interface TemplateRegistryConfig {- url: string;- name: string;- enabled: boolean;-}diff --git a/frontend/src/lib/types/user.type.ts b/frontend/src/lib/types/user.type.tsdeleted file mode 100644index 45a54507a..000000000--- a/frontend/src/lib/types/user.type.ts+++ /dev/null@@ -1,41 +0,0 @@-import type { Locale } from '$lib/paraglide/runtime';-import type { RoleAssignmentSummary } from '$lib/types/role.type';--export type User = {- id: string;- username: string;- passwordHash?: string;- displayName?: string;- email?: string;- /** Role assignments held by this user. */- roleAssignments: RoleAssignmentSummary[];- /**- * Server-resolved effective permissions, keyed by environment ID. The- * 'global' key holds permissions that apply across every environment AND- * to org-level endpoints. The value `['*']` under 'global' is a sentinel- * meaning "every permission" (sudo callers).- */- permissionsByEnv: Record<string, string[]>;- canDelete?: boolean;- createdAt: string;- lastLogin?: string;- updatedAt?: string;- oidcSubjectId?: string;- locale?: Locale;- requiresPasswordChange?: boolean;-};--export type CreateUser = Omit<- User,- | 'id'- | 'createdAt'- | 'updatedAt'- | 'lastLogin'- | 'oidcSubjectId'- | 'passwordHash'- | 'requiresPasswordChange'- | 'roleAssignments'- | 'permissionsByEnv'-> & {- password: string;-};diff --git a/frontend/src/lib/types/variable.type.ts b/frontend/src/lib/types/variable.type.tsdeleted file mode 100644index 672c315cc..000000000--- a/frontend/src/lib/types/variable.type.ts+++ /dev/null@@ -1,4 +0,0 @@-export interface Variable {- key: string;- value: string;-}diff --git a/frontend/src/lib/types/volume.type.ts b/frontend/src/lib/types/volume.type.tsdeleted file mode 100644index 350b68b96..000000000--- a/frontend/src/lib/types/volume.type.ts+++ /dev/null@@ -1,46 +0,0 @@-export interface VolumeUsageData {- size: number;- refCount: number;-}--export interface VolumeCreateRequest {- name: string;- driver?: string;- driverOpts?: Record<string, string>;- labels?: Record<string, string>;-}--export interface VolumeSummaryDto {- id: string;- name: string;- driver: string;- mountpoint: string;- scope: string;- options: Record<string, string> | null;- labels: Record<string, string>;- createdAt: string;- inUse: boolean;- usageData?: VolumeUsageData;- size: number;-}--export interface VolumeDetailDto extends VolumeSummaryDto {- containers: string[];-}--export interface VolumeUsageDto {- inUse: boolean;- containers: string[];-}--export interface VolumeUsageCounts {- inuse: number;- unused: number;- total: number;-}--export interface VolumeSizeInfo {- name: string;- size: number;- refCount: number;-}diff --git a/frontend/src/lib/types/vulnerability.type.ts b/frontend/src/lib/types/vulnerability.type.tsdeleted file mode 100644index 2c806dbde..000000000--- a/frontend/src/lib/types/vulnerability.type.ts+++ /dev/null@@ -1,99 +0,0 @@-// Vulnerability types for frontend-export type VulnerabilitySeverity = 'UNKNOWN' | 'LOW' | 'MEDIUM' | 'HIGH' | 'CRITICAL';-export type VulnerabilityScanStatus = 'pending' | 'scanning' | 'completed' | 'failed';--export interface CVSSInfo {- v2Score?: number;- v3Score?: number;- v2Vector?: string;- v3Vector?: string;-}--export interface Vulnerability {- vulnerabilityId: string;- pkgName: string;- installedVersion: string;- fixedVersion?: string;- severity: VulnerabilitySeverity;- title?: string;- description?: string;- references?: string[];- cvss?: CVSSInfo;- publishedDate?: string;- lastModifiedDate?: string;-}--export interface VulnerabilityWithImage extends Vulnerability {- imageId: string;- imageName: string;-}--export interface SeveritySummary {- critical: number;- high: number;- medium: number;- low: number;- unknown: number;- total: number;-}--export interface EnvironmentVulnerabilitySummary {- totalImages: number;- scannedImages: number;- summary?: SeveritySummary;-}--export interface VulnerabilityScanResult {- imageId: string;- imageName: string;- scanTime: string;- status: VulnerabilityScanStatus;- scanPhase?: 'creating_container' | 'scanning_image' | 'storing_results';- summary?: SeveritySummary;- vulnerabilities?: Vulnerability[];- error?: string;- duration?: number;- scannerVersion?: string;-}--export interface VulnerabilityScanSummary {- imageId: string;- scanTime: string;- status: VulnerabilityScanStatus;- scanPhase?: 'creating_container' | 'scanning_image' | 'storing_results';- summary?: SeveritySummary;- error?: string;-}--export interface ScanSummariesRequest {- imageIds: string[];-}--export interface ScanSummariesResponse {- summaries: Record<string, VulnerabilityScanSummary | undefined>;-}--export interface ScannerStatus {- available: boolean;- version?: string;-}--export interface IgnoreVulnerabilityPayload {- imageId: string;- vulnerabilityId: string;- pkgName: string;- installedVersion: string;- reason?: string;-}--export interface IgnoredVulnerability {- id: string;- environmentId: string;- imageId: string;- vulnerabilityId: string;- pkgName: string;- installedVersion: string;- reason?: string;- createdBy: string;- createdAt: string;-}diff --git a/frontend/src/lib/types/webhook.type.ts b/frontend/src/lib/types/webhook.type.tsdeleted file mode 100644index 2d7aa65cc..000000000--- a/frontend/src/lib/types/webhook.type.ts+++ /dev/null@@ -1,37 +0,0 @@-export type WebhookTargetType = 'container' | 'project' | 'updater' | 'gitops';-export type WebhookActionType = 'update' | 'start' | 'stop' | 'restart' | 'redeploy' | 'up' | 'down' | 'run' | 'sync';--export type Webhook = {- id: string;- name: string;- tokenPrefix: string;- targetType: WebhookTargetType;- actionType: WebhookActionType;- targetId: string;- targetName?: string;- environmentId: string;- enabled: boolean;- lastTriggeredAt?: string;- createdAt: string;-};--export type WebhookCreated = {- id: string;- name: string;- token: string;- targetType: WebhookTargetType;- actionType: WebhookActionType;- targetId: string;- createdAt: string;-};--export type CreateWebhook = {- name: string;- targetType: WebhookTargetType;- actionType: WebhookActionType;- targetId: string;-};--export type UpdateWebhook = {- enabled: boolean;-};diff --git a/frontend/src/lib/utils/accent-color-util.ts b/frontend/src/lib/utils/accent-color-util.tsdeleted file mode 100644index 6543dbc71..000000000--- a/frontend/src/lib/utils/accent-color-util.ts+++ /dev/null@@ -1,73 +0,0 @@-import { writable } from 'svelte/store';--const DEFAULT_ACCENT_COLOR = 'oklch(0.606 0.25 292.717)';--export const accentColorPreviewStore = writable<string>(DEFAULT_ACCENT_COLOR);--export function applyAccentColor(accentValue: string) {- const resolvedAccent = accentValue === 'default' ? DEFAULT_ACCENT_COLOR : accentValue;- accentColorPreviewStore.set(resolvedAccent);-- if (typeof document === 'undefined') {- return;- }-- if (accentValue === 'default') {- document.documentElement.style.removeProperty('--primary');- document.documentElement.style.removeProperty('--primary-foreground');- document.documentElement.style.removeProperty('--ring');- document.documentElement.style.removeProperty('--sidebar-ring');- return;- }-- document.documentElement.style.setProperty('--primary', resolvedAccent);-- // Smart foreground color selection based on brightness- const foregroundColor = getContrastingForeground(resolvedAccent);- document.documentElement.style.setProperty('--primary-foreground', foregroundColor);-- // Create proper ring colors based on input format- const ringColor = `color-mix(in srgb, ${resolvedAccent} 50%, transparent)`;- document.documentElement.style.setProperty('--ring', ringColor);- document.documentElement.style.setProperty('--sidebar-ring', ringColor);-}--function getContrastingForeground(color: string): string {- const brightness = getColorBrightness(color);-- // Use white text for dark colors, black text for light colors- return brightness < 0.55 ? 'oklch(0.98 0 0)' : 'oklch(0.09 0 0)';-}--function getColorBrightness(color: string): number {- // Create a temporary element to get computed color- const tempElement = document.createElement('div');- tempElement.style.color = color;- document.body.appendChild(tempElement);-- const computedColor = window.getComputedStyle(tempElement).color;- document.body.removeChild(tempElement);-- // Parse RGB values from computed color- const rgbMatch = computedColor.match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)/);- if (!rgbMatch) {- // Fallback: assume medium brightness- return 0.5;- }-- const r = Number.parseInt(rgbMatch[1] ?? '0', 10);- const g = Number.parseInt(rgbMatch[2] ?? '0', 10);- const b = Number.parseInt(rgbMatch[3] ?? '0', 10);-- // Calculate relative luminance using the standard formula- // https://www.w3.org/WAI/WCAG21/Understanding/contrast-minimum.html- const sR = r / 255;- const sG = g / 255;- const sB = b / 255;-- const rLinear = sR <= 0.03928 ? sR / 12.92 : Math.pow((sR + 0.055) / 1.055, 2.4);- const gLinear = sG <= 0.03928 ? sG / 12.92 : Math.pow((sG + 0.055) / 1.055, 2.4);- const bLinear = sB <= 0.03928 ? sB / 12.92 : Math.pow((sB + 0.055) / 1.055, 2.4);-- return 0.2126 * rLinear + 0.7152 * gLinear + 0.0722 * bLinear;-}diff --git a/frontend/src/lib/utils/ansi.ts b/frontend/src/lib/utils/ansi.tsdeleted file mode 100644index ce0cf8647..000000000--- a/frontend/src/lib/utils/ansi.ts+++ /dev/null@@ -1,32 +0,0 @@-import Convert from 'ansi-to-html';--const converter = new Convert({- fg: '#e4e4e7',- bg: '#000000',- newline: false,- escapeXML: true,- stream: false,- colors: {- 0: '#18181b',- 1: '#ef4444',- 2: '#22c55e',- 3: '#eab308',- 4: '#3b82f6',- 5: '#a855f7',- 6: '#06b6d4',- 7: '#f4f4f5',- 8: '#71717a',- 9: '#f87171',- 10: '#4ade80',- 11: '#facc15',- 12: '#60a5fa',- 13: '#c084fc',- 14: '#22d3ee',- 15: '#fafafa'- }-});--export function ansiToHtml(text: string): string {- if (!text) return '';- return converter.toHtml(text);-}diff --git a/frontend/src/lib/utils/api.ts b/frontend/src/lib/utils/api.tsnew file mode 100644index 000000000..b17e32072--- /dev/null+++ b/frontend/src/lib/utils/api.ts@@ -0,0 +1,194 @@+import { error as kitError } from '@sveltejs/kit';+import { toast } from 'svelte-sonner';+import { APIError } from '$lib/services/api-service';++// --- Result wrapper ---++type Success<T> = {+ data: T;+ error: null;+};++type Failure<E> = {+ data: null;+ error: E;+};++export type Result<T, E = Error> = Success<T> | Failure<E>;++export async function tryCatch<T, E = Error>(promise: Promise<T>): Promise<Result<T, E>> {+ try {+ const data = await promise;+ return { data, error: null };+ } catch (error) {+ return { data: null, error: error as E };+ }+}++// --- API error extraction ---++function extractServerMessage(data: any): string | undefined {+ const inner = data && typeof data === 'object' ? ((data as any).data ?? data) : data;+ if (typeof inner === 'string') return inner;+ if (!inner || typeof inner !== 'object') return undefined;++ const msg = (inner as any).error || (inner as any).message || (inner as any).detail || (inner as any).error_description;+ if (typeof msg === 'string' && msg.trim()) return msg;++ if (Array.isArray((inner as any).errors) && (inner as any).errors.length) {+ const first = (inner as any).errors[0];+ if (typeof first === 'string' && first.trim()) return first;+ if (first && typeof first === 'object') {+ const em = (first as any).message || (first as any).error;+ if (typeof em === 'string' && em.trim()) return em;+ }+ }++ return undefined;+}++export function extractApiErrorMessage(error: any): string {+ if (!error) return 'Unknown error';++ const respData = error?.response?.data;+ const serverMsg = extractServerMessage(respData);+ if (serverMsg) return serverMsg;++ const bodyMsg = extractServerMessage(error?.body);+ if (bodyMsg) return bodyMsg;++ if (typeof error?.error === 'string' && error.error.trim()) return error.error;+ if (typeof error?.reason === 'string' && error.reason.trim()) return error.reason;+ if (typeof error?.stderr === 'string' && error.stderr.trim()) return error.stderr;+ if (typeof error?.data === 'string' && error.data.trim()) return error.data;+ if (typeof error?.message === 'string' && error.message.trim()) return error.message;++ try {+ return JSON.stringify(error);+ } catch {+ return 'Unknown error';+ }+}++export async function handleApiResultWithCallbacks<T>({+ result,+ message,+ setLoadingState = () => {},+ onSuccess = async () => {},+ onError = async () => {}+}: {+ result: Result<T, Error>;+ message: string;+ setLoadingState?: (value: boolean) => void;+ onSuccess?: (data: T) => void | Promise<void>;+ onError?: (error: Error) => void | Promise<void>;+}) {+ try {+ setLoadingState(true);++ if (result.error) {+ console.error(`API Error: ${message}:`, result.error);+ if (!(result.error instanceof APIError) || result.error.status !== 403) {+ toast.error(message, { description: extractApiErrorMessage(result.error) });+ }+ await Promise.resolve(onError(result.error));+ } else {+ await Promise.resolve(onSuccess(result.data as T));+ }+ } finally {+ try {+ setLoadingState(false);+ } catch (e) {+ console.warn('Failed to clear loading state', e);+ }+ }+}++// --- Page load error helpers ---++export function extractApiErrorStatus(err: unknown, fallbackStatus = 500): number {+ if (err && typeof err === 'object') {+ const maybeResponse = (err as { response?: { status?: unknown } }).response;+ const responseStatus = maybeResponse?.status;+ if (typeof responseStatus === 'number' && Number.isFinite(responseStatus)) {+ return responseStatus;+ }+ }++ if (err && typeof err === 'object') {+ const maybeStatus = (err as { status?: unknown }).status;+ if (typeof maybeStatus === 'number' && Number.isFinite(maybeStatus)) {+ return maybeStatus;+ }+ if (typeof maybeStatus === 'string') {+ const parsed = Number.parseInt(maybeStatus, 10);+ if (!Number.isNaN(parsed)) {+ return parsed;+ }+ }+ }++ return fallbackStatus;+}++export function throwPageLoadError(err: unknown, fallbackMessage: string): never {+ const status = extractApiErrorStatus(err);+ const message = extractApiErrorMessage(err) || fallbackMessage;+ kitError(status, message);+}++// --- Refresh helpers ---++export interface RefreshTask<T> {+ fetch: () => Promise<T>;+ onSuccess: (data: T) => void;+ errorMessage: string;+}++export async function parallelRefresh<T extends Record<string, RefreshTask<any>>>(+ tasks: T,+ setLoading: (loading: boolean) => void+): Promise<void> {+ setLoading(true);++ const taskKeys = Object.keys(tasks);+ const completionStatus = Object.fromEntries(taskKeys.map((k) => [k, true]));++ const updateLoading = (key: string, value: boolean) => {+ completionStatus[key] = value;+ const stillLoading = Object.values(completionStatus).some((v) => v);+ setLoading(stillLoading);+ };++ await Promise.all(+ taskKeys.map(async (key) => {+ const task = tasks[key as keyof T];+ if (!task) return;++ handleApiResultWithCallbacks({+ result: await tryCatch(task.fetch()),+ message: task.errorMessage,+ setLoadingState: (value) => updateLoading(key, value),+ onSuccess: task.onSuccess+ });+ })+ );+}++export async function simpleRefresh<T>(+ fetch: () => Promise<T>,+ onSuccess: (data: T) => void,+ errorMessage: string,+ setLoading: (loading: boolean) => void+): Promise<void> {+ setLoading(true);+ try {+ const data = await fetch();+ onSuccess(data);+ } catch (error) {+ console.error('Refresh failed:', error);+ toast.error(errorMessage);+ } finally {+ setLoading(false);+ }+}diff --git a/frontend/src/lib/utils/api.util.ts b/frontend/src/lib/utils/api.util.tsdeleted file mode 100644index 6f5d2cf5a..000000000--- a/frontend/src/lib/utils/api.util.ts+++ /dev/null@@ -1,88 +0,0 @@-import type { Result } from './try-catch';-import { APIError } from '$lib/services/api-service';-import { toast } from 'svelte-sonner';--function extractServerMessage(data: any): string | undefined {- const inner = data && typeof data === 'object' ? ((data as any).data ?? data) : data;- if (typeof inner === 'string') return inner;- if (!inner || typeof inner !== 'object') return undefined;-- // Support both Arcane-style (error/message) and Huma RFC 7807 (detail)- const msg = (inner as any).error || (inner as any).message || (inner as any).detail || (inner as any).error_description;- if (typeof msg === 'string' && msg.trim()) return msg;-- if (Array.isArray((inner as any).errors) && (inner as any).errors.length) {- const first = (inner as any).errors[0];- if (typeof first === 'string' && first.trim()) return first;- if (first && typeof first === 'object') {- const em = (first as any).message || (first as any).error;- if (typeof em === 'string' && em.trim()) return em;- }- }-- return undefined;-}--export function extractApiErrorMessage(error: any): string {- if (!error) return 'Unknown error';-- const respData = error?.response?.data;- const serverMsg = extractServerMessage(respData);- if (serverMsg) return serverMsg;-- // Some callers pass `{ body: ... }`- const bodyMsg = extractServerMessage(error?.body);- if (bodyMsg) return bodyMsg;-- if (typeof error?.error === 'string' && error.error.trim()) return error.error;- if (typeof error?.reason === 'string' && error.reason.trim()) return error.reason;- if (typeof error?.stderr === 'string' && error.stderr.trim()) return error.stderr;- if (typeof error?.data === 'string' && error.data.trim()) return error.data;- if (typeof error?.message === 'string' && error.message.trim()) return error.message;-- try {- return JSON.stringify(error);- } catch {- return 'Unknown error';- }-}--function extractDockerErrorMessage(error: any): string {- return extractApiErrorMessage(error);-}--export async function handleApiResultWithCallbacks<T>({- result,- message,- setLoadingState = () => {},- onSuccess = async () => {},- onError = async () => {}-}: {- result: Result<T, Error>;- message: string;- setLoadingState?: (value: boolean) => void;- onSuccess?: (data: T) => void | Promise<void>;- onError?: (error: Error) => void | Promise<void>;-}) {- try {- setLoadingState(true);-- if (result.error) {- console.error(`API Error: ${message}:`, result.error);- // 403s are surfaced by the global "Access denied" toast in the API- // service interceptor; skip the per-action toast to avoid double-toasting.- if (!(result.error instanceof APIError) || result.error.status !== 403) {- toast.error(message, { description: extractDockerErrorMessage(result.error) });- }- await Promise.resolve(onError(result.error));- } else {- await Promise.resolve(onSuccess(result.data as T));- }- } finally {- try {- setLoadingState(false);- } catch (e) {- console.warn('Failed to clear loading state', e);- }- }-}diff --git a/frontend/src/lib/utils/arcane-labels.ts b/frontend/src/lib/utils/arcane-labels.tsdeleted file mode 100644index b58cb6464..000000000--- a/frontend/src/lib/utils/arcane-labels.ts+++ /dev/null@@ -1,15 +0,0 @@-const ARCANE_ICON_LABELS = ['arcane.icon', 'com.getarcaneapp.arcane.icon'];--export function getArcaneIconUrlFromLabels(labels?: Record<string, string> | null): string | null {- if (!labels) return null;-- for (const [key, value] of Object.entries(labels)) {- const normalizedKey = key.trim().toLowerCase();- if (ARCANE_ICON_LABELS.includes(normalizedKey)) {- const trimmed = value?.trim();- if (trimmed) return trimmed;- }- }-- return null;-}diff --git a/frontend/src/lib/utils/redirect.util.ts b/frontend/src/lib/utils/auth.tssimilarity index 52%rename from frontend/src/lib/utils/redirect.util.tsrename to frontend/src/lib/utils/auth.tsindex edd6fdfed..7644fc854 100644--- a/frontend/src/lib/utils/redirect.util.ts+++ b/frontend/src/lib/utils/auth.ts@@ -1,6 +1,47 @@-import type { User } from '$lib/types/user.type';-import { GLOBAL_SCOPE, SUDO_PERMISSION, BUILT_IN_ROLE_ADMIN } from '$lib/types/role.type';+import { get } from 'svelte/store';+import userStore from '$lib/stores/user-store';+import { environmentStore } from '$lib/stores/environment.store.svelte';import { getRouteAccessRules, getRouteFallbackRules, type RouteAccessRule } from '$lib/config/navigation-config';+import { BUILT_IN_ROLE_ADMIN, GLOBAL_SCOPE, SUDO_PERMISSION } from '$lib/types/auth';+import type { User } from '$lib/types/auth';++// --- Store-backed permission checks (for .svelte / runtime) ---++function resolveEnvId(envId?: string): string | undefined {+ if (envId) return envId;+ const selected = environmentStore.selected;+ if (!selected?.id) return undefined;+ return selected.id;+}++export function hasPermission(perm: string, envId?: string): boolean {+ return userStore.hasPermission(perm, resolveEnvId(envId));+}++export function hasAnyPermission(perms: string[], envId?: string): boolean {+ return userStore.hasAnyPermission(perms, resolveEnvId(envId));+}++export function permissions(envId?: string): Set<string> {+ return userStore.permissions(resolveEnvId(envId));+}++export function isGlobalAdmin(): boolean {+ return userStore.isGlobalAdmin();+}++export function hasAnyAccess(user: User | null): boolean {+ if (!user?.permissionsByEnv) return false;+ for (const perms of Object.values(user.permissionsByEnv)) {+ if (perms.length > 0) return true;+ }+ return false;+}++export { GLOBAL_SCOPE };+export { get };++// --- Load-function helpers (run before stores hydrate) ---const PROTECTED_PREFIXES = ['/dashboard',@@ -20,37 +61,23 @@ const PROTECTED_PREFIXES = [const UNAUTHENTICATED_ONLY_PREFIXES = ['/login', '/oidc/login', '/oidc/callback', '/auth/oidc/callback', '/img', '/favicon.ico'];-function isGlobalAdmin(user: User): boolean {+function isUserGlobalAdmin(user: User): boolean {const global = user.permissionsByEnv?.[GLOBAL_SCOPE];if (global?.includes(SUDO_PERMISSION)) return true;return !!user.roleAssignments?.some((a) => a.roleId === BUILT_IN_ROLE_ADMIN && !a.environmentId);}-/**- * Exported global-admin check for use in `+page.ts` load functions, where the- * user is available via `await parent()` but the store-backed helper in- * `permissions.util.ts` is not appropriate (load runs before stores hydrate).- */export function userIsGlobalAdmin(user: User | null | undefined): boolean {- return !!user && isGlobalAdmin(user);+ return !!user && isUserGlobalAdmin(user);}-/**- * True for routes reserved for global admins. Role creation/editing and OIDC- * mapping management are intentionally not delegatable to non-admin users —- * the matching backend routes are gated by RequireGlobalAdmin. Note that the- * bare `/settings/roles` list is still reachable for readers; only the- * `/new` and `/<id>` subroutes (the editor) are admin-only.- */function isAdminOnlyRoute(path: string): boolean {return path === '/settings/roles/new' || /^\/settings\/roles\/[^/]+/.test(path);}-/** Checks if a path matches a prefix exactly or as a parent directory. */const matchesAny = (path: string, prefixes: string[]) =>prefixes.some((prefix) => path === prefix || path.startsWith(`${prefix}/`));-/** Returns the permission set the user effectively holds at `envId` (global ∪ env). */function permissionsForEnv(user: User, envId?: string): Set<string> {const out = new Set<string>();const global = user.permissionsByEnv?.[GLOBAL_SCOPE];@@ -62,15 +89,13 @@ function permissionsForEnv(user: User, envId?: string): Set<string> {return out;}-/** Returns true if the user can satisfy any of `perms` at the given env scope. */function userCanReach(user: User, perms: string[], scope: 'global' | 'env', envId?: string): boolean {const set = permissionsForEnv(user, scope === 'env' ? envId : undefined);if (set.has(SUDO_PERMISSION)) return true;return perms.some((p) => set.has(p));}-/** Returns true if the user holds any permission anywhere. */-function hasAnyAccess(user: User): boolean {+function userHasAnyAccess(user: User): boolean {if (!user.permissionsByEnv) return false;for (const perms of Object.values(user.permissionsByEnv)) {if (perms.length > 0) return true;@@ -78,12 +103,6 @@ function hasAnyAccess(user: User): boolean {return false;}-/**- * Pick a fallback route the user CAN reach. Walks the gated routes in a- * sensible priority order (dashboard first, then resources, then settings)- * and returns the first one the user satisfies. Returns `/no-access` if- * nothing matches — that page is always reachable.- */function pickFallbackRoute(user: User, envId?: string): string {for (const rule of getRouteFallbackRules()) {if (userCanReach(user, rule.perms, rule.scope, envId)) {@@ -93,54 +112,35 @@ function pickFallbackRoute(user: User, envId?: string): string {return '/no-access';}-/**- * getAuthRedirectPath decides where to send the caller based on the current- * path, authentication state, and effective permissions. Returns null when- * no redirect is needed.- *- * @param envId the currently-selected environment ID; used for env-scoped- * permission checks. Pass undefined if no env is selected.- */export function getAuthRedirectPath(path: string, user: User | null, envId?: string): string | null {const isSignedIn = !!user;- // 1. Handle root pathif (path === '/') {return isSignedIn ? '/dashboard' : '/login';}- // 2. Redirect unauthenticated users away from protected areasif (!isSignedIn && matchesAny(path, PROTECTED_PREFIXES)) {return '/login';}- // 3. Redirect signed-in users away from login/auth pagesif (isSignedIn && matchesAny(path, UNAUTHENTICATED_ONLY_PREFIXES)) {return '/dashboard';}if (!isSignedIn || !user) return null;- // 4. Users with zero permissions land on /no-access (unless already there).- if (path !== '/no-access' && !hasAnyAccess(user)) {+ if (path !== '/no-access' && !userHasAnyAccess(user)) {return '/no-access';}- // 5. Admin-only routes (role editor) bounce non-admins back to the roles- // list — they can still read role definitions, just not edit them.- if (isAdminOnlyRoute(path) && !isGlobalAdmin(user)) {+ if (isAdminOnlyRoute(path) && !isUserGlobalAdmin(user)) {return '/settings/roles';}- // 6. Per-route permission gating. Walk the most-specific prefix first.const sorted: RouteAccessRule[] = [...getRouteAccessRules()].sort((a, b) => b.prefix.length - a.prefix.length);for (const rule of sorted) {if (matchesAny(path, [rule.prefix])) {if (!userCanReach(user, rule.perms, rule.scope, envId)) {- // Don't fall back to a route the user also can't reach — that- // produces an effective loop where every redirect target bounces- // to the same place. Pick the first reachable route in priority- // order, or /no-access if nothing fits.const fallback = pickFallbackRoute(user, envId);return fallback === path ? '/no-access' : fallback;}diff --git a/frontend/src/lib/utils/bytes.ts b/frontend/src/lib/utils/bytes.tsdeleted file mode 100644index 68e380e55..000000000--- a/frontend/src/lib/utils/bytes.ts+++ /dev/null@@ -1,141 +0,0 @@-/*!- * bytes- * Copyright(c) 2012-2014 TJ Holowaychuk- * Copyright(c) 2015 Jed Watson- * MIT Licensed- *- * TypeScript adaptation for Arcane.- */--export type BytesFormatOptions = {- decimalPlaces?: number;- fixedDecimals?: boolean;- thousandsSeparator?: string;- unit?: string;- unitSeparator?: string;-};--export type BytesValue = string | number;--const formatThousandsRegExp = /\B(?=(\d{3})+(?!\d))/g;-const formatDecimalsRegExp = /(?:\.0*|(\.[^0]+)0+)$/;--const map = {- b: 1,- kb: 1 << 10,- mb: 1 << 20,- gb: 1 << 30,- tb: Math.pow(1024, 4),- pb: Math.pow(1024, 5)-} as const;--const parseRegExp = /^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb|pb)$/i;--type BytesFunction = {- (value: string, options?: BytesFormatOptions): number | null;- (value: number, options?: BytesFormatOptions): string | null;- (value: BytesValue, options?: BytesFormatOptions): string | number | null;- format: typeof format;- parse: typeof parse;-};--function bytes(value: string, options?: BytesFormatOptions): number | null;-function bytes(value: number, options?: BytesFormatOptions): string | null;-function bytes(value: BytesValue, options?: BytesFormatOptions): string | number | null {- if (typeof value === 'string') {- return parse(value);- }-- if (typeof value === 'number') {- return format(value, options);- }-- return null;-}--export function format(value: number, options?: BytesFormatOptions): string | null {- if (!Number.isFinite(value)) {- return null;- }-- const magnitude = Math.abs(value);- const thousandsSeparator = options?.thousandsSeparator ?? '';- const unitSeparator = options?.unitSeparator ?? '';- const decimalPlaces = options?.decimalPlaces !== undefined ? options.decimalPlaces : 2;- const fixedDecimals = Boolean(options?.fixedDecimals);- let unit = options?.unit ?? '';-- const normalizedUnit = unit.toLowerCase() as keyof typeof map;- if (!unit || !map[normalizedUnit]) {- if (magnitude >= map.pb) {- unit = 'PB';- } else if (magnitude >= map.tb) {- unit = 'TB';- } else if (magnitude >= map.gb) {- unit = 'GB';- } else if (magnitude >= map.mb) {- unit = 'MB';- } else if (magnitude >= map.kb) {- unit = 'KB';- } else {- unit = 'B';- }- }-- const divisor = map[unit.toLowerCase() as keyof typeof map];- const val = value / divisor;- let str = val.toFixed(decimalPlaces);-- if (!fixedDecimals) {- str = str.replace(formatDecimalsRegExp, '$1');- }-- if (thousandsSeparator) {- str = str- .split('.')- .map((part, index) => (index === 0 ? part.replace(formatThousandsRegExp, thousandsSeparator) : part))- .join('.');- }-- return str + unitSeparator + unit;-}--export function parse(val: string | number): number | null {- if (typeof val === 'number' && !Number.isNaN(val)) {- return val;- }-- if (typeof val !== 'string') {- return null;- }-- const results = parseRegExp.exec(val);- let floatValue: number;- let unit: keyof typeof map;-- if (!results) {- floatValue = Number.parseInt(val, 10);- unit = 'b';- } else {- const numericValue = results[1];- const matchedUnit = results[4];- if (!numericValue || !matchedUnit) {- return null;- }-- floatValue = Number.parseFloat(numericValue);- unit = matchedUnit.toLowerCase() as keyof typeof map;- }-- if (Number.isNaN(floatValue)) {- return null;- }-- return Math.floor(map[unit] * floatValue);-}--const bytesWithHelpers = bytes as BytesFunction;-bytesWithHelpers.format = format;-bytesWithHelpers.parse = parse;--export default bytesWithHelpers;diff --git a/frontend/src/lib/utils/container-stats.utils.ts b/frontend/src/lib/utils/container-stats.utils.tsdeleted file mode 100644index 5d3c311d2..000000000--- a/frontend/src/lib/utils/container-stats.utils.ts+++ /dev/null@@ -1,35 +0,0 @@-import type { ContainerStats } from '$lib/types/container.type';--export function calculateCPUPercent(stats: ContainerStats | null): number {- if (!stats?.cpu_stats || !stats?.precpu_stats) return 0;-- const cpuDelta = stats.cpu_stats.cpu_usage.total_usage - (stats.precpu_stats.cpu_usage?.total_usage || 0);- const systemDelta = stats.cpu_stats.system_cpu_usage - (stats.precpu_stats.system_cpu_usage || 0);-- if (systemDelta > 0 && cpuDelta > 0) {- const cpuPercent = (cpuDelta / systemDelta) * 100.0;- return Math.min(Math.max(cpuPercent, 0), 100);- }- return 0;-}--export function calculateMemoryPercent(stats: ContainerStats | null): number {- if (!stats?.memory_stats) return 0;-- const usage = calculateMemoryUsage(stats);- const limit = stats.memory_stats.limit || 0;-- if (limit > 0) {- const percent = (usage / limit) * 100;- return Math.min(Math.max(percent, 0), 100);- }- return 0;-}--export function calculateMemoryUsage(stats: ContainerStats | null): number {- if (!stats?.memory_stats) return 0;-- const usage = stats.memory_stats.usage || 0;- const inactiveFile = stats.memory_stats.stats?.inactive_file || 0;- return Math.max(usage - inactiveFile, 0);-}diff --git a/frontend/src/lib/utils/docker.ts b/frontend/src/lib/utils/docker.tsnew file mode 100644index 000000000..17249145a--- /dev/null+++ b/frontend/src/lib/utils/docker.ts@@ -0,0 +1,711 @@+import { PersistedState } from 'runed';+import { m } from '$lib/paraglide/messages';+import type { ContainerStats } from '$lib/types/docker';+import type { Environment, EnvironmentStatus } from '$lib/types/environment';+import type { SearchPaginationSortRequest } from '$lib/types/shared';+import type { ProjectUpdateInfo } from '$lib/types/swarm';+import type { SwarmServiceModeName, SwarmServiceModeSpec } from '$lib/types/swarm';+import type { VulnerabilityScanSummary } from '$lib/types/environment';++// --- Container stats math ---++export function calculateCPUPercent(stats: ContainerStats | null): number {+ if (!stats?.cpu_stats || !stats?.precpu_stats) return 0;++ const cpuDelta = stats.cpu_stats.cpu_usage.total_usage - (stats.precpu_stats.cpu_usage?.total_usage || 0);+ const systemDelta = stats.cpu_stats.system_cpu_usage - (stats.precpu_stats.system_cpu_usage || 0);++ if (systemDelta > 0 && cpuDelta > 0) {+ const cpuPercent = (cpuDelta / systemDelta) * 100.0;+ return Math.min(Math.max(cpuPercent, 0), 100);+ }+ return 0;+}++export function calculateMemoryPercent(stats: ContainerStats | null): number {+ if (!stats?.memory_stats) return 0;++ const usage = calculateMemoryUsage(stats);+ const limit = stats.memory_stats.limit || 0;++ if (limit > 0) {+ const percent = (usage / limit) * 100;+ return Math.min(Math.max(percent, 0), 100);+ }+ return 0;+}++export function calculateMemoryUsage(stats: ContainerStats | null): number {+ if (!stats?.memory_stats) return 0;++ const usage = stats.memory_stats.usage || 0;+ const inactiveFile = stats.memory_stats.stats?.inactive_file || 0;+ return Math.max(usage - inactiveFile, 0);+}++// --- Swarm service mode helpers ---++export type SwarmServiceModeBadgeVariant = 'green' | 'blue' | 'amber' | 'purple' | 'gray';++export function getSwarmServiceModeFromSpec(mode: SwarmServiceModeSpec | undefined): SwarmServiceModeName {+ if (mode?.Replicated) return 'replicated';+ if (mode?.Global !== undefined) return 'global';+ if (mode?.ReplicatedJob) return 'replicated-job';+ if (mode?.GlobalJob !== undefined) return 'global-job';+ return 'unknown';+}++export function getSwarmServiceModeLabel(mode: string): string {+ switch (mode) {+ case 'replicated':+ return m.swarm_service_mode_replicated();+ case 'global':+ return m.swarm_service_mode_global();+ case 'replicated-job':+ return m.swarm_service_mode_replicated_job();+ case 'global-job':+ return m.swarm_service_mode_global_job();+ default:+ return m.common_unknown();+ }+}++export function getSwarmServiceModeVariant(mode: string): SwarmServiceModeBadgeVariant {+ switch (mode) {+ case 'replicated':+ return 'blue';+ case 'global':+ return 'green';+ case 'replicated-job':+ return 'amber';+ case 'global-job':+ return 'purple';+ default:+ return 'gray';+ }+}++export function isSwarmServiceModeScalable(mode: string): boolean {+ return mode === 'replicated' || mode === 'replicated-job';+}++// --- Project update status display ---++type ProjectUpdateStatus = ProjectUpdateInfo['status'];+export type ProjectUpdateBadgeVariant = 'blue' | 'green' | 'gray' | 'red';++export function getProjectUpdateStatus(updateInfo?: ProjectUpdateInfo): ProjectUpdateStatus {+ return updateInfo?.status ?? 'unknown';+}++export function getProjectUpdateText(updateInfo?: ProjectUpdateInfo): string {+ switch (getProjectUpdateStatus(updateInfo)) {+ case 'has_update':+ return m.images_has_updates();+ case 'up_to_date':+ return m.image_update_up_to_date_title();+ case 'error':+ return m.common_error();+ default:+ return m.image_update_status_unknown();+ }+}++export function getProjectUpdateVariant(updateInfo?: ProjectUpdateInfo): ProjectUpdateBadgeVariant {+ switch (getProjectUpdateStatus(updateInfo)) {+ case 'has_update':+ return 'blue';+ case 'up_to_date':+ return 'green';+ case 'error':+ return 'red';+ default:+ return 'gray';+ }+}++export function getProjectUpdateTooltip(updateInfo?: ProjectUpdateInfo): string | undefined {+ switch (getProjectUpdateStatus(updateInfo)) {+ case 'error':+ return m.image_update_check_failed_title();+ case 'unknown':+ return m.image_update_click_to_check();+ default:+ return undefined;+ }+}++// --- Updates filter transforms ---++export const updatesFilter = 'has_update';++export function ensureUpdatesFilter<T extends SearchPaginationSortRequest>(options: T): T {+ return {+ ...options,+ filters: {+ ...(options.filters ?? {}),+ updates: updatesFilter+ }+ };+}++export function ensureStandaloneContainerUpdatesFilter<T extends SearchPaginationSortRequest>(options: T): T {+ const next = ensureUpdatesFilter(options);+ return {+ ...next,+ filters: {+ ...(next.filters ?? {}),+ standalone: true+ }+ };+}++// --- Image pull progress tracking ---++export type PullPhase = 'preparing' | 'downloading' | 'extracting' | 'verifying' | 'waiting' | 'complete' | 'error';++export interface LayerProgress {+ current: number;+ total: number;+ status: string;+}++export interface PullProgressState {+ progress: number;+ statusText: string;+ error: string;+ layers: Record<string, LayerProgress>;+}++export const showImageLayersState = new PersistedState('arcane-show-image-layers', false);++export function createPullProgressState(): PullProgressState {+ return {+ progress: 0,+ statusText: '',+ error: '',+ layers: {}+ };+}++export function isLayerComplete(status: string): boolean {+ const s = status.toLowerCase();+ return (+ s.includes('pull complete') ||+ s.includes('already exists') ||+ s.includes('downloaded newer image') ||+ s.includes('image is up to date')+ );+}++export function getPullPhase(status: string, isComplete = false, hasError = false): PullPhase {+ if (hasError) return 'error';+ if (isComplete) return 'complete';++ const s = status.toLowerCase();+ if (isLayerComplete(s)) return 'complete';+ if (s.includes('downloading')) return 'downloading';+ if (s.includes('extracting')) return 'extracting';+ if (s.includes('verifying') || s.includes('digest')) return 'verifying';+ if (s.includes('waiting')) return 'waiting';+ if (s.includes('pulling') || s.includes('pull')) return 'downloading';+ return 'preparing';+}++export function isDownloadingLine(data: unknown): boolean {+ if (!data || typeof data !== 'object') return false;++ const obj = data as Record<string, unknown>;+ const status = String(obj['status'] ?? '').toLowerCase();+ const pd = obj['progressDetail'] as Record<string, unknown> | undefined;++ if (pd && (typeof pd['total'] === 'number' || typeof pd['current'] === 'number')) return true;++ return (+ status.includes('downloading') ||+ status.includes('extracting') ||+ status.includes('pulling fs layer') ||+ status.includes('download complete') ||+ status.includes('pull complete')+ );+}++export function calculateOverallProgress(layers: Record<string, LayerProgress>): number {+ const entries = Object.values(layers);+ if (entries.length === 0) return 0;++ const totalLayers = entries.length;+ let weightedSum = 0;++ for (const layer of entries) {+ const s = (layer.status || '').toLowerCase();+ if (isLayerComplete(s)) {+ weightedSum += 1.0;+ } else if (s.includes('extracting')) {+ weightedSum += 0.95;+ } else if (s.includes('verifying')) {+ weightedSum += 0.92;+ } else if (s.includes('download complete')) {+ weightedSum += 0.85;+ } else if (layer.total > 0) {+ const downloadProgress = (layer.current / layer.total) * 0.85;+ weightedSum += Math.min(downloadProgress, 0.85);+ } else if (s.includes('downloading') || s.includes('pulling')) {+ weightedSum += 0.05;+ }+ }++ const overallProgress = (weightedSum / totalLayers) * 100;+ return Math.min(overallProgress, 100);+}++export function areAllLayersComplete(layers: Record<string, LayerProgress>): boolean {+ const entries = Object.values(layers);+ if (entries.length === 0) return false;++ return entries.every((l) => l.status && isLayerComplete(l.status));+}++export function getLayerStats(layers: Record<string, LayerProgress>, forceComplete = false) {+ const entries = Object.entries(layers);+ const total = entries.length;+ const completed = entries.filter(([_, l]) => isLayerComplete(l.status || '')).length;+ const effectiveCompleted = forceComplete ? total : completed;++ const downloading = entries.filter(([_, l]) => {+ const s = (l.status || '').toLowerCase();+ return s.includes('downloading') || s.includes('pulling');+ }).length;++ const extracting = entries.filter(([_, l]) => l.status?.toLowerCase().includes('extracting')).length;++ return { total, completed: effectiveCompleted, downloading, extracting };+}++export function isIndeterminatePhase(layers: Record<string, LayerProgress>, currentProgress: number): boolean {+ const stats = getLayerStats(layers);+ if (stats.total === 0) return false;++ const downloadComplete = stats.downloading === 0;+ const hasExtractingLayers = stats.extracting > 0;+ const notAllComplete = stats.completed < stats.total;++ return downloadComplete && hasExtractingLayers && notAllComplete && currentProgress < 95;+}++export function extractErrorMessage(data: unknown, fallbackMessage: string): string {+ if (!data || typeof data !== 'object') return fallbackMessage;++ const obj = data as Record<string, unknown>;+ if (!obj['error']) return '';++ if (typeof obj['error'] === 'string') return obj['error'];+ if (typeof obj['error'] === 'object' && obj['error'] !== null) {+ const errObj = obj['error'] as Record<string, unknown>;+ if (typeof errObj['message'] === 'string') return errObj['message'];+ }++ return fallbackMessage;+}++export function updateLayerFromStreamData(layers: Record<string, LayerProgress>, data: unknown): Record<string, LayerProgress> {+ if (!data || typeof data !== 'object') return layers;++ const obj = data as Record<string, unknown>;+ const id = obj['id'] as string | undefined;+ if (!id) return layers;++ const currentLayer = layers[id] || { current: 0, total: 0, status: '' };+ const status = obj['status'] as string | undefined;++ if (status) {+ currentLayer.status = status;+ }++ const progressDetail = obj['progressDetail'] as Record<string, unknown> | undefined;+ if (progressDetail) {+ const current = progressDetail['current'] as number | undefined;+ const total = progressDetail['total'] as number | undefined;+ if (typeof current === 'number') currentLayer.current = current;+ if (typeof total === 'number') currentLayer.total = total;+ }++ return { ...layers, [id]: currentLayer };+}++export function createPullStreamHandler(callbacks: {+ onStatusChange: (status: string) => void;+ onProgressChange: (progress: number) => void;+ onLayersChange: (layers: Record<string, LayerProgress>) => void;+ onError: (error: string) => void;+ onFirstDownload?: () => void;+ errorMessage: string;+}) {+ let layers: Record<string, LayerProgress> = {};+ let hasOpenedPopover = false;++ return (data: unknown) => {+ if (!data) return;++ if (!hasOpenedPopover && isDownloadingLine(data)) {+ hasOpenedPopover = true;+ callbacks.onFirstDownload?.();+ }++ const errorMsg = extractErrorMessage(data, callbacks.errorMessage);+ if (errorMsg) {+ callbacks.onError(errorMsg);+ return;+ }++ const obj = data as Record<string, unknown>;+ if (obj['status'] && typeof obj['status'] === 'string') {+ callbacks.onStatusChange(obj['status']);+ }++ layers = updateLayerFromStreamData(layers, data);+ callbacks.onLayersChange(layers);++ const progress = calculateOverallProgress(layers);+ callbacks.onProgressChange(progress);+ };+}++export function getAggregateStatus(layers: Record<string, LayerProgress>, fallbackStatus = '', isComplete = false): string {+ if (isComplete) return 'Pull complete';++ const entries = Object.values(layers);+ if (entries.length === 0) return fallbackStatus;++ if (areAllLayersComplete(layers)) return 'Pull complete';++ const stats = getLayerStats(layers);++ if (stats.downloading > 0 || stats.extracting > 0) return 'Pulling';++ const hasVerifying = entries.some(+ (l) => l.status?.toLowerCase().includes('verifying') || l.status?.toLowerCase().includes('digest')+ );+ if (hasVerifying) return 'Verifying checksum';++ const hasWaiting = entries.some((l) => l.status?.toLowerCase().includes('waiting'));+ if (hasWaiting) return 'Waiting';++ return fallbackStatus || 'Preparing';+}++export function getAggregatePullPhase(layers: Record<string, LayerProgress>, isComplete = false, hasError = false): PullPhase {+ if (hasError) return 'error';+ if (isComplete) return 'complete';++ const entries = Object.values(layers);+ if (entries.length === 0) return 'preparing';++ if (areAllLayersComplete(layers)) return 'complete';++ const stats = getLayerStats(layers);++ if (stats.downloading > 0 || stats.extracting > 0) return 'downloading';++ const hasVerifying = entries.some(+ (l) => l.status?.toLowerCase().includes('verifying') || l.status?.toLowerCase().includes('digest')+ );+ if (hasVerifying) return 'verifying';++ const hasWaiting = entries.some((l) => l.status?.toLowerCase().includes('waiting'));+ if (hasWaiting) return 'waiting';++ return 'preparing';+}++// --- Vulnerability scan polling ---++const SCAN_IN_PROGRESS_STATUSES = new Set(['pending', 'scanning']);++export type VulnerabilityScanPollOptions = {+ intervalMs?: number;+ maxAttempts?: number;+ onUpdate?: (summary: VulnerabilityScanSummary) => void;+ onComplete?: (summary: VulnerabilityScanSummary) => void;+ onError?: (error: unknown) => void;+};++export type VulnerabilityScanTracker = {+ cancel: () => void;+ promise: Promise<VulnerabilityScanSummary>;+};++export type VulnerabilityScanStabilizeOptions = {+ scanRequestedAt?: string | number | Date | null;+ failedRecheckDelayMs?: number;+ maxFailedRechecks?: number;+ staleFailureGraceMs?: number;+};++function delay(ms: number): Promise<void> {+ return new Promise((resolve) => {+ setTimeout(resolve, ms);+ });+}++export function toTimestampMs(value?: string | number | Date | null): number {+ if (value == null) return 0;+ if (value instanceof Date) {+ const ts = value.getTime();+ return Number.isFinite(ts) ? ts : 0;+ }+ if (typeof value === 'number') {+ return Number.isFinite(value) ? value : 0;+ }+ const ts = Date.parse(value);+ return Number.isFinite(ts) ? ts : 0;+}++export function isVulnerabilityScanInProgress(status?: string | null): boolean {+ if (!status) return false;+ return SCAN_IN_PROGRESS_STATUSES.has(status);+}++export function isLikelyStaleFailedSummary(+ summary: VulnerabilityScanSummary,+ scanRequestedAt?: string | number | Date | null,+ staleFailureGraceMs = 1500+): boolean {+ if (summary.status !== 'failed') return false;++ const requestedAtMs = toTimestampMs(scanRequestedAt);+ if (requestedAtMs <= 0) return false;++ const summaryTimeMs = toTimestampMs(summary.scanTime);+ const scanTimeLooksOld = summaryTimeMs <= 0 || summaryTimeMs + staleFailureGraceMs < requestedAtMs;+ const missingErrorDetails = !summary.error || summary.error.trim() === '';++ return scanTimeLooksOld || missingErrorDetails;+}++export async function stabilizeFailedVulnerabilitySummary(+ imageId: string,+ initialSummary: VulnerabilityScanSummary,+ fetchSummary: (imageId: string) => Promise<VulnerabilityScanSummary>,+ options: VulnerabilityScanStabilizeOptions = {}+): Promise<VulnerabilityScanSummary> {+ const { scanRequestedAt, failedRecheckDelayMs = 1000, maxFailedRechecks = 2, staleFailureGraceMs = 1500 } = options;++ let summary = initialSummary;+ if (!isLikelyStaleFailedSummary(summary, scanRequestedAt, staleFailureGraceMs)) {+ return summary;+ }++ const retries = Math.max(0, maxFailedRechecks);+ for (let attempt = 0; attempt < retries; attempt++) {+ await delay(failedRecheckDelayMs);+ summary = await fetchSummary(imageId);+ if (summary.status !== 'failed') {+ return summary;+ }+ }++ return summary;+}++export function startVulnerabilityScanPolling(+ imageId: string,+ fetchSummary: (imageId: string) => Promise<VulnerabilityScanSummary>,+ options: VulnerabilityScanPollOptions = {}+): () => void {+ const { intervalMs = 2000, maxAttempts = 0, onUpdate, onComplete, onError } = options;+ let attempts = 0;+ let cancelled = false;+ let timeoutId: ReturnType<typeof setTimeout> | null = null;++ const schedule = () => {+ if (cancelled) return;+ timeoutId = setTimeout(run, intervalMs);+ };++ const run = async () => {+ if (cancelled) return;+ attempts += 1;+ try {+ const summary = await fetchSummary(imageId);+ onUpdate?.(summary);++ const isScanning = isVulnerabilityScanInProgress(summary?.status);+ if (!isScanning) {+ onComplete?.(summary);+ return;+ }+ } catch (error) {+ onError?.(error);+ }++ if (maxAttempts > 0 && attempts >= maxAttempts) {+ onError?.(new Error('Scan polling exceeded max attempts.'));+ return;+ }++ schedule();+ };++ void run();++ return () => {+ cancelled = true;+ if (timeoutId) {+ clearTimeout(timeoutId);+ }+ };+}++export function startVulnerabilityScanTracking(+ imageId: string,+ fetchSummary: (imageId: string) => Promise<VulnerabilityScanSummary>,+ options: VulnerabilityScanPollOptions = {}+): VulnerabilityScanTracker {+ let resolvePromise: (summary: VulnerabilityScanSummary) => void;+ let rejectPromise: (error: unknown) => void;++ const promise = new Promise<VulnerabilityScanSummary>((resolve, reject) => {+ resolvePromise = resolve;+ rejectPromise = reject;+ });++ const cancel = startVulnerabilityScanPolling(imageId, fetchSummary, {+ ...options,+ onComplete: (summary) => {+ options.onComplete?.(summary);+ if (summary.status === 'completed') {+ resolvePromise(summary);+ } else {+ rejectPromise(summary);+ }+ },+ onError: (error) => {+ options.onError?.(error);+ rejectPromise(error);+ }+ });++ return { cancel, promise };+}++// --- Arcane icon label extraction ---++const ARCANE_ICON_LABELS = ['arcane.icon', 'com.getarcaneapp.arcane.icon'];++export function getArcaneIconUrlFromLabels(labels?: Record<string, string> | null): string | null {+ if (!labels) return null;++ for (const [key, value] of Object.entries(labels)) {+ const normalizedKey = key.trim().toLowerCase();+ if (ARCANE_ICON_LABELS.includes(normalizedKey)) {+ const trimmed = value?.trim();+ if (trimmed) return trimmed;+ }+ }++ return null;+}++// --- App image URLs ---++export function getApplicationLogo(full = false, colorOverride?: string, version?: string): string {+ const params = new URLSearchParams();++ if (full) {+ params.set('full', 'true');+ }++ if (colorOverride) {+ params.set('color', colorOverride);+ }++ if (version) {+ params.set('v', version);+ }++ const query = params.toString();+ return query ? `/api/app-images/logo?${query}` : '/api/app-images/logo';+}++export function getDefaultProfilePicture(): string {+ return '/api/app-images/profile';+}++// --- Status variants ---++export type StatusVariant = 'red' | 'purple' | 'green' | 'blue' | 'gray' | 'amber';++const STATUS_VARIANT_MAP: Record<string, StatusVariant> = {+ running: 'green',+ deployed: 'green',+ stopped: 'red',+ failed: 'red',+ pending: 'amber',+ creating: 'blue',+ updating: 'blue',+ deleting: 'purple',+ exited: 'red'+};++export function getStatusVariant(status?: string | null): StatusVariant {+ if (!status) return 'gray';+ return STATUS_VARIANT_MAP[String(status).toLowerCase()] ?? 'gray';+}++export { STATUS_VARIANT_MAP as statusVariantMap };++// --- Environment status resolution ---++type RuntimeEnvironmentState = Pick<Environment, 'isEdge' | 'connected' | 'status' | 'lastPollAt'>;++export function resolveEnvironmentStatus(+ environment: RuntimeEnvironmentState,+ overrideStatus?: EnvironmentStatus | null+): EnvironmentStatus {+ const status = overrideStatus ?? environment.status;++ if (!environment.isEdge) {+ return status;+ }++ if (environment.connected === true) {+ return 'online';+ }++ if (environment.lastPollAt) {+ return 'standby';+ }++ if (status === 'pending') {+ return 'pending';+ }++ if (status === 'standby') {+ return 'standby';+ }++ if (environment.connected === false) {+ return 'offline';+ }++ return status;+}++export function isEnvironmentOnline(environment: RuntimeEnvironmentState, overrideStatus?: EnvironmentStatus | null): boolean {+ const resolved = resolveEnvironmentStatus(environment, overrideStatus);+ return resolved === 'online' || resolved === 'standby';+}++export function getEnvironmentStatusVariant(status: EnvironmentStatus): 'green' | 'blue' | 'amber' | 'red' {+ switch (status) {+ case 'online':+ return 'green';+ case 'standby':+ return 'blue';+ case 'pending':+ return 'amber';+ default:+ return 'red';+ }+}diff --git a/frontend/src/lib/utils/download-text-file.ts b/frontend/src/lib/utils/download-text-file.tsdeleted file mode 100644index 50e030a43..000000000--- a/frontend/src/lib/utils/download-text-file.ts+++ /dev/null@@ -1,11 +0,0 @@-export function downloadTextFile(filename: string, content: string, mimeType = 'application/x-pem-file'): void {- const blob = new Blob([content], { type: `${mimeType};charset=utf-8` });- const url = window.URL.createObjectURL(blob);- const link = document.createElement('a');- link.href = url;- link.setAttribute('download', filename);- document.body.appendChild(link);- link.click();- document.body.removeChild(link);- window.URL.revokeObjectURL(url);-}diff --git a/frontend/src/lib/utils/email.utils.ts b/frontend/src/lib/utils/email.utils.tsdeleted file mode 100644index b975d33d8..000000000--- a/frontend/src/lib/utils/email.utils.ts+++ /dev/null@@ -1,115 +0,0 @@-const LOCAL_PART_PATTERN = /^[A-Za-z0-9!#$%&'*+/=?^_`{|}~.-]+$/;-const DOMAIN_LABEL_PATTERN = /^[\p{L}\p{N}](?:[\p{L}\p{N}-]{0,61}[\p{L}\p{N}])?$/u;--export function isValidUserEmail(email: string): boolean {- const trimmedEmail = email.trim();- if (!trimmedEmail || trimmedEmail.includes(' ')) {- return false;- }-- const atIndex = trimmedEmail.indexOf('@');- if (atIndex <= 0 || atIndex !== trimmedEmail.lastIndexOf('@') || atIndex === trimmedEmail.length - 1) {- return false;- }-- const localPart = trimmedEmail.slice(0, atIndex);- const domainPart = trimmedEmail.slice(atIndex + 1);-- return isValidLocalPart(localPart) && isValidDomainPart(domainPart);-}--function isValidLocalPart(localPart: string): boolean {- if (!localPart || localPart.length > 64 || localPart.startsWith('.') || localPart.endsWith('.') || localPart.includes('..')) {- return false;- }-- return LOCAL_PART_PATTERN.test(localPart);-}--function isValidDomainPart(domainPart: string): boolean {- if (!domainPart || domainPart.length > 255) {- return false;- }-- if (isValidIPv4Literal(domainPart)) {- return true;- }-- if (isValidIPv6Literal(domainPart)) {- return true;- }-- const labels = domainPart.split('.');- if (labels.length === 4 && labels.every((label) => /^\d+$/.test(label))) {- return false;- }-- if (labels.some((label) => !DOMAIN_LABEL_PATTERN.test(label))) {- return false;- }-- return true;-}--function isValidIPv4Literal(domainPart: string): boolean {- const octets = domainPart.split('.');- if (octets.length !== 4) {- return false;- }-- return octets.every((octet) => /^\d+$/.test(octet) && Number(octet) >= 0 && Number(octet) <= 255);-}--function isValidIPv6Literal(domainPart: string): boolean {- if (!/^\[IPv6:[0-9A-Fa-f:.]+\]$/i.test(domainPart)) {- return false;- }-- const address = domainPart.slice(6, -1);- return isValidIPv6Address(address);-}--function isValidIPv6Address(address: string): boolean {- if (!address.includes(':') || address.includes(':::')) {- return false;- }-- const compressionIndex = address.indexOf('::');- if (compressionIndex !== -1 && compressionIndex !== address.lastIndexOf('::')) {- return false;- }-- if (compressionIndex === -1) {- return countIPv6Segments(address.split(':')) === 8;- }-- const [left = '', right = ''] = address.split('::');- const leftCount = left ? countIPv6Segments(left.split(':')) : 0;- const rightCount = right ? countIPv6Segments(right.split(':')) : 0;-- return leftCount >= 0 && rightCount >= 0 && leftCount + rightCount < 8;-}--function countIPv6Segments(segments: string[]): number {- let count = 0;-- for (let i = 0; i < segments.length; i += 1) {- const segment = segments[i];- if (!segment) {- return -1;- }-- const isLastSegment = i === segments.length - 1;- if (segment.includes('.')) {- return isLastSegment && isValidIPv4Literal(segment) ? count + 2 : -1;- }-- if (!/^[0-9A-Fa-f]{1,4}$/.test(segment)) {- return -1;- }-- count += 1;- }-- return count;-}diff --git a/frontend/src/lib/utils/environment-status.ts b/frontend/src/lib/utils/environment-status.tsdeleted file mode 100644index c65e0d20d..000000000--- a/frontend/src/lib/utils/environment-status.ts+++ /dev/null@@ -1,54 +0,0 @@-import type { Environment, EnvironmentStatus } from '$lib/types/environment.type';--type RuntimeEnvironmentState = Pick<Environment, 'isEdge' | 'connected' | 'status' | 'lastPollAt'>;--export function resolveEnvironmentStatus(- environment: RuntimeEnvironmentState,- overrideStatus?: EnvironmentStatus | null-): EnvironmentStatus {- const status = overrideStatus ?? environment.status;-- if (!environment.isEdge) {- return status;- }-- if (environment.connected === true) {- return 'online';- }-- if (environment.lastPollAt) {- return 'standby';- }-- if (status === 'pending') {- return 'pending';- }-- if (status === 'standby') {- return 'standby';- }-- if (environment.connected === false) {- return 'offline';- }-- return status;-}--export function isEnvironmentOnline(environment: RuntimeEnvironmentState, overrideStatus?: EnvironmentStatus | null): boolean {- const resolved = resolveEnvironmentStatus(environment, overrideStatus);- return resolved === 'online' || resolved === 'standby';-}--export function getEnvironmentStatusVariant(status: EnvironmentStatus): 'green' | 'blue' | 'amber' | 'red' {- switch (status) {- case 'online':- return 'green';- case 'standby':- return 'blue';- case 'pending':- return 'amber';- default:- return 'red';- }-}diff --git a/frontend/src/lib/utils/form.utils.ts b/frontend/src/lib/utils/form.utils.tsdeleted file mode 100644index dfbe963b7..000000000--- a/frontend/src/lib/utils/form.utils.ts+++ /dev/null@@ -1,130 +0,0 @@-import { get, writable } from 'svelte/store';-import { z } from 'zod/v4';--export function preventDefault(fn: (event: Event) => any) {- return function (this: any, event: Event) {- event.preventDefault();- fn.call(this, event);- };-}--export type FormInput<T> = {- value: T;- error: string | null;-};--export type FormInputs<T> = {- [K in keyof T]: FormInput<T[K]>;-};--export function createForm<T extends z.ZodType<any, any>>(schema: T, initialValues: z.infer<T>) {- // Create a writable store for the inputs- const inputsStore = writable<FormInputs<z.infer<T>>>(initializeInputs(initialValues));- const errorsStore = writable<z.ZodError<any> | undefined>();-- function initializeInputs(initialValues: z.infer<T>): FormInputs<z.infer<T>> {- const inputs: FormInputs<z.infer<T>> = {} as FormInputs<z.infer<T>>;-- // Get the shape keys from the schema to only include defined fields- const schemaShape = schema instanceof z.ZodObject ? schema.shape : {};- const schemaKeys = Object.keys(schemaShape);-- for (const key of schemaKeys) {- if (Object.prototype.hasOwnProperty.call(initialValues, key)) {- inputs[key as keyof z.infer<T>] = {- value: initialValues[key as keyof z.infer<T>],- error: null- };- }- }- return inputs;- }-- function validate() {- let success = true;- inputsStore.update((inputs) => {- // Extract values from inputs to validate against the schema- const values = Object.fromEntries(Object.entries(inputs).map(([key, input]) => [key, input.value]));-- const result = schema.safeParse(values);- errorsStore.set(result.error);-- if (!result.success) {- success = false;- for (const input of Object.keys(inputs)) {- const error = result.error.issues.find((e) => e.path[0] === input);- if (error) {- inputs[input as keyof z.infer<T>].error = error.message;- } else {- inputs[input as keyof z.infer<T>].error = null;- }- }- } else {- for (const input of Object.keys(inputs)) {- inputs[input as keyof z.infer<T>].error = null;- }- }- return inputs;- });- return success ? data() : null;- }-- function data() {- const inputs = get(inputsStore);-- const values = Object.fromEntries(- Object.entries(inputs).map(([key, input]) => {- // Trim values for submission, but don't mutate the store value in-place.- return [key, trimValue(input.value)];- })- );-- // Parse through schema to apply coercion (e.g., z.coerce.number())- const result = schema.safeParse(values);- return (result.success ? result.data : values) as z.infer<T>;- }-- function reset() {- inputsStore.update((inputs) => {- for (const input of Object.keys(inputs)) {- inputs[input as keyof z.infer<T>] = {- value: initialValues[input as keyof z.infer<T>],- error: null- };- }- return inputs;- });- }-- function setValue(key: keyof z.infer<T>, value: z.infer<T>[keyof z.infer<T>]) {- inputsStore.update((inputs) => {- inputs[key].value = value;- return inputs;- });- }-- // Trims whitespace from string values and arrays of strings- function trimValue(value: any) {- if (typeof value === 'string') {- value = value.trim();- } else if (Array.isArray(value)) {- value = value.map((item: any) => {- if (typeof item === 'string') {- return item.trim();- }- return item;- });- }- return value;- }-- return {- schema,- inputs: inputsStore,- errors: errorsStore,- data,- validate,- setValue,- reset- };-}diff --git a/frontend/src/lib/utils/formatting.ts b/frontend/src/lib/utils/formatting.tsnew file mode 100644index 000000000..0e6c62cad--- /dev/null+++ b/frontend/src/lib/utils/formatting.ts@@ -0,0 +1,393 @@+import Convert from 'ansi-to-html';+import { format as formatDate, setDefaultOptions } from 'date-fns';+import { z } from 'zod/v4';+import { setLocale as setParaglideLocale, type Locale } from '$lib/paraglide/runtime';++// --- String helpers ---++export function capitalizeFirstLetter(string: string): string {+ if (!string) return '';+ return string.charAt(0).toUpperCase() + string.slice(1);+}++export function shortId(id: string | undefined, length = 12): string {+ if (!id) return 'N/A';+ return id.substring(0, length);+}++export function truncateString(str: string | undefined, maxLength: number): string {+ if (!str) return '';+ if (str.length <= maxLength) {+ return str;+ }+ return str.substring(0, maxLength - 3) + '...';+}++export function truncateImageDigest(image: string): string {+ return image.replace(/@sha256:([a-f0-9]{7})[a-f0-9]+/g, '@sha256:$1');+}++// --- Byte formatting (MIT, TJ Holowaychuk / Jed Watson) ---++export type BytesFormatOptions = {+ decimalPlaces?: number;+ fixedDecimals?: boolean;+ thousandsSeparator?: string;+ unit?: string;+ unitSeparator?: string;+};++export type BytesValue = string | number;++const formatThousandsRegExp = /\B(?=(\d{3})+(?!\d))/g;+const formatDecimalsRegExp = /(?:\.0*|(\.[^0]+)0+)$/;++const bytesUnitMap = {+ b: 1,+ kb: 1 << 10,+ mb: 1 << 20,+ gb: 1 << 30,+ tb: Math.pow(1024, 4),+ pb: Math.pow(1024, 5)+} as const;++const parseBytesRegExp = /^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb|pb)$/i;++type BytesFunction = {+ (value: string, options?: BytesFormatOptions): number | null;+ (value: number, options?: BytesFormatOptions): string | null;+ (value: BytesValue, options?: BytesFormatOptions): string | number | null;+ format: typeof formatBytes;+ parse: typeof parseBytes;+};++function bytesImpl(value: string, options?: BytesFormatOptions): number | null;+function bytesImpl(value: number, options?: BytesFormatOptions): string | null;+function bytesImpl(value: BytesValue, options?: BytesFormatOptions): string | number | null {+ if (typeof value === 'string') {+ return parseBytes(value);+ }++ if (typeof value === 'number') {+ return formatBytes(value, options);+ }++ return null;+}++export function formatBytes(value: number, options?: BytesFormatOptions): string | null {+ if (!Number.isFinite(value)) {+ return null;+ }++ const magnitude = Math.abs(value);+ const thousandsSeparator = options?.thousandsSeparator ?? '';+ const unitSeparator = options?.unitSeparator ?? '';+ const decimalPlaces = options?.decimalPlaces !== undefined ? options.decimalPlaces : 2;+ const fixedDecimals = Boolean(options?.fixedDecimals);+ let unit = options?.unit ?? '';++ const normalizedUnit = unit.toLowerCase() as keyof typeof bytesUnitMap;+ if (!unit || !bytesUnitMap[normalizedUnit]) {+ if (magnitude >= bytesUnitMap.pb) {+ unit = 'PB';+ } else if (magnitude >= bytesUnitMap.tb) {+ unit = 'TB';+ } else if (magnitude >= bytesUnitMap.gb) {+ unit = 'GB';+ } else if (magnitude >= bytesUnitMap.mb) {+ unit = 'MB';+ } else if (magnitude >= bytesUnitMap.kb) {+ unit = 'KB';+ } else {+ unit = 'B';+ }+ }++ const divisor = bytesUnitMap[unit.toLowerCase() as keyof typeof bytesUnitMap];+ const val = value / divisor;+ let str = val.toFixed(decimalPlaces);++ if (!fixedDecimals) {+ str = str.replace(formatDecimalsRegExp, '$1');+ }++ if (thousandsSeparator) {+ str = str+ .split('.')+ .map((part, index) => (index === 0 ? part.replace(formatThousandsRegExp, thousandsSeparator) : part))+ .join('.');+ }++ return str + unitSeparator + unit;+}++export function parseBytes(val: string | number): number | null {+ if (typeof val === 'number' && !Number.isNaN(val)) {+ return val;+ }++ if (typeof val !== 'string') {+ return null;+ }++ const results = parseBytesRegExp.exec(val);+ let floatValue: number;+ let unit: keyof typeof bytesUnitMap;++ if (!results) {+ floatValue = Number.parseInt(val, 10);+ unit = 'b';+ } else {+ const numericValue = results[1];+ const matchedUnit = results[4];+ if (!numericValue || !matchedUnit) {+ return null;+ }++ floatValue = Number.parseFloat(numericValue);+ unit = matchedUnit.toLowerCase() as keyof typeof bytesUnitMap;+ }++ if (Number.isNaN(floatValue)) {+ return null;+ }++ return Math.floor(bytesUnitMap[unit] * floatValue);+}++const bytesWithHelpers = bytesImpl as BytesFunction;+bytesWithHelpers.format = formatBytes;+bytesWithHelpers.parse = parseBytes;++export const bytes = bytesWithHelpers;++// --- Locale-aware date/time formatting ---++export function formatDateTime(date: Date | string | null | undefined): string {+ if (!date) return '';+ const d = typeof date === 'string' ? new Date(date) : date;+ if (isNaN(d.getTime())) return '';+ return formatDate(d, 'PPpp');+}++export function formatDateTimeShort(date: Date | string | null | undefined): string {+ if (!date) return '';+ const d = typeof date === 'string' ? new Date(date) : date;+ if (isNaN(d.getTime())) return '';+ return formatDate(d, 'PPp');+}++export function formatTime(date: Date | string | null | undefined): string {+ if (!date) return '';+ const d = typeof date === 'string' ? new Date(date) : date;+ if (isNaN(d.getTime())) return '';+ return formatDate(d, 'pp');+}++export async function setLocale(locale: Locale, reload = true) {+ let dateFnsLocale: string = locale;+ if (dateFnsLocale === 'en') {+ dateFnsLocale = 'en-US';+ }++ const [zodResult, dateFnsResult] = await Promise.allSettled([+ import(`../../../node_modules/zod/v4/locales/${locale}.js`),+ import(`../../../node_modules/date-fns/locale/${dateFnsLocale}.js`)+ ]);++ if (zodResult.status === 'fulfilled') {+ z.config(zodResult.value.default());+ } else {+ console.warn(`Failed to load zod locale for ${locale}:`, zodResult.reason);+ }++ setParaglideLocale(locale, { reload });++ if (dateFnsResult.status === 'fulfilled') {+ setDefaultOptions({+ locale: dateFnsResult.value.default+ });+ } else {+ console.warn(`Failed to load date-fns locale for ${locale}:`, dateFnsResult.reason);+ }+}++// --- ANSI conversion ---++const ansiConverter = new Convert({+ fg: '#e4e4e7',+ bg: '#000000',+ newline: false,+ escapeXML: true,+ stream: false,+ colors: {+ 0: '#18181b',+ 1: '#ef4444',+ 2: '#22c55e',+ 3: '#eab308',+ 4: '#3b82f6',+ 5: '#a855f7',+ 6: '#06b6d4',+ 7: '#f4f4f5',+ 8: '#71717a',+ 9: '#f87171',+ 10: '#4ade80',+ 11: '#facc15',+ 12: '#60a5fa',+ 13: '#c084fc',+ 14: '#22d3ee',+ 15: '#fafafa'+ }+});++export function ansiToHtml(text: string): string {+ if (!text) return '';+ return ansiConverter.toHtml(text);+}++// --- Log text sanitization ---++const ANSI_ESCAPE_SEQUENCE = /\x1B\[[0-?]*[ -/]*[@-~]/g;+const ANSI_OSC_SEQUENCE = /\x1B\][^\x07]*(?:\x07|\x1B\\)/g;+const LOOSE_ANSI_MARKER_SEQUENCE = /\[(?:\d{1,3}(?:;\d{1,3})*)m/g;++export function stripAnsi(input: string): string {+ return input.replace(ANSI_ESCAPE_SEQUENCE, '').replace(ANSI_OSC_SEQUENCE, '').replace(LOOSE_ANSI_MARKER_SEQUENCE, '');+}++export function sanitizeLogText(input: string): string {+ return stripAnsi(input.replace(/\r/g, '')).trimEnd();+}++// --- Email validation ---++const EMAIL_LOCAL_PART_PATTERN = /^[A-Za-z0-9!#$%&'*+/=?^_`{|}~.-]+$/;+const EMAIL_DOMAIN_LABEL_PATTERN = /^[\p{L}\p{N}](?:[\p{L}\p{N}-]{0,61}[\p{L}\p{N}])?$/u;++export function isValidUserEmail(email: string): boolean {+ const trimmedEmail = email.trim();+ if (!trimmedEmail || trimmedEmail.includes(' ')) {+ return false;+ }++ const atIndex = trimmedEmail.indexOf('@');+ if (atIndex <= 0 || atIndex !== trimmedEmail.lastIndexOf('@') || atIndex === trimmedEmail.length - 1) {+ return false;+ }++ const localPart = trimmedEmail.slice(0, atIndex);+ const domainPart = trimmedEmail.slice(atIndex + 1);++ return isValidLocalPart(localPart) && isValidDomainPart(domainPart);+}++function isValidLocalPart(localPart: string): boolean {+ if (!localPart || localPart.length > 64 || localPart.startsWith('.') || localPart.endsWith('.') || localPart.includes('..')) {+ return false;+ }++ return EMAIL_LOCAL_PART_PATTERN.test(localPart);+}++function isValidDomainPart(domainPart: string): boolean {+ if (!domainPart || domainPart.length > 255) {+ return false;+ }++ if (isValidIPv4Literal(domainPart)) {+ return true;+ }++ if (isValidIPv6Literal(domainPart)) {+ return true;+ }++ const labels = domainPart.split('.');+ if (labels.length === 4 && labels.every((label) => /^\d+$/.test(label))) {+ return false;+ }++ if (labels.some((label) => !EMAIL_DOMAIN_LABEL_PATTERN.test(label))) {+ return false;+ }++ return true;+}++function isValidIPv4Literal(domainPart: string): boolean {+ const octets = domainPart.split('.');+ if (octets.length !== 4) {+ return false;+ }++ return octets.every((octet) => /^\d+$/.test(octet) && Number(octet) >= 0 && Number(octet) <= 255);+}++function isValidIPv6Literal(domainPart: string): boolean {+ if (!/^\[IPv6:[0-9A-Fa-f:.]+\]$/i.test(domainPart)) {+ return false;+ }++ const address = domainPart.slice(6, -1);+ return isValidIPv6Address(address);+}++function isValidIPv6Address(address: string): boolean {+ if (!address.includes(':') || address.includes(':::')) {+ return false;+ }++ const compressionIndex = address.indexOf('::');+ if (compressionIndex !== -1 && compressionIndex !== address.lastIndexOf('::')) {+ return false;+ }++ if (compressionIndex === -1) {+ return countIPv6Segments(address.split(':')) === 8;+ }++ const [left = '', right = ''] = address.split('::');+ const leftCount = left ? countIPv6Segments(left.split(':')) : 0;+ const rightCount = right ? countIPv6Segments(right.split(':')) : 0;++ return leftCount >= 0 && rightCount >= 0 && leftCount + rightCount < 8;+}++function countIPv6Segments(segments: string[]): number {+ let count = 0;++ for (let i = 0; i < segments.length; i += 1) {+ const segment = segments[i];+ if (!segment) {+ return -1;+ }++ const isLastSegment = i === segments.length - 1;+ if (segment.includes('.')) {+ return isLastSegment && isValidIPv4Literal(segment) ? count + 2 : -1;+ }++ if (!/^[0-9A-Fa-f]{1,4}$/.test(segment)) {+ return -1;+ }++ count += 1;+ }++ return count;+}++// --- Browser file download ---++export function downloadTextFile(filename: string, content: string, mimeType = 'application/x-pem-file'): void {+ const blob = new Blob([content], { type: `${mimeType};charset=utf-8` });+ const url = window.URL.createObjectURL(blob);+ const link = document.createElement('a');+ link.href = url;+ link.setAttribute('download', filename);+ document.body.appendChild(link);+ link.click();+ document.body.removeChild(link);+ window.URL.revokeObjectURL(url);+}diff --git a/frontend/src/lib/utils/git.ts b/frontend/src/lib/utils/git.tsdeleted file mode 100644index 8115d9f6e..000000000--- a/frontend/src/lib/utils/git.ts+++ /dev/null@@ -1,71 +0,0 @@-function stripGitSuffix(path: string): string {- return path.replace(/\.git\/?$/, '');-}--function trimTrailingSlash(value: string): string {- return value.replace(/\/+$/, '');-}--function commitSegmentForHost(hostname: string): string {- const host = hostname.toLowerCase();- if (host.includes('gitlab')) return '/-/commit/';- if (host.includes('bitbucket')) return '/commits/';- return '/commit/';-}--export function toGitWebUrl(raw: string): string | null {- const trimmed = raw.trim();- if (!trimmed) return null;-- if (trimmed.includes('://')) {- try {- const parsed = new URL(trimmed);- if (!parsed.hostname) return null;- const path = stripGitSuffix(parsed.pathname);- if (!path || path === '/') return null;- const protocol = parsed.protocol === 'http:' || parsed.protocol === 'https:' ? parsed.protocol : 'https:';- return `${protocol}//${parsed.hostname}${path}`;- } catch {- return null;- }- }-- const scpMatch = /^(?:.+@)?([^:\/]+):(.+)$/.exec(trimmed);- if (scpMatch) {- const host = scpMatch[1];- const matchedPath = scpMatch[2];- if (!host || !matchedPath) return null;-- const path = stripGitSuffix(matchedPath.replace(/^\/+/, ''));- if (!host || !path) return null;- return `https://${host}/${path}`;- }-- const hostPathMatch = /^([^\/]+)\/(.+)$/.exec(trimmed);- if (hostPathMatch) {- const host = hostPathMatch[1];- const matchedPath = hostPathMatch[2];- if (!host || !matchedPath) return null;-- const path = stripGitSuffix(matchedPath.replace(/^\/+/, ''));- if (!host || !path) return null;- return `https://${host}/${path}`;- }-- return null;-}--export function toGitCommitUrl(repositoryUrl: string, commit: string): string | null {- const base = toGitWebUrl(repositoryUrl);- const trimmedCommit = commit.trim();- if (!base || !trimmedCommit) return null;-- const normalizedBase = trimTrailingSlash(base);- try {- const host = new URL(normalizedBase).hostname;- const segment = commitSegmentForHost(host);- return `${normalizedBase}${segment}${encodeURIComponent(trimmedCommit)}`;- } catch {- return null;- }-}diff --git a/frontend/src/lib/utils/image.util.ts b/frontend/src/lib/utils/image.util.tsdeleted file mode 100644index 76f89dca0..000000000--- a/frontend/src/lib/utils/image.util.ts+++ /dev/null@@ -1,22 +0,0 @@-export function getApplicationLogo(full = false, colorOverride?: string, version?: string): string {- const params = new URLSearchParams();-- if (full) {- params.set('full', 'true');- }-- if (colorOverride) {- params.set('color', colorOverride);- }-- if (version) {- params.set('v', version);- }-- const query = params.toString();- return query ? `/api/app-images/logo?${query}` : '/api/app-images/logo';-}--export function getDefaultProfilePicture(): string {- return '/api/app-images/profile';-}diff --git a/frontend/src/lib/utils/keyboard-shortcut.utils.ts b/frontend/src/lib/utils/keyboard-shortcut.utils.tsdeleted file mode 100644index 6b75f1739..000000000--- a/frontend/src/lib/utils/keyboard-shortcut.utils.ts+++ /dev/null@@ -1,88 +0,0 @@-import { browser } from '$app/environment';--export type ShortcutKey = 'mod' | 'shift' | 'alt' | 'ctrl' | 'meta' | string;--const MODIFIER_KEYS = new Set(['mod', 'shift', 'alt', 'ctrl', 'meta']);--export function isMacOS(): boolean {- if (!browser) return false;- const platform = navigator?.platform?.toLowerCase() ?? '';- const userAgent = navigator?.userAgent?.toLowerCase() ?? '';- return platform.includes('mac') || userAgent.includes('mac');-}--export function formatShortcutKeys(keys: ShortcutKey[], isMac = isMacOS()): string[] {- return keys.map((key) => formatShortcutKey(key, isMac));-}--export function matchesShortcutEvent(keys: ShortcutKey[], event: KeyboardEvent, isMac = isMacOS()): boolean {- const normalizedKeys = keys.map((key) => key.toLowerCase());- const requiredModifiers = {- shift: normalizedKeys.includes('shift'),- alt: normalizedKeys.includes('alt'),- ctrl: normalizedKeys.includes('ctrl'),- meta: normalizedKeys.includes('meta'),- mod: normalizedKeys.includes('mod')- };-- const requiredCtrl = requiredModifiers.ctrl || (!isMac && requiredModifiers.mod);- const requiredMeta = requiredModifiers.meta || (isMac && requiredModifiers.mod);- const requiredShift = requiredModifiers.shift;- const requiredAlt = requiredModifiers.alt;-- if (event.shiftKey !== requiredShift) return false;- if (event.altKey !== requiredAlt) return false;- if (event.ctrlKey !== requiredCtrl) return false;- if (event.metaKey !== requiredMeta) return false;-- const nonModifierKeys = normalizedKeys.filter((key) => !MODIFIER_KEYS.has(key));- if (nonModifierKeys.length !== 1) return false;-- const key = event.key.toLowerCase();- if (MODIFIER_KEYS.has(key)) return false;-- const primaryKey = nonModifierKeys[0];- if (!primaryKey) return false;-- const expectedCode = getExpectedCode(primaryKey);- if (expectedCode) {- return event.code.toLowerCase() === expectedCode;- }-- return key === primaryKey;-}--export function isEditableTarget(target: EventTarget | null): boolean {- if (!(target instanceof HTMLElement)) return false;- const tagName = target.tagName.toLowerCase();- if (['input', 'textarea', 'select'].includes(tagName)) return true;- if (target.isContentEditable) return true;- return !!target.closest('[contenteditable="true"]');-}--function formatShortcutKey(key: ShortcutKey, isMac: boolean): string {- switch (key) {- case 'mod':- return isMac ? '⌘' : 'Ctrl';- case 'shift':- return isMac ? '⇧' : 'Shift';- case 'alt':- return isMac ? '⌥' : 'Alt';- case 'ctrl':- return isMac ? '⌃' : 'Ctrl';- case 'meta':- return isMac ? '⌘' : 'Win';- default:- return key.length === 1 ? key.toUpperCase() : key;- }-}--function getExpectedCode(key: string): string | null {- if (/^[0-9]$/.test(key)) {- return `digit${key}`;- }- if (/^[a-z]$/.test(key)) {- return `key${key}`;- }- return null;-}diff --git a/frontend/src/lib/utils/locale.util.ts b/frontend/src/lib/utils/locale.util.tsdeleted file mode 100644index 2b1530411..000000000--- a/frontend/src/lib/utils/locale.util.ts+++ /dev/null@@ -1,65 +0,0 @@-import { setLocale as setParaglideLocale, type Locale } from '$lib/paraglide/runtime';-import { format, setDefaultOptions } from 'date-fns';-import { z } from 'zod/v4';--/**- * Format a date/timestamp as a locale-aware datetime string.- * Uses date-fns which picks up the locale set by setLocale(), so it- * reflects the language the user has chosen in the app rather than- * defaulting to the browser's system locale.- */-export function formatDateTime(date: Date | string | null | undefined): string {- if (!date) return '';- const d = typeof date === 'string' ? new Date(date) : date;- if (isNaN(d.getTime())) return '';- return format(d, 'PPpp');-}--/**- * Same as formatDateTime but omits seconds (PPp).- */-export function formatDateTimeShort(date: Date | string | null | undefined): string {- if (!date) return '';- const d = typeof date === 'string' ? new Date(date) : date;- if (isNaN(d.getTime())) return '';- return format(d, 'PPp');-}--/**- * Format only the time portion of a date, locale-aware (e.g. "3:45:22 PM").- * Drop-in replacement for toLocaleTimeString() that respects the app locale.- */-export function formatTime(date: Date | string | null | undefined): string {- if (!date) return '';- const d = typeof date === 'string' ? new Date(date) : date;- if (isNaN(d.getTime())) return '';- return format(d, 'pp');-}--export async function setLocale(locale: Locale, reload = true) {- let dateFnsLocale: string = locale;- if (dateFnsLocale === 'en') {- dateFnsLocale = 'en-US';- }-- const [zodResult, dateFnsResult] = await Promise.allSettled([- import(`../../../node_modules/zod/v4/locales/${locale}.js`),- import(`../../../node_modules/date-fns/locale/${dateFnsLocale}.js`)- ]);-- if (zodResult.status === 'fulfilled') {- z.config(zodResult.value.default());- } else {- console.warn(`Failed to load zod locale for ${locale}:`, zodResult.reason);- }-- setParaglideLocale(locale, { reload });-- if (dateFnsResult.status === 'fulfilled') {- setDefaultOptions({- locale: dateFnsResult.value.default- });- } else {- console.warn(`Failed to load date-fns locale for ${locale}:`, dateFnsResult.reason);- }-}diff --git a/frontend/src/lib/utils/log-text.ts b/frontend/src/lib/utils/log-text.tsdeleted file mode 100644index b1dd3e037..000000000--- a/frontend/src/lib/utils/log-text.ts+++ /dev/null@@ -1,11 +0,0 @@-const ANSI_ESCAPE_SEQUENCE = /\x1B\[[0-?]*[ -/]*[@-~]/g;-const ANSI_OSC_SEQUENCE = /\x1B\][^\x07]*(?:\x07|\x1B\\)/g;-const LOOSE_ANSI_MARKER_SEQUENCE = /\[(?:\d{1,3}(?:;\d{1,3})*)m/g;--export function stripAnsi(input: string): string {- return input.replace(ANSI_ESCAPE_SEQUENCE, '').replace(ANSI_OSC_SEQUENCE, '').replace(LOOSE_ANSI_MARKER_SEQUENCE, '');-}--export function sanitizeLogText(input: string): string {- return stripAnsi(input.replace(/\r/g, '')).trimEnd();-}diff --git a/frontend/src/lib/utils/navigation.ts b/frontend/src/lib/utils/navigation.tsnew file mode 100644index 000000000..9f9b98090--- /dev/null+++ b/frontend/src/lib/utils/navigation.ts@@ -0,0 +1,243 @@+import { browser } from '$app/environment';+import { PersistedState } from 'runed';+import { get } from 'svelte/store';+import { defaultMobileNavigationSettings, type MobileNavigationSettings } from '$lib/config/navigation-config';+import settingsStore from '$lib/stores/config-store';+import type { MobileNavInteractionManager } from '$lib/hooks/use-mobile-nav-interactions';++// --- Mobile nav state ---++export const pinnedItemsStore = new PersistedState('mobile-nav-settings', defaultMobileNavigationSettings);++export const navigationSettingsOverridesStore = new PersistedState<Partial<MobileNavigationSettings>>(+ 'navigation-settings-overrides',+ {}+);++let mobileNavManager: MobileNavInteractionManager | null = null;++export function registerNavigationManager(manager: MobileNavInteractionManager) {+ mobileNavManager = manager;+}++export function resetNavigationVisibility() {+ if (mobileNavManager) {+ mobileNavManager.resetVisibility();+ }+}++export function getEffectiveNavigationSettings(): MobileNavigationSettings {+ const serverSettings = get(settingsStore);+ const overrides = navigationSettingsOverridesStore.current;+ const currentPinnedItems = pinnedItemsStore.current;++ const getEffectiveValue = <T>(serverValue: T | undefined, overrideValue: T | undefined, defaultValue: T): T => {+ return overrideValue !== undefined ? overrideValue : (serverValue ?? defaultValue);+ };++ const mode = getEffectiveValue(serverSettings?.mobileNavigationMode, overrides.mode, defaultMobileNavigationSettings.mode);++ return {+ pinnedItems: overrides.pinnedItems ?? currentPinnedItems.pinnedItems,+ mode,+ showLabels: getEffectiveValue(+ serverSettings?.mobileNavigationShowLabels,+ overrides.showLabels,+ defaultMobileNavigationSettings.showLabels+ ),+ scrollToHide: mode === 'floating'+ };+}++export function updateNavigationOverrides(overrides: Partial<MobileNavigationSettings>) {+ const currentOverrides = navigationSettingsOverridesStore.current;+ navigationSettingsOverridesStore.current = { ...currentOverrides, ...overrides };+}++export function clearNavigationOverrides() {+ navigationSettingsOverridesStore.current = {};+}++// --- Keyboard shortcuts ---++export type ShortcutKey = 'mod' | 'shift' | 'alt' | 'ctrl' | 'meta' | string;++const MODIFIER_KEYS = new Set(['mod', 'shift', 'alt', 'ctrl', 'meta']);++export function isMacOS(): boolean {+ if (!browser) return false;+ const platform = navigator?.platform?.toLowerCase() ?? '';+ const userAgent = navigator?.userAgent?.toLowerCase() ?? '';+ return platform.includes('mac') || userAgent.includes('mac');+}++export function formatShortcutKeys(keys: ShortcutKey[], isMac = isMacOS()): string[] {+ return keys.map((key) => formatShortcutKey(key, isMac));+}++export function matchesShortcutEvent(keys: ShortcutKey[], event: KeyboardEvent, isMac = isMacOS()): boolean {+ const normalizedKeys = keys.map((key) => key.toLowerCase());+ const requiredModifiers = {+ shift: normalizedKeys.includes('shift'),+ alt: normalizedKeys.includes('alt'),+ ctrl: normalizedKeys.includes('ctrl'),+ meta: normalizedKeys.includes('meta'),+ mod: normalizedKeys.includes('mod')+ };++ const requiredCtrl = requiredModifiers.ctrl || (!isMac && requiredModifiers.mod);+ const requiredMeta = requiredModifiers.meta || (isMac && requiredModifiers.mod);+ const requiredShift = requiredModifiers.shift;+ const requiredAlt = requiredModifiers.alt;++ if (event.shiftKey !== requiredShift) return false;+ if (event.altKey !== requiredAlt) return false;+ if (event.ctrlKey !== requiredCtrl) return false;+ if (event.metaKey !== requiredMeta) return false;++ const nonModifierKeys = normalizedKeys.filter((key) => !MODIFIER_KEYS.has(key));+ if (nonModifierKeys.length !== 1) return false;++ const key = event.key.toLowerCase();+ if (MODIFIER_KEYS.has(key)) return false;++ const primaryKey = nonModifierKeys[0];+ if (!primaryKey) return false;++ const expectedCode = getExpectedCode(primaryKey);+ if (expectedCode) {+ return event.code.toLowerCase() === expectedCode;+ }++ return key === primaryKey;+}++export function isEditableTarget(target: EventTarget | null): boolean {+ if (!(target instanceof HTMLElement)) return false;+ const tagName = target.tagName.toLowerCase();+ if (['input', 'textarea', 'select'].includes(tagName)) return true;+ if (target.isContentEditable) return true;+ return !!target.closest('[contenteditable="true"]');+}++function formatShortcutKey(key: ShortcutKey, isMac: boolean): string {+ switch (key) {+ case 'mod':+ return isMac ? '⌘' : 'Ctrl';+ case 'shift':+ return isMac ? '⇧' : 'Shift';+ case 'alt':+ return isMac ? '⌥' : 'Alt';+ case 'ctrl':+ return isMac ? '⌃' : 'Ctrl';+ case 'meta':+ return isMac ? '⌘' : 'Win';+ default:+ return key.length === 1 ? key.toUpperCase() : key;+ }+}++function getExpectedCode(key: string): string | null {+ if (/^[0-9]$/.test(key)) {+ return `digit${key}`;+ }+ if (/^[a-z]$/.test(key)) {+ return `key${key}`;+ }+ return null;+}++// --- URL helpers ---++export function toPortHref(hostPort: string, baseServerUrl?: string): string {+ try {+ const base = baseServerUrl || (typeof window !== 'undefined' ? window.location.origin : 'http://localhost');+ const url = new URL(base.startsWith('http') ? base : `http://${base}`);+ url.port = hostPort;+ return url.toString();+ } catch {+ return '#';+ }+}++export function toSafeHref(raw: string, scheme: string = 'https'): string {+ const trimmed = raw.trim();+ if (!trimmed) return '#';+ if (/^(javascript|data|vbscript):/i.test(trimmed)) return '#';+ if (/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(trimmed)) return trimmed;+ return `${scheme}://${trimmed}`;+}++// --- Git URL helpers ---++function stripGitSuffix(path: string): string {+ return path.replace(/\.git\/?$/, '');+}++function trimTrailingSlash(value: string): string {+ return value.replace(/\/+$/, '');+}++function commitSegmentForHost(hostname: string): string {+ const host = hostname.toLowerCase();+ if (host.includes('gitlab')) return '/-/commit/';+ if (host.includes('bitbucket')) return '/commits/';+ return '/commit/';+}++export function toGitWebUrl(raw: string): string | null {+ const trimmed = raw.trim();+ if (!trimmed) return null;++ if (trimmed.includes('://')) {+ try {+ const parsed = new URL(trimmed);+ if (!parsed.hostname) return null;+ const path = stripGitSuffix(parsed.pathname);+ if (!path || path === '/') return null;+ const protocol = parsed.protocol === 'http:' || parsed.protocol === 'https:' ? parsed.protocol : 'https:';+ return `${protocol}//${parsed.hostname}${path}`;+ } catch {+ return null;+ }+ }++ const scpMatch = /^(?:.+@)?([^:\/]+):(.+)$/.exec(trimmed);+ if (scpMatch) {+ const host = scpMatch[1];+ const matchedPath = scpMatch[2];+ if (!host || !matchedPath) return null;++ const path = stripGitSuffix(matchedPath.replace(/^\/+/, ''));+ if (!host || !path) return null;+ return `https://${host}/${path}`;+ }++ const hostPathMatch = /^([^\/]+)\/(.+)$/.exec(trimmed);+ if (hostPathMatch) {+ const host = hostPathMatch[1];+ const matchedPath = hostPathMatch[2];+ if (!host || !matchedPath) return null;++ const path = stripGitSuffix(matchedPath.replace(/^\/+/, ''));+ if (!host || !path) return null;+ return `https://${host}/${path}`;+ }++ return null;+}++export function toGitCommitUrl(repositoryUrl: string, commit: string): string | null {+ const base = toGitWebUrl(repositoryUrl);+ const trimmedCommit = commit.trim();+ if (!base || !trimmedCommit) return null;++ const normalizedBase = trimTrailingSlash(base);+ try {+ const host = new URL(normalizedBase).hostname;+ const segment = commitSegmentForHost(host);+ return `${normalizedBase}${segment}${encodeURIComponent(trimmedCommit)}`;+ } catch {+ return null;+ }+}diff --git a/frontend/src/lib/utils/navigation.utils.ts b/frontend/src/lib/utils/navigation.utils.tsdeleted file mode 100644index f9c04abfa..000000000--- a/frontend/src/lib/utils/navigation.utils.ts+++ /dev/null@@ -1,58 +0,0 @@-import { PersistedState } from 'runed';-import { defaultMobileNavigationSettings, type MobileNavigationSettings } from '$lib/config/navigation-config';-import settingsStore from '$lib/stores/config-store';-import { get } from 'svelte/store';-import type { MobileNavInteractionManager } from '$lib/hooks/use-mobile-nav-interactions';--export const pinnedItemsStore = new PersistedState('mobile-nav-settings', defaultMobileNavigationSettings);--export const navigationSettingsOverridesStore = new PersistedState<Partial<MobileNavigationSettings>>(- 'navigation-settings-overrides',- {}-);--let mobileNavManager: MobileNavInteractionManager | null = null;--export function registerNavigationManager(manager: MobileNavInteractionManager) {- mobileNavManager = manager;-}--export function resetNavigationVisibility() {- if (mobileNavManager) {- mobileNavManager.resetVisibility();- }-}--export function getEffectiveNavigationSettings(): MobileNavigationSettings {- const serverSettings = get(settingsStore);- const overrides = navigationSettingsOverridesStore.current;- const currentPinnedItems = pinnedItemsStore.current;-- // Helper function to get effective value (override > server > default)- const getEffectiveValue = <T>(serverValue: T | undefined, overrideValue: T | undefined, defaultValue: T): T => {- return overrideValue !== undefined ? overrideValue : (serverValue ?? defaultValue);- };-- const mode = getEffectiveValue(serverSettings?.mobileNavigationMode, overrides.mode, defaultMobileNavigationSettings.mode);-- return {- pinnedItems: overrides.pinnedItems ?? currentPinnedItems.pinnedItems,- mode,- showLabels: getEffectiveValue(- serverSettings?.mobileNavigationShowLabels,- overrides.showLabels,- defaultMobileNavigationSettings.showLabels- ),- // scrollToHide is now computed based on mode: always true for floating, always false for docked- scrollToHide: mode === 'floating'- };-}--export function updateNavigationOverrides(overrides: Partial<MobileNavigationSettings>) {- const currentOverrides = navigationSettingsOverridesStore.current;- navigationSettingsOverridesStore.current = { ...currentOverrides, ...overrides };-}--export function clearNavigationOverrides() {- navigationSettingsOverridesStore.current = {};-}diff --git a/frontend/src/lib/utils/oled-mode-util.ts b/frontend/src/lib/utils/oled-mode-util.tsdeleted file mode 100644index 05568e10a..000000000--- a/frontend/src/lib/utils/oled-mode-util.ts+++ /dev/null@@ -1,27 +0,0 @@-import { writable } from 'svelte/store';-import { syncBrowserThemeColor } from '$lib/utils/application-theme-util';--export const oledModeStore = writable<boolean>(false);--const OLED_CLASS = 'oled';--/**- * Applies or removes OLED mode by toggling the `.oled` class on <html>.- * The CSS rule only takes effect for the default application theme while dark- * mode is active, so calling this in other states is safe.- */-export function applyOledMode(enabled: boolean): void {- oledModeStore.set(enabled);-- if (typeof document === 'undefined') {- return;- }-- if (enabled) {- document.documentElement.classList.add(OLED_CLASS);- } else {- document.documentElement.classList.remove(OLED_CLASS);- }-- syncBrowserThemeColor();-}diff --git a/frontend/src/lib/utils/page-load-error.util.ts b/frontend/src/lib/utils/page-load-error.util.tsdeleted file mode 100644index 417c7aeaf..000000000--- a/frontend/src/lib/utils/page-load-error.util.ts+++ /dev/null@@ -1,33 +0,0 @@-import { error as kitError } from '@sveltejs/kit';-import { extractApiErrorMessage } from './api.util';--export function extractApiErrorStatus(err: unknown, fallbackStatus = 500): number {- if (err && typeof err === 'object') {- const maybeResponse = (err as { response?: { status?: unknown } }).response;- const responseStatus = maybeResponse?.status;- if (typeof responseStatus === 'number' && Number.isFinite(responseStatus)) {- return responseStatus;- }- }-- if (err && typeof err === 'object') {- const maybeStatus = (err as { status?: unknown }).status;- if (typeof maybeStatus === 'number' && Number.isFinite(maybeStatus)) {- return maybeStatus;- }- if (typeof maybeStatus === 'string') {- const parsed = Number.parseInt(maybeStatus, 10);- if (!Number.isNaN(parsed)) {- return parsed;- }- }- }-- return fallbackStatus;-}--export function throwPageLoadError(err: unknown, fallbackMessage: string): never {- const status = extractApiErrorStatus(err);- const message = extractApiErrorMessage(err) || fallbackMessage;- kitError(status, message);-}diff --git a/frontend/src/lib/utils/params.util.ts b/frontend/src/lib/utils/params.util.tsdeleted file mode 100644index 14c463e6d..000000000--- a/frontend/src/lib/utils/params.util.ts+++ /dev/null@@ -1,38 +0,0 @@-import type { SearchPaginationSortRequest } from '$lib/types/pagination.type';--export function transformPaginationParams(options?: SearchPaginationSortRequest): Record<string, any> {- const params: Record<string, any> = {};-- if (!options) return params;-- if (options.search) {- params['search'] = options.search;- }-- if (options.pagination) {- const { page, limit } = options.pagination;- params['start'] = Math.max(0, (page - 1) * limit);- params['limit'] = limit;- }-- if (options.sort) {- params['sort'] = options.sort.column;- params['order'] = options.sort.direction;- }-- if (options.filters) {- Object.entries(options.filters).forEach(([key, value]) => {- if (Array.isArray(value)) {- params[key] = value.join(',');- } else {- params[key] = String(value);- }- });- }-- if (typeof options.includeInternal === 'boolean') {- params['includeInternal'] = String(options.includeInternal);- }-- return params;-}diff --git a/frontend/src/lib/utils/permissions.util.ts b/frontend/src/lib/utils/permissions.util.tsdeleted file mode 100644index c75522069..000000000--- a/frontend/src/lib/utils/permissions.util.ts+++ /dev/null@@ -1,63 +0,0 @@-import userStore from '$lib/stores/user-store';-import { environmentStore } from '$lib/stores/environment.store.svelte';-import { GLOBAL_SCOPE } from '$lib/types/role.type';-import { get } from 'svelte/store';-import type { User } from '$lib/types/user.type';--/**- * Resolve the env ID to use for an RBAC check. When the caller doesn't pass- * one, fall back to the currently-selected environment from the store.- * Returns `undefined` when no env is selected — callers should treat that- * as "global-only check" (env-scoped permissions will deny).- */-function resolveEnvId(envId?: string): string | undefined {- if (envId) return envId;- const selected = environmentStore.selected;- if (!selected?.id) return undefined;- return selected.id;-}--/**- * Check whether the current user holds `perm` on the given environment.- *- * Reactive callers (inside `.svelte` files) should wrap this in `$derived`- * along with a read of `environmentStore.selected?.id` so the value re-computes- * when the env switches.- */-export function hasPermission(perm: string, envId?: string): boolean {- return userStore.hasPermission(perm, resolveEnvId(envId));-}--/** Returns true if the user has ANY of the supplied permissions on `envId`. */-export function hasAnyPermission(perms: string[], envId?: string): boolean {- return userStore.hasAnyPermission(perms, resolveEnvId(envId));-}--/** Returns the full effective permission set for the given env (global ∪ env). */-export function permissions(envId?: string): Set<string> {- return userStore.permissions(resolveEnvId(envId));-}--/** Returns true if the caller is a global admin (or sudo). */-export function isGlobalAdmin(): boolean {- return userStore.isGlobalAdmin();-}--/**- * Returns true if the user holds AT LEAST one permission on any environment- * (or globally). Useful for the "no access at all" fallback redirect.- */-export function hasAnyAccess(user: User | null): boolean {- if (!user?.permissionsByEnv) return false;- for (const perms of Object.values(user.permissionsByEnv)) {- if (perms.length > 0) return true;- }- return false;-}--// Keep imports tree-shake-friendly: re-export only what callers need.-export { GLOBAL_SCOPE };--// `get` is imported above to satisfy the (now-removed) hasAnyAccess fallback;-// kept exported so callers can grab the raw store snapshot if needed.-export { get };diff --git a/frontend/src/lib/utils/project-update.util.ts b/frontend/src/lib/utils/project-update.util.tsdeleted file mode 100644index 2449dbaa5..000000000--- a/frontend/src/lib/utils/project-update.util.ts+++ /dev/null@@ -1,46 +0,0 @@-import { m } from '$lib/paraglide/messages';-import type { ProjectUpdateInfo } from '$lib/types/project.type';--type ProjectUpdateStatus = ProjectUpdateInfo['status'];-export type ProjectUpdateBadgeVariant = 'blue' | 'green' | 'gray' | 'red';--export function getProjectUpdateStatus(updateInfo?: ProjectUpdateInfo): ProjectUpdateStatus {- return updateInfo?.status ?? 'unknown';-}--export function getProjectUpdateText(updateInfo?: ProjectUpdateInfo): string {- switch (getProjectUpdateStatus(updateInfo)) {- case 'has_update':- return m.images_has_updates();- case 'up_to_date':- return m.image_update_up_to_date_title();- case 'error':- return m.common_error();- default:- return m.image_update_status_unknown();- }-}--export function getProjectUpdateVariant(updateInfo?: ProjectUpdateInfo): ProjectUpdateBadgeVariant {- switch (getProjectUpdateStatus(updateInfo)) {- case 'has_update':- return 'blue';- case 'up_to_date':- return 'green';- case 'error':- return 'red';- default:- return 'gray';- }-}--export function getProjectUpdateTooltip(updateInfo?: ProjectUpdateInfo): string | undefined {- switch (getProjectUpdateStatus(updateInfo)) {- case 'error':- return m.image_update_check_failed_title();- case 'unknown':- return m.image_update_click_to_check();- default:- return undefined;- }-}diff --git a/frontend/src/lib/utils/pull-progress.ts b/frontend/src/lib/utils/pull-progress.tsdeleted file mode 100644index 8cf008a17..000000000--- a/frontend/src/lib/utils/pull-progress.ts+++ /dev/null@@ -1,317 +0,0 @@-/**- * Utility for tracking Docker image pull progress- */--import { PersistedState } from 'runed';--export type PullPhase = 'preparing' | 'downloading' | 'extracting' | 'verifying' | 'waiting' | 'complete' | 'error';--export interface LayerProgress {- current: number;- total: number;- status: string;-}--export interface PullProgressState {- progress: number;- statusText: string;- error: string;- layers: Record<string, LayerProgress>;-}--/**- * Persisted state for whether to show layer details in pull progress UI- */-export const showImageLayersState = new PersistedState('arcane-show-image-layers', false);--/**- * Creates an initial pull progress state- */-export function createPullProgressState(): PullProgressState {- return {- progress: 0,- statusText: '',- error: '',- layers: {}- };-}--/**- * Checks if the status indicates a layer is complete- */-export function isLayerComplete(status: string): boolean {- const s = status.toLowerCase();- return (- s.includes('pull complete') ||- s.includes('already exists') ||- s.includes('downloaded newer image') ||- s.includes('image is up to date')- );-}--/**- * Determines the phase of a pull operation from status text- */-export function getPullPhase(status: string, isComplete = false, hasError = false): PullPhase {- if (hasError) return 'error';- if (isComplete) return 'complete';-- const s = status.toLowerCase();- if (isLayerComplete(s)) return 'complete';- if (s.includes('downloading')) return 'downloading';- if (s.includes('extracting')) return 'extracting';- if (s.includes('verifying') || s.includes('digest')) return 'verifying';- if (s.includes('waiting')) return 'waiting';- if (s.includes('pulling') || s.includes('pull')) return 'downloading';- return 'preparing';-}--/**- * Checks if a stream line indicates downloading activity (should open popover)- */-export function isDownloadingLine(data: unknown): boolean {- if (!data || typeof data !== 'object') return false;-- const obj = data as Record<string, unknown>;- const status = String(obj['status'] ?? '').toLowerCase();- const pd = obj['progressDetail'] as Record<string, unknown> | undefined;-- // Open if we see byte progress or any of the common pull statuses- if (pd && (typeof pd['total'] === 'number' || typeof pd['current'] === 'number')) return true;-- return (- status.includes('downloading') ||- status.includes('extracting') ||- status.includes('pulling fs layer') ||- status.includes('download complete') ||- status.includes('pull complete')- );-}--/**- * Calculates overall progress from layer progress data- */-export function calculateOverallProgress(layers: Record<string, LayerProgress>): number {- const entries = Object.values(layers);- if (entries.length === 0) return 0;-- const totalLayers = entries.length;- let weightedSum = 0;-- for (const layer of entries) {- const s = (layer.status || '').toLowerCase();- if (isLayerComplete(s)) {- weightedSum += 1.0;- } else if (s.includes('extracting')) {- // Extraction is the last step before completion- weightedSum += 0.95;- } else if (s.includes('verifying')) {- weightedSum += 0.92;- } else if (s.includes('download complete')) {- weightedSum += 0.85;- } else if (layer.total > 0) {- // Download progress is weighted up to 85%- const downloadProgress = (layer.current / layer.total) * 0.85;- weightedSum += Math.min(downloadProgress, 0.85);- } else if (s.includes('downloading') || s.includes('pulling')) {- weightedSum += 0.05;- }- }-- const overallProgress = (weightedSum / totalLayers) * 100;- return Math.min(overallProgress, 100);-}--/**- * Checks if all layers are complete- */-export function areAllLayersComplete(layers: Record<string, LayerProgress>): boolean {- const entries = Object.values(layers);- if (entries.length === 0) return false;-- return entries.every((l) => l.status && isLayerComplete(l.status));-}--/**- * Calculates layer statistics- */-export function getLayerStats(layers: Record<string, LayerProgress>, forceComplete = false) {- const entries = Object.entries(layers);- const total = entries.length;- const completed = entries.filter(([_, l]) => isLayerComplete(l.status || '')).length;- const effectiveCompleted = forceComplete ? total : completed;-- // Downloading: status contains 'downloading' or 'pulling' explicitly- const downloading = entries.filter(([_, l]) => {- const s = (l.status || '').toLowerCase();- return s.includes('downloading') || s.includes('pulling');- }).length;-- const extracting = entries.filter(([_, l]) => l.status?.toLowerCase().includes('extracting')).length;-- return { total, completed: effectiveCompleted, downloading, extracting };-}--/**- * Checks if the pull is in an indeterminate phase (extracting/verifying with no measurable progress)- * This is used to show a marquee-style progress bar- */-export function isIndeterminatePhase(layers: Record<string, LayerProgress>, currentProgress: number): boolean {- const stats = getLayerStats(layers);- // If we have layers and most downloads are complete but extraction is happening- // and progress is low (byte progress doesn't apply to extraction)- if (stats.total === 0) return false;-- const downloadComplete = stats.downloading === 0;- const hasExtractingLayers = stats.extracting > 0;- const notAllComplete = stats.completed < stats.total;-- // We're in indeterminate phase if downloads are done, extraction is happening,- // but not all layers are complete yet- return downloadComplete && hasExtractingLayers && notAllComplete && currentProgress < 95;-}--/**- * Extracts error message from stream data- */-export function extractErrorMessage(data: unknown, fallbackMessage: string): string {- if (!data || typeof data !== 'object') return fallbackMessage;-- const obj = data as Record<string, unknown>;- if (!obj['error']) return '';-- if (typeof obj['error'] === 'string') return obj['error'];- if (typeof obj['error'] === 'object' && obj['error'] !== null) {- const errObj = obj['error'] as Record<string, unknown>;- if (typeof errObj['message'] === 'string') return errObj['message'];- }-- return fallbackMessage;-}--/**- * Updates layer progress from stream data- */-export function updateLayerFromStreamData(layers: Record<string, LayerProgress>, data: unknown): Record<string, LayerProgress> {- if (!data || typeof data !== 'object') return layers;-- const obj = data as Record<string, unknown>;- const id = obj['id'] as string | undefined;- if (!id) return layers;-- const currentLayer = layers[id] || { current: 0, total: 0, status: '' };- const status = obj['status'] as string | undefined;-- if (status) {- currentLayer.status = status;- }-- const progressDetail = obj['progressDetail'] as Record<string, unknown> | undefined;- if (progressDetail) {- const current = progressDetail['current'] as number | undefined;- const total = progressDetail['total'] as number | undefined;- if (typeof current === 'number') currentLayer.current = current;- if (typeof total === 'number') currentLayer.total = total;- }-- return { ...layers, [id]: currentLayer };-}--/**- * Creates a stream handler for pull progress- */-export function createPullStreamHandler(callbacks: {- onStatusChange: (status: string) => void;- onProgressChange: (progress: number) => void;- onLayersChange: (layers: Record<string, LayerProgress>) => void;- onError: (error: string) => void;- onFirstDownload?: () => void;- errorMessage: string;-}) {- let layers: Record<string, LayerProgress> = {};- let hasOpenedPopover = false;-- return (data: unknown) => {- if (!data) return;-- // Check for first download activity- if (!hasOpenedPopover && isDownloadingLine(data)) {- hasOpenedPopover = true;- callbacks.onFirstDownload?.();- }-- // Handle errors- const errorMsg = extractErrorMessage(data, callbacks.errorMessage);- if (errorMsg) {- callbacks.onError(errorMsg);- return;- }-- // Update status text- const obj = data as Record<string, unknown>;- if (obj['status'] && typeof obj['status'] === 'string') {- callbacks.onStatusChange(obj['status']);- }-- // Update layer progress- layers = updateLayerFromStreamData(layers, data);- callbacks.onLayersChange(layers);-- // Calculate and update overall progress- const progress = calculateOverallProgress(layers);- callbacks.onProgressChange(progress);- };-}--/**- * Returns a computed aggregate status string based on all layers- */-export function getAggregateStatus(layers: Record<string, LayerProgress>, fallbackStatus = '', isComplete = false): string {- if (isComplete) return 'Pull complete';-- const entries = Object.values(layers);- if (entries.length === 0) return fallbackStatus;-- if (areAllLayersComplete(layers)) return 'Pull complete';-- const stats = getLayerStats(layers);-- if (stats.downloading > 0 || stats.extracting > 0) return 'Pulling';-- const hasVerifying = entries.some(- (l) => l.status?.toLowerCase().includes('verifying') || l.status?.toLowerCase().includes('digest')- );- if (hasVerifying) return 'Verifying checksum';-- const hasWaiting = entries.some((l) => l.status?.toLowerCase().includes('waiting'));- if (hasWaiting) return 'Waiting';-- return fallbackStatus || 'Preparing';-}--/**- * Returns an aggregate PullPhase for phase-based title system- */-export function getAggregatePullPhase(layers: Record<string, LayerProgress>, isComplete = false, hasError = false): PullPhase {- if (hasError) return 'error';- if (isComplete) return 'complete';-- const entries = Object.values(layers);- if (entries.length === 0) return 'preparing';-- if (areAllLayersComplete(layers)) return 'complete';-- const stats = getLayerStats(layers);-- if (stats.downloading > 0 || stats.extracting > 0) return 'downloading';-- const hasVerifying = entries.some(- (l) => l.status?.toLowerCase().includes('verifying') || l.status?.toLowerCase().includes('digest')- );- if (hasVerifying) return 'verifying';-- const hasWaiting = entries.some((l) => l.status?.toLowerCase().includes('waiting'));- if (hasWaiting) return 'waiting';-- return 'preparing';-}diff --git a/frontend/src/lib/utils/refresh.util.ts b/frontend/src/lib/utils/refresh.util.tsdeleted file mode 100644index 4a98b4f55..000000000--- a/frontend/src/lib/utils/refresh.util.ts+++ /dev/null@@ -1,66 +0,0 @@-import { toast } from 'svelte-sonner';-import { tryCatch } from '$lib/utils/try-catch';-import { handleApiResultWithCallbacks } from '$lib/utils/api.util';--export interface RefreshTask<T> {- fetch: () => Promise<T>;- onSuccess: (data: T) => void;- errorMessage: string;-}--/**- * Executes multiple refresh tasks in parallel with unified loading state management.- *- * @param tasks - Array of refresh tasks to execute- * @param setLoading - Callback to update loading state- */-export async function parallelRefresh<T extends Record<string, RefreshTask<any>>>(- tasks: T,- setLoading: (loading: boolean) => void-): Promise<void> {- setLoading(true);-- const taskKeys = Object.keys(tasks);- const completionStatus = Object.fromEntries(taskKeys.map((k) => [k, true]));-- const updateLoading = (key: string, value: boolean) => {- completionStatus[key] = value;- const stillLoading = Object.values(completionStatus).some((v) => v);- setLoading(stillLoading);- };-- await Promise.all(- taskKeys.map(async (key) => {- const task = tasks[key as keyof T];- if (!task) return;-- handleApiResultWithCallbacks({- result: await tryCatch(task.fetch()),- message: task.errorMessage,- setLoadingState: (value) => updateLoading(key, value),- onSuccess: task.onSuccess- });- })- );-}--/**- * Simple refresh helper for single data fetch with error handling- */-export async function simpleRefresh<T>(- fetch: () => Promise<T>,- onSuccess: (data: T) => void,- errorMessage: string,- setLoading: (loading: boolean) => void-): Promise<void> {- setLoading(true);- try {- const data = await fetch();- onSuccess(data);- } catch (error) {- console.error('Refresh failed:', error);- toast.error(errorMessage);- } finally {- setLoading(false);- }-}diff --git a/frontend/src/lib/utils/settings-form.util.ts b/frontend/src/lib/utils/settings-form.util.tsdeleted file mode 100644index 9cf9dd902..000000000--- a/frontend/src/lib/utils/settings-form.util.ts+++ /dev/null@@ -1,102 +0,0 @@-import { z } from 'zod/v4';-import { createForm } from '$lib/utils/form.utils';-import { UseSettingsForm } from '$lib/hooks/use-settings-form.svelte';-import { toast } from 'svelte-sonner';-import type { Settings } from '$lib/types/settings.type';--type SettingsPayload = Partial<Settings> & Record<string, unknown>;--export interface SettingsFormConfig<T extends z.ZodType<SettingsPayload, any>> {- schema: T;- currentSettings: z.infer<T>;- getCurrentSettings?: () => z.infer<T>;- /**- * Custom save handler. If provided, this will be called instead of the default- * settingsService.updateSettings(). Useful for environment-specific settings- * or other custom save logic.- */- onSave?: (data: z.infer<T>) => Promise<void>;- onSuccess?: () => void;- onReset?: () => void;- successMessage?: string;- errorMessage?: string;-}--/**- * Creates a complete settings form with automatic change detection and save/reset handling.- *- * Usage:- * ```ts- * const { formInputs, form, settingsForm, registerOnMount } = createSettingsForm({- * schema: formSchema,- * currentSettings,- * getCurrentSettings: () => $settingsStore || data.settings!,- * successMessage: m.general_settings_saved(),- * onReset: () => applyAccentColor(currentSettings.accentColor)- * });- *- * onMount(() => registerOnMount());- * ```- */-export function createSettingsForm<T extends z.ZodType<any, any>>(config: SettingsFormConfig<T>) {- const {- schema,- currentSettings,- getCurrentSettings,- onSave,- onSuccess,- onReset,- successMessage = 'Settings saved',- errorMessage = 'Failed to save settings'- } = config;-- const { inputs: formInputs, ...form } = createForm(schema, currentSettings);-- const settingsForm = new UseSettingsForm({- formInputs,- getCurrentSettings: getCurrentSettings ?? (() => currentSettings),- onSave- });-- const onSubmit = async () => {- const data = form.validate();- if (!data) {- toast.error('Please check the form for errors');- return;- }- settingsForm.setLoading(true);-- try {- await settingsForm.updateSettings(data);- toast.success(successMessage);- onSuccess?.();- } catch (error) {- console.error('Failed to save settings:', error);- const message = error instanceof Error ? error.message : errorMessage;- toast.error(message);- } finally {- settingsForm.setLoading(false);- }- };-- const resetForm = () => {- form.reset();- onReset?.();- };-- // Register actions immediately so they're available even if onMount doesn't run (e.g. during $derived recreation)- settingsForm.registerFormActions(onSubmit, resetForm);-- const registerOnMount = () => {- settingsForm.registerFormActions(onSubmit, resetForm);- };-- return {- formInputs,- form,- settingsForm,- onSubmit,- resetForm,- registerOnMount- };-}diff --git a/frontend/src/lib/utils/settings.ts b/frontend/src/lib/utils/settings.tsnew file mode 100644index 000000000..a6145d38f--- /dev/null+++ b/frontend/src/lib/utils/settings.ts@@ -0,0 +1,274 @@+import { get, writable } from 'svelte/store';+import { toast } from 'svelte-sonner';+import { z } from 'zod/v4';+import { UseSettingsForm } from '$lib/hooks/use-settings-form.svelte';+import type { ApplicationTheme, Settings } from '$lib/types/settings';++// --- Local vs environment settings classification ---++export type LocalSettings = {+ applicationTheme: ApplicationTheme;+ accentColor: string;+ oledMode: boolean;+ mobileNavigationMode: string;+ mobileNavigationShowLabels: boolean;+ sidebarHoverExpansion: boolean;+ keyboardShortcutsEnabled: boolean;+ edgeMTLSManagerCAAvailable?: boolean;+};++const LOCAL_SETTING_KEYS = new Set([+ 'applicationTheme',+ 'accentColor',+ 'oledMode',+ 'mobileNavigationMode',+ 'mobileNavigationShowLabels',+ 'sidebarHoverExpansion',+ 'keyboardShortcutsEnabled',+ 'authLocalEnabled',+ 'authSessionTimeout',+ 'authPasswordPolicy',+ 'authOidcConfig',+ 'oidcEnabled',+ 'oidcMergeAccounts',+ 'oidcSkipTlsVerify',+ 'oidcAutoRedirectToProvider',+ 'oidcClientId',+ 'oidcClientSecret',+ 'oidcIssuerUrl',+ 'oidcScopes',+ 'oidcGroupsClaim',+ 'oidcProviderName',+ 'oidcProviderLogoUrl',+ 'edgeMTLSManagerCAAvailable'+]);++export function isLocalSetting(key: string): boolean {+ return LOCAL_SETTING_KEYS.has(key);+}++export function extractLocalSettings(settings: Record<string, any>): Partial<LocalSettings> {+ const local: Partial<LocalSettings> = {};+ for (const key of LOCAL_SETTING_KEYS) {+ if (key in settings) {+ local[key as keyof LocalSettings] = settings[key];+ }+ }+ return local;+}++export function extractEnvironmentSettings(settings: Record<string, any>): Record<string, any> {+ const env: Record<string, any> = {};+ for (const key in settings) {+ if (!LOCAL_SETTING_KEYS.has(key)) {+ env[key] = settings[key];+ }+ }+ return env;+}++// --- Generic Zod-backed form state ---++export function preventDefault(fn: (event: Event) => any) {+ return function (this: any, event: Event) {+ event.preventDefault();+ fn.call(this, event);+ };+}++export type FormInput<T> = {+ value: T;+ error: string | null;+};++export type FormInputs<T> = {+ [K in keyof T]: FormInput<T[K]>;+};++export function createForm<T extends z.ZodType<any, any>>(schema: T, initialValues: z.infer<T>) {+ const inputsStore = writable<FormInputs<z.infer<T>>>(initializeInputs(initialValues));+ const errorsStore = writable<z.ZodError<any> | undefined>();++ function initializeInputs(initialValues: z.infer<T>): FormInputs<z.infer<T>> {+ const inputs: FormInputs<z.infer<T>> = {} as FormInputs<z.infer<T>>;++ const schemaShape = schema instanceof z.ZodObject ? schema.shape : {};+ const schemaKeys = Object.keys(schemaShape);++ for (const key of schemaKeys) {+ if (Object.prototype.hasOwnProperty.call(initialValues, key)) {+ inputs[key as keyof z.infer<T>] = {+ value: initialValues[key as keyof z.infer<T>],+ error: null+ };+ }+ }+ return inputs;+ }++ function validate() {+ let success = true;+ inputsStore.update((inputs) => {+ const values = Object.fromEntries(Object.entries(inputs).map(([key, input]) => [key, input.value]));++ const result = schema.safeParse(values);+ errorsStore.set(result.error);++ if (!result.success) {+ success = false;+ for (const input of Object.keys(inputs)) {+ const error = result.error.issues.find((e) => e.path[0] === input);+ if (error) {+ inputs[input as keyof z.infer<T>].error = error.message;+ } else {+ inputs[input as keyof z.infer<T>].error = null;+ }+ }+ } else {+ for (const input of Object.keys(inputs)) {+ inputs[input as keyof z.infer<T>].error = null;+ }+ }+ return inputs;+ });+ return success ? data() : null;+ }++ function data() {+ const inputs = get(inputsStore);++ const values = Object.fromEntries(+ Object.entries(inputs).map(([key, input]) => {+ return [key, trimValue(input.value)];+ })+ );++ const result = schema.safeParse(values);+ return (result.success ? result.data : values) as z.infer<T>;+ }++ function reset() {+ inputsStore.update((inputs) => {+ for (const input of Object.keys(inputs)) {+ inputs[input as keyof z.infer<T>] = {+ value: initialValues[input as keyof z.infer<T>],+ error: null+ };+ }+ return inputs;+ });+ }++ function setValue(key: keyof z.infer<T>, value: z.infer<T>[keyof z.infer<T>]) {+ inputsStore.update((inputs) => {+ inputs[key].value = value;+ return inputs;+ });+ }++ function trimValue(value: any) {+ if (typeof value === 'string') {+ value = value.trim();+ } else if (Array.isArray(value)) {+ value = value.map((item: any) => {+ if (typeof item === 'string') {+ return item.trim();+ }+ return item;+ });+ }+ return value;+ }++ return {+ schema,+ inputs: inputsStore,+ errors: errorsStore,+ data,+ validate,+ setValue,+ reset+ };+}++// --- Settings-specific form wrapper ---++type SettingsPayload = Partial<Settings> & Record<string, unknown>;++export interface SettingsFormConfig<T extends z.ZodType<SettingsPayload, any>> {+ schema: T;+ currentSettings: z.infer<T>;+ getCurrentSettings?: () => z.infer<T>;+ /**+ * Custom save handler. If provided, this will be called instead of the default+ * settingsService.updateSettings(). Useful for environment-specific settings+ * or other custom save logic.+ */+ onSave?: (data: z.infer<T>) => Promise<void>;+ onSuccess?: () => void;+ onReset?: () => void;+ successMessage?: string;+ errorMessage?: string;+}++export function createSettingsForm<T extends z.ZodType<any, any>>(config: SettingsFormConfig<T>) {+ const {+ schema,+ currentSettings,+ getCurrentSettings,+ onSave,+ onSuccess,+ onReset,+ successMessage = 'Settings saved',+ errorMessage = 'Failed to save settings'+ } = config;++ const { inputs: formInputs, ...form } = createForm(schema, currentSettings);++ const settingsForm = new UseSettingsForm({+ formInputs,+ getCurrentSettings: getCurrentSettings ?? (() => currentSettings),+ onSave+ });++ const onSubmit = async () => {+ const data = form.validate();+ if (!data) {+ toast.error('Please check the form for errors');+ return;+ }+ settingsForm.setLoading(true);++ try {+ await settingsForm.updateSettings(data);+ toast.success(successMessage);+ onSuccess?.();+ } catch (error) {+ console.error('Failed to save settings:', error);+ const message = error instanceof Error ? error.message : errorMessage;+ toast.error(message);+ } finally {+ settingsForm.setLoading(false);+ }+ };++ const resetForm = () => {+ form.reset();+ onReset?.();+ };++ settingsForm.registerFormActions(onSubmit, resetForm);++ const registerOnMount = () => {+ settingsForm.registerFormActions(onSubmit, resetForm);+ };++ return {+ formInputs,+ form,+ settingsForm,+ onSubmit,+ resetForm,+ registerOnMount+ };+}diff --git a/frontend/src/lib/utils/settings.util.ts b/frontend/src/lib/utils/settings.util.tsdeleted file mode 100644index ac975f81b..000000000--- a/frontend/src/lib/utils/settings.util.ts+++ /dev/null@@ -1,62 +0,0 @@-import type { ApplicationTheme } from '$lib/types/settings.type';--export type LocalSettings = {- applicationTheme: ApplicationTheme;- accentColor: string;- oledMode: boolean;- mobileNavigationMode: string;- mobileNavigationShowLabels: boolean;- sidebarHoverExpansion: boolean;- keyboardShortcutsEnabled: boolean;- edgeMTLSManagerCAAvailable?: boolean;-};--const LOCAL_SETTING_KEYS = new Set([- 'applicationTheme',- 'accentColor',- 'oledMode',- 'mobileNavigationMode',- 'mobileNavigationShowLabels',- 'sidebarHoverExpansion',- 'keyboardShortcutsEnabled',- 'authLocalEnabled',- 'authSessionTimeout',- 'authPasswordPolicy',- 'authOidcConfig',- 'oidcEnabled',- 'oidcMergeAccounts',- 'oidcSkipTlsVerify',- 'oidcAutoRedirectToProvider',- 'oidcClientId',- 'oidcClientSecret',- 'oidcIssuerUrl',- 'oidcScopes',- 'oidcGroupsClaim',- 'oidcProviderName',- 'oidcProviderLogoUrl',- 'edgeMTLSManagerCAAvailable'-]);--export function isLocalSetting(key: string): boolean {- return LOCAL_SETTING_KEYS.has(key);-}--export function extractLocalSettings(settings: Record<string, any>): Partial<LocalSettings> {- const local: Partial<LocalSettings> = {};- for (const key of LOCAL_SETTING_KEYS) {- if (key in settings) {- local[key as keyof LocalSettings] = settings[key];- }- }- return local;-}--export function extractEnvironmentSettings(settings: Record<string, any>): Record<string, any> {- const env: Record<string, any> = {};- for (const key in settings) {- if (!LOCAL_SETTING_KEYS.has(key)) {- env[key] = settings[key];- }- }- return env;-}diff --git a/frontend/src/lib/utils/status.utils.ts b/frontend/src/lib/utils/status.utils.tsdeleted file mode 100644index e4c91bdb2..000000000--- a/frontend/src/lib/utils/status.utils.ts+++ /dev/null@@ -1,20 +0,0 @@-export type StatusVariant = 'red' | 'purple' | 'green' | 'blue' | 'gray' | 'amber';--const STATUS_VARIANT_MAP: Record<string, StatusVariant> = {- running: 'green',- deployed: 'green',- stopped: 'red',- failed: 'red',- pending: 'amber',- creating: 'blue',- updating: 'blue',- deleting: 'purple',- exited: 'red'-};--export function getStatusVariant(status?: string | null): StatusVariant {- if (!status) return 'gray';- return STATUS_VARIANT_MAP[String(status).toLowerCase()] ?? 'gray';-}--export { STATUS_VARIANT_MAP as statusVariantMap };diff --git a/frontend/src/lib/utils/string.utils.ts b/frontend/src/lib/utils/string.utils.tsdeleted file mode 100644index 55b0f57c2..000000000--- a/frontend/src/lib/utils/string.utils.ts+++ /dev/null@@ -1,21 +0,0 @@-export function capitalizeFirstLetter(string: string): string {- if (!string) return '';- return string.charAt(0).toUpperCase() + string.slice(1);-}--export function shortId(id: string | undefined, length = 12): string {- if (!id) return 'N/A';- return id.substring(0, length);-}--export function truncateString(str: string | undefined, maxLength: number): string {- if (!str) return '';- if (str.length <= maxLength) {- return str;- }- return str.substring(0, maxLength - 3) + '...';-}--export function truncateImageDigest(image: string): string {- return image.replace(/@sha256:([a-f0-9]{7})[a-f0-9]+/g, '@sha256:$1');-}diff --git a/frontend/src/lib/utils/swarm-service-mode.utils.ts b/frontend/src/lib/utils/swarm-service-mode.utils.tsdeleted file mode 100644index d5cd1cab8..000000000--- a/frontend/src/lib/utils/swarm-service-mode.utils.ts+++ /dev/null@@ -1,46 +0,0 @@-import { m } from '$lib/paraglide/messages';-import type { SwarmServiceModeName, SwarmServiceModeSpec } from '$lib/types/swarm.type';--export type SwarmServiceModeBadgeVariant = 'green' | 'blue' | 'amber' | 'purple' | 'gray';--export function getSwarmServiceModeFromSpec(mode: SwarmServiceModeSpec | undefined): SwarmServiceModeName {- if (mode?.Replicated) return 'replicated';- if (mode?.Global !== undefined) return 'global';- if (mode?.ReplicatedJob) return 'replicated-job';- if (mode?.GlobalJob !== undefined) return 'global-job';- return 'unknown';-}--export function getSwarmServiceModeLabel(mode: string): string {- switch (mode) {- case 'replicated':- return m.swarm_service_mode_replicated();- case 'global':- return m.swarm_service_mode_global();- case 'replicated-job':- return m.swarm_service_mode_replicated_job();- case 'global-job':- return m.swarm_service_mode_global_job();- default:- return m.common_unknown();- }-}--export function getSwarmServiceModeVariant(mode: string): SwarmServiceModeBadgeVariant {- switch (mode) {- case 'replicated':- return 'blue';- case 'global':- return 'green';- case 'replicated-job':- return 'amber';- case 'global-job':- return 'purple';- default:- return 'gray';- }-}--export function isSwarmServiceModeScalable(mode: string): boolean {- return mode === 'replicated' || mode === 'replicated-job';-}diff --git a/frontend/src/lib/utils/table-pagination.util.ts b/frontend/src/lib/utils/table-pagination.util.tsdeleted file mode 100644index 6c85eccf0..000000000--- a/frontend/src/lib/utils/table-pagination.util.ts+++ /dev/null@@ -1,9 +0,0 @@-import { TABLE_PAGE_SIZE_ALL, TABLE_PAGE_SIZE_OPTIONS } from '$lib/constants/table-pagination';--export function normalizeTablePageSize(limit: unknown): number | undefined {- const parsed = typeof limit === 'number' ? limit : Number.parseInt(String(limit), 10);-- if (!Number.isFinite(parsed)) return undefined;- if (parsed === TABLE_PAGE_SIZE_ALL) return parsed;- return TABLE_PAGE_SIZE_OPTIONS.includes(parsed as (typeof TABLE_PAGE_SIZE_OPTIONS)[number]) ? parsed : undefined;-}diff --git a/frontend/src/lib/utils/table-persistence.util.ts b/frontend/src/lib/utils/tables.tssimilarity index 68%rename from frontend/src/lib/utils/table-persistence.util.tsrename to frontend/src/lib/utils/tables.tsindex a7cbe1e1d..4e7e2e604 100644--- a/frontend/src/lib/utils/table-persistence.util.ts+++ b/frontend/src/lib/utils/tables.ts@@ -1,11 +1,19 @@import { browser } from '$app/environment';import { PersistedState } from 'runed';import { decodeSort, type CompactTablePrefs } from '$lib/components/arcane-table/arcane-table.types.svelte';-import type { FilterMap, FilterValue, SearchPaginationSortRequest } from '$lib/types/pagination.type';-import { normalizeTablePageSize } from '$lib/utils/table-pagination.util';+import { TABLE_PAGE_SIZE_ALL, TABLE_PAGE_SIZE_OPTIONS } from '$lib/constants/table-pagination';+import type { FilterMap, FilterValue, SearchPaginationSortRequest } from '$lib/types/shared';const DEFAULT_LIMIT = 20;+export function normalizeTablePageSize(limit: unknown): number | undefined {+ const parsed = typeof limit === 'number' ? limit : Number.parseInt(String(limit), 10);++ if (!Number.isFinite(parsed)) return undefined;+ if (parsed === TABLE_PAGE_SIZE_ALL) return parsed;+ return TABLE_PAGE_SIZE_OPTIONS.includes(parsed as (typeof TABLE_PAGE_SIZE_OPTIONS)[number]) ? parsed : undefined;+}+function cloneRequest(options: SearchPaginationSortRequest): SearchPaginationSortRequest {return {search: options.search,@@ -106,3 +114,40 @@ export function resolveInitialTableRequest(return base;}++export function transformPaginationParams(options?: SearchPaginationSortRequest): Record<string, any> {+ const params: Record<string, any> = {};++ if (!options) return params;++ if (options.search) {+ params['search'] = options.search;+ }++ if (options.pagination) {+ const { page, limit } = options.pagination;+ params['start'] = Math.max(0, (page - 1) * limit);+ params['limit'] = limit;+ }++ if (options.sort) {+ params['sort'] = options.sort.column;+ params['order'] = options.sort.direction;+ }++ if (options.filters) {+ Object.entries(options.filters).forEach(([key, value]) => {+ if (Array.isArray(value)) {+ params[key] = value.join(',');+ } else {+ params[key] = String(value);+ }+ });+ }++ if (typeof options.includeInternal === 'boolean') {+ params['includeInternal'] = String(options.includeInternal);+ }++ return params;+}diff --git a/frontend/src/lib/utils/application-theme-util.ts b/frontend/src/lib/utils/theme.tssimilarity index 67%rename from frontend/src/lib/utils/application-theme-util.tsrename to frontend/src/lib/utils/theme.tsindex 05b63b26a..80e01a939 100644--- a/frontend/src/lib/utils/application-theme-util.ts+++ b/frontend/src/lib/utils/theme.ts@@ -1,4 +1,5 @@-import type { ApplicationTheme } from '$lib/types/settings.type';+import { writable } from 'svelte/store';+import type { ApplicationTheme } from '$lib/types/settings';export const APPLICATION_THEME_VALUES = ['default',@@ -208,9 +209,13 @@ const APP_THEME_ATTRIBUTE = 'data-app-theme';const OLED_CLASS = 'oled';const DARK_CLASS = 'dark';const OLED_THEME_COLOR = '#000000';+const DEFAULT_ACCENT_COLOR = 'oklch(0.606 0.25 292.717)';let htmlClassObserver: MutationObserver | null = null;+export const accentColorPreviewStore = writable<string>(DEFAULT_ACCENT_COLOR);+export const oledModeStore = writable<boolean>(false);+export function resolveApplicationTheme(value?: string | null): ApplicationTheme {if (!value) {return 'default';@@ -283,3 +288,78 @@ export function syncBrowserThemeColor(): void {activeMeta.content = background;}}++export function applyAccentColor(accentValue: string) {+ const resolvedAccent = accentValue === 'default' ? DEFAULT_ACCENT_COLOR : accentValue;+ accentColorPreviewStore.set(resolvedAccent);++ if (typeof document === 'undefined') {+ return;+ }++ if (accentValue === 'default') {+ document.documentElement.style.removeProperty('--primary');+ document.documentElement.style.removeProperty('--primary-foreground');+ document.documentElement.style.removeProperty('--ring');+ document.documentElement.style.removeProperty('--sidebar-ring');+ return;+ }++ document.documentElement.style.setProperty('--primary', resolvedAccent);++ const foregroundColor = getContrastingForeground(resolvedAccent);+ document.documentElement.style.setProperty('--primary-foreground', foregroundColor);++ const ringColor = `color-mix(in srgb, ${resolvedAccent} 50%, transparent)`;+ document.documentElement.style.setProperty('--ring', ringColor);+ document.documentElement.style.setProperty('--sidebar-ring', ringColor);+}++function getContrastingForeground(color: string): string {+ const brightness = getColorBrightness(color);+ return brightness < 0.55 ? 'oklch(0.98 0 0)' : 'oklch(0.09 0 0)';+}++function getColorBrightness(color: string): number {+ const tempElement = document.createElement('div');+ tempElement.style.color = color;+ document.body.appendChild(tempElement);++ const computedColor = window.getComputedStyle(tempElement).color;+ document.body.removeChild(tempElement);++ const rgbMatch = computedColor.match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)/);+ if (!rgbMatch) {+ return 0.5;+ }++ const r = Number.parseInt(rgbMatch[1] ?? '0', 10);+ const g = Number.parseInt(rgbMatch[2] ?? '0', 10);+ const b = Number.parseInt(rgbMatch[3] ?? '0', 10);++ const sR = r / 255;+ const sG = g / 255;+ const sB = b / 255;++ const rLinear = sR <= 0.03928 ? sR / 12.92 : Math.pow((sR + 0.055) / 1.055, 2.4);+ const gLinear = sG <= 0.03928 ? sG / 12.92 : Math.pow((sG + 0.055) / 1.055, 2.4);+ const bLinear = sB <= 0.03928 ? sB / 12.92 : Math.pow((sB + 0.055) / 1.055, 2.4);++ return 0.2126 * rLinear + 0.7152 * gLinear + 0.0722 * bLinear;+}++export function applyOledMode(enabled: boolean): void {+ oledModeStore.set(enabled);++ if (typeof document === 'undefined') {+ return;+ }++ if (enabled) {+ document.documentElement.classList.add(OLED_CLASS);+ } else {+ document.documentElement.classList.remove(OLED_CLASS);+ }++ syncBrowserThemeColor();+}diff --git a/frontend/src/lib/utils/try-catch.ts b/frontend/src/lib/utils/try-catch.tsdeleted file mode 100644index 5668b6773..000000000--- a/frontend/src/lib/utils/try-catch.ts+++ /dev/null@@ -1,21 +0,0 @@-type Success<T> = {- data: T;- error: null;-};--type Failure<E> = {- data: null;- error: E;-};--export type Result<T, E = Error> = Success<T> | Failure<E>;--// Main wrapper function-export async function tryCatch<T, E = Error>(promise: Promise<T>): Promise<Result<T, E>> {- try {- const data = await promise;- return { data, error: null };- } catch (error) {- return { data: null, error: error as E };- }-}diff --git a/frontend/src/lib/utils/updates-filter.util.ts b/frontend/src/lib/utils/updates-filter.util.tsdeleted file mode 100644index a84074eeb..000000000--- a/frontend/src/lib/utils/updates-filter.util.ts+++ /dev/null@@ -1,24 +0,0 @@-import type { SearchPaginationSortRequest } from '$lib/types/pagination.type';--export const updatesFilter = 'has_update';--export function ensureUpdatesFilter<T extends SearchPaginationSortRequest>(options: T): T {- return {- ...options,- filters: {- ...(options.filters ?? {}),- updates: updatesFilter- }- };-}--export function ensureStandaloneContainerUpdatesFilter<T extends SearchPaginationSortRequest>(options: T): T {- const next = ensureUpdatesFilter(options);- return {- ...next,- filters: {- ...(next.filters ?? {}),- standalone: true- }- };-}diff --git a/frontend/src/lib/utils/url.ts b/frontend/src/lib/utils/url.tsdeleted file mode 100644index f86c05fe9..000000000--- a/frontend/src/lib/utils/url.ts+++ /dev/null@@ -1,18 +0,0 @@-export function toPortHref(hostPort: string, baseServerUrl?: string): string {- try {- const base = baseServerUrl || (typeof window !== 'undefined' ? window.location.origin : 'http://localhost');- const url = new URL(base.startsWith('http') ? base : `http://${base}`);- url.port = hostPort;- return url.toString();- } catch {- return '#';- }-}--export function toSafeHref(raw: string, scheme: string = 'https'): string {- const trimmed = raw.trim();- if (!trimmed) return '#';- if (/^(javascript|data|vbscript):/i.test(trimmed)) return '#';- if (/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(trimmed)) return trimmed;- return `${scheme}://${trimmed}`;-}diff --git a/frontend/src/lib/utils/utils.ts b/frontend/src/lib/utils/utils.tsdeleted file mode 100644index 340fd9a26..000000000--- a/frontend/src/lib/utils/utils.ts+++ /dev/null@@ -1,13 +0,0 @@-export function debounced<T extends (...args: any[]) => void>(func: T, delay: number) {- let debounceTimeout: ReturnType<typeof setTimeout>;-- return (...args: Parameters<T>) => {- if (debounceTimeout !== undefined) {- clearTimeout(debounceTimeout);- }-- debounceTimeout = setTimeout(() => {- func(...args);- }, delay);- };-}diff --git a/frontend/src/lib/utils/vulnerability-scan.util.ts b/frontend/src/lib/utils/vulnerability-scan.util.tsdeleted file mode 100644index 557c19317..000000000--- a/frontend/src/lib/utils/vulnerability-scan.util.ts+++ /dev/null@@ -1,170 +0,0 @@-import type { VulnerabilityScanSummary } from '$lib/types/vulnerability.type';--const SCAN_IN_PROGRESS_STATUSES = new Set(['pending', 'scanning']);--export type VulnerabilityScanPollOptions = {- intervalMs?: number;- maxAttempts?: number;- onUpdate?: (summary: VulnerabilityScanSummary) => void;- onComplete?: (summary: VulnerabilityScanSummary) => void;- onError?: (error: unknown) => void;-};--export type VulnerabilityScanTracker = {- cancel: () => void;- promise: Promise<VulnerabilityScanSummary>;-};--export type VulnerabilityScanStabilizeOptions = {- scanRequestedAt?: string | number | Date | null;- failedRecheckDelayMs?: number;- maxFailedRechecks?: number;- staleFailureGraceMs?: number;-};--function delay(ms: number): Promise<void> {- return new Promise((resolve) => {- setTimeout(resolve, ms);- });-}--export function toTimestampMs(value?: string | number | Date | null): number {- if (value == null) return 0;- if (value instanceof Date) {- const ts = value.getTime();- return Number.isFinite(ts) ? ts : 0;- }- if (typeof value === 'number') {- return Number.isFinite(value) ? value : 0;- }- const ts = Date.parse(value);- return Number.isFinite(ts) ? ts : 0;-}--export function isVulnerabilityScanInProgress(status?: string | null): boolean {- if (!status) return false;- return SCAN_IN_PROGRESS_STATUSES.has(status);-}--export function isLikelyStaleFailedSummary(- summary: VulnerabilityScanSummary,- scanRequestedAt?: string | number | Date | null,- staleFailureGraceMs = 1500-): boolean {- if (summary.status !== 'failed') return false;-- const requestedAtMs = toTimestampMs(scanRequestedAt);- if (requestedAtMs <= 0) return false;-- const summaryTimeMs = toTimestampMs(summary.scanTime);- const scanTimeLooksOld = summaryTimeMs <= 0 || summaryTimeMs + staleFailureGraceMs < requestedAtMs;- const missingErrorDetails = !summary.error || summary.error.trim() === '';-- return scanTimeLooksOld || missingErrorDetails;-}--export async function stabilizeFailedVulnerabilitySummary(- imageId: string,- initialSummary: VulnerabilityScanSummary,- fetchSummary: (imageId: string) => Promise<VulnerabilityScanSummary>,- options: VulnerabilityScanStabilizeOptions = {}-): Promise<VulnerabilityScanSummary> {- const { scanRequestedAt, failedRecheckDelayMs = 1000, maxFailedRechecks = 2, staleFailureGraceMs = 1500 } = options;-- let summary = initialSummary;- if (!isLikelyStaleFailedSummary(summary, scanRequestedAt, staleFailureGraceMs)) {- return summary;- }-- const retries = Math.max(0, maxFailedRechecks);- for (let attempt = 0; attempt < retries; attempt++) {- await delay(failedRecheckDelayMs);- summary = await fetchSummary(imageId);- if (summary.status !== 'failed') {- return summary;- }- }-- return summary;-}--export function startVulnerabilityScanPolling(- imageId: string,- fetchSummary: (imageId: string) => Promise<VulnerabilityScanSummary>,- options: VulnerabilityScanPollOptions = {}-): () => void {- const { intervalMs = 2000, maxAttempts = 0, onUpdate, onComplete, onError } = options;- let attempts = 0;- let cancelled = false;- let timeoutId: ReturnType<typeof setTimeout> | null = null;-- const schedule = () => {- if (cancelled) return;- timeoutId = setTimeout(run, intervalMs);- };-- const run = async () => {- if (cancelled) return;- attempts += 1;- try {- const summary = await fetchSummary(imageId);- onUpdate?.(summary);-- const isScanning = isVulnerabilityScanInProgress(summary?.status);- if (!isScanning) {- onComplete?.(summary);- return;- }- } catch (error) {- onError?.(error);- }-- if (maxAttempts > 0 && attempts >= maxAttempts) {- onError?.(new Error('Scan polling exceeded max attempts.'));- return;- }-- schedule();- };-- void run();-- return () => {- cancelled = true;- if (timeoutId) {- clearTimeout(timeoutId);- }- };-}--export function startVulnerabilityScanTracking(- imageId: string,- fetchSummary: (imageId: string) => Promise<VulnerabilityScanSummary>,- options: VulnerabilityScanPollOptions = {}-): VulnerabilityScanTracker {- let resolvePromise: (summary: VulnerabilityScanSummary) => void;- let rejectPromise: (error: unknown) => void;-- const promise = new Promise<VulnerabilityScanSummary>((resolve, reject) => {- resolvePromise = resolve;- rejectPromise = reject;- });-- const cancel = startVulnerabilityScanPolling(imageId, fetchSummary, {- ...options,- onComplete: (summary) => {- options.onComplete?.(summary);- if (summary.status === 'completed') {- resolvePromise(summary);- } else {- rejectPromise(summary);- }- },- onError: (error) => {- options.onError?.(error);- rejectPromise(error);- }- });-- return { cancel, promise };-}diff --git a/frontend/src/lib/utils/ws.ts b/frontend/src/lib/utils/ws.tsindex 7e0c88aef..c6cef99f4 100644--- a/frontend/src/lib/utils/ws.ts+++ b/frontend/src/lib/utils/ws.ts@@ -1,4 +1,4 @@-import type { SystemStats } from '$lib/types/system-stats.type';+import type { SystemStats } from '$lib/types/shared';export interface ReconnectWSOptions<T> {buildUrl: () => string | Promise<string>;@@ -255,3 +255,19 @@ export function createContainerStatsWebSocket(opts: {shouldReconnect: opts.shouldReconnect});}++// --- Debounce helper ---++export function debounced<T extends (...args: any[]) => void>(func: T, delay: number) {+ let debounceTimeout: ReturnType<typeof setTimeout>;++ return (...args: Parameters<T>) => {+ if (debounceTimeout !== undefined) {+ clearTimeout(debounceTimeout);+ }++ debounceTimeout = setTimeout(() => {+ func(...args);+ }, delay);+ };+}diff --git a/frontend/src/routes/(app)/+layout.svelte b/frontend/src/routes/(app)/+layout.svelteindex adb3a6fc2..585f64c58 100644--- a/frontend/src/routes/(app)/+layout.svelte+++ b/frontend/src/routes/(app)/+layout.svelte@@ -1,17 +1,17 @@<script lang="ts">import { page } from '$app/state';import { goto, afterNavigate } from '$app/navigation';- import { getAuthRedirectPath } from '$lib/utils/redirect.util';+ import { getAuthRedirectPath } from '$lib/utils/auth';import * as Sidebar from '$lib/components/ui/sidebar/index.js';import AppSidebar from '$lib/components/sidebar/sidebar.svelte';import MobileNav from '$lib/components/mobile-nav/mobile-nav.svelte';import { IsMobile } from '$lib/hooks/is-mobile.svelte.js';import { IsTablet } from '$lib/hooks/is-tablet.svelte.js';- import { getEffectiveNavigationSettings, navigationSettingsOverridesStore } from '$lib/utils/navigation.utils';+ import { getEffectiveNavigationSettings, navigationSettingsOverridesStore } from '$lib/utils/navigation';import { browser } from '$app/environment';import { environmentStore } from '$lib/stores/environment.store.svelte';import { navigationItems, getManagementItems, filterByPermissions, type NavigationItem } from '$lib/config/navigation-config';- import { isEditableTarget, matchesShortcutEvent } from '$lib/utils/keyboard-shortcut.utils';+ import { isEditableTarget, matchesShortcutEvent } from '$lib/utils/navigation';import { cn } from '$lib/utils';let { data, children }: LayoutProps = $props();diff --git a/frontend/src/routes/(app)/containers/+page.svelte b/frontend/src/routes/(app)/containers/+page.svelteindex df54f360c..0062eb887 100644--- a/frontend/src/routes/(app)/containers/+page.svelte+++ b/frontend/src/routes/(app)/containers/+page.svelte@@ -8,12 +8,12 @@import { untrack } from 'svelte';import { ResourcePageLayout, type ActionButton, type StatCardConfig } from '$lib/layouts/index';import { environmentStore } from '$lib/stores/environment.store.svelte';- import { hasPermission } from '$lib/utils/permissions.util';- import type { ContainerCreateRequest, ContainerStatusCounts } from '$lib/types/container.type';+ import { hasPermission } from '$lib/utils/auth';+ import type { ContainerCreateRequest, ContainerStatusCounts } from '$lib/types/docker';import { createMutation } from '@tanstack/svelte-query';import { BoxIcon } from '$lib/icons';import { queryKeys } from '$lib/query/query-keys';- import type { SearchPaginationSortRequest } from '$lib/types/pagination.type';+ import type { SearchPaginationSortRequest } from '$lib/types/shared';import type { ContainerListRequestOptions } from '$lib/services/container-service';import ContainerEnvironmentSync from './components/container-environment-sync.svelte';diff --git a/frontend/src/routes/(app)/containers/+page.ts b/frontend/src/routes/(app)/containers/+page.tsindex 55c773592..91b061903 100644--- a/frontend/src/routes/(app)/containers/+page.ts+++ b/frontend/src/routes/(app)/containers/+page.ts@@ -1,11 +1,11 @@-import type { SearchPaginationSortRequest } from '$lib/types/pagination.type';+import type { SearchPaginationSortRequest } from '$lib/types/shared';import { containerService } from '$lib/services/container-service';-import { resolveInitialTableRequest } from '$lib/utils/table-persistence.util';+import { resolveInitialTableRequest } from '$lib/utils/tables';import type { PageLoad } from './$types';import { settingsService } from '$lib/services/settings-service';import { environmentStore } from '$lib/stores/environment.store.svelte';import { queryKeys } from '$lib/query/query-keys';-import { throwPageLoadError } from '$lib/utils/page-load-error.util';+import { throwPageLoadError } from '$lib/utils/api';export const load: PageLoad = async ({ parent }) => {const { queryClient } = await parent();diff --git a/frontend/src/routes/(app)/containers/[containerId]/+page.svelte b/frontend/src/routes/(app)/containers/[containerId]/+page.svelteindex fb89fc1e7..9fd2c3dfe 100644--- a/frontend/src/routes/(app)/containers/[containerId]/+page.svelte+++ b/frontend/src/routes/(app)/containers/[containerId]/+page.svelte@@ -3,14 +3,10 @@import { invalidateAll } from '$app/navigation';import ActionButtons from '$lib/components/action-buttons.svelte';import StatusBadge from '$lib/components/badges/status-badge.svelte';- import bytes from '$lib/utils/bytes';+ import { bytes } from '$lib/utils/formatting';import { tick } from 'svelte';import { page } from '$app/state';- import type {- ContainerDetailsDto,- ContainerNetworkSettings,- ContainerStats as ContainerStatsType- } from '$lib/types/container.type';+ import type { ContainerDetailsDto, ContainerNetworkSettings, ContainerStats as ContainerStatsType } from '$lib/types/docker';import { m } from '$lib/paraglide/messages';import TabbedPageLayout from '$lib/layouts/tabbed-page-layout.svelte';import { type TabItem } from '$lib/components/tab-bar/index.js';@@ -27,8 +23,8 @@import ContainerDetailStatsSync from '../components/container-detail-stats-sync.svelte';import ContainerHealthcheck from '../components/ContainerHealthcheck.svelte';import IconImage from '$lib/components/icon-image.svelte';- import { getArcaneIconUrlFromLabels } from '$lib/utils/arcane-labels';- import { calculateMemoryUsage } from '$lib/utils/container-stats.utils';+ import { getArcaneIconUrlFromLabels } from '$lib/utils/docker';+ import { calculateMemoryUsage } from '$lib/utils/docker';import {ArrowLeftIcon,AlertIcon,@@ -44,10 +40,10 @@HealthIcon} from '$lib/icons';import { parse as parseYaml } from 'yaml';- import type { IncludeFile } from '$lib/types/project.type';+ import type { IncludeFile } from '$lib/types/swarm';import { projectService } from '$lib/services/project-service';import { environmentStore } from '$lib/stores/environment.store.svelte';- import { hasPermission } from '$lib/utils/permissions.util';+ import { hasPermission } from '$lib/utils/auth';let { data } = $props();let container = $derived(data?.container as ContainerDetailsDto);let stats = $state(null as ContainerStatsType | null);diff --git a/frontend/src/routes/(app)/containers/components/ContainerComposePanel.svelte b/frontend/src/routes/(app)/containers/components/ContainerComposePanel.svelteindex 590cfb284..56be2a31e 100644--- a/frontend/src/routes/(app)/containers/components/ContainerComposePanel.svelte+++ b/frontend/src/routes/(app)/containers/components/ContainerComposePanel.svelte@@ -2,7 +2,7 @@import { ComposeEditorWrapper } from '$lib/components/compose';import CodePanel from '../../projects/components/CodePanel.svelte';import { projectService } from '$lib/services/project-service';- import type { Project, IncludeFile } from '$lib/types/project.type';+ import type { Project, IncludeFile } from '$lib/types/swarm';let {project,diff --git a/frontend/src/routes/(app)/containers/components/ContainerConfiguration.svelte b/frontend/src/routes/(app)/containers/components/ContainerConfiguration.svelteindex c8bc731ae..d0225094a 100644--- a/frontend/src/routes/(app)/containers/components/ContainerConfiguration.svelte+++ b/frontend/src/routes/(app)/containers/components/ContainerConfiguration.svelte@@ -1,7 +1,7 @@<script lang="ts">import * as Card from '$lib/components/ui/card';import { m } from '$lib/paraglide/messages';- import type { ContainerDetailsDto } from '$lib/types/container.type';+ import type { ContainerDetailsDto } from '$lib/types/docker';import { SettingsIcon, TagIcon } from '$lib/icons';import { KeyValueCard, KeyValueGrid } from '$lib/components/resource-detail';diff --git a/frontend/src/routes/(app)/containers/components/ContainerHealthcheck.svelte b/frontend/src/routes/(app)/containers/components/ContainerHealthcheck.svelteindex 9c6765356..5bb425730 100644--- a/frontend/src/routes/(app)/containers/components/ContainerHealthcheck.svelte+++ b/frontend/src/routes/(app)/containers/components/ContainerHealthcheck.svelte@@ -2,7 +2,7 @@import * as Card from '$lib/components/ui/card';import StatusBadge from '$lib/components/badges/status-badge.svelte';import { m } from '$lib/paraglide/messages';- import type { ContainerDetailsDto, ContainerHealthLogEntry, ContainerHealthcheckDto } from '$lib/types/container.type';+ import type { ContainerDetailsDto, ContainerHealthLogEntry, ContainerHealthcheckDto } from '$lib/types/docker';import { HealthIcon, SettingsIcon, FileTextIcon } from '$lib/icons';import { format, formatDistanceToNow } from 'date-fns';diff --git a/frontend/src/routes/(app)/containers/components/ContainerInspect.svelte b/frontend/src/routes/(app)/containers/components/ContainerInspect.svelteindex 08ddeee0a..d4fc159fa 100644--- a/frontend/src/routes/(app)/containers/components/ContainerInspect.svelte+++ b/frontend/src/routes/(app)/containers/components/ContainerInspect.svelte@@ -2,7 +2,7 @@import * as Card from '$lib/components/ui/card';import { CopyButton } from '$lib/components/ui/copy-button';import { m } from '$lib/paraglide/messages';- import type { ContainerDetailsDto } from '$lib/types/container.type';+ import type { ContainerDetailsDto } from '$lib/types/docker';import { CodeIcon } from '$lib/icons';interface Props {diff --git a/frontend/src/routes/(app)/containers/components/ContainerLogsPanel.svelte b/frontend/src/routes/(app)/containers/components/ContainerLogsPanel.svelteindex c3a15aa74..4b8784643 100644--- a/frontend/src/routes/(app)/containers/components/ContainerLogsPanel.svelte+++ b/frontend/src/routes/(app)/containers/components/ContainerLogsPanel.svelte@@ -4,10 +4,10 @@import * as Card from '$lib/components/ui/card';import LogViewer from '$lib/components/logs/log-viewer.svelte';import LogControls from '$lib/components/logs/log-controls.svelte';- import type { ContainerStats, ContainerStatsHistorySample } from '$lib/types/container.type';+ import type { ContainerStats, ContainerStatsHistorySample } from '$lib/types/docker';import { m } from '$lib/paraglide/messages';- import bytes from '$lib/utils/bytes';- import { calculateCPUPercent, calculateMemoryUsage } from '$lib/utils/container-stats.utils';+ import { bytes } from '$lib/utils/formatting';+ import { calculateCPUPercent, calculateMemoryUsage } from '$lib/utils/docker';import { CpuIcon, FileTextIcon, MemoryStickIcon } from '$lib/icons';import ContainerLogStatMonitor from './ContainerLogStatMonitor.svelte';diff --git a/frontend/src/routes/(app)/containers/components/ContainerNetwork.svelte b/frontend/src/routes/(app)/containers/components/ContainerNetwork.svelteindex 65fdb6617..4d1478dec 100644--- a/frontend/src/routes/(app)/containers/components/ContainerNetwork.svelte+++ b/frontend/src/routes/(app)/containers/components/ContainerNetwork.svelte@@ -2,7 +2,7 @@import * as Card from '$lib/components/ui/card';import { PortBadge } from '$lib/components/badges';import { m } from '$lib/paraglide/messages';- import type { ContainerDetailsDto } from '$lib/types/container.type';+ import type { ContainerDetailsDto } from '$lib/types/docker';import { NetworksIcon } from '$lib/icons';interface Props {diff --git a/frontend/src/routes/(app)/containers/components/ContainerOverview.svelte b/frontend/src/routes/(app)/containers/components/ContainerOverview.svelteindex 34b4f0bd3..bde0f7ba6 100644--- a/frontend/src/routes/(app)/containers/components/ContainerOverview.svelte+++ b/frontend/src/routes/(app)/containers/components/ContainerOverview.svelte@@ -3,7 +3,7 @@import StatusBadge from '$lib/components/badges/status-badge.svelte';import { Switch } from '$lib/components/ui/switch';import { m } from '$lib/paraglide/messages';- import type { ContainerDetailsDto } from '$lib/types/container.type';+ import type { ContainerDetailsDto } from '$lib/types/docker';import { format, formatDistanceToNow } from 'date-fns';import { InfoIcon, StartIcon, StopIcon, NetworksIcon, VolumesIcon, HealthIcon } from '$lib/icons';import { containerService } from '$lib/services/container-service';diff --git a/frontend/src/routes/(app)/containers/components/ContainerStats.svelte b/frontend/src/routes/(app)/containers/components/ContainerStats.svelteindex 39b195303..46c867162 100644--- a/frontend/src/routes/(app)/containers/components/ContainerStats.svelte+++ b/frontend/src/routes/(app)/containers/components/ContainerStats.svelte@@ -3,8 +3,8 @@import { Progress } from '$lib/components/ui/progress';import { Skeleton } from '$lib/components/ui/skeleton';import { m } from '$lib/paraglide/messages';- import bytes from '$lib/utils/bytes';- import type { ContainerDetailsDto, ContainerStats as ContainerStatsType } from '$lib/types/container.type';+ import { bytes } from '$lib/utils/formatting';+ import type { ContainerDetailsDto, ContainerStats as ContainerStatsType } from '$lib/types/docker';import { StatsIcon } from '$lib/icons';interface Props {diff --git a/frontend/src/routes/(app)/containers/components/ContainerStorage.svelte b/frontend/src/routes/(app)/containers/components/ContainerStorage.svelteindex 7ecfe389d..0a6a49b6a 100644--- a/frontend/src/routes/(app)/containers/components/ContainerStorage.svelte+++ b/frontend/src/routes/(app)/containers/components/ContainerStorage.svelte@@ -2,7 +2,7 @@import * as Card from '$lib/components/ui/card';import { Badge } from '$lib/components/ui/badge';import { m } from '$lib/paraglide/messages';- import type { ContainerDetailsDto } from '$lib/types/container.type';+ import type { ContainerDetailsDto } from '$lib/types/docker';import { VolumesIcon, TerminalIcon } from '$lib/icons';interface Props {diff --git a/frontend/src/routes/(app)/containers/components/container-detail-stats-sync.svelte b/frontend/src/routes/(app)/containers/components/container-detail-stats-sync.svelteindex 73e1b91f4..271a031d8 100644--- a/frontend/src/routes/(app)/containers/components/container-detail-stats-sync.svelte+++ b/frontend/src/routes/(app)/containers/components/container-detail-stats-sync.svelte@@ -1,7 +1,7 @@<script lang="ts">import { createContainerStatsWebSocket, type ReconnectingWebSocket } from '$lib/utils/ws';import { environmentStore } from '$lib/stores/environment.store.svelte';- import type { ContainerStats as ContainerStatsType } from '$lib/types/container.type';+ import type { ContainerStats as ContainerStatsType } from '$lib/types/docker';import { invalidateAll } from '$app/navigation';import { onDestroy } from 'svelte';diff --git a/frontend/src/routes/(app)/containers/components/container-stats-cell.svelte b/frontend/src/routes/(app)/containers/components/container-stats-cell.svelteindex 288dd530e..da38d7f5c 100644--- a/frontend/src/routes/(app)/containers/components/container-stats-cell.svelte+++ b/frontend/src/routes/(app)/containers/components/container-stats-cell.svelte@@ -1,7 +1,7 @@<script lang="ts">import { Progress } from '$lib/components/ui/progress/index.js';import { m } from '$lib/paraglide/messages';- import bytes from '$lib/utils/bytes';+ import { bytes } from '$lib/utils/formatting';interface Props {value?: number;diff --git a/frontend/src/routes/(app)/containers/components/container-stats-manager.svelte.ts b/frontend/src/routes/(app)/containers/components/container-stats-manager.svelte.tsindex 18a5d78e8..8ed88b8a6 100644--- a/frontend/src/routes/(app)/containers/components/container-stats-manager.svelte.ts+++ b/frontend/src/routes/(app)/containers/components/container-stats-manager.svelte.ts@@ -1,6 +1,6 @@import { createContainerStatsWebSocket } from '$lib/utils/ws';-import type { ContainerStats } from '$lib/types/container.type';-import { calculateCPUPercent, calculateMemoryPercent, calculateMemoryUsage } from '$lib/utils/container-stats.utils';+import type { ContainerStats } from '$lib/types/docker';+import { calculateCPUPercent, calculateMemoryPercent, calculateMemoryUsage } from '$lib/utils/docker';import type { ReconnectingWebSocket } from '$lib/utils/ws';import { SvelteMap, SvelteSet } from 'svelte/reactivity';diff --git a/frontend/src/routes/(app)/containers/container-table.actions.ts b/frontend/src/routes/(app)/containers/container-table.actions.tsindex 9d9ac86ee..dfe95fcd0 100644--- a/frontend/src/routes/(app)/containers/container-table.actions.ts+++ b/frontend/src/routes/(app)/containers/container-table.actions.ts@@ -1,9 +1,9 @@import { openConfirmDialog } from '$lib/components/confirm-dialog';import { m } from '$lib/paraglide/messages';import { containerService, type ContainersPaginatedResponse } from '$lib/services/container-service';-import type { ContainerSummaryDto } from '$lib/types/container.type';-import { handleApiResultWithCallbacks } from '$lib/utils/api.util';-import { tryCatch } from '$lib/utils/try-catch';+import type { ContainerSummaryDto } from '$lib/types/docker';+import { handleApiResultWithCallbacks } from '$lib/utils/api';+import { tryCatch } from '$lib/utils/api';import { toast } from 'svelte-sonner';import { getContainerDisplayName, type ActionStatus } from './container-table.helpers';diff --git a/frontend/src/routes/(app)/containers/container-table.helpers.ts b/frontend/src/routes/(app)/containers/container-table.helpers.tsindex f37e59cd4..d651a2838 100644--- a/frontend/src/routes/(app)/containers/container-table.helpers.ts+++ b/frontend/src/routes/(app)/containers/container-table.helpers.ts@@ -1,5 +1,5 @@import { m } from '$lib/paraglide/messages';-import type { ContainerSummaryDto } from '$lib/types/container.type';+import type { ContainerSummaryDto } from '$lib/types/docker';export type ActionStatus = 'starting' | 'stopping' | 'restarting' | 'updating' | 'removing' | 'redeploying' | '';export type StateBadgeVariant = 'green' | 'red' | 'amber';diff --git a/frontend/src/routes/(app)/containers/container-table.svelte b/frontend/src/routes/(app)/containers/container-table.svelteindex aa4584468..9e7a17a9f 100644--- a/frontend/src/routes/(app)/containers/container-table.svelte+++ b/frontend/src/routes/(app)/containers/container-table.svelte@@ -4,11 +4,11 @@import { Spinner } from '$lib/components/ui/spinner/index.js';import { goto } from '$app/navigation';import * as DropdownMenu from '$lib/components/ui/dropdown-menu/index.js';- import type { SearchPaginationSortRequest } from '$lib/types/pagination.type';+ import type { SearchPaginationSortRequest } from '$lib/types/shared';import StatusBadge from '$lib/components/badges/status-badge.svelte';import { format } from 'date-fns';- import { capitalizeFirstLetter, truncateImageDigest } from '$lib/utils/string.utils';- import type { ContainerSummaryDto } from '$lib/types/container.type';+ import { capitalizeFirstLetter, truncateImageDigest } from '$lib/utils/formatting';+ import type { ContainerSummaryDto } from '$lib/types/docker';import type { ColumnSpec, BulkAction } from '$lib/components/arcane-table';import { m } from '$lib/paraglide/messages';import { PortBadge } from '$lib/components/badges/index.js';@@ -26,9 +26,9 @@import ContainerStatsSync from './components/container-stats-sync.svelte';import ContainerStatsCell from './components/container-stats-cell.svelte';import { environmentStore } from '$lib/stores/environment.store.svelte';- import { hasPermission } from '$lib/utils/permissions.util';+ import { hasPermission } from '$lib/utils/auth';import IconImage from '$lib/components/icon-image.svelte';- import { getArcaneIconUrlFromLabels } from '$lib/utils/arcane-labels';+ import { getArcaneIconUrlFromLabels } from '$lib/utils/docker';import { createContainerActions } from './container-table.actions';import {getActionStatusMessage,diff --git a/frontend/src/routes/(app)/customize/+page.svelte b/frontend/src/routes/(app)/customize/+page.svelteindex c0e7911c1..c48721893 100644--- a/frontend/src/routes/(app)/customize/+page.svelte+++ b/frontend/src/routes/(app)/customize/+page.svelte@@ -6,8 +6,8 @@import { m } from '$lib/paraglide/messages';import { UiConfigDisabledTag } from '$lib/components/badges/index.js';import { customizeSearchService } from '$lib/services/customize-search';- import type { CustomizeCategory } from '$lib/types/customize-search.type';- import { debounced } from '$lib/utils/utils';+ import type { CustomizeCategory } from '$lib/types/shared';+ import { debounced } from '$lib/utils/ws';import * as InputGroup from '$lib/components/ui/input-group/index.js';import { getCustomizeSubpageUrlsInNavOrder } from '$lib/config/navigation-config';import {diff --git a/frontend/src/routes/(app)/customize/git-repositories/+page.svelte b/frontend/src/routes/(app)/customize/git-repositories/+page.svelteindex d804441f2..a85f36fff 100644--- a/frontend/src/routes/(app)/customize/git-repositories/+page.svelte+++ b/frontend/src/routes/(app)/customize/git-repositories/+page.svelte@@ -1,15 +1,15 @@<script lang="ts">import { toast } from 'svelte-sonner';- import type { GitRepository, GitRepositoryCreateDto, GitRepositoryUpdateDto } from '$lib/types/gitops.type';+ import type { GitRepository, GitRepositoryCreateDto, GitRepositoryUpdateDto } from '$lib/types/automation';import GitRepositoryFormSheet from '$lib/components/sheets/git-repository-sheet.svelte';import RepositoryTable from './repository-table.svelte';- import { handleApiResultWithCallbacks } from '$lib/utils/api.util';- import { tryCatch } from '$lib/utils/try-catch';+ import { handleApiResultWithCallbacks } from '$lib/utils/api';+ import { tryCatch } from '$lib/utils/api';import { m } from '$lib/paraglide/messages';import { gitRepositoryService } from '$lib/services/git-repository-service';import { untrack } from 'svelte';import { ResourcePageLayout, type ActionButton } from '$lib/layouts/index.js';- import { hasPermission } from '$lib/utils/permissions.util';+ import { hasPermission } from '$lib/utils/auth';let { data } = $props();diff --git a/frontend/src/routes/(app)/customize/git-repositories/+page.ts b/frontend/src/routes/(app)/customize/git-repositories/+page.tsindex e640c04f3..1bedf27e2 100644--- a/frontend/src/routes/(app)/customize/git-repositories/+page.ts+++ b/frontend/src/routes/(app)/customize/git-repositories/+page.ts@@ -1,7 +1,7 @@import { gitRepositoryService } from '$lib/services/git-repository-service';import { queryKeys } from '$lib/query/query-keys';-import type { SearchPaginationSortRequest } from '$lib/types/pagination.type';-import { resolveInitialTableRequest } from '$lib/utils/table-persistence.util';+import type { SearchPaginationSortRequest } from '$lib/types/shared';+import { resolveInitialTableRequest } from '$lib/utils/tables';import type { PageLoad } from './$types';export const load: PageLoad = async ({ parent }) => {diff --git a/frontend/src/routes/(app)/customize/git-repositories/repository-table.svelte b/frontend/src/routes/(app)/customize/git-repositories/repository-table.svelteindex 963df1418..3dc2e936d 100644--- a/frontend/src/routes/(app)/customize/git-repositories/repository-table.svelte+++ b/frontend/src/routes/(app)/customize/git-repositories/repository-table.svelte@@ -5,10 +5,10 @@import * as DropdownMenu from '$lib/components/ui/dropdown-menu/index.js';import { openConfirmDialog } from '$lib/components/confirm-dialog';import { toast } from 'svelte-sonner';- import { handleApiResultWithCallbacks } from '$lib/utils/api.util';- import { tryCatch } from '$lib/utils/try-catch';- import type { Paginated, SearchPaginationSortRequest } from '$lib/types/pagination.type';- import type { GitRepository } from '$lib/types/gitops.type';+ import { handleApiResultWithCallbacks } from '$lib/utils/api';+ import { tryCatch } from '$lib/utils/api';+ import type { Paginated, SearchPaginationSortRequest } from '$lib/types/shared';+ import type { GitRepository } from '$lib/types/automation';import type { ColumnSpec, BulkAction } from '$lib/components/arcane-table';import { UniversalMobileCard } from '$lib/components/arcane-table/index.js';import { format } from 'date-fns';@@ -23,7 +23,7 @@ExternalLinkIcon as LinkIcon,EllipsisIcon} from '$lib/icons';- import { hasPermission } from '$lib/utils/permissions.util';+ import { hasPermission } from '$lib/utils/auth';import IfPermitted from '$lib/components/if-permitted.svelte';type FieldVisibility = Record<string, boolean>;diff --git a/frontend/src/routes/(app)/customize/registries/+page.svelte b/frontend/src/routes/(app)/customize/registries/+page.svelteindex a7fd55f50..60a7ba6ed 100644--- a/frontend/src/routes/(app)/customize/registries/+page.svelte+++ b/frontend/src/routes/(app)/customize/registries/+page.svelte@@ -1,19 +1,19 @@<script lang="ts">import * as Dialog from '$lib/components/ui/dialog/index.js';import { toast } from 'svelte-sonner';- import type { ContainerRegistry, ContainerRegistryPullUsage } from '$lib/types/container-registry.type';- import type { ContainerRegistryCreateDto, ContainerRegistryUpdateDto } from '$lib/types/container-registry.type';+ import type { ContainerRegistry, ContainerRegistryPullUsage } from '$lib/types/docker';+ import type { ContainerRegistryCreateDto, ContainerRegistryUpdateDto } from '$lib/types/docker';import ContainerRegistryFormSheet from '$lib/components/sheets/container-registry-sheet.svelte';import RegistryTable from './registry-table.svelte';- import { handleApiResultWithCallbacks } from '$lib/utils/api.util';- import { tryCatch } from '$lib/utils/try-catch';+ import { handleApiResultWithCallbacks } from '$lib/utils/api';+ import { tryCatch } from '$lib/utils/api';import { m } from '$lib/paraglide/messages';import { containerRegistryService } from '$lib/services/container-registry-service';import { queryKeys } from '$lib/query/query-keys';import { untrack } from 'svelte';import { ResourcePageLayout, type ActionButton } from '$lib/layouts/index.js';import { createQuery } from '@tanstack/svelte-query';- import { hasPermission } from '$lib/utils/permissions.util';+ import { hasPermission } from '$lib/utils/auth';let { data } = $props();diff --git a/frontend/src/routes/(app)/customize/registries/+page.ts b/frontend/src/routes/(app)/customize/registries/+page.tsindex 93ca7fad3..e762a2c20 100644--- a/frontend/src/routes/(app)/customize/registries/+page.ts+++ b/frontend/src/routes/(app)/customize/registries/+page.ts@@ -1,7 +1,7 @@import { containerRegistryService } from '$lib/services/container-registry-service';import { queryKeys } from '$lib/query/query-keys';-import type { SearchPaginationSortRequest } from '$lib/types/pagination.type';-import { resolveInitialTableRequest } from '$lib/utils/table-persistence.util';+import type { SearchPaginationSortRequest } from '$lib/types/shared';+import { resolveInitialTableRequest } from '$lib/utils/tables';import type { PageLoad } from './$types';export const load: PageLoad = async ({ parent }) => {diff --git a/frontend/src/routes/(app)/customize/registries/registry-table.svelte b/frontend/src/routes/(app)/customize/registries/registry-table.svelteindex d4ea388fb..e9280b36d 100644--- a/frontend/src/routes/(app)/customize/registries/registry-table.svelte+++ b/frontend/src/routes/(app)/customize/registries/registry-table.svelte@@ -6,17 +6,17 @@import { Spinner } from '$lib/components/ui/spinner/index.js';import { openConfirmDialog } from '$lib/components/confirm-dialog';import { toast } from 'svelte-sonner';- import { handleApiResultWithCallbacks } from '$lib/utils/api.util';- import { tryCatch } from '$lib/utils/try-catch';- import type { Paginated, SearchPaginationSortRequest } from '$lib/types/pagination.type';- import type { ContainerRegistry, ContainerRegistryPullUsage } from '$lib/types/container-registry.type';+ import { handleApiResultWithCallbacks } from '$lib/utils/api';+ import { tryCatch } from '$lib/utils/api';+ import type { Paginated, SearchPaginationSortRequest } from '$lib/types/shared';+ import type { ContainerRegistry, ContainerRegistryPullUsage } from '$lib/types/docker';import type { ColumnSpec, MobileFieldVisibility, BulkAction } from '$lib/components/arcane-table';import { UniversalMobileCard } from '$lib/components/arcane-table/index.js';import { format } from 'date-fns';import { m } from '$lib/paraglide/messages';import { containerRegistryService } from '$lib/services/container-registry-service';import { RegistryIcon, UserIcon, ExternalLinkIcon, EditIcon, TrashIcon, TestIcon, EllipsisIcon } from '$lib/icons';- import { hasPermission } from '$lib/utils/permissions.util';+ import { hasPermission } from '$lib/utils/auth';import IfPermitted from '$lib/components/if-permitted.svelte';let {diff --git a/frontend/src/routes/(app)/customize/templates/+page.svelte b/frontend/src/routes/(app)/customize/templates/+page.svelteindex e7128862e..8a3d0db81 100644--- a/frontend/src/routes/(app)/customize/templates/+page.svelte+++ b/frontend/src/routes/(app)/customize/templates/+page.svelte@@ -9,11 +9,11 @@import * as Tabs from '$lib/components/ui/tabs';import TemplatesBrowser from './components/TemplatesBrowser.svelte';import RegistryManager from './components/RegistryManager.svelte';- import type { TemplateRegistry } from '$lib/types/template.type';+ import type { TemplateRegistry } from '$lib/types/swarm';import { untrack } from 'svelte';- import type { SearchPaginationSortRequest } from '$lib/types/pagination.type';+ import type { SearchPaginationSortRequest } from '$lib/types/shared';import { RegistryIcon, TemplateIcon, FolderOpenIcon } from '$lib/icons';- import { hasPermission } from '$lib/utils/permissions.util';+ import { hasPermission } from '$lib/utils/auth';let { data } = $props();diff --git a/frontend/src/routes/(app)/customize/templates/+page.ts b/frontend/src/routes/(app)/customize/templates/+page.tsindex eba830726..489590003 100644--- a/frontend/src/routes/(app)/customize/templates/+page.ts+++ b/frontend/src/routes/(app)/customize/templates/+page.ts@@ -1,8 +1,8 @@import { templateService } from '$lib/services/template-service';import { queryKeys } from '$lib/query/query-keys';-import type { Template, TemplateRegistry } from '$lib/types/template.type';-import type { Paginated, SearchPaginationSortRequest } from '$lib/types/pagination.type';-import { resolveInitialTableRequest } from '$lib/utils/table-persistence.util';+import type { Template, TemplateRegistry } from '$lib/types/swarm';+import type { Paginated, SearchPaginationSortRequest } from '$lib/types/shared';+import { resolveInitialTableRequest } from '$lib/utils/tables';import type { PageLoad } from './$types';export const load: PageLoad = async ({diff --git a/frontend/src/routes/(app)/customize/templates/[id]/+page.svelte b/frontend/src/routes/(app)/customize/templates/[id]/+page.svelteindex 3f216513f..d44059e49 100644--- a/frontend/src/routes/(app)/customize/templates/[id]/+page.svelte+++ b/frontend/src/routes/(app)/customize/templates/[id]/+page.svelte@@ -11,9 +11,9 @@import { openConfirmDialog } from '$lib/components/confirm-dialog';import { untrack } from 'svelte';import { toast } from 'svelte-sonner';- import { createForm } from '$lib/utils/form.utils';- import { tryCatch } from '$lib/utils/try-catch';- import { handleApiResultWithCallbacks } from '$lib/utils/api.util';+ import { createForm } from '$lib/utils/settings';+ import { tryCatch } from '$lib/utils/api';+ import { handleApiResultWithCallbacks } from '$lib/utils/api';import { ComposeEditorSplit } from '$lib/components/compose';import { z } from 'zod/v4';import {diff --git a/frontend/src/routes/(app)/customize/templates/[id]/+page.ts b/frontend/src/routes/(app)/customize/templates/[id]/+page.tsindex 290990d75..d841bbe87 100644--- a/frontend/src/routes/(app)/customize/templates/[id]/+page.ts+++ b/frontend/src/routes/(app)/customize/templates/[id]/+page.ts@@ -1,8 +1,8 @@import { templateService } from '$lib/services/template-service';import { queryKeys } from '$lib/query/query-keys';import { error } from '@sveltejs/kit';-import type { Template, TemplateContentData } from '$lib/types/template.type';-import type { Variable } from '$lib/types/variable.type';+import type { Template, TemplateContentData } from '$lib/types/swarm';+import type { Variable } from '$lib/types/shared';import type { PageLoad } from './$types';export const load: PageLoad = async ({diff --git a/frontend/src/routes/(app)/customize/templates/components/RegistryManager.svelte b/frontend/src/routes/(app)/customize/templates/components/RegistryManager.svelteindex 223ae555a..5f3cbcb17 100644--- a/frontend/src/routes/(app)/customize/templates/components/RegistryManager.svelte+++ b/frontend/src/routes/(app)/customize/templates/components/RegistryManager.svelte@@ -6,7 +6,7 @@import { Switch } from '$lib/components/ui/switch';import { Snippet } from '$lib/components/ui/snippet';import { m } from '$lib/paraglide/messages';- import type { TemplateRegistry } from '$lib/types/template.type';+ import type { TemplateRegistry } from '$lib/types/swarm';import { RegistryIcon, CommunityIcon, ExternalLinkIcon, AlertTriangleIcon } from '$lib/icons';let {diff --git a/frontend/src/routes/(app)/customize/templates/components/TemplatesBrowser.svelte b/frontend/src/routes/(app)/customize/templates/components/TemplatesBrowser.svelteindex ff1aceb2d..86b0c9a47 100644--- a/frontend/src/routes/(app)/customize/templates/components/TemplatesBrowser.svelte+++ b/frontend/src/routes/(app)/customize/templates/components/TemplatesBrowser.svelte@@ -1,7 +1,7 @@<script lang="ts">import TemplateTable from '../template-table.svelte';- import type { Paginated, SearchPaginationSortRequest } from '$lib/types/pagination.type';- import type { Template } from '$lib/types/template.type';+ import type { Paginated, SearchPaginationSortRequest } from '$lib/types/shared';+ import type { Template } from '$lib/types/swarm';let {templates = $bindable(),diff --git a/frontend/src/routes/(app)/customize/templates/create/+page.svelte b/frontend/src/routes/(app)/customize/templates/create/+page.svelteindex 69f44a74f..d0cae2802 100644--- a/frontend/src/routes/(app)/customize/templates/create/+page.svelte+++ b/frontend/src/routes/(app)/customize/templates/create/+page.svelte@@ -5,9 +5,9 @@import { ArrowLeftIcon } from '$lib/icons';import { m } from '$lib/paraglide/messages';import { templateService } from '$lib/services/template-service';- import { handleApiResultWithCallbacks } from '$lib/utils/api.util';- import { createForm, preventDefault } from '$lib/utils/form.utils';- import { tryCatch } from '$lib/utils/try-catch';+ import { handleApiResultWithCallbacks } from '$lib/utils/api';+ import { createForm, preventDefault } from '$lib/utils/settings';+ import { tryCatch } from '$lib/utils/api';import { toast } from 'svelte-sonner';import { z } from 'zod/v4';import CodePanel from '../../../projects/components/CodePanel.svelte';diff --git a/frontend/src/routes/(app)/customize/templates/create/+page.ts b/frontend/src/routes/(app)/customize/templates/create/+page.tsindex aa6c468aa..dade51003 100644--- a/frontend/src/routes/(app)/customize/templates/create/+page.ts+++ b/frontend/src/routes/(app)/customize/templates/create/+page.ts@@ -1,6 +1,6 @@import { templateService } from '$lib/services/template-service';import { queryKeys } from '$lib/query/query-keys';-import type { Variable } from '$lib/types/variable.type';+import type { Variable } from '$lib/types/shared';import type { PageLoad } from './$types';export const load: PageLoad = async ({ parent }): Promise<{ globalVariables: Variable[] }> => {diff --git a/frontend/src/routes/(app)/customize/templates/default/+page.svelte b/frontend/src/routes/(app)/customize/templates/default/+page.svelteindex eff795830..8c4f06180 100644--- a/frontend/src/routes/(app)/customize/templates/default/+page.svelte+++ b/frontend/src/routes/(app)/customize/templates/default/+page.svelte@@ -3,9 +3,9 @@import * as Card from '$lib/components/ui/card';import { toast } from 'svelte-sonner';import CodeEditor from '$lib/components/code-editor/editor.svelte';- import { createForm } from '$lib/utils/form.utils';- import { tryCatch } from '$lib/utils/try-catch';- import { handleApiResultWithCallbacks } from '$lib/utils/api.util';+ import { createForm } from '$lib/utils/settings';+ import { tryCatch } from '$lib/utils/api';+ import { handleApiResultWithCallbacks } from '$lib/utils/api';import { m } from '$lib/paraglide/messages';import { templateService } from '$lib/services/template-service';import { z } from 'zod/v4';@@ -13,7 +13,7 @@import TemplateSelectionDialog from '$lib/components/dialogs/template-selection-dialog.svelte';import { ComposeEditorSplit } from '$lib/components/compose';import { untrack } from 'svelte';- import type { Template } from '$lib/types/template.type';+ import type { Template } from '$lib/types/swarm';import { ArrowLeftIcon, CodeIcon, VariableIcon } from '$lib/icons';let { data } = $props();diff --git a/frontend/src/routes/(app)/customize/templates/default/+page.ts b/frontend/src/routes/(app)/customize/templates/default/+page.tsindex 9d7a20555..3d710e6f1 100644--- a/frontend/src/routes/(app)/customize/templates/default/+page.ts+++ b/frontend/src/routes/(app)/customize/templates/default/+page.ts@@ -1,7 +1,7 @@import { templateService } from '$lib/services/template-service';import { queryKeys } from '$lib/query/query-keys';-import type { Template } from '$lib/types/template.type';-import type { Variable } from '$lib/types/variable.type';+import type { Template } from '$lib/types/swarm';+import type { Variable } from '$lib/types/shared';import type { PageLoad } from './$types';export const load: PageLoad = async ({diff --git a/frontend/src/routes/(app)/customize/templates/template-table.svelte b/frontend/src/routes/(app)/customize/templates/template-table.svelteindex b4f01859e..8c625a3fc 100644--- a/frontend/src/routes/(app)/customize/templates/template-table.svelte+++ b/frontend/src/routes/(app)/customize/templates/template-table.svelte@@ -7,17 +7,17 @@import { goto } from '$app/navigation';import { toast } from 'svelte-sonner';import { openConfirmDialog } from '$lib/components/confirm-dialog';- import { handleApiResultWithCallbacks } from '$lib/utils/api.util';- import { tryCatch } from '$lib/utils/try-catch';+ import { handleApiResultWithCallbacks } from '$lib/utils/api';+ import { tryCatch } from '$lib/utils/api';import UniversalMobileCard from '$lib/components/arcane-table/cards/universal-mobile-card.svelte';- import type { Paginated, SearchPaginationSortRequest } from '$lib/types/pagination.type';- import type { Template } from '$lib/types/template.type';+ import type { Paginated, SearchPaginationSortRequest } from '$lib/types/shared';+ import type { Template } from '$lib/types/swarm';import type { ColumnSpec, MobileFieldVisibility } from '$lib/components/arcane-table';import { m } from '$lib/paraglide/messages';import { templateTypeFilters } from '$lib/components/arcane-table/data';import { templateService } from '$lib/services/template-service';- import { truncateString } from '$lib/utils/string.utils';- import { hasPermission } from '$lib/utils/permissions.util';+ import { truncateString } from '$lib/utils/formatting';+ import { hasPermission } from '$lib/utils/auth';import IfPermitted from '$lib/components/if-permitted.svelte';import { PersistedState } from 'runed';import { onMount } from 'svelte';diff --git a/frontend/src/routes/(app)/customize/variables/+page.svelte b/frontend/src/routes/(app)/customize/variables/+page.svelteindex b55d0c9ca..9c09f1771 100644--- a/frontend/src/routes/(app)/customize/variables/+page.svelte+++ b/frontend/src/routes/(app)/customize/variables/+page.svelte@@ -7,11 +7,11 @@import { CopyButton } from '$lib/components/ui/copy-button';import { ResourcePageLayout, type ActionButton } from '$lib/layouts/index.js';import { templateService } from '$lib/services/template-service.js';- import type { Variable } from '$lib/types/variable.type';+ import type { Variable } from '$lib/types/shared';import { untrack } from 'svelte';import { m } from '$lib/paraglide/messages';import { SearchIcon, CloseIcon, AlertIcon, VariableIcon } from '$lib/icons';- import { hasPermission } from '$lib/utils/permissions.util';+ import { hasPermission } from '$lib/utils/auth';let { data } = $props();let envVars = $state<Variable[]>(untrack(() => [...data.variables]));diff --git a/frontend/src/routes/(app)/dashboard/+page.svelte b/frontend/src/routes/(app)/dashboard/+page.svelteindex 30301239d..f333cb59a 100644--- a/frontend/src/routes/(app)/dashboard/+page.svelte+++ b/frontend/src/routes/(app)/dashboard/+page.svelte@@ -7,16 +7,16 @@import DockerInfoDialog from '$lib/components/dialogs/docker-info-dialog.svelte';import * as Card from '$lib/components/ui/card/index.js';import { ArcaneButton } from '$lib/components/arcane-button/index.js';- import { handleApiResultWithCallbacks } from '$lib/utils/api.util';- import { tryCatch } from '$lib/utils/try-catch';+ import { handleApiResultWithCallbacks } from '$lib/utils/api';+ import { tryCatch } from '$lib/utils/api';import { openConfirmDialog } from '$lib/components/confirm-dialog';import { environmentStore } from '$lib/stores/environment.store.svelte';import userStore from '$lib/stores/user-store';import { createStatsWebSocket } from '$lib/utils/ws';import type { ReconnectingWebSocket } from '$lib/utils/ws';- import type { User } from '$lib/types/user.type';+ import type { User } from '$lib/types/auth';import QuickActions from '$lib/components/quick-actions.svelte';- import type { SystemStats } from '$lib/types/system-stats.type';+ import type { SystemStats } from '$lib/types/shared';import DashboardActionCard from './dash-action-card.svelte';import DashboardMetricTile from './dash-metric-tile.svelte';import DashboardContainerTable from './dash-container-table.svelte';@@ -25,10 +25,10 @@import { m } from '$lib/paraglide/messages';import { goto, invalidateAll } from '$app/navigation';import { systemService } from '$lib/services/system-service';- import bytes from '$lib/utils/bytes';- import type { DockerInfo } from '$lib/types/docker-info.type';- import type { DashboardSnapshot } from '$lib/types/dashboard.type';- import type { SystemPruneRequest, PruneType } from '$lib/types/prune.type';+ import { bytes } from '$lib/utils/formatting';+ import type { DockerInfo } from '$lib/types/docker';+ import type { DashboardSnapshot } from '$lib/types/shared';+ import type { SystemPruneRequest, PruneType } from '$lib/types/automation';import {CpuIcon,MemoryStickIcon,diff --git a/frontend/src/routes/(app)/dashboard/+page.ts b/frontend/src/routes/(app)/dashboard/+page.tsindex 34cadf8e3..3b2b70710 100644--- a/frontend/src/routes/(app)/dashboard/+page.ts+++ b/frontend/src/routes/(app)/dashboard/+page.ts@@ -2,7 +2,7 @@ import { dashboardService } from '$lib/services/dashboard-service';import { settingsService } from '$lib/services/settings-service';import { queryKeys } from '$lib/query/query-keys';import { environmentStore } from '$lib/stores/environment.store.svelte';-import { throwPageLoadError } from '$lib/utils/page-load-error.util';+import { throwPageLoadError } from '$lib/utils/api';import type { PageLoad } from './$types';export const load: PageLoad = async ({ parent, url }) => {diff --git a/frontend/src/routes/(app)/dashboard/dash-container-table.svelte b/frontend/src/routes/(app)/dashboard/dash-container-table.svelteindex 9fd0931e4..714bce126 100644--- a/frontend/src/routes/(app)/dashboard/dash-container-table.svelte+++ b/frontend/src/routes/(app)/dashboard/dash-container-table.svelte@@ -4,10 +4,10 @@import * as Card from '$lib/components/ui/card/index.js';import StatusBadge from '$lib/components/badges/status-badge.svelte';import { UniversalMobileCard } from '$lib/components/arcane-table/index.js';- import { getStatusVariant } from '$lib/utils/status.utils';- import { capitalizeFirstLetter } from '$lib/utils/string.utils';- import type { SearchPaginationSortRequest, Paginated } from '$lib/types/pagination.type';- import type { ContainerSummaryDto } from '$lib/types/container.type';+ import { getStatusVariant } from '$lib/utils/docker';+ import { capitalizeFirstLetter } from '$lib/utils/formatting';+ import type { SearchPaginationSortRequest, Paginated } from '$lib/types/shared';+ import type { ContainerSummaryDto } from '$lib/types/docker';import type { ColumnSpec } from '$lib/components/arcane-table';import { m } from '$lib/paraglide/messages';import { containerService } from '$lib/services/container-service';@@ -16,7 +16,7 @@import { IsMobile } from '$lib/hooks';import { ContainersIcon, ArrowRightIcon } from '$lib/icons';import IconImage from '$lib/components/icon-image.svelte';- import { getArcaneIconUrlFromLabels } from '$lib/utils/arcane-labels';+ import { getArcaneIconUrlFromLabels } from '$lib/utils/docker';let {containers = $bindable(),diff --git a/frontend/src/routes/(app)/dashboard/dash-image-table.svelte b/frontend/src/routes/(app)/dashboard/dash-image-table.svelteindex 90f161770..ae9e35bc2 100644--- a/frontend/src/routes/(app)/dashboard/dash-image-table.svelte+++ b/frontend/src/routes/(app)/dashboard/dash-image-table.svelte@@ -3,9 +3,9 @@import { ArcaneButton } from '$lib/components/arcane-button/index.js';import * as Card from '$lib/components/ui/card/index.js';import StatusBadge from '$lib/components/badges/status-badge.svelte';- import type { SearchPaginationSortRequest, Paginated } from '$lib/types/pagination.type';- import type { ImageSummaryDto } from '$lib/types/image.type';- import bytes from '$lib/utils/bytes';+ import type { SearchPaginationSortRequest, Paginated } from '$lib/types/shared';+ import type { ImageSummaryDto } from '$lib/types/docker';+ import { bytes } from '$lib/utils/formatting';import type { ColumnSpec } from '$lib/components/arcane-table';import { UniversalMobileCard } from '$lib/components/arcane-table';import { m } from '$lib/paraglide/messages';diff --git a/frontend/src/routes/(app)/dashboard/dashboard-all-environments-view.svelte b/frontend/src/routes/(app)/dashboard/dashboard-all-environments-view.svelteindex 5d9db3e0b..78dbf4ccc 100644--- a/frontend/src/routes/(app)/dashboard/dashboard-all-environments-view.svelte+++ b/frontend/src/routes/(app)/dashboard/dashboard-all-environments-view.svelte@@ -14,23 +14,23 @@import { dashboardService } from '$lib/services/dashboard-service';import { systemService } from '$lib/services/system-service';import { environmentStore } from '$lib/stores/environment.store.svelte';- import { hasAnyPermission, hasPermission } from '$lib/utils/permissions.util';- import type { SystemStats } from '$lib/types/system-stats.type';+ import { hasAnyPermission, hasPermission } from '$lib/utils/auth';+ import type { SystemStats } from '$lib/types/shared';import type {DashboardActionItem,DashboardEnvironmentCardState,DashboardEnvironmentOverview,DashboardOverviewSummary,DashboardSnapshot- } from '$lib/types/dashboard.type';- import type { Environment } from '$lib/types/environment.type';- import type { PruneType, SystemPruneRequest } from '$lib/types/prune.type';- import { extractApiErrorMessage, handleApiResultWithCallbacks } from '$lib/utils/api.util';- import { capitalizeFirstLetter } from '$lib/utils/string.utils';- import { tryCatch } from '$lib/utils/try-catch';- import { getEnvironmentStatusVariant, isEnvironmentOnline, resolveEnvironmentStatus } from '$lib/utils/environment-status';+ } from '$lib/types/shared';+ import type { Environment } from '$lib/types/environment';+ import type { PruneType, SystemPruneRequest } from '$lib/types/automation';+ import { extractApiErrorMessage, handleApiResultWithCallbacks } from '$lib/utils/api';+ import { capitalizeFirstLetter } from '$lib/utils/formatting';+ import { tryCatch } from '$lib/utils/api';+ import { getEnvironmentStatusVariant, isEnvironmentOnline, resolveEnvironmentStatus } from '$lib/utils/docker';import { createStatsWebSocket, type ReconnectingWebSocket } from '$lib/utils/ws';- import bytes from '$lib/utils/bytes';+ import { bytes } from '$lib/utils/formatting';import {ContainersIcon,CpuIcon,@@ -158,9 +158,7 @@};}- function mapOverviewSummary(- summary: import('$lib/types/dashboard.type').DashboardEnvironmentsSummary- ): DashboardOverviewSummary {+ function mapOverviewSummary(summary: import('$lib/types/shared').DashboardEnvironmentsSummary): DashboardOverviewSummary {return {totalEnvironments: summary.totalEnvironments,reachableEnvironments: summary.onlineEnvironments + summary.standbyEnvironments,diff --git a/frontend/src/routes/(app)/dashboard/dashboard-environment-upgrade-action.svelte b/frontend/src/routes/(app)/dashboard/dashboard-environment-upgrade-action.svelteindex c4dab14e3..504fcb3f1 100644--- a/frontend/src/routes/(app)/dashboard/dashboard-environment-upgrade-action.svelte+++ b/frontend/src/routes/(app)/dashboard/dashboard-environment-upgrade-action.svelte@@ -7,9 +7,9 @@import { queryKeys } from '$lib/query/query-keys';import environmentUpgradeService from '$lib/services/api/environment-upgrade-service';import systemUpgradeService from '$lib/services/api/system-upgrade-service';- import type { AppVersionInformation } from '$lib/types/application-configuration';- import type { Environment } from '$lib/types/environment.type';- import { extractApiErrorMessage } from '$lib/utils/api.util';+ import type { AppVersionInformation } from '$lib/types/settings';+ import type { Environment } from '$lib/types/environment';+ import { extractApiErrorMessage } from '$lib/utils/api';import { DownloadIcon } from '$lib/icons';let {diff --git a/frontend/src/routes/(app)/environments/+page.svelte b/frontend/src/routes/(app)/environments/+page.svelteindex 5b08af9e1..37874fac9 100644--- a/frontend/src/routes/(app)/environments/+page.svelte+++ b/frontend/src/routes/(app)/environments/+page.svelte@@ -2,16 +2,16 @@import { toast } from 'svelte-sonner';import NewEnvironmentSheet from '$lib/components/sheets/new-environment-sheet.svelte';import EnvironmentTable from './environment-table.svelte';- import { tryCatch } from '$lib/utils/try-catch';- import { handleApiResultWithCallbacks } from '$lib/utils/api.util';+ import { tryCatch } from '$lib/utils/api';+ import { handleApiResultWithCallbacks } from '$lib/utils/api';import { openConfirmDialog } from '$lib/components/confirm-dialog';import { m } from '$lib/paraglide/messages';import { environmentManagementService } from '$lib/services/env-mgmt-service';import { untrack } from 'svelte';import { ResourcePageLayout, type ActionButton } from '$lib/layouts/index.js';import { environmentStore } from '$lib/stores/environment.store.svelte';- import { simpleRefresh } from '$lib/utils/refresh.util';- import { hasPermission } from '$lib/utils/permissions.util';+ import { simpleRefresh } from '$lib/utils/api';+ import { hasPermission } from '$lib/utils/auth';import { DownloadIcon } from '$lib/icons';let { data } = $props();diff --git a/frontend/src/routes/(app)/environments/+page.ts b/frontend/src/routes/(app)/environments/+page.tsindex cf47bb559..e789629e0 100644--- a/frontend/src/routes/(app)/environments/+page.ts+++ b/frontend/src/routes/(app)/environments/+page.ts@@ -1,9 +1,9 @@import type { PageLoad } from './$types';-import type { SearchPaginationSortRequest } from '$lib/types/pagination.type';+import type { SearchPaginationSortRequest } from '$lib/types/shared';import { environmentManagementService } from '$lib/services/env-mgmt-service';-import { resolveInitialTableRequest } from '$lib/utils/table-persistence.util';+import { resolveInitialTableRequest } from '$lib/utils/tables';import { queryKeys } from '$lib/query/query-keys';-import { throwPageLoadError } from '$lib/utils/page-load-error.util';+import { throwPageLoadError } from '$lib/utils/api';export const load: PageLoad = async ({ parent }) => {const { queryClient } = await parent();diff --git a/frontend/src/routes/(app)/environments/[id]/+page.svelte b/frontend/src/routes/(app)/environments/[id]/+page.svelteindex 238c650d4..975da3292 100644--- a/frontend/src/routes/(app)/environments/[id]/+page.svelte+++ b/frontend/src/routes/(app)/environments/[id]/+page.svelte@@ -16,11 +16,11 @@import { environmentManagementService } from '$lib/services/env-mgmt-service.js';import { settingsService } from '$lib/services/settings-service';import { environmentStore } from '$lib/stores/environment.store.svelte';- import type { AppVersionInformation } from '$lib/types/application-configuration';- import type { Environment, EnvironmentStatus } from '$lib/types/environment.type';- import { isEnvironmentOnline, resolveEnvironmentStatus } from '$lib/utils/environment-status';+ import type { AppVersionInformation } from '$lib/types/settings';+ import type { Environment, EnvironmentStatus } from '$lib/types/environment';+ import { isEnvironmentOnline, resolveEnvironmentStatus } from '$lib/utils/docker';import MobileFloatingFormActions from '$lib/components/form/mobile-floating-form-actions.svelte';- import { createSettingsForm } from '$lib/utils/settings-form.util';+ import { createSettingsForm } from '$lib/utils/settings';import DetailsTab from './components/DetailsTab.svelte';import GeneralTab from './components/GeneralTab.svelte';import DockerTab from './components/DockerTab.svelte';diff --git a/frontend/src/routes/(app)/environments/[id]/components/JobsTab.svelte b/frontend/src/routes/(app)/environments/[id]/components/JobsTab.svelteindex 808d9df28..19da64703 100644--- a/frontend/src/routes/(app)/environments/[id]/components/JobsTab.svelte+++ b/frontend/src/routes/(app)/environments/[id]/components/JobsTab.svelte@@ -2,7 +2,7 @@import { SvelteSet } from 'svelte/reactivity';import { jobScheduleService } from '$lib/services/job-schedule-service';import { containerService } from '$lib/services/container-service';- import { tryCatch } from '$lib/utils/try-catch';+ import { tryCatch } from '$lib/utils/api';import JobCard from '$lib/components/job-card/job-card.svelte';import { Spinner } from '$lib/components/ui/spinner';import { m } from '$lib/paraglide/messages';@@ -13,8 +13,8 @@import { Checkbox } from '$lib/components/ui/checkbox';import * as ScrollArea from '$lib/components/ui/scroll-area';import { JobsIcon } from '$lib/icons';- import type { JobStatus, JobPrerequisite } from '$lib/types/job-schedule.type';- import type { ContainerSummaryDto } from '$lib/types/container.type';+ import type { JobStatus, JobPrerequisite } from '$lib/types/settings';+ import type { ContainerSummaryDto } from '$lib/types/docker';import type { JobsTabProps } from './tab-props';let { formInputs, environmentId }: JobsTabProps = $props();diff --git a/frontend/src/routes/(app)/environments/[id]/components/tab-props.ts b/frontend/src/routes/(app)/environments/[id]/components/tab-props.tsindex a321e2762..050495878 100644--- a/frontend/src/routes/(app)/environments/[id]/components/tab-props.ts+++ b/frontend/src/routes/(app)/environments/[id]/components/tab-props.ts@@ -1,7 +1,7 @@import type { Writable } from 'svelte/store';-import type { FormInputs } from '$lib/utils/form.utils';-import type { Environment, EnvironmentStatus } from '$lib/types/environment.type';-import type { AppVersionInformation } from '$lib/types/application-configuration';+import type { FormInputs } from '$lib/utils/settings';+import type { Environment, EnvironmentStatus } from '$lib/types/environment';+import type { AppVersionInformation } from '$lib/types/settings';import type { EnvironmentFormValues } from './environment-form-schema';export type EnvironmentFormInputs = Writable<FormInputs<EnvironmentFormValues>>;diff --git a/frontend/src/routes/(app)/environments/[id]/gitops/+page.svelte b/frontend/src/routes/(app)/environments/[id]/gitops/+page.svelteindex d7207d13b..b5646564b 100644--- a/frontend/src/routes/(app)/environments/[id]/gitops/+page.svelte+++ b/frontend/src/routes/(app)/environments/[id]/gitops/+page.svelte@@ -6,11 +6,11 @@GitOpsSyncCreateDto,GitOpsSyncUpdateDto,ImportGitOpsSyncRequest- } from '$lib/types/gitops.type';+ } from '$lib/types/automation';import GitOpsSyncFormSheet from '$lib/components/dialogs/gitops-sync-dialog.svelte';import GitOpsImportDialog from '$lib/components/dialogs/gitops-import-dialog.svelte';- import { handleApiResultWithCallbacks } from '$lib/utils/api.util';- import { tryCatch } from '$lib/utils/try-catch';+ import { handleApiResultWithCallbacks } from '$lib/utils/api';+ import { tryCatch } from '$lib/utils/api';import { m } from '$lib/paraglide/messages';import { gitOpsSyncService } from '$lib/services/gitops-sync-service';import { untrack } from 'svelte';diff --git a/frontend/src/routes/(app)/environments/[id]/gitops/+page.ts b/frontend/src/routes/(app)/environments/[id]/gitops/+page.tsindex 58e4e155c..1ac17a07c 100644--- a/frontend/src/routes/(app)/environments/[id]/gitops/+page.ts+++ b/frontend/src/routes/(app)/environments/[id]/gitops/+page.ts@@ -1,8 +1,8 @@import { gitOpsSyncService } from '$lib/services/gitops-sync-service';import { environmentManagementService } from '$lib/services/env-mgmt-service';import { queryKeys } from '$lib/query/query-keys';-import type { SearchPaginationSortRequest } from '$lib/types/pagination.type';-import { resolveInitialTableRequest } from '$lib/utils/table-persistence.util';+import type { SearchPaginationSortRequest } from '$lib/types/shared';+import { resolveInitialTableRequest } from '$lib/utils/tables';import type { PageLoad } from './$types';export const load: PageLoad = async ({ params, parent }) => {diff --git a/frontend/src/routes/(app)/environments/[id]/gitops/sync-table.svelte b/frontend/src/routes/(app)/environments/[id]/gitops/sync-table.svelteindex d3b510da1..9cc801a69 100644--- a/frontend/src/routes/(app)/environments/[id]/gitops/sync-table.svelte+++ b/frontend/src/routes/(app)/environments/[id]/gitops/sync-table.svelte@@ -5,17 +5,17 @@import * as DropdownMenu from '$lib/components/ui/dropdown-menu/index.js';import { openConfirmDialog } from '$lib/components/confirm-dialog';import { toast } from 'svelte-sonner';- import { handleApiResultWithCallbacks } from '$lib/utils/api.util';- import { tryCatch } from '$lib/utils/try-catch';- import type { Paginated, SearchPaginationSortRequest } from '$lib/types/pagination.type';- import type { GitOpsSync } from '$lib/types/gitops.type';+ import { handleApiResultWithCallbacks } from '$lib/utils/api';+ import { tryCatch } from '$lib/utils/api';+ import type { Paginated, SearchPaginationSortRequest } from '$lib/types/shared';+ import type { GitOpsSync } from '$lib/types/automation';import type { Row } from '@tanstack/table-core';import type { ColumnSpec, BulkAction } from '$lib/components/arcane-table';import { UniversalMobileCard } from '$lib/components/arcane-table/index.js';import { format } from 'date-fns';import { m } from '$lib/paraglide/messages';import { gitOpsSyncService } from '$lib/services/gitops-sync-service';- import { toGitCommitUrl } from '$lib/utils/git';+ import { toGitCommitUrl } from '$lib/utils/navigation';import {EditIcon as PencilIcon,StartIcon as PlayIcon,diff --git a/frontend/src/routes/(app)/environments/environment-table.svelte b/frontend/src/routes/(app)/environments/environment-table.svelteindex dbada7260..26fd5c51e 100644--- a/frontend/src/routes/(app)/environments/environment-table.svelte+++ b/frontend/src/routes/(app)/environments/environment-table.svelte@@ -6,25 +6,25 @@import { Badge } from '$lib/components/ui/badge';import { goto } from '$app/navigation';import { openConfirmDialog } from '$lib/components/confirm-dialog';- import { handleApiResultWithCallbacks } from '$lib/utils/api.util';- import { tryCatch } from '$lib/utils/try-catch';+ import { handleApiResultWithCallbacks } from '$lib/utils/api';+ import { tryCatch } from '$lib/utils/api';import { toast } from 'svelte-sonner';- import { extractApiErrorMessage } from '$lib/utils/api.util';- import type { Paginated, SearchPaginationSortRequest } from '$lib/types/pagination.type';+ import { extractApiErrorMessage } from '$lib/utils/api';+ import type { Paginated, SearchPaginationSortRequest } from '$lib/types/shared';import type { ColumnSpec, MobileFieldVisibility, BulkAction } from '$lib/components/arcane-table';import type { FilterOption } from '$lib/components/arcane-table/arcane-table.types.svelte';import { UniversalMobileCard } from '$lib/components/arcane-table';- import type { Environment } from '$lib/types/environment.type';+ import type { Environment } from '$lib/types/environment';import { m } from '$lib/paraglide/messages';import { environmentManagementService } from '$lib/services/env-mgmt-service';import environmentUpgradeService from '$lib/services/api/environment-upgrade-service';import UpdateCenterDialog from '$lib/components/dialogs/update-center-dialog.svelte';import EnvironmentUpgradeMenuItem from './environment-upgrade-menu-item.svelte';- import type { AppVersionInformation } from '$lib/types/application-configuration';- import { hasPermission } from '$lib/utils/permissions.util';+ import type { AppVersionInformation } from '$lib/types/settings';+ import { hasPermission } from '$lib/utils/auth';import { environmentStore } from '$lib/stores/environment.store.svelte';- import { capitalizeFirstLetter } from '$lib/utils/string.utils';- import { getEnvironmentStatusVariant, isEnvironmentOnline, resolveEnvironmentStatus } from '$lib/utils/environment-status';+ import { capitalizeFirstLetter } from '$lib/utils/formatting';+ import { getEnvironmentStatusVariant, isEnvironmentOnline, resolveEnvironmentStatus } from '$lib/utils/docker';import { EyeOnIcon, TrashIcon, EnvironmentsIcon, InspectIcon, StatsIcon, EyeOffIcon, TestIcon, EllipsisIcon } from '$lib/icons';let {diff --git a/frontend/src/routes/(app)/environments/environment-upgrade-menu-item.svelte b/frontend/src/routes/(app)/environments/environment-upgrade-menu-item.svelteindex d6f6cb294..b3ba3ff04 100644--- a/frontend/src/routes/(app)/environments/environment-upgrade-menu-item.svelte+++ b/frontend/src/routes/(app)/environments/environment-upgrade-menu-item.svelte@@ -4,8 +4,8 @@import { m } from '$lib/paraglide/messages';import { queryKeys } from '$lib/query/query-keys';import systemUpgradeService from '$lib/services/api/system-upgrade-service';- import type { AppVersionInformation } from '$lib/types/application-configuration';- import type { Environment } from '$lib/types/environment.type';+ import type { AppVersionInformation } from '$lib/types/settings';+ import type { Environment } from '$lib/types/environment';import { createQuery } from '@tanstack/svelte-query';let {diff --git a/frontend/src/routes/(app)/events/+page.svelte b/frontend/src/routes/(app)/events/+page.svelteindex f2c411bf3..2f78b2678 100644--- a/frontend/src/routes/(app)/events/+page.svelte+++ b/frontend/src/routes/(app)/events/+page.svelte@@ -1,6 +1,6 @@<script lang="ts">import { toast } from 'svelte-sonner';- import type { Event } from '$lib/types/event.type';+ import type { Event } from '$lib/types/shared';import EventTable from './event-table.svelte';import { openConfirmDialog } from '$lib/components/confirm-dialog';import { m } from '$lib/paraglide/messages';@@ -10,7 +10,7 @@import { ResourcePageLayout, type ActionButton, type StatCardConfig } from '$lib/layouts/index.js';import { createMutation, createQuery } from '@tanstack/svelte-query';import { EventsIcon } from '$lib/icons';- import { hasPermission } from '$lib/utils/permissions.util';+ import { hasPermission } from '$lib/utils/auth';let { data } = $props();diff --git a/frontend/src/routes/(app)/events/+page.ts b/frontend/src/routes/(app)/events/+page.tsindex b8db6f669..33e26f1f7 100644--- a/frontend/src/routes/(app)/events/+page.ts+++ b/frontend/src/routes/(app)/events/+page.ts@@ -1,8 +1,8 @@import { eventService } from '$lib/services/event-service';import { queryKeys } from '$lib/query/query-keys';-import type { SearchPaginationSortRequest } from '$lib/types/pagination.type';-import { resolveInitialTableRequest } from '$lib/utils/table-persistence.util';-import { throwPageLoadError } from '$lib/utils/page-load-error.util';+import type { SearchPaginationSortRequest } from '$lib/types/shared';+import { resolveInitialTableRequest } from '$lib/utils/tables';+import { throwPageLoadError } from '$lib/utils/api';import type { PageLoad } from './$types';export const load: PageLoad = async ({ parent }) => {diff --git a/frontend/src/routes/(app)/events/event-table.svelte b/frontend/src/routes/(app)/events/event-table.svelteindex 7ef37bd31..40eb7fedd 100644--- a/frontend/src/routes/(app)/events/event-table.svelte+++ b/frontend/src/routes/(app)/events/event-table.svelte@@ -6,11 +6,11 @@import { openConfirmDialog } from '$lib/components/confirm-dialog';import StatusBadge from '$lib/components/badges/status-badge.svelte';import { Badge } from '$lib/components/ui/badge';- import { tryCatch } from '$lib/utils/try-catch';- import { handleApiResultWithCallbacks } from '$lib/utils/api.util';+ import { tryCatch } from '$lib/utils/api';+ import { handleApiResultWithCallbacks } from '$lib/utils/api';import { formatDistanceToNow } from 'date-fns';- import type { Paginated, SearchPaginationSortRequest } from '$lib/types/pagination.type';- import type { Event } from '$lib/types/event.type';+ import type { Paginated, SearchPaginationSortRequest } from '$lib/types/shared';+ import type { Event } from '$lib/types/shared';import type { ColumnSpec, MobileFieldVisibility } from '$lib/components/arcane-table';import { UniversalMobileCard } from '$lib/components/arcane-table';import EventDetailsDialog from '$lib/components/dialogs/event-details-dialog.svelte';diff --git a/frontend/src/routes/(app)/images/+page.svelte b/frontend/src/routes/(app)/images/+page.svelteindex d9cb3d95f..8fc59db22 100644--- a/frontend/src/routes/(app)/images/+page.svelte+++ b/frontend/src/routes/(app)/images/+page.svelte@@ -3,16 +3,16 @@import { Spinner } from '$lib/components/ui/spinner/index.js';import { toast } from 'svelte-sonner';import ImagePullSheet from '$lib/components/sheets/image-pull-sheet.svelte';- import bytes from '$lib/utils/bytes';+ import { bytes } from '$lib/utils/formatting';import * as Dialog from '$lib/components/ui/dialog/index.js';import { displaySize, FileDropZone, MEGABYTE, type FileDropZoneProps } from '$lib/components/ui/file-drop-zone';import ImageTable from './image-table.svelte';import { m } from '$lib/paraglide/messages';import { imageService } from '$lib/services/image-service';import { environmentStore } from '$lib/stores/environment.store.svelte';- import { hasPermission } from '$lib/utils/permissions.util';+ import { hasPermission } from '$lib/utils/auth';import { queryKeys } from '$lib/query/query-keys';- import type { ImageUsageCounts } from '$lib/types/image.type';+ import type { ImageUsageCounts } from '$lib/types/docker';import { untrack } from 'svelte';import { ResourcePageLayout, type ActionButton, type StatCardConfig } from '$lib/layouts/index.js';import { CloseIcon, VolumesIcon, LocalFolderComputerIcon } from '$lib/icons';diff --git a/frontend/src/routes/(app)/images/+page.ts b/frontend/src/routes/(app)/images/+page.tsindex c90a8af75..5ed5e0225 100644--- a/frontend/src/routes/(app)/images/+page.ts+++ b/frontend/src/routes/(app)/images/+page.ts@@ -1,9 +1,9 @@import { imageService } from '$lib/services/image-service';import { settingsService } from '$lib/services/settings-service';import { queryKeys } from '$lib/query/query-keys';-import type { SearchPaginationSortRequest } from '$lib/types/pagination.type';-import { resolveInitialTableRequest } from '$lib/utils/table-persistence.util';-import { throwPageLoadError } from '$lib/utils/page-load-error.util';+import type { SearchPaginationSortRequest } from '$lib/types/shared';+import { resolveInitialTableRequest } from '$lib/utils/tables';+import { throwPageLoadError } from '$lib/utils/api';import type { PageLoad } from './$types';import { environmentStore } from '$lib/stores/environment.store.svelte';diff --git a/frontend/src/routes/(app)/images/[imageId]/+page.svelte b/frontend/src/routes/(app)/images/[imageId]/+page.svelteindex a8d423b36..907ee64a6 100644--- a/frontend/src/routes/(app)/images/[imageId]/+page.svelte+++ b/frontend/src/routes/(app)/images/[imageId]/+page.svelte@@ -3,10 +3,10 @@import { goto } from '$app/navigation';import { Badge } from '$lib/components/ui/badge';import { format } from 'date-fns';- import bytes from '$lib/utils/bytes';+ import { bytes } from '$lib/utils/formatting';import { openConfirmDialog } from '$lib/components/confirm-dialog';- import { handleApiResultWithCallbacks } from '$lib/utils/api.util';- import { tryCatch } from '$lib/utils/try-catch';+ import { handleApiResultWithCallbacks } from '$lib/utils/api';+ import { tryCatch } from '$lib/utils/api';import { toast } from 'svelte-sonner';import { onDestroy } from 'svelte';import { ArcaneButton } from '$lib/components/arcane-button';@@ -17,12 +17,12 @@startVulnerabilityScanPolling,stabilizeFailedVulnerabilitySummary,isVulnerabilityScanInProgress- } from '$lib/utils/vulnerability-scan.util';+ } from '$lib/utils/docker';import { ResourceDetailLayout, type DetailAction } from '$lib/layouts';import VulnerabilityScanPanel from '$lib/components/vulnerability/vulnerability-scan-panel.svelte';- import type { VulnerabilityScanResult } from '$lib/types/vulnerability.type';+ import type { VulnerabilityScanResult } from '$lib/types/environment';import { environmentStore } from '$lib/stores/environment.store.svelte';- import { hasPermission } from '$lib/utils/permissions.util';+ import { hasPermission } from '$lib/utils/auth';import { VolumesIcon, ClockIcon, TagIcon, LayersIcon, CpuIcon, InfoIcon, SettingsIcon, HashIcon } from '$lib/icons';let { data } = $props();diff --git a/frontend/src/routes/(app)/images/[imageId]/+page.ts b/frontend/src/routes/(app)/images/[imageId]/+page.tsindex 4760cc000..daa460f3b 100644--- a/frontend/src/routes/(app)/images/[imageId]/+page.ts+++ b/frontend/src/routes/(app)/images/[imageId]/+page.ts@@ -1,6 +1,6 @@import { imageService } from '$lib/services/image-service.js';import { environmentStore } from '$lib/stores/environment.store.svelte';-import type { ImageDetailSummaryDto } from '$lib/types/image.type.js';+import type { ImageDetailSummaryDto } from '$lib/types/docker.js';import { queryKeys } from '$lib/query/query-keys';import type { PageLoad } from './$types';import { error } from '@sveltejs/kit';diff --git a/frontend/src/routes/(app)/images/builds/+page.svelte b/frontend/src/routes/(app)/images/builds/+page.svelteindex c34ea6550..f7bba451a 100644--- a/frontend/src/routes/(app)/images/builds/+page.svelte+++ b/frontend/src/routes/(app)/images/builds/+page.svelte@@ -6,12 +6,12 @@import * as DropdownMenu from '$lib/components/ui/dropdown-menu/index.js';import { m } from '$lib/paraglide/messages';import settingsStore from '$lib/stores/config-store';- import { createForm } from '$lib/utils/form.utils';+ import { createForm } from '$lib/utils/settings';import { toast } from 'svelte-sonner';import { environmentStore } from '$lib/stores/environment.store.svelte';import { ResourceDetailLayout } from '$lib/layouts/index.js';import TabbedPageLayout from '$lib/layouts/tabbed-page-layout.svelte';- import { sanitizeLogText } from '$lib/utils/log-text';+ import { sanitizeLogText } from '$lib/utils/formatting';import IfPermitted from '$lib/components/if-permitted.svelte';import {CodeIcon,@@ -40,7 +40,7 @@getLayerStats,isIndeterminatePhase,getAggregateStatus- } from '$lib/utils/pull-progress';+ } from '$lib/utils/docker';import ResizableSplit from '$lib/components/resizable-split.svelte';import BuildControls from './components/build-controls.svelte';import BuildWorkspacePanel from './components/build-workspace-panel.svelte';@@ -48,8 +48,8 @@import BuildOutputPanel from './components/build-output-panel.svelte';import type { BuildProviderOption } from './components/build-form.types';import { imageService } from '$lib/services/image-service';- import type { ImageBuildRecord, ImageBuildStatus } from '$lib/types/image.type';- import type { Paginated, SearchPaginationSortRequest } from '$lib/types/pagination.type';+ import type { ImageBuildRecord, ImageBuildStatus } from '$lib/types/docker';+ import type { Paginated, SearchPaginationSortRequest } from '$lib/types/shared';import { queryKeys } from '$lib/query/query-keys';import { createMutation, createQuery, useQueryClient } from '@tanstack/svelte-query';import { format } from 'date-fns';diff --git a/frontend/src/routes/(app)/images/builds/build-workspace-browser.svelte b/frontend/src/routes/(app)/images/builds/build-workspace-browser.svelteindex dce1d3f15..bbd719eba 100644--- a/frontend/src/routes/(app)/images/builds/build-workspace-browser.svelte+++ b/frontend/src/routes/(app)/images/builds/build-workspace-browser.svelte@@ -14,9 +14,9 @@import { toast } from 'svelte-sonner';import { UseClipboard } from '$lib/hooks/use-clipboard.svelte';import { environmentStore } from '$lib/stores/environment.store.svelte';- import { hasPermission } from '$lib/utils/permissions.util';+ import { hasPermission } from '$lib/utils/auth';import { queryKeys } from '$lib/query/query-keys';- import type { FileEntry } from '$lib/types/file-browser.type';+ import type { FileEntry } from '$lib/types/shared';import type { FileProvider } from '$lib/components/file-browser';import { createMutation, createQuery, useQueryClient } from '@tanstack/svelte-query';diff --git a/frontend/src/routes/(app)/images/builds/components/build-config-panel.svelte b/frontend/src/routes/(app)/images/builds/components/build-config-panel.svelteindex 05e271b69..042f9aad4 100644--- a/frontend/src/routes/(app)/images/builds/components/build-config-panel.svelte+++ b/frontend/src/routes/(app)/images/builds/components/build-config-panel.svelte@@ -2,7 +2,7 @@import * as Collapsible from '$lib/components/ui/collapsible/index.js';import { ArrowDownIcon } from '$lib/icons';import FormInput from '$lib/components/form/form-input.svelte';- import { preventDefault } from '$lib/utils/form.utils';+ import { preventDefault } from '$lib/utils/settings';import { m } from '$lib/paraglide/messages';import type { BuildFormInputsStore } from './build-form.types';diff --git a/frontend/src/routes/(app)/images/builds/components/build-form.types.ts b/frontend/src/routes/(app)/images/builds/components/build-form.types.tsindex 6c6bb448b..742f9bde2 100644--- a/frontend/src/routes/(app)/images/builds/components/build-form.types.ts+++ b/frontend/src/routes/(app)/images/builds/components/build-form.types.ts@@ -1,4 +1,4 @@-import type { FormInput } from '$lib/utils/form.utils';+import type { FormInput } from '$lib/utils/settings';import type { Writable } from 'svelte/store';export type BuildProviderOption = {diff --git a/frontend/src/routes/(app)/images/image-table.svelte b/frontend/src/routes/(app)/images/image-table.svelteindex fd5da3da1..d66442b7b 100644--- a/frontend/src/routes/(app)/images/image-table.svelte+++ b/frontend/src/routes/(app)/images/image-table.svelte@@ -6,27 +6,27 @@import { goto } from '$app/navigation';import { onDestroy } from 'svelte';import { toast } from 'svelte-sonner';- import bytes from '$lib/utils/bytes';+ import { bytes } from '$lib/utils/formatting';import { openConfirmDialog } from '$lib/components/confirm-dialog';import StatusBadge from '$lib/components/badges/status-badge.svelte';import { Badge } from '$lib/components/ui/badge/index.js';- import { handleApiResultWithCallbacks } from '$lib/utils/api.util';- import { tryCatch } from '$lib/utils/try-catch';+ import { handleApiResultWithCallbacks } from '$lib/utils/api';+ import { tryCatch } from '$lib/utils/api';import ImageUpdateItem from '$lib/components/image-update-item.svelte';import VulnerabilityScanItem from '$lib/components/vulnerability/vulnerability-scan-item.svelte';import UniversalMobileCard from '$lib/components/arcane-table/cards/universal-mobile-card.svelte';import * as Tooltip from '$lib/components/ui/tooltip';- import type { Paginated, SearchPaginationSortRequest } from '$lib/types/pagination.type';- import type { ImageSummaryDto, ImageUpdateInfoDto } from '$lib/types/image.type';- import type { VulnerabilityScanSummary } from '$lib/types/vulnerability.type';+ import type { Paginated, SearchPaginationSortRequest } from '$lib/types/shared';+ import type { ImageSummaryDto, ImageUpdateInfoDto } from '$lib/types/docker';+ import type { VulnerabilityScanSummary } from '$lib/types/environment';import { format } from 'date-fns';import type { ColumnSpec, MobileFieldVisibility, BulkAction } from '$lib/components/arcane-table';import { m } from '$lib/paraglide/messages';import { imageService } from '$lib/services/image-service';import { vulnerabilityService } from '$lib/services/vulnerability-service';- import { isLikelyStaleFailedSummary, isVulnerabilityScanInProgress } from '$lib/utils/vulnerability-scan.util';+ import { isLikelyStaleFailedSummary, isVulnerabilityScanInProgress } from '$lib/utils/docker';import { environmentStore } from '$lib/stores/environment.store.svelte';- import { hasPermission } from '$lib/utils/permissions.util';+ import { hasPermission } from '$lib/utils/auth';import {DownloadIcon,diff --git a/frontend/src/routes/(app)/images/vulnerabilities/+page.svelte b/frontend/src/routes/(app)/images/vulnerabilities/+page.svelteindex db6b381f4..2e7862e0b 100644--- a/frontend/src/routes/(app)/images/vulnerabilities/+page.svelte+++ b/frontend/src/routes/(app)/images/vulnerabilities/+page.svelte@@ -3,14 +3,10 @@import { m } from '$lib/paraglide/messages';import { vulnerabilityService } from '$lib/services/vulnerability-service';import { imageService } from '$lib/services/image-service';- import { parallelRefresh } from '$lib/utils/refresh.util';+ import { parallelRefresh } from '$lib/utils/api';import { useEnvironmentRefresh } from '$lib/hooks/use-environment-refresh.svelte';- import type {- EnvironmentVulnerabilitySummary,- VulnerabilityWithImage,- IgnoredVulnerability- } from '$lib/types/vulnerability.type';- import type { Paginated, SearchPaginationSortRequest } from '$lib/types/pagination.type';+ import type { EnvironmentVulnerabilitySummary, VulnerabilityWithImage, IgnoredVulnerability } from '$lib/types/environment';+ import type { Paginated, SearchPaginationSortRequest } from '$lib/types/shared';import { untrack } from 'svelte';import SecurityVulnerabilityTable from './security-vulnerability-table.svelte';import IgnoredVulnerabilitiesTable from './ignored-vulnerabilities-table.svelte';@@ -18,7 +14,7 @@import { InspectIcon } from '$lib/icons';import * as Tabs from '$lib/components/ui/tabs/index.js';import { environmentStore } from '$lib/stores/environment.store.svelte';- import { hasPermission } from '$lib/utils/permissions.util';+ import { hasPermission } from '$lib/utils/auth';let { data } = $props();diff --git a/frontend/src/routes/(app)/images/vulnerabilities/+page.ts b/frontend/src/routes/(app)/images/vulnerabilities/+page.tsindex d66de8aa8..8e20a0ae0 100644--- a/frontend/src/routes/(app)/images/vulnerabilities/+page.ts+++ b/frontend/src/routes/(app)/images/vulnerabilities/+page.ts@@ -1,11 +1,11 @@import { vulnerabilityService } from '$lib/services/vulnerability-service';import { environmentStore } from '$lib/stores/environment.store.svelte';import { queryKeys } from '$lib/query/query-keys';-import type { SearchPaginationSortRequest } from '$lib/types/pagination.type';-import { resolveInitialTableRequest } from '$lib/utils/table-persistence.util';-import type { Paginated } from '$lib/types/pagination.type';-import type { VulnerabilityWithImage } from '$lib/types/vulnerability.type';-import { throwPageLoadError } from '$lib/utils/page-load-error.util';+import type { SearchPaginationSortRequest } from '$lib/types/shared';+import { resolveInitialTableRequest } from '$lib/utils/tables';+import type { Paginated } from '$lib/types/shared';+import type { VulnerabilityWithImage } from '$lib/types/environment';+import { throwPageLoadError } from '$lib/utils/api';import type { PageLoad } from './$types';function mapVulnerabilityRequest(options: SearchPaginationSortRequest): SearchPaginationSortRequest {diff --git a/frontend/src/routes/(app)/images/vulnerabilities/ignored-vulnerabilities-table.svelte b/frontend/src/routes/(app)/images/vulnerabilities/ignored-vulnerabilities-table.svelteindex a58e79116..b7cbfd612 100644--- a/frontend/src/routes/(app)/images/vulnerabilities/ignored-vulnerabilities-table.svelte+++ b/frontend/src/routes/(app)/images/vulnerabilities/ignored-vulnerabilities-table.svelte@@ -1,7 +1,7 @@<script lang="ts">import { m } from '$lib/paraglide/messages';- import type { IgnoredVulnerability } from '$lib/types/vulnerability.type';- import type { Paginated, SearchPaginationSortRequest } from '$lib/types/pagination.type';+ import type { IgnoredVulnerability } from '$lib/types/environment';+ import type { Paginated, SearchPaginationSortRequest } from '$lib/types/shared';import { ShieldAlertIcon, CodeIcon, ImagesIcon, EyeOnIcon } from '$lib/icons';import { ArcaneButton } from '$lib/components/arcane-button';import IfPermitted from '$lib/components/if-permitted.svelte';diff --git a/frontend/src/routes/(app)/images/vulnerabilities/security-vulnerability-table.svelte b/frontend/src/routes/(app)/images/vulnerabilities/security-vulnerability-table.svelteindex 0bed6f730..9ec1615f3 100644--- a/frontend/src/routes/(app)/images/vulnerabilities/security-vulnerability-table.svelte+++ b/frontend/src/routes/(app)/images/vulnerabilities/security-vulnerability-table.svelte@@ -5,13 +5,13 @@import { vulnerabilityService } from '$lib/services/vulnerability-service';import { m } from '$lib/paraglide/messages';import type { ColumnSpec } from '$lib/components/arcane-table/arcane-table.types.svelte';- import type { Paginated, SearchPaginationSortRequest } from '$lib/types/pagination.type';- import type { VulnerabilityWithImage } from '$lib/types/vulnerability.type';+ import type { Paginated, SearchPaginationSortRequest } from '$lib/types/shared';+ import type { VulnerabilityWithImage } from '$lib/types/environment';import { ShieldAlertIcon, CodeIcon, CheckIcon, ImagesIcon, EyeOffIcon } from '$lib/icons';import { toast } from 'svelte-sonner';import { onMount } from 'svelte';import { environmentStore } from '$lib/stores/environment.store.svelte';- import { hasPermission } from '$lib/utils/permissions.util';+ import { hasPermission } from '$lib/utils/auth';const DEFAULT_PAGE_SIZE = 20;diff --git a/frontend/src/routes/(app)/networks/+page.svelte b/frontend/src/routes/(app)/networks/+page.svelteindex 9df864405..f4fa7b988 100644--- a/frontend/src/routes/(app)/networks/+page.svelte+++ b/frontend/src/routes/(app)/networks/+page.svelte@@ -3,7 +3,7 @@import { NetworksIcon, ConnectionIcon } from '$lib/icons';import { GitBranchIcon } from '$lib/icons';import { toast } from 'svelte-sonner';- import type { NetworkCreateOptions, NetworkUsageCounts } from '$lib/types/network.type';+ import type { NetworkCreateOptions, NetworkUsageCounts } from '$lib/types/docker';import CreateNetworkSheet from '$lib/components/sheets/create-network-sheet.svelte';import NetworkTable from './network-table.svelte';import { m } from '$lib/paraglide/messages';diff --git a/frontend/src/routes/(app)/networks/+page.ts b/frontend/src/routes/(app)/networks/+page.tsindex c907e760b..26922571e 100644--- a/frontend/src/routes/(app)/networks/+page.ts+++ b/frontend/src/routes/(app)/networks/+page.ts@@ -1,8 +1,8 @@import { networkService } from '$lib/services/network-service';import { queryKeys } from '$lib/query/query-keys';-import type { SearchPaginationSortRequest } from '$lib/types/pagination.type';-import { resolveInitialTableRequest } from '$lib/utils/table-persistence.util';-import { throwPageLoadError } from '$lib/utils/page-load-error.util';+import type { SearchPaginationSortRequest } from '$lib/types/shared';+import { resolveInitialTableRequest } from '$lib/utils/tables';+import { throwPageLoadError } from '$lib/utils/api';import type { PageLoad } from './$types';import { environmentStore } from '$lib/stores/environment.store.svelte';diff --git a/frontend/src/routes/(app)/networks/[networkId]/+page.svelte b/frontend/src/routes/(app)/networks/[networkId]/+page.svelteindex 8268444e4..ec9d92262 100644--- a/frontend/src/routes/(app)/networks/[networkId]/+page.svelte+++ b/frontend/src/routes/(app)/networks/[networkId]/+page.svelte@@ -22,8 +22,8 @@import { openConfirmDialog } from '$lib/components/confirm-dialog';import { ArcaneButton } from '$lib/components/arcane-button';import { goto } from '$app/navigation';- import { handleApiResultWithCallbacks } from '$lib/utils/api.util';- import { tryCatch } from '$lib/utils/try-catch';+ import { handleApiResultWithCallbacks } from '$lib/utils/api';+ import { tryCatch } from '$lib/utils/api';import { m } from '$lib/paraglide/messages';import { networkService } from '$lib/services/network-service';import { ResourceDetailLayout, type DetailAction } from '$lib/layouts';diff --git a/frontend/src/routes/(app)/networks/network-table.svelte b/frontend/src/routes/(app)/networks/network-table.svelteindex 23dbcdfad..77426dc74 100644--- a/frontend/src/routes/(app)/networks/network-table.svelte+++ b/frontend/src/routes/(app)/networks/network-table.svelte@@ -1,5 +1,5 @@<script lang="ts">- import type { NetworkSummaryDto, NetworkUsageCounts } from '$lib/types/network.type';+ import type { NetworkSummaryDto, NetworkUsageCounts } from '$lib/types/docker';import ArcaneTable from '$lib/components/arcane-table/arcane-table.svelte';import { ArcaneButton } from '$lib/components/arcane-button/index.js';import * as DropdownMenu from '$lib/components/ui/dropdown-menu/index.js';@@ -7,11 +7,11 @@import { toast } from 'svelte-sonner';import { openConfirmDialog } from '$lib/components/confirm-dialog';import StatusBadge from '$lib/components/badges/status-badge.svelte';- import { handleApiResultWithCallbacks } from '$lib/utils/api.util';- import { tryCatch } from '$lib/utils/try-catch';+ import { handleApiResultWithCallbacks } from '$lib/utils/api';+ import { tryCatch } from '$lib/utils/api';import { DEFAULT_NETWORK_NAMES } from '$lib/constants';- import type { SearchPaginationSortRequest, Paginated } from '$lib/types/pagination.type';- import { capitalizeFirstLetter } from '$lib/utils/string.utils';+ import type { SearchPaginationSortRequest, Paginated } from '$lib/types/shared';+ import { capitalizeFirstLetter } from '$lib/utils/formatting';import type { ColumnSpec, BulkAction } from '$lib/components/arcane-table';import { UniversalMobileCard } from '$lib/components/arcane-table';import { m } from '$lib/paraglide/messages';diff --git a/frontend/src/routes/(app)/networks/topology/+page.ts b/frontend/src/routes/(app)/networks/topology/+page.tsindex 6e9653562..c66ac7ce9 100644--- a/frontend/src/routes/(app)/networks/topology/+page.ts+++ b/frontend/src/routes/(app)/networks/topology/+page.ts@@ -1,6 +1,6 @@import { networkService } from '$lib/services/network-service';import { queryKeys } from '$lib/query/query-keys';-import { throwPageLoadError } from '$lib/utils/page-load-error.util';+import { throwPageLoadError } from '$lib/utils/api';import type { PageLoad } from './$types';import { environmentStore } from '$lib/stores/environment.store.svelte';diff --git a/frontend/src/routes/(app)/ports/+page.ts b/frontend/src/routes/(app)/ports/+page.tsindex dcf725683..20eb27f8b 100644--- a/frontend/src/routes/(app)/ports/+page.ts+++ b/frontend/src/routes/(app)/ports/+page.ts@@ -1,8 +1,8 @@import { portService } from '$lib/services/port-service';import { queryKeys } from '$lib/query/query-keys';-import type { SearchPaginationSortRequest } from '$lib/types/pagination.type';-import { resolveInitialTableRequest } from '$lib/utils/table-persistence.util';-import { throwPageLoadError } from '$lib/utils/page-load-error.util';+import type { SearchPaginationSortRequest } from '$lib/types/shared';+import { resolveInitialTableRequest } from '$lib/utils/tables';+import { throwPageLoadError } from '$lib/utils/api';import type { PageLoad } from './$types';import { environmentStore } from '$lib/stores/environment.store.svelte';diff --git a/frontend/src/routes/(app)/ports/port-table.svelte b/frontend/src/routes/(app)/ports/port-table.svelteindex dddb19980..2e24811ec 100644--- a/frontend/src/routes/(app)/ports/port-table.svelte+++ b/frontend/src/routes/(app)/ports/port-table.svelte@@ -7,8 +7,8 @@import { ContainersIcon, ConnectionIcon, GlobeIcon, HashIcon } from '$lib/icons';import { m } from '$lib/paraglide/messages';import { portService } from '$lib/services/port-service';- import type { SearchPaginationSortRequest, Paginated } from '$lib/types/pagination.type';- import type { PortMappingDto } from '$lib/types/port.type';+ import type { SearchPaginationSortRequest, Paginated } from '$lib/types/shared';+ import type { PortMappingDto } from '$lib/types/docker';let {ports,diff --git a/frontend/src/routes/(app)/projects/+page.svelte b/frontend/src/routes/(app)/projects/+page.svelteindex c1b5582a0..8c7468f24 100644--- a/frontend/src/routes/(app)/projects/+page.svelte+++ b/frontend/src/routes/(app)/projects/+page.svelte@@ -8,10 +8,10 @@import { projectService } from '$lib/services/project-service';import { imageService } from '$lib/services/image-service';import { environmentStore } from '$lib/stores/environment.store.svelte';- import { hasPermission } from '$lib/utils/permissions.util';+ import { hasPermission } from '$lib/utils/auth';import { queryKeys } from '$lib/query/query-keys';- import type { SearchPaginationSortRequest } from '$lib/types/pagination.type';- import type { ProjectStatusCounts } from '$lib/types/project.type';+ import type { SearchPaginationSortRequest } from '$lib/types/shared';+ import type { ProjectStatusCounts } from '$lib/types/swarm';import { untrack } from 'svelte';import { createMutation, createQuery } from '@tanstack/svelte-query';import { ResourcePageLayout, type ActionButton, type StatCardConfig } from '$lib/layouts/index.js';diff --git a/frontend/src/routes/(app)/projects/+page.ts b/frontend/src/routes/(app)/projects/+page.tsindex 95639ec5f..c6369bff1 100644--- a/frontend/src/routes/(app)/projects/+page.ts+++ b/frontend/src/routes/(app)/projects/+page.ts@@ -1,8 +1,8 @@import { projectService } from '$lib/services/project-service';import { queryKeys } from '$lib/query/query-keys';-import type { SearchPaginationSortRequest } from '$lib/types/pagination.type';-import { resolveInitialTableRequest } from '$lib/utils/table-persistence.util';-import { throwPageLoadError } from '$lib/utils/page-load-error.util';+import type { SearchPaginationSortRequest } from '$lib/types/shared';+import { resolveInitialTableRequest } from '$lib/utils/tables';+import { throwPageLoadError } from '$lib/utils/api';import type { PageLoad } from './$types';import { environmentStore } from '$lib/stores/environment.store.svelte';diff --git a/frontend/src/routes/(app)/projects/[projectId]/+page.svelte b/frontend/src/routes/(app)/projects/[projectId]/+page.svelteindex 5f1a4ea95..ddab9d9ff 100644--- a/frontend/src/routes/(app)/projects/[projectId]/+page.svelte+++ b/frontend/src/routes/(app)/projects/[projectId]/+page.svelte@@ -1,5 +1,5 @@<script lang="ts">- import type { IncludeFile, Project } from '$lib/types/project.type';+ import type { IncludeFile, Project } from '$lib/types/swarm';import * as Tabs from '$lib/components/ui/tabs/index.js';import * as TreeView from '$lib/components/ui/tree-view/index.js';import * as Card from '$lib/components/ui/card';@@ -10,18 +10,18 @@import TabbedPageLayout from '$lib/layouts/tabbed-page-layout.svelte';import ActionButtons from '$lib/components/action-buttons.svelte';import StatusBadge from '$lib/components/badges/status-badge.svelte';- import { getStatusVariant } from '$lib/utils/status.utils';- import { capitalizeFirstLetter } from '$lib/utils/string.utils';+ import { getStatusVariant } from '$lib/utils/docker';+ import { capitalizeFirstLetter } from '$lib/utils/formatting';import { page } from '$app/state';import { invalidateAll } from '$app/navigation';import { toast } from 'svelte-sonner';- import { tryCatch } from '$lib/utils/try-catch';- import { handleApiResultWithCallbacks } from '$lib/utils/api.util';+ import { tryCatch } from '$lib/utils/api';+ import { handleApiResultWithCallbacks } from '$lib/utils/api';import { z } from 'zod/v4';- import { createForm } from '$lib/utils/form.utils';+ import { createForm } from '$lib/utils/settings';import { m } from '$lib/paraglide/messages';- import { toGitCommitUrl } from '$lib/utils/git';- import { toSafeHref } from '$lib/utils/url';+ import { toGitCommitUrl } from '$lib/utils/navigation';+ import { toSafeHref } from '$lib/utils/navigation';import { PersistedState } from 'runed';import EditableName from '../components/EditableName.svelte';import ProjectContainersTable from '../components/ProjectContainersTable.svelte';@@ -34,7 +34,7 @@import { imageService } from '$lib/services/image-service';import { gitOpsSyncService } from '$lib/services/gitops-sync-service';import { environmentStore } from '$lib/stores/environment.store.svelte';- import { hasPermission } from '$lib/utils/permissions.util';+ import { hasPermission } from '$lib/utils/auth';import { queryKeys } from '$lib/query/query-keys';import { RefreshIcon } from '$lib/icons';import IconImage from '$lib/components/icon-image.svelte';diff --git a/frontend/src/routes/(app)/projects/[projectId]/+page.ts b/frontend/src/routes/(app)/projects/[projectId]/+page.tsindex 105c5d800..ac91d208f 100644--- a/frontend/src/routes/(app)/projects/[projectId]/+page.ts+++ b/frontend/src/routes/(app)/projects/[projectId]/+page.ts@@ -2,7 +2,7 @@ import { projectService } from '$lib/services/project-service';import { templateService } from '$lib/services/template-service';import { environmentStore } from '$lib/stores/environment.store.svelte';import { queryKeys } from '$lib/query/query-keys';-import { throwPageLoadError } from '$lib/utils/page-load-error.util';+import { throwPageLoadError } from '$lib/utils/api';import type { QueryClient } from '@tanstack/svelte-query';import type { PageLoad } from './$types';diff --git a/frontend/src/routes/(app)/projects/components/ProjectContainersTable.svelte b/frontend/src/routes/(app)/projects/components/ProjectContainersTable.svelteindex 6cf355e39..45dcd4321 100644--- a/frontend/src/routes/(app)/projects/components/ProjectContainersTable.svelte+++ b/frontend/src/routes/(app)/projects/components/ProjectContainersTable.svelte@@ -7,22 +7,22 @@import StatusBadge from '$lib/components/badges/status-badge.svelte';import { PortBadge } from '$lib/components/badges/index.js';import { UniversalMobileCard } from '$lib/components/arcane-table/index.js';- import { getStatusVariant } from '$lib/utils/status.utils';- import { capitalizeFirstLetter } from '$lib/utils/string.utils';- import type { RuntimeService } from '$lib/types/project.type';+ import { getStatusVariant } from '$lib/utils/docker';+ import { capitalizeFirstLetter } from '$lib/utils/formatting';+ import type { RuntimeService } from '$lib/types/swarm';import type { ColumnSpec, BulkAction } from '$lib/components/arcane-table';import { m } from '$lib/paraglide/messages';import { goto } from '$app/navigation';import { toast } from 'svelte-sonner';import { openConfirmDialog } from '$lib/components/confirm-dialog';- import { handleApiResultWithCallbacks } from '$lib/utils/api.util';- import { tryCatch } from '$lib/utils/try-catch';+ import { handleApiResultWithCallbacks } from '$lib/utils/api';+ import { tryCatch } from '$lib/utils/api';import { containerService } from '$lib/services/container-service';import { environmentStore } from '$lib/stores/environment.store.svelte';- import { hasPermission } from '$lib/utils/permissions.util';+ import { hasPermission } from '$lib/utils/auth';import * as ArcaneTooltip from '$lib/components/arcane-tooltip';import IconImage from '$lib/components/icon-image.svelte';- import { getArcaneIconUrlFromLabels } from '$lib/utils/arcane-labels';+ import { getArcaneIconUrlFromLabels } from '$lib/utils/docker';import {StartIcon,StopIcon,diff --git a/frontend/src/routes/(app)/projects/new/+page.svelte b/frontend/src/routes/(app)/projects/new/+page.svelteindex 5af9ca154..6839557d3 100644--- a/frontend/src/routes/(app)/projects/new/+page.svelte+++ b/frontend/src/routes/(app)/projects/new/+page.svelte@@ -5,14 +5,14 @@import { Label } from '$lib/components/ui/label/index.js';import { goto, invalidateAll } from '$app/navigation';import { toast } from 'svelte-sonner';- import { preventDefault, createForm } from '$lib/utils/form.utils';- import { tryCatch } from '$lib/utils/try-catch';- import { handleApiResultWithCallbacks } from '$lib/utils/api.util';+ import { preventDefault, createForm } from '$lib/utils/settings';+ import { tryCatch } from '$lib/utils/api';+ import { handleApiResultWithCallbacks } from '$lib/utils/api';import { Textarea } from '$lib/components/ui/textarea/index.js';import * as Dialog from '$lib/components/ui/dialog/index.js';import * as ArcaneTooltip from '$lib/components/arcane-tooltip';import TemplateSelectionDialog from '$lib/components/dialogs/template-selection-dialog.svelte';- import type { Template } from '$lib/types/template.type';+ import type { Template } from '$lib/types/swarm';import { z } from 'zod/v4';import { arcaneButtonVariants, actionConfigs } from '$lib/components/arcane-button/variants';import { m } from '$lib/paraglide/messages';@@ -25,7 +25,7 @@import CodePanel from '../components/CodePanel.svelte';import EditableName from '../components/EditableName.svelte';import { environmentStore } from '$lib/stores/environment.store.svelte';- import { hasPermission } from '$lib/utils/permissions.util';+ import { hasPermission } from '$lib/utils/auth';import IfPermitted from '$lib/components/if-permitted.svelte';import { ComposeEditorSplit } from '$lib/components/compose';diff --git a/frontend/src/routes/(app)/projects/projects-table.actions.ts b/frontend/src/routes/(app)/projects/projects-table.actions.tsindex c5d9649b8..0b3c631b4 100644--- a/frontend/src/routes/(app)/projects/projects-table.actions.ts+++ b/frontend/src/routes/(app)/projects/projects-table.actions.ts@@ -3,9 +3,9 @@ import { m } from '$lib/paraglide/messages';import { deployOptionsStore } from '$lib/stores/deploy-options.store.svelte';import { gitOpsSyncService } from '$lib/services/gitops-sync-service';import { projectService } from '$lib/services/project-service';-import type { SearchPaginationSortRequest } from '$lib/types/pagination.type';-import { handleApiResultWithCallbacks } from '$lib/utils/api.util';-import { tryCatch } from '$lib/utils/try-catch';+import type { SearchPaginationSortRequest } from '$lib/types/shared';+import { handleApiResultWithCallbacks } from '$lib/utils/api';+import { tryCatch } from '$lib/utils/api';import { toast } from 'svelte-sonner';import type { ActionStatus } from './projects-table.helpers';diff --git a/frontend/src/routes/(app)/projects/projects-table.svelte b/frontend/src/routes/(app)/projects/projects-table.svelteindex 1fa718f30..a4853f3d9 100644--- a/frontend/src/routes/(app)/projects/projects-table.svelte+++ b/frontend/src/routes/(app)/projects/projects-table.svelte@@ -1,5 +1,5 @@<script lang="ts">- import type { Project } from '$lib/types/project.type';+ import type { Project } from '$lib/types/swarm';import ArcaneTable from '$lib/components/arcane-table/arcane-table.svelte';import { ArcaneButton } from '$lib/components/arcane-button/index.js';import * as DropdownMenu from '$lib/components/ui/dropdown-menu/index.js';@@ -8,9 +8,9 @@import { goto } from '$app/navigation';import { toast } from 'svelte-sonner';import StatusBadge from '$lib/components/badges/status-badge.svelte';- import type { Paginated, SearchPaginationSortRequest } from '$lib/types/pagination.type';- import { getStatusVariant } from '$lib/utils/status.utils';- import { capitalizeFirstLetter } from '$lib/utils/string.utils';+ import type { Paginated, SearchPaginationSortRequest } from '$lib/types/shared';+ import { getStatusVariant } from '$lib/utils/docker';+ import { capitalizeFirstLetter } from '$lib/utils/formatting';import { format } from 'date-fns';import type { ColumnSpec, MobileFieldVisibility, BulkAction } from '$lib/components/arcane-table';import { UniversalMobileCard } from '$lib/components/arcane-table';@@ -19,7 +19,7 @@import { projectService } from '$lib/services/project-service';import { FolderOpenIcon, LayersIcon, CalendarIcon, ProjectsIcon, GitBranchIcon, RefreshIcon } from '$lib/icons';import { environmentStore } from '$lib/stores/environment.store.svelte';- import { hasPermission } from '$lib/utils/permissions.util';+ import { hasPermission } from '$lib/utils/auth';import IfPermitted from '$lib/components/if-permitted.svelte';import IconImage from '$lib/components/icon-image.svelte';import type { ActionStatus } from './projects-table.helpers';@@ -32,7 +32,7 @@getProjectUpdateText,getProjectUpdateTooltip,getProjectUpdateVariant- } from '$lib/utils/project-update.util';+ } from '$lib/utils/docker';let {projects = $bindable(),diff --git a/frontend/src/routes/(app)/settings/+page.svelte b/frontend/src/routes/(app)/settings/+page.svelteindex 1cc6baad9..112f800b8 100644--- a/frontend/src/routes/(app)/settings/+page.svelte+++ b/frontend/src/routes/(app)/settings/+page.svelte@@ -22,8 +22,8 @@import { m } from '$lib/paraglide/messages';import { UiConfigDisabledTag } from '$lib/components/badges/index.js';import { settingsSearchService } from '$lib/services/settings-search';- import type { SettingsCategory } from '$lib/types/settings-search.type';- import { debounced } from '$lib/utils/utils';+ import type { SettingsCategory } from '$lib/types/shared';+ import { debounced } from '$lib/utils/ws';import * as InputGroup from '$lib/components/ui/input-group/index.js';import { getSettingsSubpageUrlsInNavOrder } from '$lib/config/navigation-config';import HeaderCard from '$lib/components/header-card.svelte';diff --git a/frontend/src/routes/(app)/settings/api-keys/+page.svelte b/frontend/src/routes/(app)/settings/api-keys/+page.svelteindex 72bdc5073..571b8d7a2 100644--- a/frontend/src/routes/(app)/settings/api-keys/+page.svelte+++ b/frontend/src/routes/(app)/settings/api-keys/+page.svelte@@ -1,11 +1,11 @@<script lang="ts">import { toast } from 'svelte-sonner';- import { handleApiResultWithCallbacks } from '$lib/utils/api.util';- import { tryCatch } from '$lib/utils/try-catch';+ import { handleApiResultWithCallbacks } from '$lib/utils/api';+ import { tryCatch } from '$lib/utils/api';import ApiKeyTable from './api-key-table.svelte';import ApiKeyFormSheet from '$lib/components/sheets/api-key-form-sheet.svelte';- import type { SearchPaginationSortRequest } from '$lib/types/pagination.type';- import type { ApiKey, ApiKeyCreated, CreateApiKey } from '$lib/types/api-key.type';+ import type { SearchPaginationSortRequest } from '$lib/types/shared';+ import type { ApiKey, ApiKeyCreated, CreateApiKey } from '$lib/types/auth';import { apiKeyService } from '$lib/services/api-key-service';import { SettingsPageLayout, type SettingsActionButton } from '$lib/layouts/index.js';import * as ResponsiveDialog from '$lib/components/ui/responsive-dialog/index.js';diff --git a/frontend/src/routes/(app)/settings/api-keys/+page.ts b/frontend/src/routes/(app)/settings/api-keys/+page.tsindex 85ee03601..a44cf7d8d 100644--- a/frontend/src/routes/(app)/settings/api-keys/+page.ts+++ b/frontend/src/routes/(app)/settings/api-keys/+page.ts@@ -1,8 +1,8 @@import { apiKeyService } from '$lib/services/api-key-service';import { roleService } from '$lib/services/role-service';import { queryKeys } from '$lib/query/query-keys';-import type { SearchPaginationSortRequest } from '$lib/types/pagination.type';-import { resolveInitialTableRequest } from '$lib/utils/table-persistence.util';+import type { SearchPaginationSortRequest } from '$lib/types/shared';+import { resolveInitialTableRequest } from '$lib/utils/tables';import type { PageLoad } from './$types';export const load: PageLoad = async ({ parent }) => {diff --git a/frontend/src/routes/(app)/settings/api-keys/api-key-table.svelte b/frontend/src/routes/(app)/settings/api-keys/api-key-table.svelteindex 272ba983c..62a9694c5 100644--- a/frontend/src/routes/(app)/settings/api-keys/api-key-table.svelte+++ b/frontend/src/routes/(app)/settings/api-keys/api-key-table.svelte@@ -6,10 +6,10 @@import { toast } from 'svelte-sonner';import { openConfirmDialog } from '$lib/components/confirm-dialog';import StatusBadge from '$lib/components/badges/status-badge.svelte';- import { handleApiResultWithCallbacks } from '$lib/utils/api.util';- import { tryCatch } from '$lib/utils/try-catch';- import type { Paginated, SearchPaginationSortRequest } from '$lib/types/pagination.type';- import type { ApiKey } from '$lib/types/api-key.type';+ import { handleApiResultWithCallbacks } from '$lib/utils/api';+ import { tryCatch } from '$lib/utils/api';+ import type { Paginated, SearchPaginationSortRequest } from '$lib/types/shared';+ import type { ApiKey } from '$lib/types/auth';import type { ColumnSpec, MobileFieldVisibility, BulkAction } from '$lib/components/arcane-table';import { UniversalMobileCard } from '$lib/components/arcane-table';import { apiKeyService } from '$lib/services/api-key-service';diff --git a/frontend/src/routes/(app)/settings/appearance/+page.svelte b/frontend/src/routes/(app)/settings/appearance/+page.svelteindex 2bc40620f..b00c65e8f 100644--- a/frontend/src/routes/(app)/settings/appearance/+page.svelte+++ b/frontend/src/routes/(app)/settings/appearance/+page.svelte@@ -4,18 +4,18 @@import { mode, toggleMode } from 'mode-watcher';import settingsStore from '$lib/stores/config-store';import { m } from '$lib/paraglide/messages';- import { navigationSettingsOverridesStore, resetNavigationVisibility } from '$lib/utils/navigation.utils';+ import { navigationSettingsOverridesStore, resetNavigationVisibility } from '$lib/utils/navigation';import { SettingsPageLayout } from '$lib/layouts';import { Switch } from '$lib/components/ui/switch/index.js';import { useSidebar } from '$lib/components/ui/sidebar/context.svelte.js';- import { createSettingsForm } from '$lib/utils/settings-form.util';+ import { createSettingsForm } from '$lib/utils/settings';import SettingsRow from '$lib/components/settings/settings-row.svelte';import LocalePicker from '$lib/components/locale-picker.svelte';import AccentColorPicker from '$lib/components/accent-color/accent-color-picker.svelte';import ApplicationThemePicker from '$lib/components/application-theme/application-theme-picker.svelte';- import { applyAccentColor } from '$lib/utils/accent-color-util';- import { APPLICATION_THEME_VALUES, applyApplicationTheme } from '$lib/utils/application-theme-util';- import { applyOledMode } from '$lib/utils/oled-mode-util';+ import { applyAccentColor } from '$lib/utils/theme';+ import { APPLICATION_THEME_VALUES, applyApplicationTheme } from '$lib/utils/theme';+ import { applyOledMode } from '$lib/utils/theme';import { AppearanceIcon, MonitorSpeakerIcon, DockIcon, MoonIcon, SunIcon } from '$lib/icons';import { ArcaneButton } from '$lib/components/arcane-button/index.js';import { cn } from '$lib/utils';diff --git a/frontend/src/routes/(app)/settings/authentication/+page.svelte b/frontend/src/routes/(app)/settings/authentication/+page.svelteindex 9007c1528..9ce97ebfe 100644--- a/frontend/src/routes/(app)/settings/authentication/+page.svelte+++ b/frontend/src/routes/(app)/settings/authentication/+page.svelte@@ -6,24 +6,24 @@import { Switch } from '$lib/components/ui/switch/index.js';import TextInputWithLabel from '$lib/components/form/text-input-with-label.svelte';import { toast } from 'svelte-sonner';- import type { Settings } from '$lib/types/settings.type';+ import type { Settings } from '$lib/types/settings';import * as ArcaneTooltip from '$lib/components/arcane-tooltip';import { m } from '$lib/paraglide/messages';import { LockIcon, InfoIcon, ArrowDownIcon } from '$lib/icons';import settingsStore from '$lib/stores/config-store';import { SettingsPageLayout } from '$lib/layouts';import { CopyButton } from '$lib/components/ui/copy-button';- import { createSettingsForm } from '$lib/utils/settings-form.util';+ import { createSettingsForm } from '$lib/utils/settings';import * as Alert from '$lib/components/ui/alert';import * as Collapsible from '$lib/components/ui/collapsible';import SettingsRow from '$lib/components/settings/settings-row.svelte';import { cn } from '$lib/utils';import OidcMappingTable from './oidc-mapping-table.svelte';import OidcMappingFormSheet from '$lib/components/sheets/oidc-mapping-form-sheet.svelte';- import type { OidcRoleMapping, CreateOidcRoleMapping, UpdateOidcRoleMapping } from '$lib/types/role.type';+ import type { OidcRoleMapping, CreateOidcRoleMapping, UpdateOidcRoleMapping } from '$lib/types/auth';import { oidcMappingService } from '$lib/services/oidc-mapping-service';- import { handleApiResultWithCallbacks } from '$lib/utils/api.util';- import { tryCatch } from '$lib/utils/try-catch';+ import { handleApiResultWithCallbacks } from '$lib/utils/api';+ import { tryCatch } from '$lib/utils/api';import { untrack } from 'svelte';import IfPermitted from '$lib/components/if-permitted.svelte';diff --git a/frontend/src/routes/(app)/settings/authentication/oidc-mapping-table.svelte b/frontend/src/routes/(app)/settings/authentication/oidc-mapping-table.svelteindex a8595c5cf..cfb592702 100644--- a/frontend/src/routes/(app)/settings/authentication/oidc-mapping-table.svelte+++ b/frontend/src/routes/(app)/settings/authentication/oidc-mapping-table.svelte@@ -5,12 +5,12 @@import * as DropdownMenu from '$lib/components/ui/dropdown-menu/index.js';import { openConfirmDialog } from '$lib/components/confirm-dialog';import StatusBadge from '$lib/components/badges/status-badge.svelte';- import { handleApiResultWithCallbacks } from '$lib/utils/api.util';- import { tryCatch } from '$lib/utils/try-catch';- import type { Paginated, SearchPaginationSortRequest } from '$lib/types/pagination.type';- import type { OidcRoleMapping, Role } from '$lib/types/role.type';- import type { Environment } from '$lib/types/environment.type';- import { BUILT_IN_ROLE_ADMIN, BUILT_IN_ROLE_EDITOR, BUILT_IN_ROLE_DEPLOYER, BUILT_IN_ROLE_VIEWER } from '$lib/types/role.type';+ import { handleApiResultWithCallbacks } from '$lib/utils/api';+ import { tryCatch } from '$lib/utils/api';+ import type { Paginated, SearchPaginationSortRequest } from '$lib/types/shared';+ import type { OidcRoleMapping, Role } from '$lib/types/auth';+ import type { Environment } from '$lib/types/environment';+ import { BUILT_IN_ROLE_ADMIN, BUILT_IN_ROLE_EDITOR, BUILT_IN_ROLE_DEPLOYER, BUILT_IN_ROLE_VIEWER } from '$lib/types/auth';import type { ColumnSpec, MobileFieldVisibility } from '$lib/components/arcane-table';import { UniversalMobileCard } from '$lib/components/arcane-table';import { m } from '$lib/paraglide/messages';diff --git a/frontend/src/routes/(app)/settings/builds/+page.svelte b/frontend/src/routes/(app)/settings/builds/+page.svelteindex 18c2e0e1b..dcfaa6c7f 100644--- a/frontend/src/routes/(app)/settings/builds/+page.svelte+++ b/frontend/src/routes/(app)/settings/builds/+page.svelte@@ -7,7 +7,7 @@import TextInputWithLabel from '$lib/components/form/text-input-with-label.svelte';import SelectWithLabel from '$lib/components/form/select-with-label.svelte';import { m } from '$lib/paraglide/messages';- import { createSettingsForm } from '$lib/utils/settings-form.util';+ import { createSettingsForm } from '$lib/utils/settings';import { settingsService } from '$lib/services/settings-service';let { data } = $props();diff --git a/frontend/src/routes/(app)/settings/notifications/+page.svelte b/frontend/src/routes/(app)/settings/notifications/+page.svelteindex da8607888..6e56e01bf 100644--- a/frontend/src/routes/(app)/settings/notifications/+page.svelte+++ b/frontend/src/routes/(app)/settings/notifications/+page.svelte@@ -8,7 +8,7 @@import settingsStore from '$lib/stores/config-store';import { m } from '$lib/paraglide/messages';import { notificationService } from '$lib/services/notification-service';- import type { NotificationSettings } from '$lib/types/notification.type';+ import type { NotificationSettings } from '$lib/types/notifications';import {type DiscordFormValues,type EmailFormValues,@@ -42,7 +42,7 @@gotifyFormValuesToSettings,matrixFormValuesToSettings,genericFormValuesToSettings- } from '$lib/types/notification-providers';+ } from '$lib/types/notifications';import { NotificationsIcon } from '$lib/icons';import { BuiltInProviderForm } from './providers';diff --git a/frontend/src/routes/(app)/settings/notifications/providers/BuiltInProviderForm.svelte b/frontend/src/routes/(app)/settings/notifications/providers/BuiltInProviderForm.svelteindex da125e164..4a7c9ea20 100644--- a/frontend/src/routes/(app)/settings/notifications/providers/BuiltInProviderForm.svelte+++ b/frontend/src/routes/(app)/settings/notifications/providers/BuiltInProviderForm.svelte@@ -1,7 +1,7 @@<script lang="ts">import { m } from '$lib/paraglide/messages';import { z } from 'zod/v4';- import type { NotificationProviderKey, ProviderFormValuesMap } from '$lib/types/notification-providers';+ import type { NotificationProviderKey, ProviderFormValuesMap } from '$lib/types/notifications';import ProviderFormWrapper from './ProviderFormWrapper.svelte';import EventSubscriptions from './EventSubscriptions.svelte';import DynamicProviderFormBuilder from './DynamicProviderFormBuilder.svelte';diff --git a/frontend/src/routes/(app)/settings/roles/+page.svelte b/frontend/src/routes/(app)/settings/roles/+page.svelteindex 4e8f83882..ac49cbf99 100644--- a/frontend/src/routes/(app)/settings/roles/+page.svelte+++ b/frontend/src/routes/(app)/settings/roles/+page.svelte@@ -3,7 +3,7 @@import { goto } from '$app/navigation';import { untrack } from 'svelte';import RolesTable from './roles-table.svelte';- import type { SearchPaginationSortRequest } from '$lib/types/pagination.type';+ import type { SearchPaginationSortRequest } from '$lib/types/shared';import { m } from '$lib/paraglide/messages';import { roleService } from '$lib/services/role-service';import { SettingsPageLayout, type SettingsActionButton } from '$lib/layouts/index.js';diff --git a/frontend/src/routes/(app)/settings/roles/+page.ts b/frontend/src/routes/(app)/settings/roles/+page.tsindex 5cdecb749..a5f07977d 100644--- a/frontend/src/routes/(app)/settings/roles/+page.ts+++ b/frontend/src/routes/(app)/settings/roles/+page.ts@@ -1,6 +1,6 @@import { roleService } from '$lib/services/role-service';-import type { SearchPaginationSortRequest } from '$lib/types/pagination.type';-import { resolveInitialTableRequest } from '$lib/utils/table-persistence.util';+import type { SearchPaginationSortRequest } from '$lib/types/shared';+import { resolveInitialTableRequest } from '$lib/utils/tables';import type { PageLoad } from './$types';export const load: PageLoad = async ({ parent }) => {diff --git a/frontend/src/routes/(app)/settings/roles/[id]/+page.svelte b/frontend/src/routes/(app)/settings/roles/[id]/+page.svelteindex 2ef12e35b..7aa43ac78 100644--- a/frontend/src/routes/(app)/settings/roles/[id]/+page.svelte+++ b/frontend/src/routes/(app)/settings/roles/[id]/+page.svelte@@ -1,10 +1,10 @@<script lang="ts">import { toast } from 'svelte-sonner';import { goto } from '$app/navigation';- import { handleApiResultWithCallbacks } from '$lib/utils/api.util';- import { tryCatch } from '$lib/utils/try-catch';+ import { handleApiResultWithCallbacks } from '$lib/utils/api';+ import { tryCatch } from '$lib/utils/api';import RoleEditor from '$lib/components/role-editor/role-editor.svelte';- import type { UpdateRole, CreateRole } from '$lib/types/role.type';+ import type { UpdateRole, CreateRole } from '$lib/types/auth';import { m } from '$lib/paraglide/messages';import { roleService } from '$lib/services/role-service';import { SettingsPageLayout } from '$lib/layouts/index.js';diff --git a/frontend/src/routes/(app)/settings/roles/[id]/+page.ts b/frontend/src/routes/(app)/settings/roles/[id]/+page.tsindex b65a97d20..9afba1ea6 100644--- a/frontend/src/routes/(app)/settings/roles/[id]/+page.ts+++ b/frontend/src/routes/(app)/settings/roles/[id]/+page.ts@@ -1,6 +1,6 @@import { error, redirect } from '@sveltejs/kit';import { roleService } from '$lib/services/role-service';-import { userIsGlobalAdmin } from '$lib/utils/redirect.util';+import { userIsGlobalAdmin } from '$lib/utils/auth';import type { PageLoad } from './$types';export const load: PageLoad = async ({ parent, params }) => {diff --git a/frontend/src/routes/(app)/settings/roles/new/+page.svelte b/frontend/src/routes/(app)/settings/roles/new/+page.svelteindex 604bd5ba1..4606e491f 100644--- a/frontend/src/routes/(app)/settings/roles/new/+page.svelte+++ b/frontend/src/routes/(app)/settings/roles/new/+page.svelte@@ -1,10 +1,10 @@<script lang="ts">import { toast } from 'svelte-sonner';import { goto } from '$app/navigation';- import { handleApiResultWithCallbacks } from '$lib/utils/api.util';- import { tryCatch } from '$lib/utils/try-catch';+ import { handleApiResultWithCallbacks } from '$lib/utils/api';+ import { tryCatch } from '$lib/utils/api';import RoleEditor from '$lib/components/role-editor/role-editor.svelte';- import type { CreateRole } from '$lib/types/role.type';+ import type { CreateRole } from '$lib/types/auth';import { m } from '$lib/paraglide/messages';import { roleService } from '$lib/services/role-service';import { SettingsPageLayout } from '$lib/layouts/index.js';diff --git a/frontend/src/routes/(app)/settings/roles/new/+page.ts b/frontend/src/routes/(app)/settings/roles/new/+page.tsindex c9d89ac7f..f923f8452 100644--- a/frontend/src/routes/(app)/settings/roles/new/+page.ts+++ b/frontend/src/routes/(app)/settings/roles/new/+page.ts@@ -1,6 +1,6 @@import { redirect } from '@sveltejs/kit';import { roleService } from '$lib/services/role-service';-import { userIsGlobalAdmin } from '$lib/utils/redirect.util';+import { userIsGlobalAdmin } from '$lib/utils/auth';import type { PageLoad } from './$types';export const load: PageLoad = async ({ parent }) => {diff --git a/frontend/src/routes/(app)/settings/roles/roles-table.svelte b/frontend/src/routes/(app)/settings/roles/roles-table.svelteindex 84b472d17..91e50151d 100644--- a/frontend/src/routes/(app)/settings/roles/roles-table.svelte+++ b/frontend/src/routes/(app)/settings/roles/roles-table.svelte@@ -6,12 +6,12 @@import * as ArcaneTooltip from '$lib/components/arcane-tooltip';import { openConfirmDialog } from '$lib/components/confirm-dialog';import StatusBadge from '$lib/components/badges/status-badge.svelte';- import { handleApiResultWithCallbacks } from '$lib/utils/api.util';- import { tryCatch } from '$lib/utils/try-catch';+ import { handleApiResultWithCallbacks } from '$lib/utils/api';+ import { tryCatch } from '$lib/utils/api';import { goto } from '$app/navigation';- import type { Paginated, SearchPaginationSortRequest } from '$lib/types/pagination.type';- import type { Role } from '$lib/types/role.type';- import { BUILT_IN_ROLE_ADMIN, BUILT_IN_ROLE_EDITOR, BUILT_IN_ROLE_DEPLOYER, BUILT_IN_ROLE_VIEWER } from '$lib/types/role.type';+ import type { Paginated, SearchPaginationSortRequest } from '$lib/types/shared';+ import type { Role } from '$lib/types/auth';+ import { BUILT_IN_ROLE_ADMIN, BUILT_IN_ROLE_EDITOR, BUILT_IN_ROLE_DEPLOYER, BUILT_IN_ROLE_VIEWER } from '$lib/types/auth';import type { ColumnSpec, MobileFieldVisibility, BulkAction } from '$lib/components/arcane-table';import { UniversalMobileCard } from '$lib/components/arcane-table';import { m } from '$lib/paraglide/messages';diff --git a/frontend/src/routes/(app)/settings/timeouts/+page.svelte b/frontend/src/routes/(app)/settings/timeouts/+page.svelteindex 900955f97..9c8560f6a 100644--- a/frontend/src/routes/(app)/settings/timeouts/+page.svelte+++ b/frontend/src/routes/(app)/settings/timeouts/+page.svelte@@ -6,7 +6,7 @@import { SettingsPageLayout } from '$lib/layouts';import { ClockIcon } from '$lib/icons';import TextInputWithLabel from '$lib/components/form/text-input-with-label.svelte';- import { createSettingsForm } from '$lib/utils/settings-form.util';+ import { createSettingsForm } from '$lib/utils/settings';let { data } = $props();diff --git a/frontend/src/routes/(app)/settings/users/+page.svelte b/frontend/src/routes/(app)/settings/users/+page.svelteindex 79a899b37..5153a2d97 100644--- a/frontend/src/routes/(app)/settings/users/+page.svelte+++ b/frontend/src/routes/(app)/settings/users/+page.svelte@@ -1,13 +1,13 @@<script lang="ts">import { UsersIcon } from '$lib/icons';import { toast } from 'svelte-sonner';- import { handleApiResultWithCallbacks } from '$lib/utils/api.util';- import { tryCatch } from '$lib/utils/try-catch';+ import { handleApiResultWithCallbacks } from '$lib/utils/api';+ import { tryCatch } from '$lib/utils/api';import UserTable from './user-table.svelte';import UserFormSheet from '$lib/components/sheets/user-form-sheet.svelte';- import type { SearchPaginationSortRequest } from '$lib/types/pagination.type';- import type { User } from '$lib/types/user.type';- import type { CreateUser } from '$lib/types/user.type';+ import type { SearchPaginationSortRequest } from '$lib/types/shared';+ import type { User } from '$lib/types/auth';+ import type { CreateUser } from '$lib/types/auth';import { m } from '$lib/paraglide/messages';import { userService } from '$lib/services/user-service';import { roleService } from '$lib/services/role-service';diff --git a/frontend/src/routes/(app)/settings/users/+page.ts b/frontend/src/routes/(app)/settings/users/+page.tsindex 9a3ff9674..1d7df3d14 100644--- a/frontend/src/routes/(app)/settings/users/+page.ts+++ b/frontend/src/routes/(app)/settings/users/+page.ts@@ -2,8 +2,8 @@ import { userService } from '$lib/services/user-service';import { roleService } from '$lib/services/role-service';import { environmentManagementService } from '$lib/services/env-mgmt-service';import { queryKeys } from '$lib/query/query-keys';-import type { SearchPaginationSortRequest } from '$lib/types/pagination.type';-import { resolveInitialTableRequest } from '$lib/utils/table-persistence.util';+import type { SearchPaginationSortRequest } from '$lib/types/shared';+import { resolveInitialTableRequest } from '$lib/utils/tables';import type { PageLoad } from './$types';export const load: PageLoad = async ({ parent }) => {diff --git a/frontend/src/routes/(app)/settings/users/user-table.svelte b/frontend/src/routes/(app)/settings/users/user-table.svelteindex 53b4b164e..311c500e8 100644--- a/frontend/src/routes/(app)/settings/users/user-table.svelte+++ b/frontend/src/routes/(app)/settings/users/user-table.svelte@@ -5,12 +5,12 @@import * as DropdownMenu from '$lib/components/ui/dropdown-menu/index.js';import { openConfirmDialog } from '$lib/components/confirm-dialog';import StatusBadge from '$lib/components/badges/status-badge.svelte';- import { handleApiResultWithCallbacks } from '$lib/utils/api.util';- import { tryCatch } from '$lib/utils/try-catch';- import type { Paginated, SearchPaginationSortRequest } from '$lib/types/pagination.type';- import type { User } from '$lib/types/user.type';- import type { Role } from '$lib/types/role.type';- import { BUILT_IN_ROLE_ADMIN, BUILT_IN_ROLE_EDITOR, BUILT_IN_ROLE_DEPLOYER, BUILT_IN_ROLE_VIEWER } from '$lib/types/role.type';+ import { handleApiResultWithCallbacks } from '$lib/utils/api';+ import { tryCatch } from '$lib/utils/api';+ import type { Paginated, SearchPaginationSortRequest } from '$lib/types/shared';+ import type { User } from '$lib/types/auth';+ import type { Role } from '$lib/types/auth';+ import { BUILT_IN_ROLE_ADMIN, BUILT_IN_ROLE_EDITOR, BUILT_IN_ROLE_DEPLOYER, BUILT_IN_ROLE_VIEWER } from '$lib/types/auth';import type { ColumnSpec, MobileFieldVisibility, BulkAction } from '$lib/components/arcane-table';import { UniversalMobileCard } from '$lib/components/arcane-table';import { m } from '$lib/paraglide/messages';diff --git a/frontend/src/routes/(app)/settings/webhooks/+page.svelte b/frontend/src/routes/(app)/settings/webhooks/+page.svelteindex 37158b269..b70d372df 100644--- a/frontend/src/routes/(app)/settings/webhooks/+page.svelte+++ b/frontend/src/routes/(app)/settings/webhooks/+page.svelte@@ -1,10 +1,10 @@<script lang="ts">import { toast } from 'svelte-sonner';- import { handleApiResultWithCallbacks } from '$lib/utils/api.util';- import { tryCatch } from '$lib/utils/try-catch';+ import { handleApiResultWithCallbacks } from '$lib/utils/api';+ import { tryCatch } from '$lib/utils/api';import WebhookTable from './webhook-table.svelte';import WebhookFormSheet from '$lib/components/sheets/webhook-form-sheet.svelte';- import type { Webhook, WebhookCreated, CreateWebhook } from '$lib/types/webhook.type';+ import type { Webhook, WebhookCreated, CreateWebhook } from '$lib/types/environment';import { webhookService } from '$lib/services/webhook-service';import { SettingsPageLayout, type SettingsActionButton } from '$lib/layouts/index.js';import * as ResponsiveDialog from '$lib/components/ui/responsive-dialog/index.js';diff --git a/frontend/src/routes/(app)/settings/webhooks/webhook-table.svelte b/frontend/src/routes/(app)/settings/webhooks/webhook-table.svelteindex d1c1e6ce6..2b2d35837 100644--- a/frontend/src/routes/(app)/settings/webhooks/webhook-table.svelte+++ b/frontend/src/routes/(app)/settings/webhooks/webhook-table.svelte@@ -8,10 +8,10 @@import { CopyButton } from '$lib/components/ui/copy-button';import { toast } from 'svelte-sonner';import { openConfirmDialog } from '$lib/components/confirm-dialog';- import { handleApiResultWithCallbacks } from '$lib/utils/api.util';- import { tryCatch } from '$lib/utils/try-catch';- import type { Webhook } from '$lib/types/webhook.type';- import type { Paginated, SearchPaginationSortRequest } from '$lib/types/pagination.type';+ import { handleApiResultWithCallbacks } from '$lib/utils/api';+ import { tryCatch } from '$lib/utils/api';+ import type { Webhook } from '$lib/types/environment';+ import type { Paginated, SearchPaginationSortRequest } from '$lib/types/shared';import { webhookService } from '$lib/services/webhook-service';import { TrashIcon, EllipsisIcon, GlobeIcon } from '$lib/icons';import * as m from '$lib/paraglide/messages.js';diff --git a/frontend/src/routes/(app)/swarm/cluster/+page.svelte b/frontend/src/routes/(app)/swarm/cluster/+page.svelteindex fc43a3bfd..78cb2a16c 100644--- a/frontend/src/routes/(app)/swarm/cluster/+page.svelte+++ b/frontend/src/routes/(app)/swarm/cluster/+page.svelte@@ -12,7 +12,7 @@import { ResourcePageLayout, type ActionButton, type StatCardConfig } from '$lib/layouts/index.js';import { m } from '$lib/paraglide/messages';import { swarmService } from '$lib/services/swarm-service';- import { hasPermission } from '$lib/utils/permissions.util';+ import { hasPermission } from '$lib/utils/auth';import { environmentStore } from '$lib/stores/environment.store.svelte';import type {SwarmInfo,@@ -20,9 +20,9 @@SwarmJoinRequest,SwarmJoinTokensResponse,SwarmUpdateRequest- } from '$lib/types/swarm.type';- import { handleApiResultWithCallbacks } from '$lib/utils/api.util';- import { tryCatch } from '$lib/utils/try-catch';+ } from '$lib/types/swarm';+ import { handleApiResultWithCallbacks } from '$lib/utils/api';+ import { tryCatch } from '$lib/utils/api';import { toast } from 'svelte-sonner';let {}: PageProps = $props();diff --git a/frontend/src/routes/(app)/swarm/configs/+page.svelte b/frontend/src/routes/(app)/swarm/configs/+page.svelteindex 0c1ef62f0..4b42774eb 100644--- a/frontend/src/routes/(app)/swarm/configs/+page.svelte+++ b/frontend/src/routes/(app)/swarm/configs/+page.svelte@@ -9,11 +9,11 @@import { ResourcePageLayout, type ActionButton, type StatCardConfig } from '$lib/layouts/index.js';import { m } from '$lib/paraglide/messages';import { swarmService } from '$lib/services/swarm-service';- import { hasPermission } from '$lib/utils/permissions.util';+ import { hasPermission } from '$lib/utils/auth';import { environmentStore } from '$lib/stores/environment.store.svelte';- import type { SwarmConfigSummary } from '$lib/types/swarm.type';- import { handleApiResultWithCallbacks } from '$lib/utils/api.util';- import { tryCatch } from '$lib/utils/try-catch';+ import type { SwarmConfigSummary } from '$lib/types/swarm';+ import { handleApiResultWithCallbacks } from '$lib/utils/api';+ import { tryCatch } from '$lib/utils/api';import { toast } from 'svelte-sonner';import { formatDistanceToNow } from 'date-fns';import { openConfirmDialog } from '$lib/components/confirm-dialog';diff --git a/frontend/src/routes/(app)/swarm/nodes/+page.svelte b/frontend/src/routes/(app)/swarm/nodes/+page.svelteindex 22d33a84f..c1f951c89 100644--- a/frontend/src/routes/(app)/swarm/nodes/+page.svelte+++ b/frontend/src/routes/(app)/swarm/nodes/+page.svelte@@ -6,7 +6,7 @@import { untrack } from 'svelte';import { ResourcePageLayout, type ActionButton, type StatCardConfig } from '$lib/layouts/index.js';import { useEnvironmentRefresh } from '$lib/hooks/use-environment-refresh.svelte';- import { parallelRefresh } from '$lib/utils/refresh.util';+ import { parallelRefresh } from '$lib/utils/api';import SwarmNodesTable from './nodes-table.svelte';let { data } = $props();diff --git a/frontend/src/routes/(app)/swarm/nodes/+page.ts b/frontend/src/routes/(app)/swarm/nodes/+page.tsindex 4dbd2c98f..ec8bd98a7 100644--- a/frontend/src/routes/(app)/swarm/nodes/+page.ts+++ b/frontend/src/routes/(app)/swarm/nodes/+page.ts@@ -1,6 +1,6 @@import { swarmService } from '$lib/services/swarm-service';-import type { SearchPaginationSortRequest } from '$lib/types/pagination.type';-import { resolveInitialTableRequest } from '$lib/utils/table-persistence.util';+import type { SearchPaginationSortRequest } from '$lib/types/shared';+import { resolveInitialTableRequest } from '$lib/utils/tables';import type { PageLoad } from './$types';export const load: PageLoad = async () => {diff --git a/frontend/src/routes/(app)/swarm/nodes/agent-status.ts b/frontend/src/routes/(app)/swarm/nodes/agent-status.tsindex 08e91cd4b..79fcf9cb2 100644--- a/frontend/src/routes/(app)/swarm/nodes/agent-status.ts+++ b/frontend/src/routes/(app)/swarm/nodes/agent-status.ts@@ -1,5 +1,5 @@import { m } from '$lib/paraglide/messages';-import type { SwarmNodeAgentState } from '$lib/types/swarm.type';+import type { SwarmNodeAgentState } from '$lib/types/swarm';export function getSwarmNodeAgentLabel(state: SwarmNodeAgentState | null | undefined): string {switch (state) {diff --git a/frontend/src/routes/(app)/swarm/nodes/nodes-table.svelte b/frontend/src/routes/(app)/swarm/nodes/nodes-table.svelteindex 5ec062b94..2503f4253 100644--- a/frontend/src/routes/(app)/swarm/nodes/nodes-table.svelte+++ b/frontend/src/routes/(app)/swarm/nodes/nodes-table.svelte@@ -15,18 +15,18 @@} from '$lib/icons';import { m } from '$lib/paraglide/messages';import { swarmService } from '$lib/services/swarm-service';- import type { SwarmNodeAgentDeployment, SwarmNodeSummary } from '$lib/types/swarm.type';- import type { Paginated, SearchPaginationSortRequest } from '$lib/types/pagination.type';+ import type { SwarmNodeAgentDeployment, SwarmNodeSummary } from '$lib/types/swarm';+ import type { Paginated, SearchPaginationSortRequest } from '$lib/types/shared';import StatusBadge from '$lib/components/badges/status-badge.svelte';- import { capitalizeFirstLetter } from '$lib/utils/string.utils';+ import { capitalizeFirstLetter } from '$lib/utils/formatting';import * as DropdownMenu from '$lib/components/ui/dropdown-menu/index.js';import { ArcaneButton } from '$lib/components/arcane-button/index.js';import { openConfirmDialog } from '$lib/components/confirm-dialog';import { toast } from 'svelte-sonner';- import { tryCatch } from '$lib/utils/try-catch';- import { extractApiErrorMessage, handleApiResultWithCallbacks } from '$lib/utils/api.util';+ import { tryCatch } from '$lib/utils/api';+ import { extractApiErrorMessage, handleApiResultWithCallbacks } from '$lib/utils/api';import { goto } from '$app/navigation';- import { hasPermission } from '$lib/utils/permissions.util';+ import { hasPermission } from '$lib/utils/auth';import { environmentStore } from '$lib/stores/environment.store.svelte';import SwarmNodeAgentDialog from './swarm-node-agent-dialog.svelte';import SwarmNodeLabelDialog from './swarm-node-label-dialog.svelte';diff --git a/frontend/src/routes/(app)/swarm/nodes/swarm-node-agent-dialog.svelte b/frontend/src/routes/(app)/swarm/nodes/swarm-node-agent-dialog.svelteindex 6e25054f3..a12a8a9f2 100644--- a/frontend/src/routes/(app)/swarm/nodes/swarm-node-agent-dialog.svelte+++ b/frontend/src/routes/(app)/swarm/nodes/swarm-node-agent-dialog.svelte@@ -7,7 +7,7 @@import StatusBadge from '$lib/components/badges/status-badge.svelte';import { AlertTriangleIcon, EdgeConnectionIcon } from '$lib/icons';import { m } from '$lib/paraglide/messages';- import type { SwarmNodeAgentDeployment, SwarmNodeSummary } from '$lib/types/swarm.type';+ import type { SwarmNodeAgentDeployment, SwarmNodeSummary } from '$lib/types/swarm';import { getSwarmNodeAgentLabel, getSwarmNodeAgentVariant } from './agent-status';type SwarmNodeAgentDialogProps = {diff --git a/frontend/src/routes/(app)/swarm/nodes/swarm-node-label-dialog.svelte b/frontend/src/routes/(app)/swarm/nodes/swarm-node-label-dialog.svelteindex ac857ef91..39d88c243 100644--- a/frontend/src/routes/(app)/swarm/nodes/swarm-node-label-dialog.svelte+++ b/frontend/src/routes/(app)/swarm/nodes/swarm-node-label-dialog.svelte@@ -5,7 +5,7 @@import { Label } from '$lib/components/ui/label';import { m } from '$lib/paraglide/messages';import { toast } from 'svelte-sonner';- import { extractApiErrorMessage } from '$lib/utils/api.util';+ import { extractApiErrorMessage } from '$lib/utils/api';type SwarmNodeLabelDialogProps = {open: boolean;diff --git a/frontend/src/routes/(app)/swarm/secrets/+page.svelte b/frontend/src/routes/(app)/swarm/secrets/+page.svelteindex ab5aafc0e..c446fadda 100644--- a/frontend/src/routes/(app)/swarm/secrets/+page.svelte+++ b/frontend/src/routes/(app)/swarm/secrets/+page.svelte@@ -9,11 +9,11 @@import { ResourcePageLayout, type ActionButton, type StatCardConfig } from '$lib/layouts/index.js';import { m } from '$lib/paraglide/messages';import { swarmService } from '$lib/services/swarm-service';- import { hasPermission } from '$lib/utils/permissions.util';+ import { hasPermission } from '$lib/utils/auth';import { environmentStore } from '$lib/stores/environment.store.svelte';- import type { SwarmSecretSummary } from '$lib/types/swarm.type';- import { handleApiResultWithCallbacks } from '$lib/utils/api.util';- import { tryCatch } from '$lib/utils/try-catch';+ import type { SwarmSecretSummary } from '$lib/types/swarm';+ import { handleApiResultWithCallbacks } from '$lib/utils/api';+ import { tryCatch } from '$lib/utils/api';import { toast } from 'svelte-sonner';import { formatDistanceToNow } from 'date-fns';import { openConfirmDialog } from '$lib/components/confirm-dialog';diff --git a/frontend/src/routes/(app)/swarm/services/+page.svelte b/frontend/src/routes/(app)/swarm/services/+page.svelteindex 0d465e771..91d9050aa 100644--- a/frontend/src/routes/(app)/swarm/services/+page.svelte+++ b/frontend/src/routes/(app)/swarm/services/+page.svelte@@ -4,15 +4,15 @@import { swarmService } from '$lib/services/swarm-service';import { toast } from 'svelte-sonner';import { untrack } from 'svelte';- import { tryCatch } from '$lib/utils/try-catch';- import { handleApiResultWithCallbacks } from '$lib/utils/api.util';+ import { tryCatch } from '$lib/utils/api';+ import { handleApiResultWithCallbacks } from '$lib/utils/api';import { ResourcePageLayout, type ActionButton, type StatCardConfig } from '$lib/layouts/index.js';import { useEnvironmentRefresh } from '$lib/hooks/use-environment-refresh.svelte';- import { parallelRefresh } from '$lib/utils/refresh.util';- import type { SwarmServiceCreateSpec } from '$lib/types/swarm.type';+ import { parallelRefresh } from '$lib/utils/api';+ import type { SwarmServiceCreateSpec } from '$lib/types/swarm';import SwarmServicesTable from './services-table.svelte';import CreateServiceDialog from '$lib/components/dialogs/create-service-dialog.svelte';- import { hasPermission } from '$lib/utils/permissions.util';+ import { hasPermission } from '$lib/utils/auth';import { environmentStore } from '$lib/stores/environment.store.svelte';let { data } = $props();diff --git a/frontend/src/routes/(app)/swarm/services/+page.ts b/frontend/src/routes/(app)/swarm/services/+page.tsindex 67ecc8112..76d107c28 100644--- a/frontend/src/routes/(app)/swarm/services/+page.ts+++ b/frontend/src/routes/(app)/swarm/services/+page.ts@@ -1,6 +1,6 @@import { swarmService } from '$lib/services/swarm-service';-import type { SearchPaginationSortRequest } from '$lib/types/pagination.type';-import { resolveInitialTableRequest } from '$lib/utils/table-persistence.util';+import type { SearchPaginationSortRequest } from '$lib/types/shared';+import { resolveInitialTableRequest } from '$lib/utils/tables';import type { PageLoad } from './$types';export const load: PageLoad = async () => {diff --git a/frontend/src/routes/(app)/swarm/services/[serviceId]/+page.svelte b/frontend/src/routes/(app)/swarm/services/[serviceId]/+page.svelteindex bdbde7ef6..66523367f 100644--- a/frontend/src/routes/(app)/swarm/services/[serviceId]/+page.svelte+++ b/frontend/src/routes/(app)/swarm/services/[serviceId]/+page.svelte@@ -8,8 +8,8 @@import * as Tabs from '$lib/components/ui/tabs/index.js';import { openConfirmDialog } from '$lib/components/confirm-dialog';import { toast } from 'svelte-sonner';- import { tryCatch } from '$lib/utils/try-catch';- import { handleApiResultWithCallbacks } from '$lib/utils/api.util';+ import { tryCatch } from '$lib/utils/api';+ import { handleApiResultWithCallbacks } from '$lib/utils/api';import { swarmService } from '$lib/services/swarm-service';import type {RawServiceNetworkAttachment,@@ -23,7 +23,7 @@SwarmServiceMount,SwarmServicePort,SwarmServiceModeSpec- } from '$lib/types/swarm.type';+ } from '$lib/types/swarm';import ServiceEditorDialog from '../service-editor-dialog.svelte';import ServiceOverview from '../components/ServiceOverview.svelte';import ServiceLogsPanel from '../components/ServiceLogsPanel.svelte';@@ -50,8 +50,8 @@getSwarmServiceModeLabel,getSwarmServiceModeVariant,isSwarmServiceModeScalable- } from '$lib/utils/swarm-service-mode.utils';- import { hasPermission } from '$lib/utils/permissions.util';+ } from '$lib/utils/docker';+ import { hasPermission } from '$lib/utils/auth';import { environmentStore } from '$lib/stores/environment.store.svelte';let { data } = $props();diff --git a/frontend/src/routes/(app)/swarm/services/components/ServiceNetwork.svelte b/frontend/src/routes/(app)/swarm/services/components/ServiceNetwork.svelteindex 59dd4a0de..07f99b8d7 100644--- a/frontend/src/routes/(app)/swarm/services/components/ServiceNetwork.svelte+++ b/frontend/src/routes/(app)/swarm/services/components/ServiceNetwork.svelte@@ -3,7 +3,7 @@import StatusBadge from '$lib/components/badges/status-badge.svelte';import { m } from '$lib/paraglide/messages';import { NetworksIcon, GlobeIcon } from '$lib/icons';- import type { ServiceNetworkAttachment, ServiceNetworkDetail, ServiceVirtualIP, SwarmServicePort } from '$lib/types/swarm.type';+ import type { ServiceNetworkAttachment, ServiceNetworkDetail, ServiceVirtualIP, SwarmServicePort } from '$lib/types/swarm';interface Props {ports: SwarmServicePort[];diff --git a/frontend/src/routes/(app)/swarm/services/components/ServiceOverview.svelte b/frontend/src/routes/(app)/swarm/services/components/ServiceOverview.svelteindex f880bddc3..003e58739 100644--- a/frontend/src/routes/(app)/swarm/services/components/ServiceOverview.svelte+++ b/frontend/src/routes/(app)/swarm/services/components/ServiceOverview.svelte@@ -2,15 +2,11 @@import * as Card from '$lib/components/ui/card';import StatusBadge from '$lib/components/badges/status-badge.svelte';import { m } from '$lib/paraglide/messages';- import type { SwarmServiceInspect } from '$lib/types/swarm.type';+ import type { SwarmServiceInspect } from '$lib/types/swarm';import { format, formatDistanceToNow } from 'date-fns';import { InfoIcon, ConnectionIcon } from '$lib/icons';- import { truncateImageDigest } from '$lib/utils/string.utils';- import {- getSwarmServiceModeLabel,- getSwarmServiceModeVariant,- isSwarmServiceModeScalable- } from '$lib/utils/swarm-service-mode.utils';+ import { truncateImageDigest } from '$lib/utils/formatting';+ import { getSwarmServiceModeLabel, getSwarmServiceModeVariant, isSwarmServiceModeScalable } from '$lib/utils/docker';interface Props {service: SwarmServiceInspect;diff --git a/frontend/src/routes/(app)/swarm/services/components/ServiceStorage.svelte b/frontend/src/routes/(app)/swarm/services/components/ServiceStorage.svelteindex bfeaa38f4..67b27943b 100644--- a/frontend/src/routes/(app)/swarm/services/components/ServiceStorage.svelte+++ b/frontend/src/routes/(app)/swarm/services/components/ServiceStorage.svelte@@ -4,7 +4,7 @@import StatusBadge from '$lib/components/badges/status-badge.svelte';import { m } from '$lib/paraglide/messages';import { VolumesIcon, TerminalIcon, FolderOpenIcon } from '$lib/icons';- import type { SwarmServiceMount } from '$lib/types/swarm.type';+ import type { SwarmServiceMount } from '$lib/types/swarm';interface Props {mounts: SwarmServiceMount[];diff --git a/frontend/src/routes/(app)/swarm/services/components/ServiceTasksPanel.svelte b/frontend/src/routes/(app)/swarm/services/components/ServiceTasksPanel.svelteindex e7001e3cb..d028d1963 100644--- a/frontend/src/routes/(app)/swarm/services/components/ServiceTasksPanel.svelte+++ b/frontend/src/routes/(app)/swarm/services/components/ServiceTasksPanel.svelte@@ -4,7 +4,7 @@import { ArcaneButton } from '$lib/components/arcane-button/index.js';import { m } from '$lib/paraglide/messages';import { swarmService } from '$lib/services/swarm-service';- import type { SwarmTaskSummary } from '$lib/types/swarm.type';+ import type { SwarmTaskSummary } from '$lib/types/swarm';import { JobsIcon, ConnectionIcon } from '$lib/icons';let {diff --git a/frontend/src/routes/(app)/swarm/services/service-editor-dialog.svelte b/frontend/src/routes/(app)/swarm/services/service-editor-dialog.svelteindex 2810a43a4..4fad6461a 100644--- a/frontend/src/routes/(app)/swarm/services/service-editor-dialog.svelte+++ b/frontend/src/routes/(app)/swarm/services/service-editor-dialog.svelte@@ -3,13 +3,13 @@import { ArcaneButton } from '$lib/components/arcane-button/index.js';import { Input } from '$lib/components/ui/input/index.js';import * as Select from '$lib/components/ui/select/index.js';- import { preventDefault } from '$lib/utils/form.utils';+ import { preventDefault } from '$lib/utils/settings';import { m } from '$lib/paraglide/messages';import { AddIcon, TrashIcon } from '$lib/icons';import * as Accordion from '$lib/components/ui/accordion/index.js';import FormInput from '$lib/components/form/form-input.svelte';import { untrack } from 'svelte';- import { getSwarmServiceModeLabel } from '$lib/utils/swarm-service-mode.utils';+ import { getSwarmServiceModeLabel } from '$lib/utils/docker';type ServiceEditorPayload = {spec: Record<string, unknown>;diff --git a/frontend/src/routes/(app)/swarm/services/services-table.svelte b/frontend/src/routes/(app)/swarm/services/services-table.svelteindex 8cd40551c..562c96bcc 100644--- a/frontend/src/routes/(app)/swarm/services/services-table.svelte+++ b/frontend/src/routes/(app)/swarm/services/services-table.svelte@@ -5,17 +5,17 @@import { DockIcon, GlobeIcon, EllipsisIcon, TrashIcon, NetworksIcon, InspectIcon } from '$lib/icons';import { m } from '$lib/paraglide/messages';import { swarmService } from '$lib/services/swarm-service';- import type { SwarmServiceSummary, SwarmServicePort } from '$lib/types/swarm.type';- import type { Paginated, SearchPaginationSortRequest } from '$lib/types/pagination.type';+ import type { SwarmServiceSummary, SwarmServicePort } from '$lib/types/swarm';+ import type { Paginated, SearchPaginationSortRequest } from '$lib/types/shared';import StatusBadge from '$lib/components/badges/status-badge.svelte';import * as DropdownMenu from '$lib/components/ui/dropdown-menu/index.js';import { ArcaneButton } from '$lib/components/arcane-button/index.js';import { openConfirmDialog } from '$lib/components/confirm-dialog';import { toast } from 'svelte-sonner';- import { tryCatch } from '$lib/utils/try-catch';- import { handleApiResultWithCallbacks } from '$lib/utils/api.util';+ import { tryCatch } from '$lib/utils/api';+ import { handleApiResultWithCallbacks } from '$lib/utils/api';import { goto } from '$app/navigation';- import { getSwarmServiceModeLabel, getSwarmServiceModeVariant } from '$lib/utils/swarm-service-mode.utils';+ import { getSwarmServiceModeLabel, getSwarmServiceModeVariant } from '$lib/utils/docker';import IfPermitted from '$lib/components/if-permitted.svelte';let {diff --git a/frontend/src/routes/(app)/swarm/stacks/+page.svelte b/frontend/src/routes/(app)/swarm/stacks/+page.svelteindex eef6f3476..22f32d73d 100644--- a/frontend/src/routes/(app)/swarm/stacks/+page.svelte+++ b/frontend/src/routes/(app)/swarm/stacks/+page.svelte@@ -5,10 +5,10 @@import { untrack } from 'svelte';import { ResourcePageLayout, type ActionButton, type StatCardConfig } from '$lib/layouts/index.js';import { useEnvironmentRefresh } from '$lib/hooks/use-environment-refresh.svelte';- import { parallelRefresh } from '$lib/utils/refresh.util';+ import { parallelRefresh } from '$lib/utils/api';import SwarmStacksTable from './stacks-table.svelte';import { goto } from '$app/navigation';- import { hasPermission } from '$lib/utils/permissions.util';+ import { hasPermission } from '$lib/utils/auth';import { environmentStore } from '$lib/stores/environment.store.svelte';let { data } = $props();diff --git a/frontend/src/routes/(app)/swarm/stacks/+page.ts b/frontend/src/routes/(app)/swarm/stacks/+page.tsindex d013b529e..cd0269f20 100644--- a/frontend/src/routes/(app)/swarm/stacks/+page.ts+++ b/frontend/src/routes/(app)/swarm/stacks/+page.ts@@ -1,6 +1,6 @@import { swarmService } from '$lib/services/swarm-service';-import type { SearchPaginationSortRequest } from '$lib/types/pagination.type';-import { resolveInitialTableRequest } from '$lib/utils/table-persistence.util';+import type { SearchPaginationSortRequest } from '$lib/types/shared';+import { resolveInitialTableRequest } from '$lib/utils/tables';import type { PageLoad } from './$types';export const load: PageLoad = async () => {diff --git a/frontend/src/routes/(app)/swarm/stacks/[name]/+page.svelte b/frontend/src/routes/(app)/swarm/stacks/[name]/+page.svelteindex d4202a6a7..cf6c96041 100644--- a/frontend/src/routes/(app)/swarm/stacks/[name]/+page.svelte+++ b/frontend/src/routes/(app)/swarm/stacks/[name]/+page.svelte@@ -9,15 +9,15 @@import { ResourcePageLayout, type ActionButton, type StatCardConfig } from '$lib/layouts/index.js';import { m } from '$lib/paraglide/messages';import { swarmService } from '$lib/services/swarm-service';- import { handleApiResultWithCallbacks } from '$lib/utils/api.util';- import { tryCatch } from '$lib/utils/try-catch';+ import { handleApiResultWithCallbacks } from '$lib/utils/api';+ import { tryCatch } from '$lib/utils/api';import { onMount } from 'svelte';import { untrack } from 'svelte';import { toast } from 'svelte-sonner';import { openConfirmDialog } from '$lib/components/confirm-dialog';import SwarmServicesTable from '../../services/services-table.svelte';import SwarmTasksTable from '../../tasks/tasks-table.svelte';- import type { SwarmStackSource } from '$lib/types/swarm.type';+ import type { SwarmStackSource } from '$lib/types/swarm';let { data } = $props();diff --git a/frontend/src/routes/(app)/swarm/stacks/[name]/+page.ts b/frontend/src/routes/(app)/swarm/stacks/[name]/+page.tsindex cfb4eb0ef..873766e21 100644--- a/frontend/src/routes/(app)/swarm/stacks/[name]/+page.ts+++ b/frontend/src/routes/(app)/swarm/stacks/[name]/+page.ts@@ -1,7 +1,7 @@import { error } from '@sveltejs/kit';import { swarmService } from '$lib/services/swarm-service';-import type { SearchPaginationSortRequest } from '$lib/types/pagination.type';-import { resolveInitialTableRequest } from '$lib/utils/table-persistence.util';+import type { SearchPaginationSortRequest } from '$lib/types/shared';+import { resolveInitialTableRequest } from '$lib/utils/tables';import type { PageLoad } from './$types';type StackSourceState = 'loading' | 'available' | 'missing' | 'forbidden' | 'error';diff --git a/frontend/src/routes/(app)/swarm/stacks/new/+page.svelte b/frontend/src/routes/(app)/swarm/stacks/new/+page.svelteindex f141655db..b4fd16efd 100644--- a/frontend/src/routes/(app)/swarm/stacks/new/+page.svelte+++ b/frontend/src/routes/(app)/swarm/stacks/new/+page.svelte@@ -4,14 +4,14 @@import { Label } from '$lib/components/ui/label/index.js';import { goto, invalidateAll } from '$app/navigation';import { toast } from 'svelte-sonner';- import { preventDefault, createForm } from '$lib/utils/form.utils';- import { tryCatch } from '$lib/utils/try-catch';- import { handleApiResultWithCallbacks } from '$lib/utils/api.util';+ import { preventDefault, createForm } from '$lib/utils/settings';+ import { tryCatch } from '$lib/utils/api';+ import { handleApiResultWithCallbacks } from '$lib/utils/api';import { Textarea } from '$lib/components/ui/textarea/index.js';import * as Dialog from '$lib/components/ui/dialog/index.js';import * as ArcaneTooltip from '$lib/components/arcane-tooltip';import TemplateSelectionDialog from '$lib/components/dialogs/template-selection-dialog.svelte';- import type { Template } from '$lib/types/template.type';+ import type { Template } from '$lib/types/swarm';import { z } from 'zod/v4';import { arcaneButtonVariants, actionConfigs } from '$lib/components/arcane-button/variants';import { m } from '$lib/paraglide/messages';diff --git a/frontend/src/routes/(app)/swarm/stacks/stacks-table.svelte b/frontend/src/routes/(app)/swarm/stacks/stacks-table.svelteindex aae468676..d6d04a469 100644--- a/frontend/src/routes/(app)/swarm/stacks/stacks-table.svelte+++ b/frontend/src/routes/(app)/swarm/stacks/stacks-table.svelte@@ -5,15 +5,15 @@import { LayersIcon, EllipsisIcon, InspectIcon, TrashIcon } from '$lib/icons';import { m } from '$lib/paraglide/messages';import { swarmService } from '$lib/services/swarm-service';- import type { SwarmStackSummary } from '$lib/types/swarm.type';- import type { Paginated, SearchPaginationSortRequest } from '$lib/types/pagination.type';+ import type { SwarmStackSummary } from '$lib/types/swarm';+ import type { Paginated, SearchPaginationSortRequest } from '$lib/types/shared';import { formatDistanceToNow } from 'date-fns';import * as DropdownMenu from '$lib/components/ui/dropdown-menu/index.js';import { ArcaneButton } from '$lib/components/arcane-button/index.js';import { openConfirmDialog } from '$lib/components/confirm-dialog';import { toast } from 'svelte-sonner';- import { tryCatch } from '$lib/utils/try-catch';- import { handleApiResultWithCallbacks } from '$lib/utils/api.util';+ import { tryCatch } from '$lib/utils/api';+ import { handleApiResultWithCallbacks } from '$lib/utils/api';import { goto } from '$app/navigation';import IfPermitted from '$lib/components/if-permitted.svelte';diff --git a/frontend/src/routes/(app)/swarm/tasks/+page.svelte b/frontend/src/routes/(app)/swarm/tasks/+page.svelteindex ea866e7f9..bb5b7adf2 100644--- a/frontend/src/routes/(app)/swarm/tasks/+page.svelte+++ b/frontend/src/routes/(app)/swarm/tasks/+page.svelte@@ -5,7 +5,7 @@import { untrack } from 'svelte';import { ResourcePageLayout, type ActionButton, type StatCardConfig } from '$lib/layouts/index.js';import { useEnvironmentRefresh } from '$lib/hooks/use-environment-refresh.svelte';- import { parallelRefresh } from '$lib/utils/refresh.util';+ import { parallelRefresh } from '$lib/utils/api';import SwarmTasksTable from './tasks-table.svelte';let { data } = $props();diff --git a/frontend/src/routes/(app)/swarm/tasks/+page.ts b/frontend/src/routes/(app)/swarm/tasks/+page.tsindex eb223093e..98eb3b83c 100644--- a/frontend/src/routes/(app)/swarm/tasks/+page.ts+++ b/frontend/src/routes/(app)/swarm/tasks/+page.ts@@ -1,6 +1,6 @@import { swarmService } from '$lib/services/swarm-service';-import type { SearchPaginationSortRequest } from '$lib/types/pagination.type';-import { resolveInitialTableRequest } from '$lib/utils/table-persistence.util';+import type { SearchPaginationSortRequest } from '$lib/types/shared';+import { resolveInitialTableRequest } from '$lib/utils/tables';import type { PageLoad } from './$types';export const load: PageLoad = async ({ url }) => {diff --git a/frontend/src/routes/(app)/swarm/tasks/tasks-table.svelte b/frontend/src/routes/(app)/swarm/tasks/tasks-table.svelteindex 6964b8f16..195dcc750 100644--- a/frontend/src/routes/(app)/swarm/tasks/tasks-table.svelte+++ b/frontend/src/routes/(app)/swarm/tasks/tasks-table.svelte@@ -5,8 +5,8 @@import { JobsIcon, ConnectionIcon } from '$lib/icons';import { m } from '$lib/paraglide/messages';import { swarmService } from '$lib/services/swarm-service';- import type { SwarmTaskSummary } from '$lib/types/swarm.type';- import type { Paginated, SearchPaginationSortRequest } from '$lib/types/pagination.type';+ import type { SwarmTaskSummary } from '$lib/types/swarm';+ import type { Paginated, SearchPaginationSortRequest } from '$lib/types/shared';import StatusBadge from '$lib/components/badges/status-badge.svelte';let {diff --git a/frontend/src/routes/(app)/updates/+page.svelte b/frontend/src/routes/(app)/updates/+page.svelteindex cbcf673f3..4d9d84a63 100644--- a/frontend/src/routes/(app)/updates/+page.svelte+++ b/frontend/src/routes/(app)/updates/+page.svelte@@ -13,12 +13,12 @@import { containerService, type ContainerListRequestOptions } from '$lib/services/container-service';import { projectService } from '$lib/services/project-service';import type { ContainersPaginatedResponse } from '$lib/services/container-service';- import type { ImageUpdateInfoDto } from '$lib/types/image.type';- import type { Paginated, SearchPaginationSortRequest } from '$lib/types/pagination.type';- import type { Project } from '$lib/types/project.type';+ import type { ImageUpdateInfoDto } from '$lib/types/docker';+ import type { Paginated, SearchPaginationSortRequest } from '$lib/types/shared';+ import type { Project } from '$lib/types/swarm';import { ContainersIcon, ProjectsIcon, UpdateIcon } from '$lib/icons';import { toast } from 'svelte-sonner';- import { ensureStandaloneContainerUpdatesFilter, ensureUpdatesFilter } from '$lib/utils/updates-filter.util';+ import { ensureStandaloneContainerUpdatesFilter, ensureUpdatesFilter } from '$lib/utils/docker';let { data } = $props();diff --git a/frontend/src/routes/(app)/updates/+page.ts b/frontend/src/routes/(app)/updates/+page.tsindex fe1d94a5e..2c861a80b 100644--- a/frontend/src/routes/(app)/updates/+page.ts+++ b/frontend/src/routes/(app)/updates/+page.ts@@ -1,10 +1,10 @@import { containerService, type ContainerListRequestOptions } from '$lib/services/container-service';import { projectService } from '$lib/services/project-service';import { queryKeys } from '$lib/query/query-keys';-import type { SearchPaginationSortRequest } from '$lib/types/pagination.type';-import { resolveInitialTableRequest } from '$lib/utils/table-persistence.util';-import { throwPageLoadError } from '$lib/utils/page-load-error.util';-import { ensureStandaloneContainerUpdatesFilter, ensureUpdatesFilter } from '$lib/utils/updates-filter.util';+import type { SearchPaginationSortRequest } from '$lib/types/shared';+import { resolveInitialTableRequest } from '$lib/utils/tables';+import { throwPageLoadError } from '$lib/utils/api';+import { ensureStandaloneContainerUpdatesFilter, ensureUpdatesFilter } from '$lib/utils/docker';import type { PageLoad } from './$types';import { environmentStore } from '$lib/stores/environment.store.svelte';diff --git a/frontend/src/routes/(app)/updates/container-updates-table.svelte b/frontend/src/routes/(app)/updates/container-updates-table.svelteindex 6a09c3c8b..37afce6cb 100644--- a/frontend/src/routes/(app)/updates/container-updates-table.svelte+++ b/frontend/src/routes/(app)/updates/container-updates-table.svelte@@ -6,9 +6,9 @@import { UniversalMobileCard, type ColumnSpec, type MobileFieldVisibility } from '$lib/components/arcane-table';import { m } from '$lib/paraglide/messages';import { toast } from 'svelte-sonner';- import type { SearchPaginationSortRequest, Paginated } from '$lib/types/pagination.type';- import type { ContainerSummaryDto } from '$lib/types/container.type';- import type { ImageUpdateInfoDto } from '$lib/types/image.type';+ import type { SearchPaginationSortRequest, Paginated } from '$lib/types/shared';+ import type { ContainerSummaryDto } from '$lib/types/docker';+ import type { ImageUpdateInfoDto } from '$lib/types/docker';import {containerService,type ContainersPaginatedResponse,diff --git a/frontend/src/routes/(app)/updates/project-updates-table.svelte b/frontend/src/routes/(app)/updates/project-updates-table.svelteindex ab33caf96..be48e2823 100644--- a/frontend/src/routes/(app)/updates/project-updates-table.svelte+++ b/frontend/src/routes/(app)/updates/project-updates-table.svelte@@ -3,9 +3,9 @@import ArcaneTable from '$lib/components/arcane-table/arcane-table.svelte';import { UniversalMobileCard, type ColumnSpec, type MobileFieldVisibility } from '$lib/components/arcane-table';import { m } from '$lib/paraglide/messages';- import type { Paginated, SearchPaginationSortRequest } from '$lib/types/pagination.type';- import type { Project } from '$lib/types/project.type';- import type { ImageUpdateInfoDto } from '$lib/types/image.type';+ import type { Paginated, SearchPaginationSortRequest } from '$lib/types/shared';+ import type { Project } from '$lib/types/swarm';+ import type { ImageUpdateInfoDto } from '$lib/types/docker';import { ProjectsIcon, ImagesIcon } from '$lib/icons';type ProjectUpdateRow = {diff --git a/frontend/src/routes/(app)/volumes/+page.svelte b/frontend/src/routes/(app)/volumes/+page.svelteindex 7d9c11a89..5db7c36bb 100644--- a/frontend/src/routes/(app)/volumes/+page.svelte+++ b/frontend/src/routes/(app)/volumes/+page.svelte@@ -2,12 +2,12 @@import { VolumesIcon, VolumeUnusedIcon } from '$lib/icons';import { toast } from 'svelte-sonner';import CreateVolumeSheet from '$lib/components/sheets/create-volume-sheet.svelte';- import type { VolumeCreateRequest, VolumeUsageCounts } from '$lib/types/volume.type';+ import type { VolumeCreateRequest, VolumeUsageCounts } from '$lib/types/docker';import VolumeTable from './volume-table.svelte';import { m } from '$lib/paraglide/messages';import { volumeService } from '$lib/services/volume-service';import { environmentStore } from '$lib/stores/environment.store.svelte';- import { hasPermission } from '$lib/utils/permissions.util';+ import { hasPermission } from '$lib/utils/auth';import { queryKeys } from '$lib/query/query-keys';import { untrack } from 'svelte';import { ResourcePageLayout, type ActionButton, type StatCardConfig } from '$lib/layouts/index.js';diff --git a/frontend/src/routes/(app)/volumes/+page.ts b/frontend/src/routes/(app)/volumes/+page.tsindex bdac1f66c..f0f820e5d 100644--- a/frontend/src/routes/(app)/volumes/+page.ts+++ b/frontend/src/routes/(app)/volumes/+page.ts@@ -1,7 +1,7 @@import { volumeService } from '$lib/services/volume-service';import { queryKeys } from '$lib/query/query-keys';-import type { SearchPaginationSortRequest } from '$lib/types/pagination.type';-import { resolveInitialTableRequest } from '$lib/utils/table-persistence.util';+import type { SearchPaginationSortRequest } from '$lib/types/shared';+import { resolveInitialTableRequest } from '$lib/utils/tables';import type { PageLoad } from './$types';import { environmentStore } from '$lib/stores/environment.store.svelte';diff --git a/frontend/src/routes/(app)/volumes/[volumeName]/+page.svelte b/frontend/src/routes/(app)/volumes/[volumeName]/+page.svelteindex b71023ab2..97f8d824e 100644--- a/frontend/src/routes/(app)/volumes/[volumeName]/+page.svelte+++ b/frontend/src/routes/(app)/volumes/[volumeName]/+page.svelte@@ -3,11 +3,11 @@import { VolumesIcon, ClockIcon, TagIcon, LayersIcon, InfoIcon, GlobeIcon, ContainersIcon, BoxIcon } from '$lib/icons';import { goto } from '$app/navigation';import StatusBadge from '$lib/components/badges/status-badge.svelte';- import { truncateString } from '$lib/utils/string.utils';+ import { truncateString } from '$lib/utils/formatting';import { openConfirmDialog } from '$lib/components/confirm-dialog/';import { toast } from 'svelte-sonner';- import { tryCatch } from '$lib/utils/try-catch';- import { handleApiResultWithCallbacks } from '$lib/utils/api.util';+ import { tryCatch } from '$lib/utils/api';+ import { handleApiResultWithCallbacks } from '$lib/utils/api';import { ArcaneButton } from '$lib/components/arcane-button/index.js';import { format } from 'date-fns';import { m } from '$lib/paraglide/messages';@@ -19,7 +19,7 @@import BackupList from '../components/volume-backup-table.svelte';import settingsStore from '$lib/stores/config-store';import { environmentStore } from '$lib/stores/environment.store.svelte';- import { hasPermission } from '$lib/utils/permissions.util';+ import { hasPermission } from '$lib/utils/auth';let { data } = $props();let volume = $state(untrack(() => data.volume));diff --git a/frontend/src/routes/(app)/volumes/components/volume-backup-table.svelte b/frontend/src/routes/(app)/volumes/components/volume-backup-table.svelteindex ecb9d6b38..f43c02659 100644--- a/frontend/src/routes/(app)/volumes/components/volume-backup-table.svelte+++ b/frontend/src/routes/(app)/volumes/components/volume-backup-table.svelte@@ -1,7 +1,7 @@<script lang="ts">import { volumeBackupService, type VolumeBackupListResponse } from '$lib/services/volume-backup-service';import { volumeService } from '$lib/services/volume-service';- import type { BackupEntry } from '$lib/types/file-browser.type';+ import type { BackupEntry } from '$lib/types/shared';import { onMount } from 'svelte';import {LoadingSpinnerIcon,@@ -19,10 +19,10 @@import { ArcaneButton } from '$lib/components/arcane-button';import { toast } from 'svelte-sonner';import * as m from '$lib/paraglide/messages.js';- import bytes from '$lib/utils/bytes';+ import { bytes } from '$lib/utils/formatting';import { format } from 'date-fns';import ArcaneTable from '$lib/components/arcane-table/arcane-table.svelte';- import type { SearchPaginationSortRequest } from '$lib/types/pagination.type';+ import type { SearchPaginationSortRequest } from '$lib/types/shared';import { UniversalMobileCard, type ColumnSpec, type MobileFieldVisibility } from '$lib/components/arcane-table';import * as DropdownMenu from '$lib/components/ui/dropdown-menu';import { openConfirmDialog } from '$lib/components/confirm-dialog';@@ -32,7 +32,7 @@import * as Checkbox from '$lib/components/ui/checkbox';import * as Alert from '$lib/components/ui/alert';import { environmentStore } from '$lib/stores/environment.store.svelte';- import { hasPermission } from '$lib/utils/permissions.util';+ import { hasPermission } from '$lib/utils/auth';import IfPermitted from '$lib/components/if-permitted.svelte';let { volumeName }: { volumeName: string } = $props();diff --git a/frontend/src/routes/(app)/volumes/volume-table.svelte b/frontend/src/routes/(app)/volumes/volume-table.svelteindex daf111f5f..a6c074e8b 100644--- a/frontend/src/routes/(app)/volumes/volume-table.svelte+++ b/frontend/src/routes/(app)/volumes/volume-table.svelte@@ -6,24 +6,24 @@import { toast } from 'svelte-sonner';import { openConfirmDialog } from '$lib/components/confirm-dialog';import StatusBadge from '$lib/components/badges/status-badge.svelte';- import { handleApiResultWithCallbacks } from '$lib/utils/api.util';- import { tryCatch } from '$lib/utils/try-catch';+ import { handleApiResultWithCallbacks } from '$lib/utils/api';+ import { tryCatch } from '$lib/utils/api';import { format } from 'date-fns';- import { truncateString } from '$lib/utils/string.utils';- import type { Paginated, SearchPaginationSortRequest } from '$lib/types/pagination.type';- import type { VolumeSummaryDto, VolumeSizeInfo } from '$lib/types/volume.type';+ import { truncateString } from '$lib/utils/formatting';+ import type { Paginated, SearchPaginationSortRequest } from '$lib/types/shared';+ import type { VolumeSummaryDto, VolumeSizeInfo } from '$lib/types/docker';import type { ColumnSpec, MobileFieldVisibility, BulkAction } from '$lib/components/arcane-table';import { UniversalMobileCard } from '$lib/components/arcane-table/index.js';import { m } from '$lib/paraglide/messages';import { volumeService } from '$lib/services/volume-service';- import bytes from '$lib/utils/bytes';+ import { bytes } from '$lib/utils/formatting';import { TrashIcon, InspectIcon, VolumesIcon, CalendarIcon, EllipsisIcon } from '$lib/icons';import { Spinner } from '$lib/components/ui/spinner';import settingsStore from '$lib/stores/config-store';import { onMount } from 'svelte';import { SvelteMap } from 'svelte/reactivity';import { environmentStore } from '$lib/stores/environment.store.svelte';- import { hasPermission } from '$lib/utils/permissions.util';+ import { hasPermission } from '$lib/utils/auth';let {volumes = $bindable(),diff --git a/frontend/src/routes/(auth)/login/+page.svelte b/frontend/src/routes/(auth)/login/+page.svelteindex 542e2cbda..9f31be001 100644--- a/frontend/src/routes/(auth)/login/+page.svelte+++ b/frontend/src/routes/(auth)/login/+page.svelte@@ -8,7 +8,7 @@import { m } from '$lib/paraglide/messages';import { authService } from '$lib/services/auth-service';import { queryKeys } from '$lib/query/query-keys';- import { getApplicationLogo } from '$lib/utils/image.util';+ import { getApplicationLogo } from '$lib/utils/docker';import { ArcaneButton } from '$lib/components/arcane-button/index.js';import { onMount } from 'svelte';import { createMutation, useQueryClient } from '@tanstack/svelte-query';diff --git a/frontend/src/routes/(auth)/oidc/callback/+page.svelte b/frontend/src/routes/(auth)/oidc/callback/+page.svelteindex f61aff06e..54dd5328a 100644--- a/frontend/src/routes/(auth)/oidc/callback/+page.svelte+++ b/frontend/src/routes/(auth)/oidc/callback/+page.svelte@@ -4,7 +4,7 @@import { page } from '$app/state';import { toast } from 'svelte-sonner';import userStore from '$lib/stores/user-store';- import type { User } from '$lib/types/user.type';+ import type { User } from '$lib/types/auth';import { m } from '$lib/paraglide/messages';import settingsStore from '$lib/stores/config-store';import { settingsService } from '$lib/services/settings-service';diff --git a/frontend/src/routes/+layout.ts b/frontend/src/routes/+layout.tsindex 4062e5504..82d42c2d4 100644--- a/frontend/src/routes/+layout.ts+++ b/frontend/src/routes/+layout.ts@@ -7,10 +7,10 @@ import versionService from '$lib/services/version-service';import settingsStore from '$lib/stores/config-store';import { environmentStore } from '$lib/stores/environment.store.svelte';import userStore from '$lib/stores/user-store';-import { type AppVersionInformation } from '$lib/types/application-configuration';-import type { SearchPaginationSortRequest } from '$lib/types/pagination.type';+import { type AppVersionInformation } from '$lib/types/settings';+import type { SearchPaginationSortRequest } from '$lib/types/shared';import { authService } from '$lib/services/auth-service';-import { tryCatch } from '$lib/utils/try-catch';+import { tryCatch } from '$lib/utils/api';import { QueryClient } from '@tanstack/svelte-query';import { queryKeys } from '$lib/query/query-keys';