From 10d15c8b777d95cc05df396ba4cc82372ad0c99e Mon Sep 17 00:00:00 2001 From: guitavano Date: Wed, 19 Aug 2026 15:06:31 -0300 Subject: [PATCH 1/3] feat(assets): make the native Assets tab always-on, drop the feature flag MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The external admin-MCP assets UI is being removed (decocms/admin-mcp#30), so the native per-site Assets tab is now the assets experience — no longer gated. - use-main-panel-tabs: show the Assets tab whenever a bucket is associated to the site's slug, dropping the `native_assets_tab` gate. - Remove `native_assets_tab` from OrgFlagsSchema + its Navigation settings toggle and i18n; regenerate tool contracts. Co-Authored-By: Claude Opus 4.8 --- .../settings/navigation-settings.tsx | 27 ++----------------- apps/web/src/i18n/en/settings.ts | 3 --- apps/web/src/i18n/pt-br/settings.ts | 3 --- .../main-panel-tabs/use-main-panel-tabs.ts | 21 ++++++--------- packages/shared/src/organization/schema.ts | 6 ----- packages/shared/src/tools/tool-io.ts | 3 --- 6 files changed, 10 insertions(+), 53 deletions(-) diff --git a/apps/web/src/components/settings/navigation-settings.tsx b/apps/web/src/components/settings/navigation-settings.tsx index a10bc85027..e1312a8aa1 100644 --- a/apps/web/src/components/settings/navigation-settings.tsx +++ b/apps/web/src/components/settings/navigation-settings.tsx @@ -1,16 +1,12 @@ import { toast } from "sonner"; import { Switch } from "@decocms/ui/components/switch.tsx"; -import { LayoutLeft, Package } from "@untitledui/icons"; +import { LayoutLeft } from "@untitledui/icons"; import { SettingsCard, SettingsCardItem, SettingsSection, } from "@/components/settings/settings-section"; -import { - useNavV2, - useOrgFlag, - useSetOrgFlag, -} from "@/hooks/use-organization-settings"; +import { useNavV2, useSetOrgFlag } from "@/hooks/use-organization-settings"; import { useT } from "@/i18n/use-t.ts"; /** @@ -22,7 +18,6 @@ import { useT } from "@/i18n/use-t.ts"; export function NavigationSettings() { const t = useT(); const enabled = useNavV2(); - const nativeAssetsEnabled = useOrgFlag("native_assets_tab"); const setFlag = useSetOrgFlag(); return ( } /> - } - title={t("settings.navigation.nativeAssetsTitle")} - description={t("settings.navigation.nativeAssetsDescription")} - action={ - - setFlag.mutate("native_assets_tab", next, { - onError: () => - toast.error(t("settings.navigation.updateError")), - }) - } - /> - } - /> ); diff --git a/apps/web/src/i18n/en/settings.ts b/apps/web/src/i18n/en/settings.ts index 274dd081ab..be89be0ade 100644 --- a/apps/web/src/i18n/en/settings.ts +++ b/apps/web/src/i18n/en/settings.ts @@ -446,9 +446,6 @@ export const settings = { "settings.navigation.navV2Title": "First-class navigation", "settings.navigation.navV2Description": "The sidebar lists destinations (Reports, Library, Tasks) instead of chats, and the chat list moves to the top of the chat panel. On by default for report organizations.", - "settings.navigation.nativeAssetsTitle": "Native Assets tab", - "settings.navigation.nativeAssetsDescription": - "Show a native Assets tab that browses the site's associated storage bucket, instead of the external admin view. Appears only on sites that have a bucket configured.", "settings.orgGeneral.organization": "Organization", "settings.mainAgent.title": "Main agent", "settings.mainAgent.description": diff --git a/apps/web/src/i18n/pt-br/settings.ts b/apps/web/src/i18n/pt-br/settings.ts index dcd1326a5d..dd01de8f7a 100644 --- a/apps/web/src/i18n/pt-br/settings.ts +++ b/apps/web/src/i18n/pt-br/settings.ts @@ -465,9 +465,6 @@ export const settings = { "settings.navigation.navV2Title": "Navegação de primeira classe", "settings.navigation.navV2Description": "A barra lateral lista destinos (Relatórios, Biblioteca, Tarefas) em vez de chats, e a lista de chats vai para o topo do painel de chat. Ativada por padrão em organizações de relatório.", - "settings.navigation.nativeAssetsTitle": "Aba de Assets nativa", - "settings.navigation.nativeAssetsDescription": - "Mostra uma aba de Assets nativa que navega o bucket de armazenamento associado ao site, em vez da view externa de admin. Aparece s\u00f3 em sites que t\u00eam um bucket configurado.", "settings.orgGeneral.organization": "Organiza\u00e7\u00e3o", "settings.mainAgent.title": "Agente principal", "settings.mainAgent.description": diff --git a/apps/web/src/layouts/main-panel-tabs/use-main-panel-tabs.ts b/apps/web/src/layouts/main-panel-tabs/use-main-panel-tabs.ts index f836e38078..12b64262e1 100644 --- a/apps/web/src/layouts/main-panel-tabs/use-main-panel-tabs.ts +++ b/apps/web/src/layouts/main-panel-tabs/use-main-panel-tabs.ts @@ -68,11 +68,7 @@ import { import { useCapability } from "@/hooks/use-capability"; import { useFileConfigsQuery } from "@/hooks/use-file-configs"; import { matchSiteSlugConfig } from "@/components/file-picker/match-site-slug-config"; -import { - useNavV2, - useOrgFlag, - useReportsOnly, -} from "@/hooks/use-organization-settings"; +import { useNavV2, useReportsOnly } from "@/hooks/use-organization-settings"; import { useT } from "@/i18n/use-t.ts"; export type AgentTabDef = { @@ -293,19 +289,18 @@ export function useMainPanelTabs(ctx: { const showContentTab = hasEditableDecoContent(decofile, meta); /** - * Assets is a per-site tab behind the `native_assets_tab` org flag: it shows - * only when the flag is on AND an S3 bucket is associated to this site's slug - * (managed `deco-assets-` or a BYOB bucket). Uses the non-suspense - * configs query so the bar never blocks on the bucket list. + * Assets is a per-site tab: it shows whenever an S3 bucket is associated to + * this site's slug (managed `deco-assets-` or a BYOB bucket). Uses the + * non-suspense configs query so the bar never blocks on the bucket list. */ - const nativeAssetsTabEnabled = useOrgFlag("native_assets_tab"); const siteSlug = (entity?.metadata as { siteSlug?: string | null } | undefined)?.siteSlug ?? null; const fileConfigsQuery = useFileConfigsQuery(); - const showAssetsTab = - nativeAssetsTabEnabled && - !!matchSiteSlugConfig(fileConfigsQuery.data?.configs ?? [], siteSlug); + const showAssetsTab = !!matchSiteSlugConfig( + fileConfigsQuery.data?.configs ?? [], + siteSlug, + ); const { activeTab: rawActiveTab, mainOpen: rawMainOpen } = resolveActiveTabAndOpen({ diff --git a/packages/shared/src/organization/schema.ts b/packages/shared/src/organization/schema.ts index 865a0df608..9cd3e1218f 100644 --- a/packages/shared/src/organization/schema.ts +++ b/packages/shared/src/organization/schema.ts @@ -173,12 +173,6 @@ export const OrgFlagsSchema = z.object({ .describe( "When a report import creates a task board item without an assignee, delegate it to the Super Agent automatically instead of leaving it unassigned.", ), - native_assets_tab: z - .boolean() - .optional() - .describe( - "Show the native Assets tab (a browser over the site's associated S3 bucket) instead of relying on the external admin-MCP fetch_assets view. Off by default while in development.", - ), }); export type OrgFlags = z.infer; diff --git a/packages/shared/src/tools/tool-io.ts b/packages/shared/src/tools/tool-io.ts index 7fe12fba7d..f6617d9630 100644 --- a/packages/shared/src/tools/tool-io.ts +++ b/packages/shared/src/tools/tool-io.ts @@ -127,7 +127,6 @@ export interface StudioToolIO { auto_merge?: boolean | undefined; cheap_reviewer_model?: boolean | undefined; auto_assign_report_tasks_to_super_agent?: boolean | undefined; - native_assets_tab?: boolean | undefined; } | null | undefined; @@ -196,7 +195,6 @@ export interface StudioToolIO { auto_merge?: boolean | undefined; cheap_reviewer_model?: boolean | undefined; auto_assign_report_tasks_to_super_agent?: boolean | undefined; - native_assets_tab?: boolean | undefined; } | undefined; main_agent_id?: string | null | undefined; @@ -265,7 +263,6 @@ export interface StudioToolIO { auto_merge?: boolean | undefined; cheap_reviewer_model?: boolean | undefined; auto_assign_report_tasks_to_super_agent?: boolean | undefined; - native_assets_tab?: boolean | undefined; } | null | undefined; From e0b6a0ad743ca881b7a4389931911e5191101159 Mon Sep 17 00:00:00 2001 From: guitavano Date: Wed, 19 Aug 2026 15:10:17 -0300 Subject: [PATCH 2/3] feat(assets): stop creating the fetch_assets pinned view on deco.cx import MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The native always-on Assets tab replaces the admin-MCP assets view, so the deco.cx import no longer pins `fetch_assets`. The Monitor pinned view (get_monitor_data) stays — admin-MCP still serves it. Co-Authored-By: Claude Opus 4.8 --- apps/web/src/components/import-from-deco-dialog.tsx | 6 ------ 1 file changed, 6 deletions(-) diff --git a/apps/web/src/components/import-from-deco-dialog.tsx b/apps/web/src/components/import-from-deco-dialog.tsx index 25e880758e..99a030deef 100644 --- a/apps/web/src/components/import-from-deco-dialog.tsx +++ b/apps/web/src/components/import-from-deco-dialog.tsx @@ -312,12 +312,6 @@ export function ImportFromDecoDialog({ themeColor: "#22C55E", slug, pinnedViews: [ - { - connectionId: connId, - toolName: "fetch_assets", - label: "Assets", - icon: null, - }, { connectionId: connId, toolName: "get_monitor_data", From 8f4cf9cd2e41a7c963a648a101edfe577be9c51b Mon Sep 17 00:00:00 2001 From: guitavano Date: Wed, 19 Aug 2026 15:12:15 -0300 Subject: [PATCH 3/3] fix(assets): drop stale fetch_assets pinned view on already-imported sites MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit admin-MCP no longer serves fetch_assets (decocms/admin-mcp#30), so sites imported before this change carry a dead "Assets" pinned view. Skip it at render time — the native always-on Assets tab replaces it — so no data migration is needed. Co-Authored-By: Claude Opus 4.8 --- apps/web/src/layouts/main-panel-tabs/use-main-panel-tabs.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/web/src/layouts/main-panel-tabs/use-main-panel-tabs.ts b/apps/web/src/layouts/main-panel-tabs/use-main-panel-tabs.ts index 12b64262e1..c6963f366a 100644 --- a/apps/web/src/layouts/main-panel-tabs/use-main-panel-tabs.ts +++ b/apps/web/src/layouts/main-panel-tabs/use-main-panel-tabs.ts @@ -445,6 +445,8 @@ export function useMainPanelTabs(ctx: { }); } for (const pv of pinnedViews) { + // Retired admin-MCP view, now the native Assets tab: drop stale pins. + if (pv.toolName === "fetch_assets") continue; const id = formatPinnedViewTabId(pv.connectionId, pv.toolName); pinnedTabMap.set(id, { id,