mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-10-09 03:20:56 +00:00
fabro(01KSE2PAVXD56N4TWNK4T5H5VA): fixup (succeeded)
Fabro-Run: 01KSE2PAVXD56N4TWNK4T5H5VA
Fabro-Completed: 13
Fabro-Checkpoint: f120fc68ab
⚒️ Generated with [Fabro](https://fabro.sh)
This commit is contained in:
parent
60f2dddb10
commit
5e0a845a86
1 changed files with 5 additions and 24 deletions
|
|
@ -5,7 +5,6 @@ import { MemoryRouter } from "react-router";
|
|||
import {
|
||||
AgentToolCategory,
|
||||
AgentSkillActivationSource,
|
||||
PermissionLevel,
|
||||
StageContextWindowCategory,
|
||||
StageContextWindowCountMethod,
|
||||
StageContextWindowStaleness,
|
||||
|
|
@ -148,17 +147,7 @@ describe("StageInsightsSidebar", () => {
|
|||
expect(dom).not.toContain("31%");
|
||||
});
|
||||
|
||||
test("renders permission badge for read-only", () => {
|
||||
const dom = render(makeStage({ permission_level: PermissionLevel.READ_ONLY }), null);
|
||||
expect(dom).toContain("Read-only");
|
||||
});
|
||||
|
||||
test("renders permission badge for full access", () => {
|
||||
const dom = render(makeStage({ permission_level: PermissionLevel.FULL }), null);
|
||||
expect(dom).toContain("Full access");
|
||||
});
|
||||
|
||||
test("renders projected agent tool names, descriptions, categories, and invoked state", () => {
|
||||
test("renders projected agent tool names, descriptions as tooltips, and invoked state", () => {
|
||||
const dom = render(
|
||||
makeStage({
|
||||
agent_tools: [
|
||||
|
|
@ -177,28 +166,20 @@ describe("StageInsightsSidebar", () => {
|
|||
invoked: false,
|
||||
},
|
||||
],
|
||||
permission_level: PermissionLevel.FULL,
|
||||
}),
|
||||
null,
|
||||
);
|
||||
|
||||
expect(dom).toContain("1/2");
|
||||
expect(dom).toContain("apply_patch");
|
||||
// Descriptions are surfaced as `title` tooltip props on each tool row.
|
||||
expect(dom).toContain("Apply a unified diff patch");
|
||||
expect(dom).toContain("write");
|
||||
expect(dom).toContain("used");
|
||||
expect(dom).toContain("grep");
|
||||
expect(dom).toContain("Search file contents");
|
||||
expect(dom).toContain("read");
|
||||
expect(dom).toContain("available");
|
||||
// Permission remains secondary compatibility metadata, not the source of
|
||||
// the tool list.
|
||||
expect(dom).toContain("Full access");
|
||||
});
|
||||
|
||||
test("legacy stages without agent tools keep permission fallback only", () => {
|
||||
const dom = render(makeStage({ permission_level: PermissionLevel.READ_WRITE }), null);
|
||||
expect(dom).toContain("Read/write");
|
||||
test("legacy stages without agent tools render no tool rows", () => {
|
||||
const dom = render(makeStage(), null);
|
||||
expect(dom).not.toContain("apply_patch");
|
||||
});
|
||||
|
||||
|
|
@ -266,6 +247,6 @@ describe("StageInsightsSidebar", () => {
|
|||
const dom = render(undefined, null);
|
||||
// sidebar still renders even with no data
|
||||
expect(dom).toContain("Agent");
|
||||
expect(dom).toContain("Unknown");
|
||||
expect(dom).toContain("Context");
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue