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
1 change: 1 addition & 0 deletions src/components/JsonDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export function JsonDetail({
language="json"
showLineNumbers={false}
showBorder={false}
wrap
code={JSON.stringify(data, null, 2)}
/>
</ScrollView>
Expand Down
13 changes: 13 additions & 0 deletions src/handlers/harness/get/get.screen.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,19 @@ describe("harness hub screen", () => {
});

describe("harness JSON detail screen", () => {
test("wraps long JSON values instead of truncating them", async () => {
const longPrompt = `${"reply sarcastically but accurately and concisely ".repeat(5)}WRAP_SENTINEL`;
const response = getResponse();
response.harness!.systemPrompt = [{ text: longPrompt }];

const core = new TestCoreClient();
core.harness.setGetResponse(response);
const r = renderScreen("/agentcore/harness/get/MyHarness-abc123/json", { core });

await waitForText(r.lastFrame, "WRAP_SENTINEL");
r.unmount();
});

test("renders the harness JSON and scrolls without crashing", async () => {
const core = new TestCoreClient();
core.harness.setGetResponse(getResponse());
Expand Down
Loading