Skip to content

Commit 0c11f61

Browse files
nieaoclaude
andcommitted
fix(cli-monitor): absolute 改 fixed + z-110, 跨平台可见
用户报告 Win 看得见监控黑框, Mac 看不见 (图 45)。 之前用 absolute 受父容器布局/视口限制, 在 Mac Safari/Chrome 某些布局下 可能被 RightPanel 抽屉遮挡或滚出视口。改 fixed + z-index 110 (高于 DebateStreamPanel 的 100), 折叠 chip 与展开抽屉都浮在最顶层。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 45bd0bd commit 0c11f61

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

src/components/CliMonitor.jsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,13 @@ export default function CliMonitor() {
101101
return (
102102
<button
103103
onClick={() => setOpen(true)}
104-
// 抬到 CostMeterChip (bottom 12 right 12) 上方, 不重叠
105-
className="absolute z-40 flex items-center gap-2 px-3 py-1.5 rounded-md shadow-lg transition-all hover:translate-y-[-2px]"
104+
// fixed + 高 z-index, 跨平台都能看见 (用户报告 Win 可见 Mac 不可见,
105+
// 之前 absolute 在某些布局下被 RightPanel 抽屉/视口限制挡住)
106+
className="fixed flex items-center gap-2 px-3 py-1.5 rounded-md shadow-lg transition-all hover:translate-y-[-2px]"
106107
style={{
107108
bottom: 56,
108109
right: 12,
110+
zIndex: 110,
109111
background: '#1a1a1a',
110112
color: '#fafafa',
111113
border: '1px solid #2d2d2d',
@@ -128,9 +130,13 @@ export default function CliMonitor() {
128130

129131
return (
130132
<div
131-
className="absolute top-0 right-0 bottom-0 z-40 flex flex-col"
133+
className="fixed flex flex-col"
132134
style={{
135+
top: 0,
136+
right: 0,
137+
bottom: 0,
133138
width: 420,
139+
zIndex: 110,
134140
background: '#0f0f0f',
135141
color: '#e0e0e0',
136142
borderLeft: '1px solid #2d2d2d',

0 commit comments

Comments
 (0)