Skip to content

armgit / alook

Public Imported from GitHub
0

Multi-Agent Collaboration for Team and Friends

fix(web): let bot activity preview size to content

Gus4c388f0ea04c
diff --git a/src/web/src/components/community/social/bot-audit-preview.test.ts b/src/web/src/components/community/social/bot-audit-preview.test.ts
index cf769e7ac..45e4ad6bb 100644
--- a/src/web/src/components/community/social/bot-audit-preview.test.ts
+++ b/src/web/src/components/community/social/bot-audit-preview.test.ts
@@ -88,6 +88,7 @@ describe("BotAuditPreview", () => {
"Bot activity in progress. Open full bot activity log",
)
expect(button.props.className).toContain("duration-150")
+ expect(button.props.className).not.toContain("h-40")
expect(button.props.className).not.toContain("hover:bg-accent")
expect(button.props.className).toContain("hover:after:opacity-100")
expect(button.props.className).toContain("after:ring-inset")
@@ -106,6 +107,9 @@ describe("BotAuditPreview", () => {
&& node.props["data-testid"].startsWith("community-bot-audit-preview-row-")))
.toHaveLength(4)
expect(renderer.root.findAllByType("button")).toHaveLength(1)
+ const timeline = button.find((node) => node.props.className === "flex flex-col py-1")
+ expect(timeline.props.className).not.toContain("overflow-y-auto")
+ expect(timeline.props.className).not.toContain("thin-scrollbar")
const rows = renderer.root.findAll((node) =>
typeof node.props["data-testid"] === "string"
&& node.props["data-testid"].startsWith("community-bot-audit-preview-row-"))
diff --git a/src/web/src/components/community/social/bot-audit-preview.tsx b/src/web/src/components/community/social/bot-audit-preview.tsx
index aeffdf47a..587e13421 100644
--- a/src/web/src/components/community/social/bot-audit-preview.tsx
+++ b/src/web/src/components/community/social/bot-audit-preview.tsx
@@ -65,7 +65,7 @@ export function BotAuditPreview({
? "Bot activity in progress. Open full bot activity log"
: "Bot at rest. Open full bot activity log"}
className={[
- "relative flex h-40 w-full shrink-0 flex-col overflow-hidden rounded-xl border bg-card text-left shadow-(--e1) transition-[border-color] duration-150",
+ "relative flex w-full shrink-0 flex-col overflow-hidden rounded-xl border bg-card text-left shadow-(--e1) transition-[border-color] duration-150",
"after:pointer-events-none after:absolute after:inset-0 after:z-10 after:rounded-[inherit] after:opacity-0 after:ring-2 after:ring-inset after:ring-ring/50 after:transition-opacity after:duration-150 after:content-[''] hover:after:opacity-100 active:after:ring-ring/70",
"focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none",
active
@@ -82,7 +82,7 @@ export function BotAuditPreview({
</span>
<ChevronRight className="size-3.5 shrink-0 text-muted-foreground" aria-hidden />
</div>
- <div className="flex min-h-0 flex-1 flex-col overflow-y-auto py-1 thin-scrollbar">
+ <div className="flex flex-col py-1">
{isLoading ? (
<PreviewSkeleton />
) : isError ? (
diff --git a/src/web/src/components/community/social/profile-card.test.ts b/src/web/src/components/community/social/profile-card.test.ts
index a69fbf9a3..364fcf681 100644
--- a/src/web/src/components/community/social/profile-card.test.ts
+++ b/src/web/src/components/community/social/profile-card.test.ts
@@ -78,7 +78,7 @@ describe("ProfileCard contextual metadata", () => {
expect(html).not.toContain("community-bot-audit-preview")
})
- it("mounts the fixed secondary preview only for the owning viewer", () => {
+ it("mounts the content-sized secondary preview only for the owning viewer", () => {
const html = renderProfile({
identity: {
kind: "bot",
@@ -88,7 +88,7 @@ describe("ProfileCard contextual metadata", () => {
})
expect(html).toContain('data-testid="community-bot-audit-preview"')
- expect(html).toContain("h-40")
+ expect(html).not.toContain("h-40")
})
it("wraps owner metadata and exposes a full accessible label while truncating long handles", () => {