Your lightweight open-source personal agent.
Python agent-frameworkai-agentai-agentschatbotchatopsdiscord-botllm-agentsllmslocal-llmmcpmodel-context-protocolmulti-agentopenai-compatibleopenclawpersonal-ai-assistantpythonself-hostedtelegram-bot-ai-assistantwebuiworkflow-automation
fix(webui): remove goal halo and redundant detail header (#6417)
chengyongru3bd489e31432
diff --git a/webui/src/components/thread/ThreadComposer.tsx b/webui/src/components/thread/ThreadComposer.tsxindex c16428058..5e74c1226 100644--- a/webui/src/components/thread/ThreadComposer.tsx+++ b/webui/src/components/thread/ThreadComposer.tsx@@ -979,7 +979,7 @@ function GoalStateStrip({id="nanobot-goal-panel-root"role="dialog"aria-modal="false"- aria-labelledby="nanobot-goal-panel-title"+ aria-label={t("thread.composer.goalStateSheetTitle")}tabIndex={-1}className={cn("absolute bottom-[calc(100%+8px)] left-3 right-3 z-[50] flex max-w-none flex-col overflow-hidden",@@ -988,29 +988,9 @@ function GoalStateStrip({)}style={{ maxHeight: `${Math.round(panelMaxPx)}px` }}>- <div className="flex shrink-0 items-center justify-between gap-2 border-b border-black/[0.06] px-3 py-2 dark:border-white/[0.08]">- <h2- id="nanobot-goal-panel-title"- className="min-w-0 truncate text-[13px] font-semibold tracking-tight text-foreground"- >- {t("thread.composer.goalStateSheetTitle")}- </h2>- <button- type="button"- className={cn(- "inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full",- "text-muted-foreground transition-colors hover:text-foreground",- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",- )}- aria-label={t("thread.composer.goalStateCloseAria")}- onClick={() => setGoalPanelOpen(false)}- >- <X className="h-4 w-4" aria-hidden />- </button>- </div><divid="nanobot-goal-panel-scroll"- className="min-h-0 flex-1 overflow-y-auto scrollbar-thin px-3 pb-3 pt-2"+ className="min-h-0 flex-1 overflow-y-auto scrollbar-thin p-3"><MarkdownText className="max-w-none text-foreground/90">{markdownBody}@@ -2668,7 +2648,7 @@ export function ThreadComposer({sessionDragPreview && "ring-1 ring-primary/25",isDragging && "ring-2 ring-primary/40 motion-reduce:ring-0 motion-reduce:border-primary",goalState?.active &&- "goal-shell-glow ring-1 ring-sky-400/35 motion-reduce:ring-sky-400/25 dark:ring-sky-400/45",+ "ring-1 ring-sky-400/35 motion-reduce:ring-sky-400/25 dark:ring-sky-400/45",)}>{queuedPrompt ? (diff --git a/webui/src/globals.css b/webui/src/globals.cssindex afded86d9..5ced905e9 100644--- a/webui/src/globals.css+++ b/webui/src/globals.css@@ -856,45 +856,6 @@transform-origin: top left;}- /** Goal halo: pale sky blue (not ``--primary``, which often reads as neutral gray). */- @keyframes goal-shell-glow-breathe {- 0%,- 100% {- filter: drop-shadow(0 0 10px hsl(204 72% 52% / 0.22))- drop-shadow(0 0 24px hsl(199 80% 58% / 0.14));- }- 50% {- filter: drop-shadow(0 0 17px hsl(204 78% 48% / 0.32))- drop-shadow(0 0 38px hsl(199 85% 55% / 0.2));- }- }- .goal-shell-glow {- animation: goal-shell-glow-breathe 4.8s ease-in-out infinite;- }- @keyframes goal-shell-glow-breathe-dark {- 0%,- 100% {- filter: drop-shadow(0 0 12px hsl(198 90% 72% / 0.28))- drop-shadow(0 0 28px hsl(195 95% 65% / 0.16));- }- 50% {- filter: drop-shadow(0 0 20px hsl(198 95% 78% / 0.42))- drop-shadow(0 0 42px hsl(195 100% 70% / 0.24));- }- }- .dark .goal-shell-glow {- animation-name: goal-shell-glow-breathe-dark;- }- @media (prefers-reduced-motion: reduce) {- .goal-shell-glow {- animation: none;- filter: drop-shadow(0 0 14px hsl(204 70% 50% / 0.24));- }- .dark .goal-shell-glow {- filter: drop-shadow(0 0 14px hsl(198 88% 70% / 0.32));- }- }-/* Subtle scrollbar that doesn't fight the dark background. */.scrollbar-thin {scrollbar-width: thin;diff --git a/webui/src/tests/thread-composer.test.tsx b/webui/src/tests/thread-composer.test.tsxindex edff7dfcd..d017774b9 100644--- a/webui/src/tests/thread-composer.test.tsx+++ b/webui/src/tests/thread-composer.test.tsx@@ -1800,12 +1800,14 @@ describe("ThreadComposer", () => {expect(container.querySelector("[data-composer-status-drawer]")).toBeNull();});- it("opens an upward anchored goal panel with markdown content when expand is clicked", async () => {+ it("shows full goal content and dismisses it without losing the composer draft", async () => {+ const user = userEvent.setup();const longObjective ="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz0123456789GoalTail";render(<ThreadComposeronSend={vi.fn()}+ persistDraft={false}placeholder="Type your message..."goalState={{active: true,@@ -1815,12 +1817,30 @@ describe("ThreadComposer", () => {/>,);- fireEvent.click(screen.getByRole("button", { name: "Show full goal" }));+ const input = screen.getByRole("textbox", { name: "Message input" });+ const trigger = screen.getByRole("button", { name: "Show full goal" });+ await user.type(input, "Keep my draft");+ await user.click(trigger);const dialog = await screen.findByRole("dialog", { name: "Goal" });- expect(dialog).toBeInTheDocument();expect(dialog).toHaveTextContent("Short summary for strip");expect(dialog).toHaveTextContent(longObjective);+ expect(trigger).toHaveAttribute("aria-expanded", "true");++ await user.click(trigger);+ expect(screen.queryByRole("dialog", { name: "Goal" })).not.toBeInTheDocument();+ expect(trigger).toHaveAttribute("aria-expanded", "false");++ await user.click(trigger);+ expect(await screen.findByRole("dialog", { name: "Goal" })).toBeVisible();+ await user.keyboard("{Escape}");+ expect(screen.queryByRole("dialog", { name: "Goal" })).not.toBeInTheDocument();++ await user.click(trigger);+ expect(await screen.findByRole("dialog", { name: "Goal" })).toBeVisible();+ await user.click(input);+ expect(screen.queryByRole("dialog", { name: "Goal" })).not.toBeInTheDocument();+ expect(input).toHaveValue("Keep my draft");});it("opens a slash command palette and inserts the selected command", () => {