@agent-native/dispatch 0.19.2 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions/provider-api-register.d.ts +5 -5
- package/dist/components/admin-navigation.d.ts +2 -1
- package/dist/components/admin-navigation.d.ts.map +1 -1
- package/dist/components/admin-navigation.js +10 -7
- package/dist/components/admin-navigation.js.map +1 -1
- package/dist/components/app-icon.d.ts +9 -0
- package/dist/components/app-icon.d.ts.map +1 -0
- package/dist/components/app-icon.js +85 -0
- package/dist/components/app-icon.js.map +1 -0
- package/dist/components/app-list-row.d.ts +12 -0
- package/dist/components/app-list-row.d.ts.map +1 -0
- package/dist/components/app-list-row.js +11 -0
- package/dist/components/app-list-row.js.map +1 -0
- package/dist/components/app-open-actions.d.ts +17 -0
- package/dist/components/app-open-actions.d.ts.map +1 -0
- package/dist/components/app-open-actions.js +20 -0
- package/dist/components/app-open-actions.js.map +1 -0
- package/dist/components/connected-app-card.d.ts +2 -1
- package/dist/components/connected-app-card.d.ts.map +1 -1
- package/dist/components/connected-app-card.js +8 -8
- package/dist/components/connected-app-card.js.map +1 -1
- package/dist/components/dispatch-control-plane.d.ts.map +1 -1
- package/dist/components/dispatch-control-plane.js +21 -14
- package/dist/components/dispatch-control-plane.js.map +1 -1
- package/dist/components/layout/Layout.d.ts.map +1 -1
- package/dist/components/layout/Layout.js +40 -19
- package/dist/components/layout/Layout.js.map +1 -1
- package/dist/components/layout/workspace-apps-rail.d.ts.map +1 -1
- package/dist/components/layout/workspace-apps-rail.js +10 -10
- package/dist/components/layout/workspace-apps-rail.js.map +1 -1
- package/dist/components/other-apps-section.d.ts +31 -0
- package/dist/components/other-apps-section.d.ts.map +1 -0
- package/dist/components/other-apps-section.js +59 -0
- package/dist/components/other-apps-section.js.map +1 -0
- package/dist/components/workspace-app-card.d.ts.map +1 -1
- package/dist/components/workspace-app-card.js +38 -28
- package/dist/components/workspace-app-card.js.map +1 -1
- package/dist/components/workspace-template-card.d.ts +8 -2
- package/dist/components/workspace-template-card.d.ts.map +1 -1
- package/dist/components/workspace-template-card.js +17 -13
- package/dist/components/workspace-template-card.js.map +1 -1
- package/dist/lib/other-apps.d.ts.map +1 -1
- package/dist/lib/other-apps.js +5 -1
- package/dist/lib/other-apps.js.map +1 -1
- package/dist/lib/workspace-apps.d.ts +1 -0
- package/dist/lib/workspace-apps.d.ts.map +1 -1
- package/dist/lib/workspace-apps.js +3 -0
- package/dist/lib/workspace-apps.js.map +1 -1
- package/dist/routes/index.d.ts.map +1 -1
- package/dist/routes/index.js +0 -2
- package/dist/routes/index.js.map +1 -1
- package/dist/routes/pages/admin._index.d.ts.map +1 -1
- package/dist/routes/pages/admin._index.js +32 -7
- package/dist/routes/pages/admin._index.js.map +1 -1
- package/dist/routes/pages/apps.$appId.d.ts.map +1 -1
- package/dist/routes/pages/apps.$appId.js +62 -13
- package/dist/routes/pages/apps.$appId.js.map +1 -1
- package/dist/routes/pages/apps.d.ts +1 -1
- package/dist/routes/pages/apps.d.ts.map +1 -1
- package/dist/routes/pages/apps.js +21 -30
- package/dist/routes/pages/apps.js.map +1 -1
- package/package.json +2 -2
- package/src/components/admin-navigation.tsx +21 -16
- package/src/components/app-icon.tsx +149 -0
- package/src/components/app-list-row.tsx +40 -0
- package/src/components/app-open-actions.tsx +111 -0
- package/src/components/connected-app-card.tsx +30 -34
- package/src/components/dispatch-control-plane.spec.tsx +28 -1
- package/src/components/dispatch-control-plane.tsx +122 -48
- package/src/components/layout/Layout.spec.tsx +4 -4
- package/src/components/layout/Layout.tsx +86 -55
- package/src/components/layout/workspace-apps-rail.tsx +20 -21
- package/src/components/other-apps-section.tsx +195 -0
- package/src/components/workspace-app-card.spec.tsx +58 -32
- package/src/components/workspace-app-card.tsx +222 -158
- package/src/components/workspace-template-card.spec.tsx +45 -7
- package/src/components/workspace-template-card.tsx +74 -81
- package/src/lib/other-apps.spec.ts +31 -0
- package/src/lib/other-apps.ts +9 -1
- package/src/lib/workspace-apps.ts +4 -0
- package/src/routes/index.spec.ts +2 -1
- package/src/routes/index.ts +0 -2
- package/src/routes/pages/admin._index.tsx +85 -17
- package/src/routes/pages/apps.$appId.tsx +144 -57
- package/src/routes/pages/apps.tsx +76 -147
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-apps-rail.js","sourceRoot":"","sources":["../../../src/components/layout/workspace-apps-rail.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,IAAI,EAAE,MAAM,gCAAgC,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"workspace-apps-rail.js","sourceRoot":"","sources":["../../../src/components/layout/workspace-apps-rail.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,IAAI,EAAE,MAAM,gCAAgC,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEjD,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AACrC,OAAO,EACL,iBAAiB,EACjB,gBAAgB,GAEjB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAExE,SAAS,aAAa,CAAC,KAAgC;IACrD,MAAM,OAAO,GAAG,KAAK,EAAE,IAAI,EAAE,CAAC;IAC9B,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IAE1B,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,OAAO,E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AAa,CAAC,GAAG,CAAC,IAA3B,GAAG,CAAC,EAAE,CAA2B,CAAC;gBACpD,CAAC,CAAC,GACC,IACD,CACP,CAAC;AACJ,CAAC","sourcesContent":["import { useActionQuery } from \"@agent-native/core/client/hooks\";\nimport { useT } from \"@agent-native/core/client/i18n\";\nimport { IconApps } from \"@tabler/icons-react\";\nimport { Link, useLocation } from \"react-router\";\n\nimport { cn } from \"../../lib/utils\";\nimport {\n workspaceAppRoute,\n workspaceAppHref,\n type WorkspaceAppSummary,\n} from \"../../lib/workspace-apps\";\nimport { AppIcon } from \"../app-icon\";\nimport { Tooltip, TooltipContent, TooltipTrigger } from \"../ui/tooltip\";\n\nfunction pathFromValue(value: string | null | undefined): string | null {\n const trimmed = value?.trim();\n if (!trimmed) return null;\n\n try {\n const pathname = new URL(trimmed, \"https://dispatch.local\").pathname;\n return pathname.replace(/\\/+$/, \"\") || \"/\";\n } catch {\n // coercion-ok: malformed app URLs cannot match a workspace route.\n return null;\n }\n}\n\nfunction appMatchesPath(app: WorkspaceAppSummary, pathname: string): boolean {\n const appRoute = workspaceAppRoute(app.id);\n if (pathname === appRoute || pathname.startsWith(`${appRoute}/`)) {\n return true;\n }\n\n const candidatePaths = [app.path, app.url]\n .map(pathFromValue)\n .filter((path): path is string => !!path);\n\n return candidatePaths.some(\n (path) => pathname === path || pathname.startsWith(`${path}/`),\n );\n}\n\nfunction appLabel(app: WorkspaceAppSummary): string {\n return app.name.trim() || app.id;\n}\n\nexport function WorkspaceAppsRail({\n collapsed = false,\n onNavigate,\n}: {\n collapsed?: boolean;\n onNavigate?: () => void;\n}) {\n const t = useT();\n const location = useLocation();\n const appsQuery = useActionQuery<WorkspaceAppSummary[]>(\n \"list-workspace-apps\",\n {\n includeAgentCards: false,\n },\n );\n if (appsQuery.isError || !appsQuery.data) return null;\n\n const apps = appsQuery.data\n .filter(\n (app) =>\n !app.isDispatch &&\n !app.archived &&\n app.status !== \"pending\" &&\n !!workspaceAppHref(app),\n )\n .sort((a, b) => appLabel(a).localeCompare(appLabel(b)));\n\n if (apps.length === 0) return null;\n\n const renderAppLink = (app: WorkspaceAppSummary) => {\n const href = workspaceAppHref(app);\n if (!href) return null;\n\n const label = appLabel(app);\n const active = appMatchesPath(app, location.pathname);\n const link = (\n <Link\n to={workspaceAppRoute(app.id)}\n aria-current={active ? \"page\" : undefined}\n aria-label={collapsed ? label : undefined}\n onClick={onNavigate}\n className={cn(\n \"flex h-9 items-center rounded-md text-sm transition-colors\",\n collapsed ? \"w-9 justify-center\" : \"w-full gap-2 px-2 text-start\",\n active\n ? \"bg-sidebar-accent font-medium text-sidebar-accent-foreground\"\n : \"text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground\",\n )}\n >\n <AppIcon\n id={app.id}\n name={label}\n size=\"sm\"\n className={cn(\"size-5 rounded-md\", active && \"ring-1 ring-ring/30\")}\n />\n {!collapsed ? <span className=\"truncate\">{label}</span> : null}\n </Link>\n );\n\n if (!collapsed) return link;\n\n return (\n <Tooltip>\n <TooltipTrigger asChild>{link}</TooltipTrigger>\n <TooltipContent side=\"right\">{label}</TooltipContent>\n </Tooltip>\n );\n };\n\n return (\n <div\n className={cn(\n \"mt-4 border-t border-sidebar-border pt-3\",\n collapsed ? \"px-1.5\" : \"px-2\",\n )}\n data-dispatch-apps-rail\n >\n {!collapsed ? (\n <div className=\"mb-1 flex items-center gap-1.5 px-2 text-[11px] font-medium uppercase tracking-wide text-sidebar-foreground/45\">\n <IconApps size={13} />\n <span>\n {t(\"dispatch.pages.workspaceApps\", {\n defaultValue: \"Workspace apps\",\n })}\n </span>\n </div>\n ) : (\n <span className=\"sr-only\">\n {t(\"dispatch.pages.workspaceApps\", {\n defaultValue: \"Workspace apps\",\n })}\n </span>\n )}\n <ul\n className={cn(\n collapsed ? \"flex flex-col items-center gap-1\" : \"space-y-0.5\",\n )}\n >\n {apps.map((app) => {\n const href = workspaceAppHref(app);\n if (!href) return null;\n return <li key={app.id}>{renderAppLink(app)}</li>;\n })}\n </ul>\n </div>\n );\n}\n"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type ConnectedAppSummary } from "../lib/other-apps.js";
|
|
2
|
+
import type { WorkspaceAppId } from "../lib/other-apps.js";
|
|
3
|
+
import { type CuratedWorkspaceTemplate, type CuratedWorkspaceTemplatesResult, type WorkspaceTemplateLabels } from "./workspace-template-card.js";
|
|
4
|
+
type OtherAppEntry = {
|
|
5
|
+
kind: "template";
|
|
6
|
+
template: CuratedWorkspaceTemplate;
|
|
7
|
+
} | {
|
|
8
|
+
kind: "connected";
|
|
9
|
+
app: ConnectedAppSummary;
|
|
10
|
+
};
|
|
11
|
+
export declare function mergeOtherAppEntries({ templates, connectedApps, workspaceApps, }: {
|
|
12
|
+
templates?: CuratedWorkspaceTemplatesResult;
|
|
13
|
+
connectedApps: ConnectedAppSummary[];
|
|
14
|
+
workspaceApps: WorkspaceAppId[];
|
|
15
|
+
}): OtherAppEntry[];
|
|
16
|
+
export declare function OtherAppsSection({ templates, connectedApps, workspaceApps, templatesLoading, connectedAppsLoading, templatesError, connectedAppsError, onRetryTemplates, onRetryConnectedApps, templateLabels, onRemixSuccess, className, }: {
|
|
17
|
+
templates?: CuratedWorkspaceTemplatesResult;
|
|
18
|
+
connectedApps?: ConnectedAppSummary[];
|
|
19
|
+
workspaceApps: WorkspaceAppId[];
|
|
20
|
+
templatesLoading?: boolean;
|
|
21
|
+
connectedAppsLoading?: boolean;
|
|
22
|
+
templatesError?: Error | null;
|
|
23
|
+
connectedAppsError?: Error | null;
|
|
24
|
+
onRetryTemplates?: () => void;
|
|
25
|
+
onRetryConnectedApps?: () => void;
|
|
26
|
+
templateLabels?: Partial<WorkspaceTemplateLabels>;
|
|
27
|
+
onRemixSuccess?: (result: unknown, template: CuratedWorkspaceTemplate) => void;
|
|
28
|
+
className?: string;
|
|
29
|
+
}): import("node_modules/@types/react").JSX.Element | null;
|
|
30
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=other-apps-section.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"other-apps-section.d.ts","sourceRoot":"","sources":["../../src/components/other-apps-section.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAmB,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC9E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAUxD,OAAO,EAEL,KAAK,wBAAwB,EAC7B,KAAK,+BAA+B,EACpC,KAAK,uBAAuB,EAC7B,MAAM,2BAA2B,CAAC;AAEnC,KAAK,aAAa,GACd;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,QAAQ,EAAE,wBAAwB,CAAA;CAAE,GACxD;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,GAAG,EAAE,mBAAmB,CAAA;CAAE,CAAC;AAepD,wBAAgB,oBAAoB,CAAC,EACnC,SAAS,EACT,aAAa,EACb,aAAa,GACd,EAAE;IACD,SAAS,CAAC,EAAE,+BAA+B,CAAC;IAC5C,aAAa,EAAE,mBAAmB,EAAE,CAAC;IACrC,aAAa,EAAE,cAAc,EAAE,CAAC;CACjC,GAAG,aAAa,EAAE,CAsBlB;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,SAAS,EACT,aAAkB,EAClB,aAAa,EACb,gBAAwB,EACxB,oBAA4B,EAC5B,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,cAAc,EACd,cAAc,EACd,SAAS,GACV,EAAE;IACD,SAAS,CAAC,EAAE,+BAA+B,CAAC;IAC5C,aAAa,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACtC,aAAa,EAAE,cAAc,EAAE,CAAC;IAChC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,cAAc,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;IAC9B,kBAAkB,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;IAClC,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAC;IAClC,cAAc,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,CAAC;IAClD,cAAc,CAAC,EAAE,CACf,MAAM,EAAE,OAAO,EACf,QAAQ,EAAE,wBAAwB,KAC/B,IAAI,CAAC;IACV,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,0DAwEA"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useT } from "@agent-native/core/client/i18n";
|
|
3
|
+
import { IconStack2 } from "@tabler/icons-react";
|
|
4
|
+
import { filterOtherApps } from "../lib/other-apps.js";
|
|
5
|
+
import { cn } from "../lib/utils.js";
|
|
6
|
+
import { ActionQueryError } from "./action-query-error.js";
|
|
7
|
+
import { APP_LIST_GRID_CLASS, APP_LIST_GRID_ROW_CLASS, AppList, } from "./app-list-row.js";
|
|
8
|
+
import { ConnectedAppCard } from "./connected-app-card.js";
|
|
9
|
+
import { Skeleton } from "./ui/skeleton.js";
|
|
10
|
+
import { WorkspaceTemplateCard, } from "./workspace-template-card.js";
|
|
11
|
+
function templateKey(template) {
|
|
12
|
+
return (template.templateId || template.id || template.appId || template.name)
|
|
13
|
+
.trim()
|
|
14
|
+
.toLowerCase();
|
|
15
|
+
}
|
|
16
|
+
function getTemplateItems(result) {
|
|
17
|
+
if (!result)
|
|
18
|
+
return [];
|
|
19
|
+
return Array.isArray(result) ? result : result.templates;
|
|
20
|
+
}
|
|
21
|
+
export function mergeOtherAppEntries({ templates, connectedApps, workspaceApps, }) {
|
|
22
|
+
const workspaceAppIds = new Set(workspaceApps.map((app) => app.id.trim().toLowerCase()));
|
|
23
|
+
const seen = new Set();
|
|
24
|
+
const entries = [];
|
|
25
|
+
for (const template of getTemplateItems(templates)) {
|
|
26
|
+
const id = templateKey(template);
|
|
27
|
+
if (!id || template.installed || workspaceAppIds.has(id))
|
|
28
|
+
continue;
|
|
29
|
+
seen.add(id);
|
|
30
|
+
entries.push({ kind: "template", template });
|
|
31
|
+
}
|
|
32
|
+
for (const app of filterOtherApps(connectedApps, workspaceApps)) {
|
|
33
|
+
const id = app.id.trim().toLowerCase();
|
|
34
|
+
if (seen.has(id))
|
|
35
|
+
continue;
|
|
36
|
+
seen.add(id);
|
|
37
|
+
entries.push({ kind: "connected", app });
|
|
38
|
+
}
|
|
39
|
+
return entries;
|
|
40
|
+
}
|
|
41
|
+
export function OtherAppsSection({ templates, connectedApps = [], workspaceApps, templatesLoading = false, connectedAppsLoading = false, templatesError, connectedAppsError, onRetryTemplates, onRetryConnectedApps, templateLabels, onRemixSuccess, className, }) {
|
|
42
|
+
const t = useT();
|
|
43
|
+
const entries = mergeOtherAppEntries({
|
|
44
|
+
templates,
|
|
45
|
+
connectedApps,
|
|
46
|
+
workspaceApps,
|
|
47
|
+
});
|
|
48
|
+
const isLoading = templatesLoading || connectedAppsLoading;
|
|
49
|
+
const hasError = Boolean(templatesError || connectedAppsError);
|
|
50
|
+
if (!isLoading && !hasError && entries.length === 0)
|
|
51
|
+
return null;
|
|
52
|
+
return (_jsxs("section", { className: cn("space-y-3 border-t pt-6", className), children: [_jsxs("div", { className: "flex min-w-0 items-start gap-2", children: [_jsx(IconStack2, { size: 16, className: "mt-0.5 shrink-0 text-muted-foreground" }), _jsxs("div", { className: "min-w-0", children: [_jsx("h2", { className: "truncate text-sm font-semibold text-foreground", children: t("dispatch.pages.otherApps", { defaultValue: "Other apps" }) }), entries.length > 0 ? (_jsx("p", { className: "mt-0.5 text-xs text-muted-foreground", children: t("dispatch.pages.availableCount", {
|
|
53
|
+
count: entries.length,
|
|
54
|
+
}) })) : null] })] }), templatesError ? (_jsx(ActionQueryError, { error: templatesError, onRetry: () => onRetryTemplates?.() })) : null, connectedAppsError ? (_jsx(ActionQueryError, { error: connectedAppsError, onRetry: () => onRetryConnectedApps?.() })) : null, isLoading && entries.length === 0 ? (_jsx(OtherAppsSkeletonList, {})) : entries.length > 0 ? (_jsx(AppList, { className: APP_LIST_GRID_CLASS, children: entries.map((entry) => entry.kind === "template" ? (_jsx(WorkspaceTemplateCard, { template: entry.template, labels: templateLabels, catalog: true, className: APP_LIST_GRID_ROW_CLASS, onRemixSuccess: onRemixSuccess }, `template:${templateKey(entry.template)}`)) : (_jsx(ConnectedAppCard, { app: entry.app, className: APP_LIST_GRID_ROW_CLASS }, `connected:${entry.app.id}`))) })) : null] }));
|
|
55
|
+
}
|
|
56
|
+
function OtherAppsSkeletonList() {
|
|
57
|
+
return (_jsx(AppList, { className: APP_LIST_GRID_CLASS, children: Array.from({ length: 4 }).map((_, index) => (_jsxs("div", { className: cn("flex min-w-0 items-center gap-3 border-b px-4 py-3.5 last:border-b-0", APP_LIST_GRID_ROW_CLASS), children: [_jsx(Skeleton, { className: "size-8 shrink-0 rounded-xl" }), _jsxs("div", { className: "min-w-0 flex-1 space-y-2", children: [_jsx(Skeleton, { className: "h-4 w-32" }), _jsx(Skeleton, { className: "h-3 w-2/3" })] }), _jsx(Skeleton, { className: "h-9 w-24 shrink-0 rounded-md" })] }, index))) }));
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=other-apps-section.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"other-apps-section.js","sourceRoot":"","sources":["../../src/components/other-apps-section.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,gCAAgC,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,EAAE,eAAe,EAA4B,MAAM,mBAAmB,CAAC;AAE9E,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EACL,mBAAmB,EACnB,uBAAuB,EACvB,OAAO,GACR,MAAM,gBAAgB,CAA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,IAEf,GAAG,EAAE,KAAK,CAAC,GAAG,EACd,SAAS,EAAE,uBAAuB,IAF7B,aAAa,KAAK,CAAC,GAAG,CAAC,EAAE,EAAE,CAGhC,CACH,CACF,GACO,CACX,CAAC,CAAC,CAAC,IAAI,IACA,CACX,CAAC;AACJ,CAAC;AAED,SAAS,qBAAqB;IAC5B,OAAO,CACL,KAAC,OAAO,IAAC,SAAS,EAAE,mBAAmB,YACpC,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,CAC3C,eAEE,SAAS,EAAE,EAAE,CACX,sEAAsE,EACtE,uBAAuB,CACxB,aAED,KAAC,QAAQ,IAAC,SAAS,EAAC,4BAA4B,GAAG,EACnD,eAAK,SAAS,EAAC,0BAA0B,aACvC,KAAC,QAAQ,IAAC,SAAS,EAAC,UAAU,GAAG,EACjC,KAAC,QAAQ,IAAC,SAAS,EAAC,WAAW,GAAG,IAC9B,EACN,KAAC,QAAQ,IAAC,SAAS,EAAC,8BAA8B,GAAG,KAXhD,KAAK,CAYN,CACP,CAAC,GACM,CACX,CAAC;AACJ,CAAC","sourcesContent":["import { useT } from \"@agent-native/core/client/i18n\";\nimport { IconStack2 } from \"@tabler/icons-react\";\n\nimport { filterOtherApps, type ConnectedAppSummary } from \"../lib/other-apps\";\nimport type { WorkspaceAppId } from \"../lib/other-apps\";\nimport { cn } from \"../lib/utils\";\nimport { ActionQueryError } from \"./action-query-error\";\nimport {\n APP_LIST_GRID_CLASS,\n APP_LIST_GRID_ROW_CLASS,\n AppList,\n} from \"./app-list-row\";\nimport { ConnectedAppCard } from \"./connected-app-card\";\nimport { Skeleton } from \"./ui/skeleton\";\nimport {\n WorkspaceTemplateCard,\n type CuratedWorkspaceTemplate,\n type CuratedWorkspaceTemplatesResult,\n type WorkspaceTemplateLabels,\n} from \"./workspace-template-card\";\n\ntype OtherAppEntry =\n | { kind: \"template\"; template: CuratedWorkspaceTemplate }\n | { kind: \"connected\"; app: ConnectedAppSummary };\n\nfunction templateKey(template: CuratedWorkspaceTemplate): string {\n return (template.templateId || template.id || template.appId || template.name)\n .trim()\n .toLowerCase();\n}\n\nfunction getTemplateItems(\n result: CuratedWorkspaceTemplatesResult | undefined,\n): CuratedWorkspaceTemplate[] {\n if (!result) return [];\n return Array.isArray(result) ? result : result.templates;\n}\n\nexport function mergeOtherAppEntries({\n templates,\n connectedApps,\n workspaceApps,\n}: {\n templates?: CuratedWorkspaceTemplatesResult;\n connectedApps: ConnectedAppSummary[];\n workspaceApps: WorkspaceAppId[];\n}): OtherAppEntry[] {\n const workspaceAppIds = new Set(\n workspaceApps.map((app) => app.id.trim().toLowerCase()),\n );\n const seen = new Set<string>();\n const entries: OtherAppEntry[] = [];\n\n for (const template of getTemplateItems(templates)) {\n const id = templateKey(template);\n if (!id || template.installed || workspaceAppIds.has(id)) continue;\n seen.add(id);\n entries.push({ kind: \"template\", template });\n }\n\n for (const app of filterOtherApps(connectedApps, workspaceApps)) {\n const id = app.id.trim().toLowerCase();\n if (seen.has(id)) continue;\n seen.add(id);\n entries.push({ kind: \"connected\", app });\n }\n\n return entries;\n}\n\nexport function OtherAppsSection({\n templates,\n connectedApps = [],\n workspaceApps,\n templatesLoading = false,\n connectedAppsLoading = false,\n templatesError,\n connectedAppsError,\n onRetryTemplates,\n onRetryConnectedApps,\n templateLabels,\n onRemixSuccess,\n className,\n}: {\n templates?: CuratedWorkspaceTemplatesResult;\n connectedApps?: ConnectedAppSummary[];\n workspaceApps: WorkspaceAppId[];\n templatesLoading?: boolean;\n connectedAppsLoading?: boolean;\n templatesError?: Error | null;\n connectedAppsError?: Error | null;\n onRetryTemplates?: () => void;\n onRetryConnectedApps?: () => void;\n templateLabels?: Partial<WorkspaceTemplateLabels>;\n onRemixSuccess?: (\n result: unknown,\n template: CuratedWorkspaceTemplate,\n ) => void;\n className?: string;\n}) {\n const t = useT();\n const entries = mergeOtherAppEntries({\n templates,\n connectedApps,\n workspaceApps,\n });\n const isLoading = templatesLoading || connectedAppsLoading;\n const hasError = Boolean(templatesError || connectedAppsError);\n\n if (!isLoading && !hasError && entries.length === 0) return null;\n\n return (\n <section className={cn(\"space-y-3 border-t pt-6\", className)}>\n <div className=\"flex min-w-0 items-start gap-2\">\n <IconStack2\n size={16}\n className=\"mt-0.5 shrink-0 text-muted-foreground\"\n />\n <div className=\"min-w-0\">\n <h2 className=\"truncate text-sm font-semibold text-foreground\">\n {t(\"dispatch.pages.otherApps\", { defaultValue: \"Other apps\" })}\n </h2>\n {entries.length > 0 ? (\n <p className=\"mt-0.5 text-xs text-muted-foreground\">\n {t(\"dispatch.pages.availableCount\", {\n count: entries.length,\n })}\n </p>\n ) : null}\n </div>\n </div>\n\n {templatesError ? (\n <ActionQueryError\n error={templatesError}\n onRetry={() => onRetryTemplates?.()}\n />\n ) : null}\n {connectedAppsError ? (\n <ActionQueryError\n error={connectedAppsError}\n onRetry={() => onRetryConnectedApps?.()}\n />\n ) : null}\n\n {isLoading && entries.length === 0 ? (\n <OtherAppsSkeletonList />\n ) : entries.length > 0 ? (\n <AppList className={APP_LIST_GRID_CLASS}>\n {entries.map((entry) =>\n entry.kind === \"template\" ? (\n <WorkspaceTemplateCard\n key={`template:${templateKey(entry.template)}`}\n template={entry.template}\n labels={templateLabels}\n catalog\n className={APP_LIST_GRID_ROW_CLASS}\n onRemixSuccess={onRemixSuccess}\n />\n ) : (\n <ConnectedAppCard\n key={`connected:${entry.app.id}`}\n app={entry.app}\n className={APP_LIST_GRID_ROW_CLASS}\n />\n ),\n )}\n </AppList>\n ) : null}\n </section>\n );\n}\n\nfunction OtherAppsSkeletonList() {\n return (\n <AppList className={APP_LIST_GRID_CLASS}>\n {Array.from({ length: 4 }).map((_, index) => (\n <div\n key={index}\n className={cn(\n \"flex min-w-0 items-center gap-3 border-b px-4 py-3.5 last:border-b-0\",\n APP_LIST_GRID_ROW_CLASS,\n )}\n >\n <Skeleton className=\"size-8 shrink-0 rounded-xl\" />\n <div className=\"min-w-0 flex-1 space-y-2\">\n <Skeleton className=\"h-4 w-32\" />\n <Skeleton className=\"h-3 w-2/3\" />\n </div>\n <Skeleton className=\"h-9 w-24 shrink-0 rounded-md\" />\n </div>\n ))}\n </AppList>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-app-card.d.ts","sourceRoot":"","sources":["../../src/components/workspace-app-card.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"workspace-app-card.d.ts","sourceRoot":"","sources":["../../src/components/workspace-app-card.tsx"],"names":[],"mappings":"AAyBA,OAAO,EAGL,KAAK,mBAAmB,EACzB,MAAM,uBAAuB,CAAC;AAiC/B,wBAAgB,gBAAgB,CAAC,EAC/B,GAAG,EACH,SAAS,GACV,EAAE;IACD,GAAG,EAAE,mBAAmB,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,mDAsMA"}
|
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useActionMutation, useActionQuery, } from "@agent-native/core/client/hooks";
|
|
3
3
|
import { useFormatters, useT } from "@agent-native/core/client/i18n";
|
|
4
|
-
import { IconCalendar, IconChevronDown, IconChevronRight, IconClockHour4,
|
|
4
|
+
import { IconCalendar, IconChevronDown, IconChevronRight, IconClockHour4, IconEdit, IconEye, IconEyeOff, IconFileText, IconKey, IconSettings, IconTrash, IconUser, IconUsersGroup, IconWorld, } from "@tabler/icons-react";
|
|
5
5
|
import { useEffect, useState } from "react";
|
|
6
6
|
import { toast } from "sonner";
|
|
7
7
|
import { cn } from "../lib/utils.js";
|
|
8
8
|
import { isPendingBuilderHref, workspaceAppHref, } from "../lib/workspace-apps.js";
|
|
9
9
|
import { ActionQueryError } from "./action-query-error.js";
|
|
10
|
-
import {
|
|
10
|
+
import { AppIcon } from "./app-icon.js";
|
|
11
|
+
import { AppKeysPanel } from "./app-keys-popover.js";
|
|
12
|
+
import { AppListRow } from "./app-list-row.js";
|
|
13
|
+
import { AppOpenActions } from "./app-open-actions.js";
|
|
11
14
|
import { Badge } from "./ui/badge.js";
|
|
12
15
|
import { Button } from "./ui/button.js";
|
|
13
|
-
import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle,
|
|
16
|
+
import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, } from "./ui/dialog.js";
|
|
14
17
|
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, } from "./ui/dropdown-menu.js";
|
|
15
18
|
import { Input } from "./ui/input.js";
|
|
16
19
|
import { Label } from "./ui/label.js";
|
|
@@ -22,12 +25,13 @@ export function WorkspaceAppCard({ app, className, }) {
|
|
|
22
25
|
const t = useT();
|
|
23
26
|
const { formatDate } = useFormatters();
|
|
24
27
|
const href = workspaceAppHref(app);
|
|
25
|
-
const openInNewTab = isPendingBuilderHref(app);
|
|
26
28
|
const isPending = app.status === "pending";
|
|
27
29
|
const pendingLabel = app.statusLabel || "Builder branch";
|
|
28
30
|
const isArchived = !!app.archived;
|
|
29
31
|
const audience = app.audience ?? "internal";
|
|
30
32
|
const [editOpen, setEditOpen] = useState(false);
|
|
33
|
+
const [keysOpen, setKeysOpen] = useState(false);
|
|
34
|
+
const [resourcesOpen, setResourcesOpen] = useState(false);
|
|
31
35
|
const [draftName, setDraftName] = useState(app.name);
|
|
32
36
|
const [draftDescription, setDraftDescription] = useState(app.description || "");
|
|
33
37
|
useEffect(() => {
|
|
@@ -77,16 +81,23 @@ export function WorkspaceAppCard({ app, className, }) {
|
|
|
77
81
|
description: draftDescription.trim(),
|
|
78
82
|
});
|
|
79
83
|
};
|
|
80
|
-
return (_jsxs(
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
84
|
+
return (_jsxs(_Fragment, { children: [_jsxs(AppListRow, { className: cn(!href && "opacity-60", isArchived && "opacity-70", className), children: [_jsx(AppIcon, { id: app.id, name: app.name, size: "sm" }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("h3", { className: "truncate text-sm font-semibold text-foreground", children: app.name }), app.description || isPending ? (_jsx("p", { className: "mt-0.5 truncate text-xs text-muted-foreground", children: app.description || pendingLabel })) : null, _jsxs("div", { className: "mt-1.5 flex min-w-0 flex-wrap items-center gap-2 text-[11px] text-muted-foreground", children: [isPending ? (_jsxs("span", { className: "inline-flex min-w-0 items-center gap-1 rounded-full bg-muted px-2 py-0.5", children: [_jsx(IconClockHour4, { size: 12 }), _jsx("span", { className: "truncate", children: pendingLabel })] })) : null, isArchived ? (_jsxs("span", { className: "inline-flex items-center gap-1 rounded-full bg-muted px-2 py-0.5", children: [_jsx(IconEyeOff, { size: 12 }), "Hidden"] })) : null, audience === "public" ? (_jsxs("span", { className: "inline-flex items-center gap-1 rounded-full bg-muted px-2 py-0.5", children: [_jsx(IconWorld, { size: 12 }), "Public"] })) : null, isPending && app.branchName ? (_jsx("span", { className: "min-w-0 truncate", children: app.branchName })) : null] })] }), _jsxs("div", { className: "flex shrink-0 items-center gap-2", children: [_jsx(WorkspaceAppOpenActions, { app: app, href: href }), _jsx(WorkspaceAppSettings, { app: app, formatDate: formatDate, isArchived: isArchived, isPending: isPending, onEdit: () => setEditOpen(true), onKeys: () => setKeysOpen(true), onResources: () => setResourcesOpen(true), onArchive: handleArchive, onUnarchive: handleUnarchive, onRemovePending: handleRemovePending, labels: {
|
|
85
|
+
created: t("agents.dashboardMetadataCreated"),
|
|
86
|
+
createdBy: t("agents.dashboardMetadataCreatedBy"),
|
|
87
|
+
owner: t("dispatch.pages.appMetadataOwner"),
|
|
88
|
+
teams: t("dispatch.pages.appMetadataTeams"),
|
|
89
|
+
notTracked: t("agents.notTracked"),
|
|
90
|
+
} })] })] }), _jsx(Dialog, { open: editOpen, onOpenChange: setEditOpen, children: _jsxs(DialogContent, { children: [_jsx(DialogHeader, { children: _jsx(DialogTitle, { children: "Edit app details" }) }), _jsxs("form", { className: "space-y-4", onSubmit: handleMetadataSubmit, children: [_jsxs("div", { className: "space-y-2", children: [_jsx(Label, { htmlFor: `app-name-${app.id}`, children: "Name" }), _jsx(Input, { id: `app-name-${app.id}`, value: draftName, maxLength: 120, onChange: (event) => setDraftName(event.target.value) })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { htmlFor: `app-description-${app.id}`, children: "Description" }), _jsx(Textarea, { id: `app-description-${app.id}`, value: draftDescription, maxLength: 500, rows: 4, onChange: (event) => setDraftDescription(event.target.value) })] }), _jsxs(DialogFooter, { children: [_jsx(Button, { type: "button", variant: "outline", onClick: () => setEditOpen(false), children: "Cancel" }), _jsx(Button, { type: "submit", disabled: updateMetadata.isPending, children: updateMetadata.isPending ? "Saving..." : "Save" })] })] })] }) }), _jsx(Dialog, { open: keysOpen, onOpenChange: setKeysOpen, children: _jsxs(DialogContent, { className: "max-w-md", children: [_jsxs(DialogHeader, { children: [_jsxs(DialogTitle, { children: ["Manage keys for ", app.name] }), _jsx(DialogDescription, { children: "Choose which workspace credentials this app can use." })] }), _jsx(AppKeysPanel, { appId: app.id, appName: app.name }), _jsx(DialogFooter, { children: _jsx(Button, { type: "button", onClick: () => setKeysOpen(false), children: "Done" }) })] }) }), _jsx(AppResourcesDialog, { app: app, open: resourcesOpen, onOpenChange: setResourcesOpen })] }));
|
|
91
|
+
}
|
|
92
|
+
function WorkspaceAppOpenActions({ app, href, }) {
|
|
93
|
+
const openInNewTab = isPendingBuilderHref(app);
|
|
94
|
+
if (!href) {
|
|
95
|
+
return (_jsx(Button, { size: "sm", variant: "outline", disabled: true, children: "Open app" }));
|
|
96
|
+
}
|
|
97
|
+
return (_jsx(AppOpenActions, { name: app.name, href: href, target: openInNewTab ? "_blank" : undefined, rel: openInNewTab ? "noreferrer" : undefined, showInlineOption: true, showNewTabOption: true }));
|
|
98
|
+
}
|
|
99
|
+
function WorkspaceAppSettings({ app, formatDate, isArchived, isPending, onEdit, onKeys, onResources, onArchive, onUnarchive, onRemovePending, labels, }) {
|
|
100
|
+
return (_jsxs(DropdownMenu, { children: [_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { type: "button", variant: "ghost", size: "sm", "aria-label": `Settings for ${app.name}`, className: APP_CARD_ACTION_CLASS, children: _jsx(IconSettings, { size: 15 }) }) }) }), _jsx(TooltipContent, { children: "App settings" })] }), _jsxs(DropdownMenuContent, { align: "end", className: "w-72", children: [_jsxs(DropdownMenuItem, { onSelect: onEdit, children: [_jsx(IconEdit, { size: 14, className: "mr-2" }), "Edit details"] }), !isPending && !isArchived ? (_jsxs(_Fragment, { children: [_jsxs(DropdownMenuItem, { onSelect: onKeys, children: [_jsx(IconKey, { size: 14, className: "mr-2" }), "Manage keys"] }), _jsxs(DropdownMenuItem, { onSelect: onResources, children: [_jsx(IconFileText, { size: 14, className: "mr-2" }), "Agent resources"] })] })) : null, isPending ? (_jsxs(DropdownMenuItem, { onSelect: onRemovePending, className: "text-destructive focus:text-destructive", children: [_jsx(IconTrash, { size: 14, className: "mr-2" }), "Remove from list"] })) : isArchived ? (_jsxs(DropdownMenuItem, { onSelect: onUnarchive, children: [_jsx(IconEye, { size: 14, className: "mr-2" }), "Restore to list"] })) : (_jsxs(DropdownMenuItem, { onSelect: onArchive, children: [_jsx(IconEyeOff, { size: 14, className: "mr-2" }), "Hide from list"] })), _jsx(DropdownMenuSeparator, {}), _jsx(DropdownMenuLabel, { className: "font-normal", children: _jsx(WorkspaceAppMetadata, { app: app, formatDate: formatDate, labels: labels }) })] })] }));
|
|
90
101
|
}
|
|
91
102
|
function WorkspaceAppMetadata({ app, formatDate, labels, }) {
|
|
92
103
|
function formatMetadataDate(value) {
|
|
@@ -110,26 +121,25 @@ function WorkspaceAppMetadata({ app, formatDate, labels, }) {
|
|
|
110
121
|
function WorkspaceAppMetadataRow({ icon: Icon, label, value, }) {
|
|
111
122
|
return (_jsxs("div", { className: "flex items-start gap-1.5", children: [_jsx(Icon, { className: "mt-0.5 h-3 w-3 shrink-0" }), _jsx("span", { className: "shrink-0", children: label }), _jsx("span", { className: "min-w-0 truncate text-foreground/80", children: value })] }));
|
|
112
123
|
}
|
|
113
|
-
function AppResourcesDialog({ app }) {
|
|
114
|
-
const [open, setOpen] = useState(false);
|
|
124
|
+
function AppResourcesDialog({ app, open, onOpenChange, }) {
|
|
115
125
|
const [inspectedResourceId, setInspectedResourceId] = useState(null);
|
|
116
126
|
const query = useActionQuery("list-workspace-resources-for-app", { appId: app.id }, { enabled: open });
|
|
117
127
|
const { data, isLoading } = query;
|
|
118
128
|
const resources = (data?.resources ?? []);
|
|
119
129
|
const counts = data?.counts;
|
|
120
|
-
return (
|
|
121
|
-
|
|
130
|
+
return (_jsx(Dialog, { open: open, onOpenChange: (nextOpen) => {
|
|
131
|
+
onOpenChange(nextOpen);
|
|
122
132
|
if (!nextOpen)
|
|
123
133
|
setInspectedResourceId(null);
|
|
124
|
-
}, children:
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
134
|
+
}, children: _jsxs(DialogContent, { className: "max-w-2xl", children: [_jsxs(DialogHeader, { children: [_jsxs(DialogTitle, { children: [app.name, " agent resources"] }), _jsx(DialogDescription, { children: "Workspace-scope agent resources are inherited at runtime. App shared and personal resources can override them locally." })] }), _jsxs("div", { className: "space-y-4", children: [_jsx("div", { className: "rounded-lg border bg-muted/30 px-3 py-2 text-xs leading-relaxed text-muted-foreground", children: "All-app agent resources live once at workspace scope and are read by each app agent when it builds context. Nothing is copied into this app." }), _jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [_jsxs(Badge, { variant: "secondary", children: [counts?.total ?? 0, " total"] }), _jsxs(Badge, { variant: "outline", children: [counts?.workspace ?? counts?.global ?? 0, " workspace"] }), _jsxs(Badge, { variant: "outline", children: [counts?.granted ?? 0, " granted"] }), _jsxs(Badge, { variant: "outline", children: [counts?.autoLoaded ?? 0, " auto-loaded"] })] }), query.isError ? (_jsx(ActionQueryError, { error: query.error, onRetry: () => void query.refetch() })) : isLoading ? (_jsxs("div", { className: "space-y-2", children: [_jsx("div", { className: "h-14 rounded-lg border bg-muted/30" }), _jsx("div", { className: "h-14 rounded-lg border bg-muted/30" }), _jsx("div", { className: "h-14 rounded-lg border bg-muted/30" })] })) : resources.length === 0 ? (_jsx("div", { className: "rounded-lg border border-dashed px-4 py-8 text-center text-sm text-muted-foreground", children: "No workspace or granted resources are visible to this app yet." })) : (_jsx("div", { className: "max-h-[420px] space-y-2 overflow-y-auto pr-1", children: resources.map((resource) => {
|
|
135
|
+
const inspected = inspectedResourceId === resource.id;
|
|
136
|
+
return (_jsxs("div", { className: "rounded-lg border px-3 py-3", children: [_jsxs("div", { className: "flex items-start justify-between gap-3", children: [_jsxs("div", { className: "min-w-0", children: [_jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [_jsx("span", { className: "text-sm font-medium text-foreground", children: resource.name }), _jsx(Badge, { variant: "secondary", children: resource.kind }), _jsx(Badge, { variant: "outline", children: resource.source === "workspace"
|
|
137
|
+
? "All apps"
|
|
138
|
+
: "Granted" }), resource.autoLoaded ? (_jsx(Badge, { variant: "outline", children: "Auto-loaded" })) : null] }), _jsx("div", { className: "mt-1 truncate font-mono text-xs text-muted-foreground", children: resource.path })] }), _jsxs("div", { className: "flex shrink-0 flex-col items-end gap-2", children: [resource.source === "grant" ? (_jsx("div", { className: "text-right text-[11px] text-muted-foreground", children: "Selected grant" })) : null, _jsxs(Button, { type: "button", variant: "ghost", size: "sm", className: "h-7 px-2 text-xs", onClick: (event) => {
|
|
139
|
+
event.stopPropagation();
|
|
140
|
+
setInspectedResourceId(inspected ? null : resource.id);
|
|
141
|
+
}, children: [inspected ? (_jsx(IconChevronDown, { size: 14, className: "mr-1" })) : (_jsx(IconChevronRight, { size: 14, className: "mr-1" })), "Stack"] })] })] }), resource.description ? (_jsx("p", { className: "mt-2 line-clamp-2 text-xs text-muted-foreground", children: resource.description })) : null, inspected ? (_jsx(AppResourceEffectiveStack, { appId: app.id, resource: resource })) : null] }, resource.id));
|
|
142
|
+
}) }))] }), _jsx(DialogFooter, { children: _jsx(Button, { type: "button", onClick: () => onOpenChange(false), children: "Done" }) })] }) }));
|
|
133
143
|
}
|
|
134
144
|
function stringifyError(err) {
|
|
135
145
|
if (err instanceof Error)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-app-card.js","sourceRoot":"","sources":["../../src/components/workspace-app-card.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,iBAAiB,EACjB,cAAc,GACf,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EACL,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,UAAU,EACV,YAAY,EACZ,SAAS,EACT,SAAS,EACT,QAAQ,EACR,cAAc,GACf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAE/B,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,EACL,oBAAoB,EACpB,gBAAgB,GAEjB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,KA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E,EAAE,EAAE,SAAS,EAAC,MAAM,GAAG,CAC/C,CAAC,CAAC,CAAC,CACF,KAAC,gBAAgB,IAAC,IAAI,EAAE,EAAE,EAAE,SAAS,EAAC,MAAM,GAAG,CAChD,aAEM,IACL,IACF,EAEL,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,CACtB,YAAG,SAAS,EAAC,iDAAiD,YAC3D,QAAQ,CAAC,WAAW,GACnB,CACL,CAAC,CAAC,CAAC,IAAI,EAEP,SAAS,CAAC,CAAC,CAAC,CACX,KAAC,yBAAyB,IACxB,KAAK,EAAE,GAAG,CAAC,EAAE,EACb,QAAQ,EAAE,QAAQ,GAClB,CACH,CAAC,CAAC,CAAC,IAAI,KA9DH,QAAQ,CAAC,EAAE,CA+DZ,CACP,CAAC;gCACJ,CAAC,CAAC,GACE,CACP,IACG,EACN,KAAC,YAAY,cACX,KAAC,MAAM,IAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,qBAE1C,GACI,IACD,IACT,CACV,CAAC;AACJ,CAAC;AAED,SAAS,cAAc,CAAC,GAAY;IAClC,IAAI,GAAG,YAAY,KAAK;QAAE,OAAO,GAAG,CAAC,OAAO,CAAC;IAC7C,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC;AACrB,CAAC","sourcesContent":["import {\n useActionMutation,\n useActionQuery,\n} from \"@agent-native/core/client/hooks\";\nimport { useFormatters, useT } from \"@agent-native/core/client/i18n\";\nimport {\n IconCalendar,\n IconChevronDown,\n IconChevronRight,\n IconClockHour4,\n IconDots,\n IconEdit,\n IconEye,\n IconEyeOff,\n IconFileText,\n IconWorld,\n IconTrash,\n IconUser,\n IconUsersGroup,\n} from \"@tabler/icons-react\";\nimport { useEffect, useState, type FormEvent } from \"react\";\nimport { toast } from \"sonner\";\n\nimport { cn } from \"../lib/utils\";\nimport {\n isPendingBuilderHref,\n workspaceAppHref,\n type WorkspaceAppSummary,\n} from \"../lib/workspace-apps\";\nimport { ActionQueryError } from \"./action-query-error\";\nimport { AppKeysPopover } from \"./app-keys-popover\";\nimport { Badge } from \"./ui/badge\";\nimport { Button } from \"./ui/button\";\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n} from \"./ui/dialog\";\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from \"./ui/dropdown-menu\";\nimport { Input } from \"./ui/input\";\nimport { Label } from \"./ui/label\";\nimport { Textarea } from \"./ui/textarea\";\nimport { Tooltip, TooltipContent, TooltipTrigger } from \"./ui/tooltip\";\nimport { AppResourceEffectiveStack } from \"./workspace-resource-effective-stack\";\n\nconst APP_CARD_ACTION_CLASS =\n \"size-7 rounded-md p-0 text-muted-foreground transition-[background-color,color] hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring data-[state=open]:bg-accent data-[state=open]:text-foreground\";\n\nexport function WorkspaceAppCard({\n app,\n className,\n}: {\n app: WorkspaceAppSummary;\n className?: string;\n}) {\n const t = useT();\n const { formatDate } = useFormatters();\n const href = workspaceAppHref(app);\n const openInNewTab = isPendingBuilderHref(app);\n const isPending = app.status === \"pending\";\n const pendingLabel = app.statusLabel || \"Builder branch\";\n const isArchived = !!app.archived;\n const audience = app.audience ?? \"internal\";\n const [editOpen, setEditOpen] = useState(false);\n const [draftName, setDraftName] = useState(app.name);\n const [draftDescription, setDraftDescription] = useState(\n app.description || \"\",\n );\n\n useEffect(() => {\n if (editOpen) return;\n setDraftName(app.name);\n setDraftDescription(app.description || \"\");\n }, [app.description, app.name, editOpen]);\n\n const archive = useActionMutation(\"archive-workspace-app\", {\n onError: (err) =>\n toast.error(`Could not hide ${app.name}: ${stringifyError(err)}`),\n });\n const unarchive = useActionMutation(\"unarchive-workspace-app\", {\n onError: (err) =>\n toast.error(`Could not restore ${app.name}: ${stringifyError(err)}`),\n });\n const removePending = useActionMutation(\"remove-pending-workspace-app\", {\n onError: (err) =>\n toast.error(`Could not remove ${app.name}: ${stringifyError(err)}`),\n });\n const updateMetadata = useActionMutation(\"update-workspace-app-metadata\", {\n onSuccess: () => {\n toast.success(`Updated ${draftName.trim() || app.name}`);\n setEditOpen(false);\n },\n onError: (err) =>\n toast.error(`Could not update ${app.name}: ${stringifyError(err)}`),\n });\n\n const handleArchive = () => {\n archive.mutate({ appId: app.id });\n toast.success(`Hid ${app.name} from the Apps list`);\n };\n const handleUnarchive = () => {\n unarchive.mutate({ appId: app.id });\n toast.success(`Restored ${app.name} to the Apps list`);\n };\n const handleRemovePending = () => {\n removePending.mutate({ appId: app.id });\n toast.success(`Removed pending ${app.name}`);\n };\n const handleMetadataSubmit = (event: FormEvent<HTMLFormElement>) => {\n event.preventDefault();\n const name = draftName.trim();\n if (!name) {\n toast.error(\"App name is required.\");\n return;\n }\n updateMetadata.mutate({\n appId: app.id,\n name,\n description: draftDescription.trim(),\n });\n };\n\n return (\n <div\n aria-disabled={!href}\n className={cn(\n \"group relative rounded-xl bg-card/40 p-4 transition-[background-color] hover:bg-accent/15 focus-within:bg-accent/15 aria-disabled:opacity-60\",\n isArchived && \"opacity-70\",\n className,\n )}\n >\n {href ? (\n <a\n href={href}\n target={openInNewTab ? \"_blank\" : undefined}\n rel={openInNewTab ? \"noreferrer\" : undefined}\n aria-label={`Open ${app.name}`}\n className=\"absolute inset-0 z-0 rounded-xl outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background\"\n />\n ) : null}\n\n <div className=\"pointer-events-none relative z-10 flex h-full min-w-0 items-start justify-between gap-3\">\n <div className=\"min-w-0 flex-1\">\n <div className=\"flex min-w-0 flex-wrap items-center gap-1.5\">\n <h3 className=\"min-w-0 flex-1 truncate text-sm font-semibold text-foreground\">\n {app.name}\n </h3>\n {isPending ? (\n <Badge\n variant=\"outline\"\n className=\"shrink-0 gap-1 border-amber-500/30 bg-amber-500/10 text-amber-700 dark:text-amber-300\"\n >\n <IconClockHour4 size={12} />\n {pendingLabel}\n </Badge>\n ) : null}\n {isArchived ? (\n <Badge variant=\"outline\" className=\"shrink-0 gap-1\">\n <IconEyeOff size={12} />\n Hidden\n </Badge>\n ) : null}\n {audience === \"public\" ? (\n <Badge variant=\"outline\" className=\"shrink-0 gap-1\">\n <IconWorld size={12} />\n Public\n </Badge>\n ) : null}\n </div>\n <p className=\"mt-1 truncate font-mono text-[11px] text-muted-foreground\">\n {app.path}\n </p>\n {isPending && app.branchName ? (\n <p className=\"mt-1 truncate text-xs text-muted-foreground\">\n Builder branch: {app.branchName}\n </p>\n ) : null}\n {app.description ? (\n <p className=\"mt-2 min-h-10 line-clamp-2 text-[13px] leading-5 text-muted-foreground\">\n {app.description}\n </p>\n ) : null}\n </div>\n <div className=\"flex shrink-0 items-center gap-1\">\n {!isPending && !isArchived ? (\n <div className=\"pointer-events-auto\">\n <AppResourcesDialog app={app} />\n </div>\n ) : null}\n {!isPending && !isArchived ? (\n <div className=\"pointer-events-auto\">\n <AppKeysPopover appId={app.id} appName={app.name} />\n </div>\n ) : null}\n <div className=\"pointer-events-auto\">\n <DropdownMenu>\n <Tooltip>\n <TooltipTrigger asChild>\n <DropdownMenuTrigger asChild>\n <button\n type=\"button\"\n aria-label={`More actions for ${app.name}`}\n className={cn(\n APP_CARD_ACTION_CLASS,\n \"inline-flex cursor-pointer items-center justify-center\",\n )}\n onClick={(e) => e.stopPropagation()}\n >\n <IconDots size={15} />\n </button>\n </DropdownMenuTrigger>\n </TooltipTrigger>\n <TooltipContent>More actions</TooltipContent>\n </Tooltip>\n <DropdownMenuContent align=\"end\" className=\"w-72\">\n <DropdownMenuItem\n onSelect={(event) => {\n event.preventDefault();\n setEditOpen(true);\n }}\n >\n <IconEdit size={14} className=\"mr-2\" />\n Edit details\n </DropdownMenuItem>\n {isPending ? (\n <DropdownMenuItem\n onSelect={handleRemovePending}\n className=\"text-red-600 focus:text-red-600 dark:text-red-400 dark:focus:text-red-400\"\n >\n <IconTrash size={14} className=\"mr-2\" />\n Remove from list\n </DropdownMenuItem>\n ) : isArchived ? (\n <DropdownMenuItem onSelect={handleUnarchive}>\n <IconEye size={14} className=\"mr-2\" />\n Restore to list\n </DropdownMenuItem>\n ) : (\n <DropdownMenuItem onSelect={handleArchive}>\n <IconEyeOff size={14} className=\"mr-2\" />\n Hide from list\n </DropdownMenuItem>\n )}\n <DropdownMenuSeparator />\n <DropdownMenuLabel className=\"font-normal\">\n <WorkspaceAppMetadata\n app={app}\n formatDate={formatDate}\n labels={{\n created: t(\"agents.dashboardMetadataCreated\"),\n createdBy: t(\"agents.dashboardMetadataCreatedBy\"),\n owner: t(\"dispatch.pages.appMetadataOwner\"),\n teams: t(\"dispatch.pages.appMetadataTeams\"),\n notTracked: t(\"agents.notTracked\"),\n }}\n />\n </DropdownMenuLabel>\n </DropdownMenuContent>\n </DropdownMenu>\n </div>\n </div>\n </div>\n <Dialog open={editOpen} onOpenChange={setEditOpen}>\n <DialogContent>\n <DialogHeader>\n <DialogTitle>Edit app details</DialogTitle>\n </DialogHeader>\n <form className=\"space-y-4\" onSubmit={handleMetadataSubmit}>\n <div className=\"space-y-2\">\n <Label htmlFor={`app-name-${app.id}`}>Name</Label>\n <Input\n id={`app-name-${app.id}`}\n value={draftName}\n maxLength={120}\n onChange={(event) => setDraftName(event.target.value)}\n />\n </div>\n <div className=\"space-y-2\">\n <Label htmlFor={`app-description-${app.id}`}>Description</Label>\n <Textarea\n id={`app-description-${app.id}`}\n value={draftDescription}\n maxLength={500}\n rows={4}\n onChange={(event) => setDraftDescription(event.target.value)}\n />\n </div>\n <DialogFooter>\n <Button\n type=\"button\"\n variant=\"outline\"\n onClick={() => setEditOpen(false)}\n >\n Cancel\n </Button>\n <Button type=\"submit\" disabled={updateMetadata.isPending}>\n {updateMetadata.isPending ? \"Saving...\" : \"Save\"}\n </Button>\n </DialogFooter>\n </form>\n </DialogContent>\n </Dialog>\n </div>\n );\n}\n\nfunction WorkspaceAppMetadata({\n app,\n formatDate,\n labels,\n}: {\n app: WorkspaceAppSummary;\n formatDate: ReturnType<typeof useFormatters>[\"formatDate\"];\n labels: {\n created: string;\n createdBy: string;\n owner: string;\n teams: string;\n notTracked: string;\n };\n}) {\n function formatMetadataDate(value: string | null | undefined): string {\n if (!value) return labels.notTracked;\n try {\n return formatDate(value, {\n year: \"numeric\",\n month: \"short\",\n day: \"numeric\",\n hour: \"numeric\",\n minute: \"2-digit\",\n });\n } catch {\n return value;\n }\n }\n\n return (\n <div className=\"flex flex-col gap-1.5 text-xs text-muted-foreground\">\n <WorkspaceAppMetadataRow\n icon={IconCalendar}\n label={labels.created}\n value={formatMetadataDate(app.createdAt)}\n />\n <WorkspaceAppMetadataRow\n icon={IconUser}\n label={labels.createdBy}\n value={app.createdBy || labels.notTracked}\n />\n <WorkspaceAppMetadataRow\n icon={IconUser}\n label={labels.owner}\n value={app.owner || labels.notTracked}\n />\n <WorkspaceAppMetadataRow\n icon={IconUsersGroup}\n label={labels.teams}\n value={app.teams?.join(\", \") || labels.notTracked}\n />\n </div>\n );\n}\n\nfunction WorkspaceAppMetadataRow({\n icon: Icon,\n label,\n value,\n}: {\n icon: typeof IconCalendar;\n label: string;\n value: string;\n}) {\n return (\n <div className=\"flex items-start gap-1.5\">\n <Icon className=\"mt-0.5 h-3 w-3 shrink-0\" />\n <span className=\"shrink-0\">{label}</span>\n <span className=\"min-w-0 truncate text-foreground/80\">{value}</span>\n </div>\n );\n}\n\nfunction AppResourcesDialog({ app }: { app: WorkspaceAppSummary }) {\n const [open, setOpen] = useState(false);\n const [inspectedResourceId, setInspectedResourceId] = useState<string | null>(\n null,\n );\n const query = useActionQuery(\n \"list-workspace-resources-for-app\",\n { appId: app.id },\n { enabled: open },\n );\n const { data, isLoading } = query;\n\n const resources = ((data as any)?.resources ?? []) as any[];\n const counts = (data as any)?.counts;\n\n return (\n <Dialog\n open={open}\n onOpenChange={(nextOpen) => {\n setOpen(nextOpen);\n if (!nextOpen) setInspectedResourceId(null);\n }}\n >\n <Tooltip>\n <TooltipTrigger asChild>\n <DialogTrigger asChild>\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n aria-label={`View agent resources for ${app.name}`}\n className={APP_CARD_ACTION_CLASS}\n onClick={(e) => e.stopPropagation()}\n >\n <IconFileText size={14} />\n </Button>\n </DialogTrigger>\n </TooltipTrigger>\n <TooltipContent>View agent resources</TooltipContent>\n </Tooltip>\n <DialogContent className=\"max-w-2xl\">\n <DialogHeader>\n <DialogTitle>{app.name} agent resources</DialogTitle>\n <DialogDescription>\n Workspace-scope agent resources are inherited at runtime. App shared\n and personal resources can override them locally.\n </DialogDescription>\n </DialogHeader>\n <div className=\"space-y-4\">\n <div className=\"rounded-lg border bg-muted/30 px-3 py-2 text-xs leading-relaxed text-muted-foreground\">\n All-app agent resources live once at workspace scope and are read by\n each app agent when it builds context. Nothing is copied into this\n app.\n </div>\n\n <div className=\"flex flex-wrap items-center gap-2\">\n <Badge variant=\"secondary\">{counts?.total ?? 0} total</Badge>\n <Badge variant=\"outline\">\n {counts?.workspace ?? counts?.global ?? 0} workspace\n </Badge>\n <Badge variant=\"outline\">{counts?.granted ?? 0} granted</Badge>\n <Badge variant=\"outline\">\n {counts?.autoLoaded ?? 0} auto-loaded\n </Badge>\n </div>\n\n {query.isError ? (\n <ActionQueryError\n error={query.error}\n onRetry={() => void query.refetch()}\n />\n ) : isLoading ? (\n <div className=\"space-y-2\">\n <div className=\"h-14 rounded-lg border bg-muted/30\" />\n <div className=\"h-14 rounded-lg border bg-muted/30\" />\n <div className=\"h-14 rounded-lg border bg-muted/30\" />\n </div>\n ) : resources.length === 0 ? (\n <div className=\"rounded-lg border border-dashed px-4 py-8 text-center text-sm text-muted-foreground\">\n No workspace or granted resources are visible to this app yet.\n </div>\n ) : (\n <div className=\"max-h-[420px] space-y-2 overflow-y-auto pr-1\">\n {resources.map((resource) => {\n const inspected = inspectedResourceId === resource.id;\n return (\n <div\n key={resource.id}\n className=\"rounded-lg border px-3 py-3\"\n >\n <div className=\"flex items-start justify-between gap-3\">\n <div className=\"min-w-0\">\n <div className=\"flex flex-wrap items-center gap-2\">\n <span className=\"text-sm font-medium text-foreground\">\n {resource.name}\n </span>\n <Badge variant=\"secondary\">{resource.kind}</Badge>\n <Badge variant=\"outline\">\n {resource.source === \"workspace\"\n ? \"All apps\"\n : \"Granted\"}\n </Badge>\n {resource.autoLoaded ? (\n <Badge variant=\"outline\">Auto-loaded</Badge>\n ) : null}\n </div>\n <div className=\"mt-1 truncate font-mono text-xs text-muted-foreground\">\n {resource.path}\n </div>\n </div>\n <div className=\"flex shrink-0 flex-col items-end gap-2\">\n {resource.source === \"grant\" ? (\n <div className=\"text-right text-[11px] text-muted-foreground\">\n Selected grant\n </div>\n ) : null}\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n className=\"h-7 px-2 text-xs\"\n onClick={(event) => {\n event.stopPropagation();\n setInspectedResourceId(\n inspected ? null : resource.id,\n );\n }}\n >\n {inspected ? (\n <IconChevronDown size={14} className=\"mr-1\" />\n ) : (\n <IconChevronRight size={14} className=\"mr-1\" />\n )}\n Stack\n </Button>\n </div>\n </div>\n\n {resource.description ? (\n <p className=\"mt-2 line-clamp-2 text-xs text-muted-foreground\">\n {resource.description}\n </p>\n ) : null}\n\n {inspected ? (\n <AppResourceEffectiveStack\n appId={app.id}\n resource={resource}\n />\n ) : null}\n </div>\n );\n })}\n </div>\n )}\n </div>\n <DialogFooter>\n <Button type=\"button\" onClick={() => setOpen(false)}>\n Done\n </Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n );\n}\n\nfunction stringifyError(err: unknown): string {\n if (err instanceof Error) return err.message;\n return String(err);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"workspace-app-card.js","sourceRoot":"","sources":["../../src/components/workspace-app-card.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,iBAAiB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C,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC;AACrB,CAAC","sourcesContent":["import {\n useActionMutation,\n useActionQuery,\n} from \"@agent-native/core/client/hooks\";\nimport { useFormatters, useT } from \"@agent-native/core/client/i18n\";\nimport {\n IconCalendar,\n IconChevronDown,\n IconChevronRight,\n IconClockHour4,\n IconEdit,\n IconEye,\n IconEyeOff,\n IconFileText,\n IconKey,\n IconSettings,\n IconTrash,\n IconUser,\n IconUsersGroup,\n IconWorld,\n} from \"@tabler/icons-react\";\nimport { useEffect, useState, type FormEvent } from \"react\";\nimport { toast } from \"sonner\";\n\nimport { cn } from \"../lib/utils\";\nimport {\n isPendingBuilderHref,\n workspaceAppHref,\n type WorkspaceAppSummary,\n} from \"../lib/workspace-apps\";\nimport { ActionQueryError } from \"./action-query-error\";\nimport { AppIcon } from \"./app-icon\";\nimport { AppKeysPanel } from \"./app-keys-popover\";\nimport { AppListRow } from \"./app-list-row\";\nimport { AppOpenActions } from \"./app-open-actions\";\nimport { Badge } from \"./ui/badge\";\nimport { Button } from \"./ui/button\";\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n} from \"./ui/dialog\";\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from \"./ui/dropdown-menu\";\nimport { Input } from \"./ui/input\";\nimport { Label } from \"./ui/label\";\nimport { Textarea } from \"./ui/textarea\";\nimport { Tooltip, TooltipContent, TooltipTrigger } from \"./ui/tooltip\";\nimport { AppResourceEffectiveStack } from \"./workspace-resource-effective-stack\";\n\nconst APP_CARD_ACTION_CLASS =\n \"size-7 rounded-md p-0 text-muted-foreground transition-[background-color,color] hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring data-[state=open]:bg-accent data-[state=open]:text-foreground\";\n\nexport function WorkspaceAppCard({\n app,\n className,\n}: {\n app: WorkspaceAppSummary;\n className?: string;\n}) {\n const t = useT();\n const { formatDate } = useFormatters();\n const href = workspaceAppHref(app);\n const isPending = app.status === \"pending\";\n const pendingLabel = app.statusLabel || \"Builder branch\";\n const isArchived = !!app.archived;\n const audience = app.audience ?? \"internal\";\n const [editOpen, setEditOpen] = useState(false);\n const [keysOpen, setKeysOpen] = useState(false);\n const [resourcesOpen, setResourcesOpen] = useState(false);\n const [draftName, setDraftName] = useState(app.name);\n const [draftDescription, setDraftDescription] = useState(\n app.description || \"\",\n );\n\n useEffect(() => {\n if (editOpen) return;\n setDraftName(app.name);\n setDraftDescription(app.description || \"\");\n }, [app.description, app.name, editOpen]);\n\n const archive = useActionMutation(\"archive-workspace-app\", {\n onError: (err) =>\n toast.error(`Could not hide ${app.name}: ${stringifyError(err)}`),\n });\n const unarchive = useActionMutation(\"unarchive-workspace-app\", {\n onError: (err) =>\n toast.error(`Could not restore ${app.name}: ${stringifyError(err)}`),\n });\n const removePending = useActionMutation(\"remove-pending-workspace-app\", {\n onError: (err) =>\n toast.error(`Could not remove ${app.name}: ${stringifyError(err)}`),\n });\n const updateMetadata = useActionMutation(\"update-workspace-app-metadata\", {\n onSuccess: () => {\n toast.success(`Updated ${draftName.trim() || app.name}`);\n setEditOpen(false);\n },\n onError: (err) =>\n toast.error(`Could not update ${app.name}: ${stringifyError(err)}`),\n });\n\n const handleArchive = () => {\n archive.mutate({ appId: app.id });\n toast.success(`Hid ${app.name} from the Apps list`);\n };\n const handleUnarchive = () => {\n unarchive.mutate({ appId: app.id });\n toast.success(`Restored ${app.name} to the Apps list`);\n };\n const handleRemovePending = () => {\n removePending.mutate({ appId: app.id });\n toast.success(`Removed pending ${app.name}`);\n };\n const handleMetadataSubmit = (event: FormEvent<HTMLFormElement>) => {\n event.preventDefault();\n const name = draftName.trim();\n if (!name) {\n toast.error(\"App name is required.\");\n return;\n }\n updateMetadata.mutate({\n appId: app.id,\n name,\n description: draftDescription.trim(),\n });\n };\n\n return (\n <>\n <AppListRow\n className={cn(\n !href && \"opacity-60\",\n isArchived && \"opacity-70\",\n className,\n )}\n >\n <AppIcon id={app.id} name={app.name} size=\"sm\" />\n <div className=\"min-w-0 flex-1\">\n <h3 className=\"truncate text-sm font-semibold text-foreground\">\n {app.name}\n </h3>\n {app.description || isPending ? (\n <p className=\"mt-0.5 truncate text-xs text-muted-foreground\">\n {app.description || pendingLabel}\n </p>\n ) : null}\n <div className=\"mt-1.5 flex min-w-0 flex-wrap items-center gap-2 text-[11px] text-muted-foreground\">\n {isPending ? (\n <span className=\"inline-flex min-w-0 items-center gap-1 rounded-full bg-muted px-2 py-0.5\">\n <IconClockHour4 size={12} />\n <span className=\"truncate\">{pendingLabel}</span>\n </span>\n ) : null}\n {isArchived ? (\n <span className=\"inline-flex items-center gap-1 rounded-full bg-muted px-2 py-0.5\">\n <IconEyeOff size={12} />\n Hidden\n </span>\n ) : null}\n {audience === \"public\" ? (\n <span className=\"inline-flex items-center gap-1 rounded-full bg-muted px-2 py-0.5\">\n <IconWorld size={12} />\n Public\n </span>\n ) : null}\n {isPending && app.branchName ? (\n <span className=\"min-w-0 truncate\">{app.branchName}</span>\n ) : null}\n </div>\n </div>\n <div className=\"flex shrink-0 items-center gap-2\">\n <WorkspaceAppOpenActions app={app} href={href} />\n <WorkspaceAppSettings\n app={app}\n formatDate={formatDate}\n isArchived={isArchived}\n isPending={isPending}\n onEdit={() => setEditOpen(true)}\n onKeys={() => setKeysOpen(true)}\n onResources={() => setResourcesOpen(true)}\n onArchive={handleArchive}\n onUnarchive={handleUnarchive}\n onRemovePending={handleRemovePending}\n labels={{\n created: t(\"agents.dashboardMetadataCreated\"),\n createdBy: t(\"agents.dashboardMetadataCreatedBy\"),\n owner: t(\"dispatch.pages.appMetadataOwner\"),\n teams: t(\"dispatch.pages.appMetadataTeams\"),\n notTracked: t(\"agents.notTracked\"),\n }}\n />\n </div>\n </AppListRow>\n <Dialog open={editOpen} onOpenChange={setEditOpen}>\n <DialogContent>\n <DialogHeader>\n <DialogTitle>Edit app details</DialogTitle>\n </DialogHeader>\n <form className=\"space-y-4\" onSubmit={handleMetadataSubmit}>\n <div className=\"space-y-2\">\n <Label htmlFor={`app-name-${app.id}`}>Name</Label>\n <Input\n id={`app-name-${app.id}`}\n value={draftName}\n maxLength={120}\n onChange={(event) => setDraftName(event.target.value)}\n />\n </div>\n <div className=\"space-y-2\">\n <Label htmlFor={`app-description-${app.id}`}>Description</Label>\n <Textarea\n id={`app-description-${app.id}`}\n value={draftDescription}\n maxLength={500}\n rows={4}\n onChange={(event) => setDraftDescription(event.target.value)}\n />\n </div>\n <DialogFooter>\n <Button\n type=\"button\"\n variant=\"outline\"\n onClick={() => setEditOpen(false)}\n >\n Cancel\n </Button>\n <Button type=\"submit\" disabled={updateMetadata.isPending}>\n {updateMetadata.isPending ? \"Saving...\" : \"Save\"}\n </Button>\n </DialogFooter>\n </form>\n </DialogContent>\n </Dialog>\n <Dialog open={keysOpen} onOpenChange={setKeysOpen}>\n <DialogContent className=\"max-w-md\">\n <DialogHeader>\n <DialogTitle>Manage keys for {app.name}</DialogTitle>\n <DialogDescription>\n Choose which workspace credentials this app can use.\n </DialogDescription>\n </DialogHeader>\n <AppKeysPanel appId={app.id} appName={app.name} />\n <DialogFooter>\n <Button type=\"button\" onClick={() => setKeysOpen(false)}>\n Done\n </Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n <AppResourcesDialog\n app={app}\n open={resourcesOpen}\n onOpenChange={setResourcesOpen}\n />\n </>\n );\n}\n\nfunction WorkspaceAppOpenActions({\n app,\n href,\n}: {\n app: WorkspaceAppSummary;\n href: string | null;\n}) {\n const openInNewTab = isPendingBuilderHref(app);\n\n if (!href) {\n return (\n <Button size=\"sm\" variant=\"outline\" disabled>\n Open app\n </Button>\n );\n }\n\n return (\n <AppOpenActions\n name={app.name}\n href={href}\n target={openInNewTab ? \"_blank\" : undefined}\n rel={openInNewTab ? \"noreferrer\" : undefined}\n showInlineOption\n showNewTabOption\n />\n );\n}\n\ntype WorkspaceAppMetadataLabels = {\n created: string;\n createdBy: string;\n owner: string;\n teams: string;\n notTracked: string;\n};\n\nfunction WorkspaceAppSettings({\n app,\n formatDate,\n isArchived,\n isPending,\n onEdit,\n onKeys,\n onResources,\n onArchive,\n onUnarchive,\n onRemovePending,\n labels,\n}: {\n app: WorkspaceAppSummary;\n formatDate: ReturnType<typeof useFormatters>[\"formatDate\"];\n isArchived: boolean;\n isPending: boolean;\n onEdit: () => void;\n onKeys: () => void;\n onResources: () => void;\n onArchive: () => void;\n onUnarchive: () => void;\n onRemovePending: () => void;\n labels: WorkspaceAppMetadataLabels;\n}) {\n return (\n <DropdownMenu>\n <Tooltip>\n <TooltipTrigger asChild>\n <DropdownMenuTrigger asChild>\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n aria-label={`Settings for ${app.name}`}\n className={APP_CARD_ACTION_CLASS}\n >\n <IconSettings size={15} />\n </Button>\n </DropdownMenuTrigger>\n </TooltipTrigger>\n <TooltipContent>App settings</TooltipContent>\n </Tooltip>\n <DropdownMenuContent align=\"end\" className=\"w-72\">\n <DropdownMenuItem onSelect={onEdit}>\n <IconEdit size={14} className=\"mr-2\" />\n Edit details\n </DropdownMenuItem>\n {!isPending && !isArchived ? (\n <>\n <DropdownMenuItem onSelect={onKeys}>\n <IconKey size={14} className=\"mr-2\" />\n Manage keys\n </DropdownMenuItem>\n <DropdownMenuItem onSelect={onResources}>\n <IconFileText size={14} className=\"mr-2\" />\n Agent resources\n </DropdownMenuItem>\n </>\n ) : null}\n {isPending ? (\n <DropdownMenuItem\n onSelect={onRemovePending}\n className=\"text-destructive focus:text-destructive\"\n >\n <IconTrash size={14} className=\"mr-2\" />\n Remove from list\n </DropdownMenuItem>\n ) : isArchived ? (\n <DropdownMenuItem onSelect={onUnarchive}>\n <IconEye size={14} className=\"mr-2\" />\n Restore to list\n </DropdownMenuItem>\n ) : (\n <DropdownMenuItem onSelect={onArchive}>\n <IconEyeOff size={14} className=\"mr-2\" />\n Hide from list\n </DropdownMenuItem>\n )}\n <DropdownMenuSeparator />\n <DropdownMenuLabel className=\"font-normal\">\n <WorkspaceAppMetadata\n app={app}\n formatDate={formatDate}\n labels={labels}\n />\n </DropdownMenuLabel>\n </DropdownMenuContent>\n </DropdownMenu>\n );\n}\n\nfunction WorkspaceAppMetadata({\n app,\n formatDate,\n labels,\n}: {\n app: WorkspaceAppSummary;\n formatDate: ReturnType<typeof useFormatters>[\"formatDate\"];\n labels: WorkspaceAppMetadataLabels;\n}) {\n function formatMetadataDate(value: string | null | undefined): string {\n if (!value) return labels.notTracked;\n try {\n return formatDate(value, {\n year: \"numeric\",\n month: \"short\",\n day: \"numeric\",\n hour: \"numeric\",\n minute: \"2-digit\",\n });\n } catch {\n return value;\n }\n }\n\n return (\n <div className=\"flex flex-col gap-1.5 text-xs text-muted-foreground\">\n <WorkspaceAppMetadataRow\n icon={IconCalendar}\n label={labels.created}\n value={formatMetadataDate(app.createdAt)}\n />\n <WorkspaceAppMetadataRow\n icon={IconUser}\n label={labels.createdBy}\n value={app.createdBy || labels.notTracked}\n />\n <WorkspaceAppMetadataRow\n icon={IconUser}\n label={labels.owner}\n value={app.owner || labels.notTracked}\n />\n <WorkspaceAppMetadataRow\n icon={IconUsersGroup}\n label={labels.teams}\n value={app.teams?.join(\", \") || labels.notTracked}\n />\n </div>\n );\n}\n\nfunction WorkspaceAppMetadataRow({\n icon: Icon,\n label,\n value,\n}: {\n icon: typeof IconCalendar;\n label: string;\n value: string;\n}) {\n return (\n <div className=\"flex items-start gap-1.5\">\n <Icon className=\"mt-0.5 h-3 w-3 shrink-0\" />\n <span className=\"shrink-0\">{label}</span>\n <span className=\"min-w-0 truncate text-foreground/80\">{value}</span>\n </div>\n );\n}\n\nfunction AppResourcesDialog({\n app,\n open,\n onOpenChange,\n}: {\n app: WorkspaceAppSummary;\n open: boolean;\n onOpenChange: (open: boolean) => void;\n}) {\n const [inspectedResourceId, setInspectedResourceId] = useState<string | null>(\n null,\n );\n const query = useActionQuery(\n \"list-workspace-resources-for-app\",\n { appId: app.id },\n { enabled: open },\n );\n const { data, isLoading } = query;\n\n const resources = ((data as any)?.resources ?? []) as any[];\n const counts = (data as any)?.counts;\n\n return (\n <Dialog\n open={open}\n onOpenChange={(nextOpen) => {\n onOpenChange(nextOpen);\n if (!nextOpen) setInspectedResourceId(null);\n }}\n >\n <DialogContent className=\"max-w-2xl\">\n <DialogHeader>\n <DialogTitle>{app.name} agent resources</DialogTitle>\n <DialogDescription>\n Workspace-scope agent resources are inherited at runtime. App shared\n and personal resources can override them locally.\n </DialogDescription>\n </DialogHeader>\n <div className=\"space-y-4\">\n <div className=\"rounded-lg border bg-muted/30 px-3 py-2 text-xs leading-relaxed text-muted-foreground\">\n All-app agent resources live once at workspace scope and are read by\n each app agent when it builds context. Nothing is copied into this\n app.\n </div>\n\n <div className=\"flex flex-wrap items-center gap-2\">\n <Badge variant=\"secondary\">{counts?.total ?? 0} total</Badge>\n <Badge variant=\"outline\">\n {counts?.workspace ?? counts?.global ?? 0} workspace\n </Badge>\n <Badge variant=\"outline\">{counts?.granted ?? 0} granted</Badge>\n <Badge variant=\"outline\">\n {counts?.autoLoaded ?? 0} auto-loaded\n </Badge>\n </div>\n\n {query.isError ? (\n <ActionQueryError\n error={query.error}\n onRetry={() => void query.refetch()}\n />\n ) : isLoading ? (\n <div className=\"space-y-2\">\n <div className=\"h-14 rounded-lg border bg-muted/30\" />\n <div className=\"h-14 rounded-lg border bg-muted/30\" />\n <div className=\"h-14 rounded-lg border bg-muted/30\" />\n </div>\n ) : resources.length === 0 ? (\n <div className=\"rounded-lg border border-dashed px-4 py-8 text-center text-sm text-muted-foreground\">\n No workspace or granted resources are visible to this app yet.\n </div>\n ) : (\n <div className=\"max-h-[420px] space-y-2 overflow-y-auto pr-1\">\n {resources.map((resource) => {\n const inspected = inspectedResourceId === resource.id;\n return (\n <div\n key={resource.id}\n className=\"rounded-lg border px-3 py-3\"\n >\n <div className=\"flex items-start justify-between gap-3\">\n <div className=\"min-w-0\">\n <div className=\"flex flex-wrap items-center gap-2\">\n <span className=\"text-sm font-medium text-foreground\">\n {resource.name}\n </span>\n <Badge variant=\"secondary\">{resource.kind}</Badge>\n <Badge variant=\"outline\">\n {resource.source === \"workspace\"\n ? \"All apps\"\n : \"Granted\"}\n </Badge>\n {resource.autoLoaded ? (\n <Badge variant=\"outline\">Auto-loaded</Badge>\n ) : null}\n </div>\n <div className=\"mt-1 truncate font-mono text-xs text-muted-foreground\">\n {resource.path}\n </div>\n </div>\n <div className=\"flex shrink-0 flex-col items-end gap-2\">\n {resource.source === \"grant\" ? (\n <div className=\"text-right text-[11px] text-muted-foreground\">\n Selected grant\n </div>\n ) : null}\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n className=\"h-7 px-2 text-xs\"\n onClick={(event) => {\n event.stopPropagation();\n setInspectedResourceId(\n inspected ? null : resource.id,\n );\n }}\n >\n {inspected ? (\n <IconChevronDown size={14} className=\"mr-1\" />\n ) : (\n <IconChevronRight size={14} className=\"mr-1\" />\n )}\n Stack\n </Button>\n </div>\n </div>\n\n {resource.description ? (\n <p className=\"mt-2 line-clamp-2 text-xs text-muted-foreground\">\n {resource.description}\n </p>\n ) : null}\n\n {inspected ? (\n <AppResourceEffectiveStack\n appId={app.id}\n resource={resource}\n />\n ) : null}\n </div>\n );\n })}\n </div>\n )}\n </div>\n <DialogFooter>\n <Button type=\"button\" onClick={() => onOpenChange(false)}>\n Done\n </Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n );\n}\n\nfunction stringifyError(err: unknown): string {\n if (err instanceof Error) return err.message;\n return String(err);\n}\n"]}
|
|
@@ -7,6 +7,8 @@ export interface CuratedWorkspaceTemplate {
|
|
|
7
7
|
description?: string | null;
|
|
8
8
|
source?: string | null;
|
|
9
9
|
sourceDescription?: string | null;
|
|
10
|
+
icon?: string | null;
|
|
11
|
+
color?: string | null;
|
|
10
12
|
integrationSetup?: string | null;
|
|
11
13
|
setupNote?: string | null;
|
|
12
14
|
installed?: boolean | null;
|
|
@@ -29,6 +31,7 @@ export interface WorkspaceTemplateLabels {
|
|
|
29
31
|
remixError: string;
|
|
30
32
|
appIdRequired: string;
|
|
31
33
|
source: string;
|
|
34
|
+
openApp: string;
|
|
32
35
|
viewLiveApp: string;
|
|
33
36
|
}
|
|
34
37
|
export interface WorkspaceTemplateCardProps {
|
|
@@ -36,9 +39,10 @@ export interface WorkspaceTemplateCardProps {
|
|
|
36
39
|
defaultAppId?: string;
|
|
37
40
|
labels?: Partial<WorkspaceTemplateLabels>;
|
|
38
41
|
className?: string;
|
|
42
|
+
catalog?: boolean;
|
|
39
43
|
onRemixSuccess?: (result: unknown, template: CuratedWorkspaceTemplate) => void;
|
|
40
44
|
}
|
|
41
|
-
export declare function WorkspaceTemplateCard({ template, defaultAppId, labels: labelOverrides, className, onRemixSuccess, }: WorkspaceTemplateCardProps): import("node_modules/@types/react").JSX.Element;
|
|
45
|
+
export declare function WorkspaceTemplateCard({ template, defaultAppId, labels: labelOverrides, className, catalog, onRemixSuccess, }: WorkspaceTemplateCardProps): import("node_modules/@types/react").JSX.Element;
|
|
42
46
|
export interface WorkspaceTemplatesSectionProps {
|
|
43
47
|
templates: CuratedWorkspaceTemplatesResult;
|
|
44
48
|
title?: ReactNode;
|
|
@@ -46,7 +50,9 @@ export interface WorkspaceTemplatesSectionProps {
|
|
|
46
50
|
labels?: Partial<WorkspaceTemplateLabels>;
|
|
47
51
|
className?: string;
|
|
48
52
|
cardClassName?: string;
|
|
53
|
+
listClassName?: string;
|
|
54
|
+
catalog?: boolean;
|
|
49
55
|
onRemixSuccess?: (result: unknown, template: CuratedWorkspaceTemplate) => void;
|
|
50
56
|
}
|
|
51
|
-
export declare function WorkspaceTemplatesSection({ templates: result, title, defaultAppId, labels, className, cardClassName, onRemixSuccess, }: WorkspaceTemplatesSectionProps): import("node_modules/@types/react").JSX.Element | null;
|
|
57
|
+
export declare function WorkspaceTemplatesSection({ templates: result, title, defaultAppId, labels, className, cardClassName, listClassName, catalog, onRemixSuccess, }: WorkspaceTemplatesSectionProps): import("node_modules/@types/react").JSX.Element | null;
|
|
52
58
|
//# sourceMappingURL=workspace-template-card.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-template-card.d.ts","sourceRoot":"","sources":["../../src/components/workspace-template-card.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"workspace-template-card.d.ts","sourceRoot":"","sources":["../../src/components/workspace-template-card.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAgC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAqBrE,MAAM,WAAW,wBAAwB;IACvC,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAC3B,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,MAAM,MAAM,+BAA+B,GACvC,wBAAwB,EAAE,GAC1B;IACE,SAAS,EAAE,wBAAwB,EAAE,CAAC;C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