From 1416b2cb756d1f0f5d3b2d9463864bafc6885a42 Mon Sep 17 00:00:00 2001 From: Jesus Armando Anaya <1445792+JArmandoAnaya@users.noreply.github.com> Date: Thu, 17 Sep 2026 17:58:15 -0700 Subject: [PATCH 1/8] feat(ui): make suggest panel collapsible --- .../ui-core/src/annotator/EditorNotice.tsx | 40 +++++++++++++++++-- .../ui-core/src/annotator/SuggestPanel.tsx | 13 +++--- .../src/annotator/suggestPanel.test.tsx | 19 +++++++++ 3 files changed, 63 insertions(+), 9 deletions(-) diff --git a/frontend/ui-core/src/annotator/EditorNotice.tsx b/frontend/ui-core/src/annotator/EditorNotice.tsx index e9df0a09..3a174d9e 100644 --- a/frontend/ui-core/src/annotator/EditorNotice.tsx +++ b/frontend/ui-core/src/annotator/EditorNotice.tsx @@ -48,7 +48,9 @@ * desktop; see `MAX_WIDTH` below. */ -import type { JSX, ReactNode } from "react"; +import { ChevronDown, ChevronRight } from "lucide-react"; +import { Button } from "@robomous/ui-core"; +import { useId, useState, type JSX, type ReactNode } from "react"; /** * The surface's width, stated here because the number is a measurement rather @@ -96,6 +98,8 @@ export interface EditorNoticeProps { readonly tone: "calm" | "warn"; readonly icon: ReactNode; readonly children: ReactNode; + /** Adds a compact, open-by-default toggle for notices that can obstruct the canvas. */ + readonly collapsible?: boolean; /** The kernel's identifier, where a bug report can quote it. Never the message. */ readonly title?: string; } @@ -106,14 +110,19 @@ export function EditorNotice({ icon, children, title, + collapsible = false, }: EditorNoticeProps): JSX.Element { + const [collapsed, setCollapsed] = useState(false); + const contentId = useId(); return (
{heldClass === null
? "Nothing selected to suggest for"
@@ -301,6 +301,7 @@ export function SuggestPanel({
const copy = BLOCKER_COPY[blocker];
return (
That suggestion could not be made
{/* The server's sentence, verbatim. It is the one that carries the install command when the cause is a missing extra. */} @@ -339,7 +340,7 @@ export function SuggestPanel({ // lives in `usePendingIndicator` rather than here. if (session.status === "asking") { return ( -Looking at that…
@@ -358,7 +359,7 @@ export function SuggestPanel({ if (session.status === "none") { return ( -Nothing to suggest there
@@ -399,7 +400,7 @@ export function SuggestPanel({ */ if (isAcceptable(session)) { return ( -A shape for “{session.labelClass}”
@@ -453,7 +454,7 @@ export function SuggestPanel({ activeBrowserModel?.state === "activating"; return ( -+ A shape for “{session.labelClass}” +
+A shape for “{session.labelClass}”
Click again to refine it — alt-click to take a part away.
-