+ {/* Summary */}
+
+
+ {/* Collision strategy */}
+
+ Collision strategy
+ onCollisionStrategyChange(v as CompanyPortabilityCollisionStrategy)}>
+
+
+
+
+ Rename collisions
+ Skip collisions
+
+
+
+
+ {/* Errors / warnings */}
+ {result.errors.length > 0 && (
+
+
Install blocked
+
+ {result.errors.map((e, i) => {e} )}
+
+
+ )}
+ {result.warnings.length > 0 && (
+
+
+ {result.warnings.map((w, i) => {w} )}
+
+
+ )}
+
+ {/* Agents */}
+ {plan.agentPlans.length > 0 && (
+
+ {plan.agentPlans.map((p) => (
+
+ ))}
+
+ )}
+
+ {/* Projects */}
+ {plan.projectPlans.length > 0 && (
+
+ {plan.projectPlans.map((p) => (
+
+ ))}
+
+ )}
+
+ {/* Starter tasks */}
+ {plan.issuePlans.length > 0 && (
+
+ {plan.issuePlans.map((p) => (
+
+ ))}
+
+ )}
+
+ {/* Env inputs (read-only) */}
+ {envInputs.length > 0 && (
+
+ {envInputs.map((input) => (
+
+
+ {input.key}
+ {input.description && {input.description} }
+
+ {input.kind}
+
+
+ ))}
+
+ Secret values are configured on the imported agents after install.
+
+
+ )}
+
+ {/* Provenance */}
+
+ Imported entities are stamped with metadata.paperclip.catalogTeam{" "}
+ ({team.packageName ?? team.key}, content hash {team.contentHash.slice(0, 16)}…),
+ and an activity event is recorded for preview and install.
+
+
+ );
+}
+
+function SummaryCount({ label, value }: { label: string; value: number }) {
+ return (
+
+ {/* Toolbar */}
+
+
Teams
+
+
+ setFilterParam("q", e.target.value)}
+ placeholder="Search teams"
+ className="h-8 w-56 pl-8"
+ />
+
+
+
+
+
+
+ {kindFilter === "all" ? "All kinds" : kindFilter === "bundled" ? "Bundled" : "Optional"}
+
+
+
+
+ Kind
+ setFilterParam("kind", v)}>
+ All kinds
+ Bundled
+ Optional
+
+
+
+
+ {categories.length > 0 && (
+
+
+
+ {categoryFilter ? `Category · ${titleCase(categoryFilter)}` : "All categories"}
+
+
+
+
+ Category
+ setFilterParam("category", v)}>
+ All categories
+ {categories.map((cat) => (
+ {titleCase(cat)}
+ ))}
+
+
+
+ )}
+
+
+
+
+ {riskFilter === "any" ? "Any risk" : riskFilter === "safe" ? "Safe only" : riskFilter === "has_warnings" ? "Has warnings" : "Blocked"}
+
+
+
+
+ Risk
+ setFilterParam("risk", v)}>
+ Any risk
+ Safe only
+ Has warnings
+ Blocked
+
+ {anyFilterActive && (
+ <>
+
+ setSearchParams(new URLSearchParams())}
+ >
+ Reset filters
+
+ >
+ )}
+
+
+
+ {anyFilterActive && (
+
setSearchParams(new URLSearchParams())}>
+ Reset filters
+
+ )}
+
+
+
+ {/* List column */}
+
+ {catalogQuery.isLoading ? (
+
+ {Array.from({ length: 6 }).map((_, i) => (
+
+ ))}
+
+ ) : catalogQuery.isError ? (
+
+
+ Failed to load team catalog.
+
+
catalogQuery.refetch()}>
+ Retry
+
+
+ ) : teams.length === 0 ? (
+
+ ) : filtered.length === 0 ? (
+
setSearchParams(new URLSearchParams())}
+ />
+ ) : (
+
+ {grouped.bundled.length > 0 && (
+ <>
+
+ Bundled · {grouped.bundled.length}
+
+ {grouped.bundled.map((team) => (
+
navigate(teamRoute(team.id))}
+ />
+ ))}
+ >
+ )}
+ {grouped.optional.length > 0 && (
+ <>
+
+ Optional · {grouped.optional.length}
+
+ {grouped.optional.map((team) => (
+ navigate(teamRoute(team.id))}
+ />
+ ))}
+ >
+ )}
+
+ )}
+
+
+ {/* Detail pane */}
+ {selectedTeam ? (
+
+ navigate(path ? teamRoute(selectedTeam.id, path) : teamRoute(selectedTeam.id))
+ }
+ onInstall={() => setInstallOpen(true)}
+ canInstall={canInstall}
+ fileContent={fileQuery.data?.content ?? null}
+ />
+ ) : (
+
+ Select a team to view details.
+
+ )}
+
+
+ {selectedTeam && installOpen && (
+
setInstallOpen(false)}
+ onInstalled={() => {
+ pushToast({ tone: "success", title: "Team installed", body: `${selectedTeam.name} was imported.` });
+ }}
+ />
+ )}
+
+ );
+}