Show enabled alpha apps in sidebar and app store (#1449)

This commit is contained in:
Konsti Wohlwend 2026-05-20 11:07:49 -07:00 committed by GitHub
parent 512099ed23
commit 2c620aa208
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 5 deletions

View File

@ -46,9 +46,9 @@ export default function PageClient() {
const filteredApps = useMemo(() => {
let apps = Object.keys(ALL_APPS) as AppId[];
// Filter out alpha apps in production
// Filter out alpha apps in production, but keep enabled ones
if (process.env.NODE_ENV !== "development") {
apps = apps.filter(appId => ALL_APPS[appId].stage !== "alpha");
apps = apps.filter(appId => ALL_APPS[appId].stage !== "alpha" || installedAppsSet.has(appId));
}
// Apply category filter
@ -88,14 +88,14 @@ export default function PageClient() {
const getCategoryCount = (categoryId: string) => {
if (categoryId === "installed") return installedApps.length;
if (categoryId === "all") return Object.keys(ALL_APPS).filter(appId =>
process.env.NODE_ENV === "development" || ALL_APPS[appId as AppId].stage !== "alpha"
process.env.NODE_ENV === "development" || ALL_APPS[appId as AppId].stage !== "alpha" || installedAppsSet.has(appId as AppId)
).length;
const category = CATEGORIES.find(c => c.id === categoryId);
if (!category) return 0;
return (Object.entries(ALL_APPS) as [AppId, typeof ALL_APPS[AppId]][]).filter(([appId, app]) => {
if (process.env.NODE_ENV !== "development" && app.stage === "alpha") return false;
if (process.env.NODE_ENV !== "development" && app.stage === "alpha" && !installedAppsSet.has(appId)) return false;
return app.tags.some((tag: string) => category.tags.includes(tag));
}).length;
};

View File

@ -38,9 +38,13 @@ export function isAppEnabled(installedApps: InstalledAppsMap, appId: AppId): boo
/**
* Get all enabled app IDs using centralized enabled/sub-app logic.
*
* Unlike `getAllAvailableAppIds`, this intentionally includes alpha-stage apps
* that are explicitly enabled. The alpha filter only gates *discovery*
* (app store listing, onboarding wizard), not functionality.
*/
export function getEnabledAppIds(installedApps: InstalledAppsMap): AppId[] {
return getAllAvailableAppIds().filter((appId) => isAppEnabled(installedApps, appId));
return (Object.keys(ALL_APPS) as AppId[]).filter((appId) => isAppEnabled(installedApps, appId));
}
/**