fix(dsh-plugin-browserskill): dock below the shell top bar

The plain top:16 default overlapped the shell's Session log action;
dock the card and capsule at the content area's top-right (64px) so
neither collides with the header controls.
This commit is contained in:
BB-fat
2026-08-14 08:06:28 +00:00
parent 47070fdc14
commit b07b8fec65
2 changed files with 5 additions and 3 deletions
@@ -182,7 +182,7 @@
.capsule {
position: fixed;
right: 16px;
top: 16px;
top: 64px;
z-index: 40;
display: inline-flex;
align-items: center;
@@ -46,6 +46,8 @@ interface Size {
const DEFAULT_SIZE: Size = { w: 320, h: 240 };
const MIN_SIZE: Size = { w: 240, h: 180 };
const EDGE_MARGIN = 16;
/** Default dock: top-right, just under the shell's top bar (no spacing tokens exist in dsh 0.1). */
const TOP_OFFSET = 64;
function pipApi(): DocumentPip | undefined {
if (typeof window === "undefined") return undefined;
@@ -408,7 +410,7 @@ export function ObservationOverlay({ store }: { store: ObservationClientStore })
)?.getBoundingClientRect();
const base = {
x: rect?.left ?? pos?.x ?? viewport().w - size.w - EDGE_MARGIN,
y: rect?.top ?? pos?.y ?? EDGE_MARGIN,
y: rect?.top ?? pos?.y ?? TOP_OFFSET,
w: rect?.width ?? size.w,
h: rect?.height ?? size.h,
};
@@ -474,7 +476,7 @@ export function ObservationOverlay({ store }: { store: ObservationClientStore })
const style: React.CSSProperties =
pos !== null
? { left: pos.x, top: pos.y, width: size.w, height: size.h }
: { right: EDGE_MARGIN, top: EDGE_MARGIN, width: size.w, height: size.h };
: { right: EDGE_MARGIN, top: TOP_OFFSET, width: size.w, height: size.h };
return (
<div className={css.card} style={style} data-obs-card data-testid="obs-card">
{body}