Skip to content

🀯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

πŸ› fix(verify): finish acceptance Drawer migration & stop drawer focus-scroll page jump (#17947)

Innei621598bc309b
diff --git a/.agents/acceptance/common-mistakes.md b/.agents/acceptance/common-mistakes.md
index 5ac3f2b3690..b13a9a6194f 100644
--- a/.agents/acceptance/common-mistakes.md
+++ b/.agents/acceptance/common-mistakes.md
@@ -339,6 +339,23 @@ it in the route layout instead, and cover it with a test that asserts which rout
received the write β€” a test that only asserts a write happened passes on the
broken topology too.
+### L-S7 β€” Verifying a dependency-level fix through a dev server that predates the install
+
+**Wrong approach:** confirm the fixed version exists in `node_modules`, then capture
+behavioral evidence through an already-running Vite dev server.
+
+**Why it fails:** Vite pins its optimized dependency bundle at server boot. A server
+started before (or during) the `pnpm install` that brought the fix serves the old
+dependency code for its entire lifetime β€” the browser provably executes code that no
+longer exists on disk, and the evidence contradicts the source. An in-process restart
+via touching the Vite config can wedge the optimizer (new dep URLs 504); only a real
+process restart is trustworthy.
+
+**Correct approach:** before capturing evidence for a dependency-level change, prove
+the served bundle carries it β€” fetch the relevant `/node_modules/.vite/deps/*` chunk
+from the dev server and grep for a marker of the fix β€” or restart the dev server
+process outright and re-verify.
+
## Historical source
Detailed incident narratives and retired pixel- or component-specific directions
diff --git a/src/features/Verify/Acceptance/index.tsx b/src/features/Verify/Acceptance/index.tsx
index 4910355bd62..830ab026b9c 100644
--- a/src/features/Verify/Acceptance/index.tsx
+++ b/src/features/Verify/Acceptance/index.tsx
@@ -7,7 +7,6 @@ import {
Center,
copyToClipboard,
DraggablePanel,
- Drawer,
Empty,
Flexbox,
Icon,
@@ -15,7 +14,7 @@ import {
Text,
} from '@lobehub/ui';
import type { DropdownItem } from '@lobehub/ui/base-ui';
-import { Button, DropdownMenu, Select, toast } from '@lobehub/ui/base-ui';
+import { Button, Drawer, DropdownMenu, Select, toast } from '@lobehub/ui/base-ui';
import { createStaticStyles, cssVar, cx, useResponsive } from 'antd-style';
import dayjs from 'dayjs';
import {
@@ -1848,7 +1847,7 @@ const AcceptancePage = memo<AcceptancePageProps>(
containerMaxWidth={'100%'}
open={ledgerExpand}
placement={'right'}
- styles={{ body: { padding: 0 } }}
+ styles={{ bodyContent: { padding: 0 } }}
width={'min(340px, 88vw)'}
onClose={() => setLedgerExpand(false)}
>
@@ -1872,6 +1871,7 @@ const AcceptancePage = memo<AcceptancePageProps>(
</Drawer>
) : (
<DraggablePanel
+ stableLayout
defaultSize={{ width: 340 }}
expand={ledgerExpand}
minWidth={300}
@@ -1910,15 +1910,13 @@ const AcceptancePage = memo<AcceptancePageProps>(
so no extra close button here (two would overlap). */}
{showHistory && (
<Drawer
- destroyOnHidden
noHeader
containerMaxWidth={'100%'}
open={reportRound !== null}
placement={'right'}
width={'min(960px, 92vw)'}
styles={{
- body: { height: '100%', padding: 0 },
- bodyContent: { height: '100%', minHeight: 0, overflow: 'hidden' },
+ bodyContent: { height: '100%', minHeight: 0, overflow: 'hidden', padding: 0 },
}}
onClose={() => openReport(null)}
>
diff --git a/src/styles/global.ts b/src/styles/global.ts
index bed81eef3a7..ca1b25b23e9 100644
--- a/src/styles/global.ts
+++ b/src/styles/global.ts
@@ -23,9 +23,12 @@ const genGlobalStyle = ({ token }: { prefixCls: string; token: Theme }) => css`
}
body {
- /* Increase compositing layer, force hardware acceleration, otherwise render black edges will appear */
+ /* Own stacking context, otherwise render black edges will appear. Must NOT
+ be a transform-based hack: a transform on body rebases every position:
+ fixed descendant onto body, and a drawer panel mid slide-in then overflows
+ body horizontally β€” focusing it scrolls the whole page sideways. */
will-change: opacity;
- transform: translateZ(0);
+ isolation: isolate;
}
* {