fix(webui): center prompt navigation in the complete chat frame
This commit is contained in:
1 parent
f230409b5a
commit
27ef6fe24f
7 files changed
+84
-15
No files matched your search
@@ -1,8 +1,10 @@
|
|||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { createRoot } from "react-dom/client";
|
import { createRoot } from "react-dom/client";
|
||||||
|
import { createPortal } from "react-dom";
|
||||||
import { MessageBubble } from "@/components/MessageBubble";
|
import { MessageBubble } from "@/components/MessageBubble";
|
||||||
import { ThreadMessages } from "@/components/thread/ThreadMessages";
|
import { ThreadMessages } from "@/components/thread/ThreadMessages";
|
||||||
import { ThreadViewport } from "@/components/thread/ThreadViewport";
|
import { ThreadViewport } from "@/components/thread/ThreadViewport";
|
||||||
|
import { PaneWorkbench } from "@/components/workbench/PaneWorkbench";
|
||||||
import { usePromptHistory } from "@/hooks/usePromptHistory";
|
import { usePromptHistory } from "@/hooks/usePromptHistory";
|
||||||
import { ClientProvider } from "@/providers/ClientProvider";
|
import { ClientProvider } from "@/providers/ClientProvider";
|
||||||
import { NanobotClient } from "@/lib/nanobot-client";
|
import { NanobotClient } from "@/lib/nanobot-client";
|
||||||
@@ -82,14 +84,24 @@ function RailFixture() {
|
|||||||
return () => window.clearInterval(timer);
|
return () => window.clearInterval(timer);
|
||||||
}, [streaming]);
|
}, [streaming]);
|
||||||
const navigation = usePromptHistory(messages.length ? "websocket:rail" : null, version, messages);
|
const navigation = usePromptHistory(messages.length ? "websocket:rail" : null, version, messages);
|
||||||
|
const composer = <div style={{ height: parameters.has("tall-composer") ? 240 : 100, border: "1px solid #ddd", borderRadius: 20, padding: 20 }}>Message nanobot</div>;
|
||||||
|
const viewport = (external: boolean, navigationFrame?: HTMLElement | null) => <ThreadViewport
|
||||||
|
messages={messages} isStreaming={streaming} conversationKey="websocket:rail"
|
||||||
|
navigation={parameters.has("short") ? undefined : navigation}
|
||||||
|
navigationFrame={navigationFrame} composer={external ? null : composer} />;
|
||||||
return <main style={{ height: "100vh", display: "flex", flexDirection: "column" }}>
|
return <main style={{ height: "100vh", display: "flex", flexDirection: "column" }}>
|
||||||
{parameters.has("real") && <div>
|
{parameters.has("real") && <div>
|
||||||
<button onClick={() => setVersion((value) => value + 1)}>Refresh index</button>
|
<button onClick={() => setVersion((value) => value + 1)}>Refresh index</button>
|
||||||
<button onClick={() => setStreaming(true)} disabled={streaming}>{streaming ? "Streaming" : "Simulate stream"}</button>
|
<button onClick={() => setStreaming(true)} disabled={streaming}>{streaming ? "Streaming" : "Simulate stream"}</button>
|
||||||
</div>}
|
</div>}
|
||||||
<ThreadViewport messages={messages} isStreaming={streaming} conversationKey="websocket:rail"
|
{parameters.has("workbench") ? <PaneWorkbench
|
||||||
navigation={parameters.has("short") ? undefined : navigation}
|
panes={[{ key: "rail", title: "Rail conversation" }]} activePaneKey="rail" layout="columns" showLayoutControl={false}
|
||||||
composer={<div style={{ height: 100, border: "1px solid #ddd", borderRadius: 20, padding: 20 }}>Message nanobot</div>} />
|
onActivatePane={() => {}} onAddPane={() => {}} onLayoutChange={() => {}} onPaneOrderChange={() => {}}
|
||||||
|
renderPane={(_pane, context) => <>
|
||||||
|
{viewport(true, context.navigationFrame)}
|
||||||
|
{context.composerPortalTarget && createPortal(composer, context.composerPortalTarget)}
|
||||||
|
</>}
|
||||||
|
/> : viewport(false)}
|
||||||
</main>;
|
</main>;
|
||||||
}
|
}
|
||||||
await initializeI18n();
|
await initializeI18n();
|
||||||
|
|||||||
@@ -16,10 +16,17 @@ test("complete rail scrolls independently, jumps to unloaded history and returns
|
|||||||
has_more_before: start > 0, has_more_after: start + 10 < 2000 } } });
|
has_more_before: start > 0, has_more_after: start + 10 < 2000 } } });
|
||||||
});
|
});
|
||||||
await page.setViewportSize({ width: 1440, height: 900 });
|
await page.setViewportSize({ width: 1440, height: 900 });
|
||||||
await page.goto("/browser/fixture.html?case=rail");
|
await page.goto("/browser/fixture.html?case=rail&workbench=1");
|
||||||
const rail = page.getByTestId("prompt-rail-scroll");
|
const rail = page.getByTestId("prompt-rail-scroll");
|
||||||
const body = page.getByTestId("thread-message-region");
|
const body = page.getByTestId("thread-message-region");
|
||||||
await expect(rail).toBeVisible();
|
await expect(rail).toBeVisible();
|
||||||
|
// Center against the complete chat pane, not the rail's own (possibly shifted) box.
|
||||||
|
const expectRailCentered = async () => {
|
||||||
|
const pane = await page.getByRole("region", { name: "Workbench", exact: true }).boundingBox();
|
||||||
|
const bounds = await rail.boundingBox();
|
||||||
|
expect(Math.abs(bounds!.y + bounds!.height / 2 - (pane!.y + pane!.height / 2))).toBeLessThan(2);
|
||||||
|
};
|
||||||
|
await expectRailCentered();
|
||||||
await expect.poll(() => rail.evaluate((node) => node.scrollHeight)).toBe(32024);
|
await expect.poll(() => rail.evaluate((node) => node.scrollHeight)).toBe(32024);
|
||||||
expect(reads).toHaveLength(0);
|
expect(reads).toHaveLength(0);
|
||||||
// Lazy markdown and content-visibility can change the scroll range during startup.
|
// Lazy markdown and content-visibility can change the scroll range during startup.
|
||||||
@@ -64,11 +71,28 @@ test("complete rail scrolls independently, jumps to unloaded history and returns
|
|||||||
expect(await rail.evaluate((node) => getComputedStyle(node).maskImage)).toContain("linear-gradient");
|
expect(await rail.evaluate((node) => getComputedStyle(node).maskImage)).toContain("linear-gradient");
|
||||||
await page.screenshot({ path: "test-results/prompt-rail-long.png" });
|
await page.screenshot({ path: "test-results/prompt-rail-long.png" });
|
||||||
// Short lists remain centered in the same viewport-relative space.
|
// Short lists remain centered in the same viewport-relative space.
|
||||||
await page.goto("/browser/fixture.html?case=rail&short=1");
|
await page.goto("/browser/fixture.html?case=rail&short=1&workbench=1");
|
||||||
const markers = page.getByTestId("prompt-rail-marker");
|
const markers = page.getByTestId("prompt-rail-marker");
|
||||||
await expect(markers).toHaveCount(5);
|
await expect(markers).toHaveCount(5);
|
||||||
const bounds = await rail.boundingBox();
|
await expectRailCentered();
|
||||||
|
const bounds = await page.getByRole("region", { name: "Workbench", exact: true }).boundingBox();
|
||||||
const middle = await markers.nth(2).boundingBox();
|
const middle = await markers.nth(2).boundingBox();
|
||||||
expect(Math.abs(middle!.y + middle!.height / 2 - (bounds!.y + bounds!.height / 2))).toBeLessThan(2);
|
expect(Math.abs(middle!.y + middle!.height / 2 - (bounds!.y + bounds!.height / 2))).toBeLessThan(2);
|
||||||
await page.screenshot({ path: "test-results/prompt-rail-short.png" });
|
await page.screenshot({ path: "test-results/prompt-rail-short.png" });
|
||||||
|
// A taller composer in a shorter window must not push navigation above center.
|
||||||
|
await page.setViewportSize({ width: 1440, height: 640 });
|
||||||
|
await page.goto("/browser/fixture.html?case=rail&short=1&tall-composer=1&workbench=1");
|
||||||
|
await expect(markers).toHaveCount(5);
|
||||||
|
await expectRailCentered();
|
||||||
|
const shortBounds = await page.getByRole("region", { name: "Workbench", exact: true }).boundingBox();
|
||||||
|
const shortMiddle = await markers.nth(2).boundingBox();
|
||||||
|
expect(Math.abs(shortMiddle!.y + shortMiddle!.height / 2 - (shortBounds!.y + shortBounds!.height / 2))).toBeLessThan(2);
|
||||||
|
await expect(markers.first()).toBeInViewport();
|
||||||
|
await expect(markers.last()).toBeInViewport();
|
||||||
|
await page.setViewportSize({ width: 800, height: 900 });
|
||||||
|
await page.goto("/browser/fixture.html?case=rail&short=1&workbench=1");
|
||||||
|
await expect(rail).not.toBeVisible();
|
||||||
|
await page.setViewportSize({ width: 1440, height: 900 });
|
||||||
|
await expect(rail).toBeVisible();
|
||||||
|
await expectRailCentered();
|
||||||
});
|
});
|
||||||
@@ -3066,6 +3066,7 @@ function Shell({
|
|||||||
headerPortalTarget={context.headerPortalTarget}
|
headerPortalTarget={context.headerPortalTarget}
|
||||||
headerActive={context.active}
|
headerActive={context.active}
|
||||||
composerPortalTarget={context.composerPortalTarget}
|
composerPortalTarget={context.composerPortalTarget}
|
||||||
|
navigationFrame={context.navigationFrame}
|
||||||
composerActive={context.active}
|
composerActive={context.active}
|
||||||
composerInputAriaLabel={t("workbench.composerAria", {
|
composerInputAriaLabel={t("workbench.composerAria", {
|
||||||
title: pane.title,
|
title: pane.title,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { memo, type RefObject, useEffect, useMemo, useRef, useState } from "react";
|
import { memo, type RefObject, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { MarkdownText } from "@/components/MarkdownText";
|
import { MarkdownText } from "@/components/MarkdownText";
|
||||||
import { floatingSurfaceElevationClassName } from "@/components/ui/floating-surface";
|
import { floatingSurfaceElevationClassName } from "@/components/ui/floating-surface";
|
||||||
@@ -7,11 +7,11 @@ import type { UIMessage } from "@/lib/types";
|
|||||||
import { type PromptAnchor, userPromptAnchors } from "./promptNavigation";
|
import { type PromptAnchor, userPromptAnchors } from "./promptNavigation";
|
||||||
|
|
||||||
interface PromptRailProps {
|
interface PromptRailProps {
|
||||||
bottomOffset: number;
|
|
||||||
messages: UIMessage[];
|
messages: UIMessage[];
|
||||||
prompts?: PromptAnchor[];
|
prompts?: PromptAnchor[];
|
||||||
onJumpToPrompt: (promptId: string) => void;
|
onJumpToPrompt: (promptId: string) => void;
|
||||||
scrollRef: RefObject<HTMLDivElement>;
|
scrollRef: RefObject<HTMLDivElement>;
|
||||||
|
navigationFrame?: HTMLElement | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const GAP = 16;
|
const GAP = 16;
|
||||||
@@ -19,13 +19,15 @@ const EDGE = 20;
|
|||||||
const WIDTHS = [28, 22, 16, 11];
|
const WIDTHS = [28, 22, 16, 11];
|
||||||
|
|
||||||
/** Complete logical list; only the visible markers and one preview are mounted. */
|
/** Complete logical list; only the visible markers and one preview are mounted. */
|
||||||
export const PromptRail = memo(function PromptRail({ bottomOffset, messages, prompts, onJumpToPrompt, scrollRef }: PromptRailProps) {
|
export const PromptRail = memo(function PromptRail({ messages, prompts, onJumpToPrompt, scrollRef, navigationFrame }: PromptRailProps) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const anchors = useMemo(() => prompts ?? userPromptAnchors(messages), [prompts, messages]);
|
const anchors = useMemo(() => prompts ?? userPromptAnchors(messages), [prompts, messages]);
|
||||||
const anchorPositions = useMemo(() => new Map(anchors.map((anchor, index) => [anchor.id, index])), [anchors]);
|
const anchorPositions = useMemo(() => new Map(anchors.map((anchor, index) => [anchor.id, index])), [anchors]);
|
||||||
// Assistant token updates do not change which user elements need observation.
|
// Assistant token updates do not change which user elements need observation.
|
||||||
const userIds = messages.filter((message) => message.role === "user").map((message) => message.id).join("\n");
|
const userIds = messages.filter((message) => message.role === "user").map((message) => message.id).join("\n");
|
||||||
const railRef = useRef<HTMLDivElement>(null);
|
const railRef = useRef<HTMLDivElement>(null);
|
||||||
|
const frameRef = useRef<HTMLDivElement>(null);
|
||||||
|
const [frame, setFrame] = useState<{ center: number; height: number } | null>(null);
|
||||||
const inside = useRef(false);
|
const inside = useRef(false);
|
||||||
const [height, setHeight] = useState(300);
|
const [height, setHeight] = useState(300);
|
||||||
const [scrollTop, setScrollTop] = useState(0);
|
const [scrollTop, setScrollTop] = useState(0);
|
||||||
@@ -36,15 +38,33 @@ export const PromptRail = memo(function PromptRail({ bottomOffset, messages, pro
|
|||||||
const first = Math.max(0, Math.floor((scrollTop - padding) / GAP) - 4);
|
const first = Math.max(0, Math.floor((scrollTop - padding) / GAP) - 4);
|
||||||
const end = Math.min(anchors.length, Math.ceil((scrollTop + height - padding) / GAP) + 5);
|
const end = Math.min(anchors.length, Math.ceil((scrollTop + height - padding) / GAP) + 5);
|
||||||
|
|
||||||
useEffect(() => {
|
useLayoutEffect(() => {
|
||||||
const rail = railRef.current;
|
const rail = railRef.current;
|
||||||
if (!rail) return;
|
if (!rail) return;
|
||||||
const measure = () => setHeight(rail.clientHeight || 300);
|
// The rail is a direct child of ThreadViewport. Unlike offsetParent this
|
||||||
|
// remains available while the narrow-pane CSS hides the rail.
|
||||||
|
const pane = frameRef.current?.parentElement;
|
||||||
|
const measure = () => {
|
||||||
|
if (navigationFrame && pane) {
|
||||||
|
const target = navigationFrame.getBoundingClientRect();
|
||||||
|
const bounds = pane.getBoundingClientRect();
|
||||||
|
const center = target.top + target.height / 2 - bounds.top;
|
||||||
|
// Keep the centered rail inside the transcript, even when a shared
|
||||||
|
// composer outside this viewport grows. It must not be clipped below.
|
||||||
|
const height = Math.max(0, Math.min(target.height * 0.8, 2 * (Math.min(center, bounds.height - center) - 12)));
|
||||||
|
setFrame((previous) => previous?.center === center && previous.height === height ? previous : { center, height });
|
||||||
|
} else setFrame(null);
|
||||||
|
setHeight(rail.clientHeight || 300);
|
||||||
|
};
|
||||||
measure();
|
measure();
|
||||||
const observer = new ResizeObserver(measure);
|
const observer = new ResizeObserver(measure);
|
||||||
observer.observe(rail);
|
observer.observe(rail);
|
||||||
|
if (navigationFrame && pane) {
|
||||||
|
observer.observe(navigationFrame);
|
||||||
|
observer.observe(pane);
|
||||||
|
}
|
||||||
return () => observer.disconnect();
|
return () => observer.disconnect();
|
||||||
}, [anchors.length >= 2, bottomOffset]);
|
}, [anchors.length >= 2, navigationFrame]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const scroller = scrollRef.current;
|
const scroller = scrollRef.current;
|
||||||
@@ -117,9 +137,10 @@ export const PromptRail = memo(function PromptRail({ bottomOffset, messages, pro
|
|||||||
};
|
};
|
||||||
|
|
||||||
return <div
|
return <div
|
||||||
|
ref={frameRef}
|
||||||
aria-label={t("thread.promptNavigator.railAria")}
|
aria-label={t("thread.promptNavigator.railAria")}
|
||||||
className="thread-prompt-rail pointer-events-auto absolute top-3 z-20 w-9"
|
className="thread-prompt-rail pointer-events-auto absolute inset-y-[10%] z-20 w-9"
|
||||||
style={{ bottom: Math.max(16, bottomOffset) }}
|
style={frame ? { top: frame.center, bottom: "auto", height: frame.height, transform: "translateY(-50%)" } : undefined}
|
||||||
onPointerEnter={() => { inside.current = true; }}
|
onPointerEnter={() => { inside.current = true; }}
|
||||||
onPointerLeave={() => { inside.current = false; setFocused(null); }}
|
onPointerLeave={() => { inside.current = false; setFocused(null); }}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -538,6 +538,7 @@ interface ThreadShellProps {
|
|||||||
headerPortalTarget?: HTMLElement | null;
|
headerPortalTarget?: HTMLElement | null;
|
||||||
headerActive?: boolean;
|
headerActive?: boolean;
|
||||||
composerPortalTarget?: HTMLElement | null;
|
composerPortalTarget?: HTMLElement | null;
|
||||||
|
navigationFrame?: HTMLElement | null;
|
||||||
composerActive?: boolean;
|
composerActive?: boolean;
|
||||||
composerInputAriaLabel?: string;
|
composerInputAriaLabel?: string;
|
||||||
emptyComposerVariant?: "hero" | "thread";
|
emptyComposerVariant?: "hero" | "thread";
|
||||||
@@ -756,6 +757,7 @@ export function ThreadShell({
|
|||||||
headerPortalTarget,
|
headerPortalTarget,
|
||||||
headerActive = true,
|
headerActive = true,
|
||||||
composerPortalTarget,
|
composerPortalTarget,
|
||||||
|
navigationFrame,
|
||||||
composerActive = true,
|
composerActive = true,
|
||||||
composerInputAriaLabel,
|
composerInputAriaLabel,
|
||||||
emptyComposerVariant = "hero",
|
emptyComposerVariant = "hero",
|
||||||
@@ -2077,6 +2079,7 @@ export function ThreadShell({
|
|||||||
ref={viewportRef}
|
ref={viewportRef}
|
||||||
messages={displayMessages}
|
messages={displayMessages}
|
||||||
navigation={promptNavigation}
|
navigation={promptNavigation}
|
||||||
|
navigationFrame={navigationFrame}
|
||||||
temporary={temporary}
|
temporary={temporary}
|
||||||
isStreaming={turnActive}
|
isStreaming={turnActive}
|
||||||
runStartedAt={currentRunStartedAt}
|
runStartedAt={currentRunStartedAt}
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ interface ThreadViewportProps {
|
|||||||
runStartedAt?: number | null;
|
runStartedAt?: number | null;
|
||||||
retryStatus?: RetryStatus | null;
|
retryStatus?: RetryStatus | null;
|
||||||
composer?: ReactNode;
|
composer?: ReactNode;
|
||||||
|
navigationFrame?: HTMLElement | null;
|
||||||
emptyState?: ReactNode;
|
emptyState?: ReactNode;
|
||||||
scrollToBottomSignal?: number;
|
scrollToBottomSignal?: number;
|
||||||
activeTurnId?: string | null;
|
activeTurnId?: string | null;
|
||||||
@@ -241,6 +242,7 @@ export const ThreadViewport = forwardRef<ThreadViewportHandle, ThreadViewportPro
|
|||||||
runStartedAt = null,
|
runStartedAt = null,
|
||||||
retryStatus = null,
|
retryStatus = null,
|
||||||
composer,
|
composer,
|
||||||
|
navigationFrame,
|
||||||
emptyState,
|
emptyState,
|
||||||
scrollToBottomSignal = 0,
|
scrollToBottomSignal = 0,
|
||||||
activeTurnId: liveTurnId = null,
|
activeTurnId: liveTurnId = null,
|
||||||
@@ -1130,7 +1132,7 @@ export const ThreadViewport = forwardRef<ThreadViewportHandle, ThreadViewportPro
|
|||||||
messages={messages}
|
messages={messages}
|
||||||
prompts={navigation?.prompts}
|
prompts={navigation?.prompts}
|
||||||
scrollRef={scrollRef}
|
scrollRef={scrollRef}
|
||||||
bottomOffset={scrollButtonBottom}
|
navigationFrame={navigationFrame}
|
||||||
onJumpToPrompt={jumpToUserPrompt}
|
onJumpToPrompt={jumpToUserPrompt}
|
||||||
/>
|
/>
|
||||||
) : null}
|
) : null}
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ interface PaneRenderContext {
|
|||||||
active: boolean;
|
active: boolean;
|
||||||
headerPortalTarget: HTMLElement | null | undefined;
|
headerPortalTarget: HTMLElement | null | undefined;
|
||||||
composerPortalTarget: HTMLElement | null | undefined;
|
composerPortalTarget: HTMLElement | null | undefined;
|
||||||
|
navigationFrame: HTMLElement | null | undefined;
|
||||||
headerActions: ReactNode;
|
headerActions: ReactNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -208,6 +209,7 @@ export function PaneWorkbench({
|
|||||||
const effectiveLayout = layout;
|
const effectiveLayout = layout;
|
||||||
const [headerPortalTarget, setHeaderPortalTarget] = useState<HTMLElement | null>(null);
|
const [headerPortalTarget, setHeaderPortalTarget] = useState<HTMLElement | null>(null);
|
||||||
const [composerPortalTarget, setComposerPortalTarget] = useState<HTMLElement | null>(null);
|
const [composerPortalTarget, setComposerPortalTarget] = useState<HTMLElement | null>(null);
|
||||||
|
const [navigationFrame, setNavigationFrame] = useState<HTMLElement | null>(null);
|
||||||
const gridRef = useRef<HTMLDivElement | null>(null);
|
const gridRef = useRef<HTMLDivElement | null>(null);
|
||||||
const paneRefs = useRef(new Map<string, HTMLElement>());
|
const paneRefs = useRef(new Map<string, HTMLElement>());
|
||||||
const lastRectsRef = useRef(new Map<string, DOMRect>());
|
const lastRectsRef = useRef(new Map<string, DOMRect>());
|
||||||
@@ -675,6 +677,7 @@ export function PaneWorkbench({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<section
|
<section
|
||||||
|
ref={setNavigationFrame}
|
||||||
aria-label={t("workbench.aria", { defaultValue: "Conversation workbench" })}
|
aria-label={t("workbench.aria", { defaultValue: "Conversation workbench" })}
|
||||||
className={cn(
|
className={cn(
|
||||||
"thread-workspace relative flex h-full min-h-0 flex-col overflow-hidden bg-background",
|
"thread-workspace relative flex h-full min-h-0 flex-col overflow-hidden bg-background",
|
||||||
@@ -726,6 +729,9 @@ export function PaneWorkbench({
|
|||||||
// Multiple conversation panes still share the workbench toolbar.
|
// Multiple conversation panes still share the workbench toolbar.
|
||||||
headerPortalTarget: chrome && displayedPanes.length > 1 ? headerPortalTarget : undefined,
|
headerPortalTarget: chrome && displayedPanes.length > 1 ? headerPortalTarget : undefined,
|
||||||
composerPortalTarget: chrome ? composerPortalTarget : undefined,
|
composerPortalTarget: chrome ? composerPortalTarget : undefined,
|
||||||
|
// A single chat includes the shared composer in its visual frame.
|
||||||
|
// Split chats keep navigation centered within their own pane.
|
||||||
|
navigationFrame: displayedPanes.length === 1 ? navigationFrame : undefined,
|
||||||
headerActions,
|
headerActions,
|
||||||
})}
|
})}
|
||||||
{chrome && panes.length > 1 && !compact ? (
|
{chrome && panes.length > 1 && !compact ? (
|
||||||
|
|||||||
Reference in new issue
Block a user