Skip to content

armgit / ARTEX

Public Imported from GitHub
0

ARTEX - AI autonomous penetration testing system (English translation; upstream: Autumn-27/ARTEX, AGPL-3.0)

fix(findings): 「按资产」视图资产列表溢出时补回滚动条

Autumn-27587ef91f6893
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 55efead..c6f8742 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -26,6 +26,12 @@
- **修复自定义会话头在「一次性 LLM 调用」路径上不生效**:会话头的头值取自请求 context 上的 session id,而该 id 由 agentcore 仅在挂载了 transcript store 时才写入 context。目标拆解(第 0 轮)与冷节点压缩(§4 body 调用)都是不挂 store 的一次性调用,context 上没有 session id,网关侧读不到该头——对 opencode zen 这类「缺 `x-opencode-session` 直接 400 MissingSessionID」的端点,表现为「第 0 轮目标拆解 400 失败、后续 planner 轮次却完全正常」,且压缩失败只留一行日志、极难关联。现为这两条路径显式挂上按探索稳定的 session id(`exp<N>-goals` / `exp<N>-compactor`):既能正常带上该头,也让 llmrec 能把这两条路径的 token 用量正确归因到对应探索(此前完全记不到)。
+### 发现
+
+#### 修复的问题
+
+- **修复「按资产」视图资产列表溢出后没有滚动条**:左侧资产树本已套了滚动容器,但外层卡片只给了 `max-height` 而没有确定高度,滚动视口靠 `height:100%` 解析不出高度(CSS 中只设 `max-height`、`height` 仍为 `auto` 时百分比高度不生效),于是资产多时列表要么撑破卡片、要么被截断且无法滚动。现将高度上限直接落到资产树的原生滚动容器上(`overflow-y-auto` + `max-h`,随窗口高度自适应),资产少时卡片随内容收缩、资产多时封顶并出滚动条。
+
## [0.3.14] - 2026-09-24
### 任务列表
diff --git a/web/src/app/(main)/function/findings/_components/asset-tree.tsx b/web/src/app/(main)/function/findings/_components/asset-tree.tsx
index 1bf2d6b..a948077 100644
--- a/web/src/app/(main)/function/findings/_components/asset-tree.tsx
+++ b/web/src/app/(main)/function/findings/_components/asset-tree.tsx
@@ -18,7 +18,6 @@ import {
import { Button } from "@/components/ui/button";
import { InputGroup, InputGroupAddon, InputGroupInput } from "@/components/ui/input-group";
-import { ScrollArea } from "@/components/ui/scroll-area";
import type { FindingAssetKind, FindingAssetNode } from "@/lib/types";
import { cn } from "@/lib/utils";
@@ -299,12 +298,12 @@ export function AssetTree({
<span className="text-xs tabular-nums text-muted-foreground">{findingTotal}</span>
</button>
- <ScrollArea className="min-h-0 flex-1">
- <div className="flex flex-col pr-2">
+ <div className="max-h-[24rem] min-h-0 flex-1 overflow-y-auto pr-2 lg:max-h-[calc(100vh-16rem)]">
+ <div className="flex flex-col">
{rows}
{rows.length === 0 && <p className="px-2 py-8 text-center text-xs text-muted-foreground">{emptyHint}</p>}
</div>
- </ScrollArea>
+ </div>
{truncated && (
<p className="px-1 text-xs text-muted-foreground">
diff --git a/web/src/app/(main)/function/findings/page.tsx b/web/src/app/(main)/function/findings/page.tsx
index a054c9a..5b869f8 100644
--- a/web/src/app/(main)/function/findings/page.tsx
+++ b/web/src/app/(main)/function/findings/page.tsx
@@ -964,7 +964,7 @@ export default function FindingsPage() {
{view === "asset" && (
<div className="grid min-h-0 items-start gap-4 lg:grid-cols-[20rem_minmax(0,1fr)] xl:grid-cols-[24rem_minmax(0,1fr)]">
<Card className="gap-0 py-3 lg:sticky lg:top-4">
- <CardContent className="flex max-h-[24rem] flex-col px-3 lg:max-h-[calc(100vh-14rem)]">
+ <CardContent className="flex flex-col px-3">
{assetTree.loading && !assetTree.loaded ? (
<div className="flex min-h-36 items-center justify-center">
<Spinner />