diff --git a/webui/src/components/thread/ThreadComposer.tsx b/webui/src/components/thread/ThreadComposer.tsx
index 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` }}
>
-
-
- {t("thread.composer.goalStateSheetTitle")}
-
-
-
{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.css
index 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.tsx
index 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(
{
/>,
);
- 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", () => {