Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,17 @@ const INCOMPATIBLE_ENTRY: PluginCatalogSearchEntry = {
incompatibleReason: "Requires a newer BB version",
};

const GITHUB_ENTRY: PluginCatalogSearchEntry = {
...MEMORY_ENTRY,
entryId: "github",
pluginId: "github",
displayName: "GitHub",
description: "Browse GitHub issues and pull requests in BB.",
icon: "Github",
category: "Developer tools",
source: "builtin:github",
};

const INSTALLED_MEMORY_PLUGIN = {
id: "memory",
source: "builtin:memory",
Expand Down Expand Up @@ -79,7 +90,7 @@ describe("BrowsePluginsTab", () => {
}
if (url === "/api/v1/plugin-catalog/search?q=") {
return jsonResponse({
results: [MEMORY_ENTRY, INCOMPATIBLE_ENTRY],
results: [MEMORY_ENTRY, INCOMPATIBLE_ENTRY, GITHUB_ENTRY],
});
}
if (url === "/api/v1/plugins") {
Expand Down Expand Up @@ -109,6 +120,10 @@ describe("BrowsePluginsTab", () => {
expect(
screen.getByRole("textbox", { name: "Search plugins" }),
).toBeTruthy();
const githubGrid = screen
.getByRole("button", { name: "Open GitHub details" })
.closest('[class*="auto-fill"]');
expect(githubGrid?.className).toContain("auto-fill");

expect(screen.queryByText(MEMORY_ENTRY.source)).toBeNull();
expect(screen.getByText("Requires a newer BB version")).toBeTruthy();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@ export function BrowsePluginsTab({
<h3 className="mb-2 text-sm font-semibold text-foreground">
{category}
</h3>
<ResourceBrowseGrid>
<ResourceBrowseGrid
className="grid-cols-[repeat(auto-fill,minmax(min(100%,23rem),1fr))]"
>
{categoryEntries.map((entry) => (
<BrowseCard
key={entry.entryId}
Expand Down
18 changes: 15 additions & 3 deletions apps/app/src/components/tools/SkillsCollection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,18 @@ function SkillRow({
titleMeta={
skill.scope === "bb-builtin" ? (
<ProvenancePill label="BB Official" />
) : skill.scope === "plugin" ? (
<ProvenancePill
label="Plugin"
tooltip={
<SkillProvenanceTooltip
prefix="Included with"
providerId={skill.provider}
name={`${providerPluginDisplayName(skill)} plugin`}
/>
}
accessibleLabel={`${skill.name} is included with ${includedPluginDescription(skill)}`}
/>
) : undefined
}
description={description}
Expand Down Expand Up @@ -315,7 +327,7 @@ export function SkillsOverview({
normalizedQuery === "" && providerFilters.length === 0
? "No skills in your library."
: normalizedQuery === ""
? "No skills match these agents."
? "No skills match these providers."
: `No skills match "${query}"`
}
/>
Expand Down Expand Up @@ -367,7 +379,7 @@ export function SkillsOverview({
controls={
<>
<ResourceMultiSelectMenu
label="Agent"
label="Provider"
icon="Layers"
selectedValues={providerFilters}
options={providerOptions}
Expand All @@ -381,7 +393,7 @@ export function SkillsOverview({
options={[
{
id: "provider",
label: "Agent",
label: "Provider",
disabled: providerBucketCount <= 1,
},
{ id: "alpha", label: "Skill name" },
Expand Down
29 changes: 24 additions & 5 deletions apps/app/src/views/SkillsView.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ describe("SkillsOverview", () => {
});
expect(markup).not.toContain("claude-skill");
expect(markup).toContain("Review the current diff.");
expect(markup).toContain('aria-label="Agent: 1 selected"');
expect(markup).toContain('aria-label="Provider: 1 selected"');
expect(markup).toContain("Sort");
expect(markup).toContain('role="tab"');
expect(markup).toContain("Library");
Expand All @@ -269,6 +269,25 @@ describe("SkillsOverview", () => {
);
});

it("labels skills bundled with plugins", () => {
const markup = render({
skills: [
makeSkill({
name: "automations",
provider: null,
scope: "plugin",
pluginId: "automations",
manageable: false,
}),
],
});

expect(markup).toContain(">Plugin<");
expect(markup).toContain(
'aria-label="automations is included with Automations (bb plugin)"',
);
});

it("renders browse content as the active full-page collection mode", () => {
const registrySkill = makeRegistrySkill({ installs: 123_456, stars: 654 });
const markup = renderToStaticMarkup(
Expand Down Expand Up @@ -317,7 +336,7 @@ describe("SkillsOverview", () => {
);

fireEvent.pointerDown(
screen.getByRole("button", { name: "Agent: 1 selected" }),
screen.getByRole("button", { name: "Provider: 1 selected" }),
);

await waitFor(() => {
Expand Down Expand Up @@ -358,13 +377,13 @@ describe("SkillsOverview", () => {

await waitFor(() => {
expect(
screen.getByRole("button", { name: "Agent: 1 selected" }),
screen.getByRole("button", { name: "Provider: 1 selected" }),
).toBeTruthy();
expect(screen.queryByText("codex-skill")).toBeNull();
});

fireEvent.pointerDown(
screen.getByRole("button", { name: "Agent: 1 selected" }),
screen.getByRole("button", { name: "Provider: 1 selected" }),
);
const bbFilter = screen.getByRole("menuitemcheckbox", { name: "bb" });
expect(bbFilter.getAttribute("aria-checked")).toBe("true");
Expand Down Expand Up @@ -396,7 +415,7 @@ describe("SkillsOverview", () => {
);

fireEvent.pointerDown(
screen.getByRole("button", { name: "Agent: 1 selected" }),
screen.getByRole("button", { name: "Provider: 1 selected" }),
);
fireEvent.click(screen.getByRole("menuitemcheckbox", { name: "bb" }));
fireEvent.click(
Expand Down
Loading