fix(findings): 「按资产」视图资产列表溢出时补回滚动条
左侧资产树的滚动容器靠 height:100% 取高,但外层卡片只给了 max-height 没有确定高度,百分比高度解析失败,资产多时列表撑破卡片或被截断且无法 滚动。改为把高度上限直接放到资产树的原生滚动容器上(overflow-y-auto + max-h,随窗口自适应),资产少随内容收缩、资产多封顶并出滚动条。 Closes #170
This commit is contained in:
1 parent
b590898d1f
commit
4b1eda8e92
3 files changed
+10
-5
No files matched your search
@@ -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 用量正确归因到对应探索(此前完全记不到)。
|
- **修复自定义会话头在「一次性 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
|
## [0.3.14] - 2026-09-24
|
||||||
|
|
||||||
### 任务列表
|
### 任务列表
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ import {
|
|||||||
|
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import { InputGroup, InputGroupAddon, InputGroupInput } from "@/components/ui/input-group";
|
import { InputGroup, InputGroupAddon, InputGroupInput } from "@/components/ui/input-group";
|
||||||
import { ScrollArea } from "@/components/ui/scroll-area";
|
|
||||||
import type { FindingAssetKind, FindingAssetNode } from "@/lib/types";
|
import type { FindingAssetKind, FindingAssetNode } from "@/lib/types";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
|
|
||||||
@@ -299,12 +298,12 @@ export function AssetTree({
|
|||||||
<span className="text-xs tabular-nums text-muted-foreground">{findingTotal}</span>
|
<span className="text-xs tabular-nums text-muted-foreground">{findingTotal}</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<ScrollArea className="min-h-0 flex-1">
|
<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 pr-2">
|
<div className="flex flex-col">
|
||||||
{rows}
|
{rows}
|
||||||
{rows.length === 0 && <p className="px-2 py-8 text-center text-xs text-muted-foreground">{emptyHint}</p>}
|
{rows.length === 0 && <p className="px-2 py-8 text-center text-xs text-muted-foreground">{emptyHint}</p>}
|
||||||
</div>
|
</div>
|
||||||
</ScrollArea>
|
</div>
|
||||||
|
|
||||||
{truncated && (
|
{truncated && (
|
||||||
<p className="px-1 text-xs text-muted-foreground">
|
<p className="px-1 text-xs text-muted-foreground">
|
||||||
|
|||||||
@@ -964,7 +964,7 @@ export default function FindingsPage() {
|
|||||||
{view === "asset" && (
|
{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)]">
|
<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">
|
<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 ? (
|
{assetTree.loading && !assetTree.loaded ? (
|
||||||
<div className="flex min-h-36 items-center justify-center">
|
<div className="flex min-h-36 items-center justify-center">
|
||||||
<Spinner />
|
<Spinner />
|
||||||
|
|||||||
Reference in new issue
Block a user