Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions apps/web/src/components/import-from-deco-dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
27 changes: 2 additions & 25 deletions apps/web/src/components/settings/navigation-settings.tsx
Original file line number Diff line number Diff line change
@@ -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";

/**
Expand All @@ -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 (
<SettingsSection
Expand All @@ -48,24 +43,6 @@ export function NavigationSettings() {
/>
}
/>
<SettingsCardItem
icon={<Package size={16} />}
title={t("settings.navigation.nativeAssetsTitle")}
description={t("settings.navigation.nativeAssetsDescription")}
action={
<Switch
checked={nativeAssetsEnabled}
disabled={setFlag.isPending}
aria-label={t("settings.navigation.nativeAssetsTitle")}
onCheckedChange={(next) =>
setFlag.mutate("native_assets_tab", next, {
onError: () =>
toast.error(t("settings.navigation.updateError")),
})
}
/>
}
/>
</SettingsCard>
</SettingsSection>
);
Expand Down
3 changes: 0 additions & 3 deletions apps/web/src/i18n/en/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down
3 changes: 0 additions & 3 deletions apps/web/src/i18n/pt-br/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down
23 changes: 10 additions & 13 deletions apps/web/src/layouts/main-panel-tabs/use-main-panel-tabs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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-<slug>` 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-<slug>` 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({
Expand Down Expand Up @@ -450,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,
Expand Down
6 changes: 0 additions & 6 deletions packages/shared/src/organization/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<typeof OrgFlagsSchema>;
Expand Down
3 changes: 0 additions & 3 deletions packages/shared/src/tools/tool-io.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
Loading