From 6150347c2a9911a5f2705021bf29bee5abe14946 Mon Sep 17 00:00:00 2001 From: Till-JS <101404291+Till-JS@users.noreply.github.com> Date: Sat, 29 Nov 2025 15:17:10 +0100 Subject: [PATCH] fix(shared-branding): filter archived apps from app switcher MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add archived field to ManaApp interface - Mark memoro, maerchenzauber, wisekeep, nutriphi as archived - Add getActiveManaApps helper function - Update getPillAppItems to only return active apps 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- packages/shared-branding/src/index.ts | 1 + packages/shared-branding/src/mana-apps.ts | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/packages/shared-branding/src/index.ts b/packages/shared-branding/src/index.ts index 89f2424ef..8e30f3afd 100644 --- a/packages/shared-branding/src/index.ts +++ b/packages/shared-branding/src/index.ts @@ -36,6 +36,7 @@ export { getManaApp, getManaAppsByStatus, getAvailableManaApps, + getActiveManaApps, APP_STATUS_LABELS, APP_SLIDER_LABELS, APP_URLS, diff --git a/packages/shared-branding/src/mana-apps.ts b/packages/shared-branding/src/mana-apps.ts index 58f781906..0ffe8065a 100644 --- a/packages/shared-branding/src/mana-apps.ts +++ b/packages/shared-branding/src/mana-apps.ts @@ -23,6 +23,8 @@ export interface ManaApp { comingSoon: boolean; status: AppStatus; url?: string; // Optional URL for the app + /** Whether this app is archived (in apps-archived folder) */ + archived?: boolean; } /** @@ -61,6 +63,7 @@ export const MANA_APPS: ManaApp[] = [ color: '#f8d62b', comingSoon: false, status: 'published', + archived: true, }, { id: 'presi', @@ -109,6 +112,7 @@ export const MANA_APPS: ManaApp[] = [ color: '#FF6B9D', comingSoon: true, status: 'beta', + archived: true, }, { id: 'picture', @@ -157,6 +161,7 @@ export const MANA_APPS: ManaApp[] = [ color: '#6366f1', comingSoon: true, status: 'planning', + archived: true, }, { id: 'nutriphi', @@ -173,6 +178,7 @@ export const MANA_APPS: ManaApp[] = [ color: '#10b981', comingSoon: false, status: 'development', + archived: true, }, ]; @@ -197,6 +203,13 @@ export function getAvailableManaApps(): ManaApp[] { return MANA_APPS.filter((app) => !app.comingSoon); } +/** + * Get only active (non-archived) apps + */ +export function getActiveManaApps(): ManaApp[] { + return MANA_APPS.filter((app) => !app.archived); +} + /** * Status labels in German and English */ @@ -260,6 +273,7 @@ export interface PillAppItemConfig { /** * Get app items for PillNavigation app switcher + * Only returns active (non-archived) apps * @param currentAppId - The ID of the current app to mark as active * @param isDev - Whether to use development URLs (default: auto-detect) * @param customUrls - Optional custom URL overrides per app @@ -271,7 +285,8 @@ export function getPillAppItems( ): PillAppItemConfig[] { const isDevMode = isDev ?? (typeof window !== 'undefined' && window.location.hostname === 'localhost'); - return MANA_APPS.map((app) => ({ + // Only show active (non-archived) apps + return getActiveManaApps().map((app) => ({ id: app.id, name: app.name, url: customUrls?.[app.id] || (isDevMode ? APP_URLS[app.id].dev : APP_URLS[app.id].prod),