feat(webui): stabilize session transitions and goal presentation
Keep the composer stable during interruptible session changes. Move active and blocked goals into the header with localized gallery previews, and preserve focus when overlays close. Include the reviewed navigation, layout and accessibility fixes.
This commit is contained in:
1 parent
e65bec9a6e
commit
ce3f36983d
58 files changed
+1874
-453
No files matched your search
@@ -6,6 +6,7 @@ import { AgentActivityCluster } from "@/components/thread/AgentActivityCluster";
|
||||
import { ComposerUsagePopover, type ComposerRoundUsage } from "@/components/thread/ComposerUsagePopover";
|
||||
import type { ContextSnapshot } from "@/lib/types";
|
||||
import { ContextCompactionNotice } from "@/components/thread/ContextCompactionNotice";
|
||||
import { GoalIsland } from "@/components/thread/GoalIsland";
|
||||
import { ModelFallbackNotice } from "@/components/thread/ModelFallbackNotice";
|
||||
import { SandboxNotice, type SandboxIssue } from "@/components/thread/SandboxNotice";
|
||||
import { ModelPresetBadge, type ModelPresetOption } from "@/components/thread/ModelPresetBadge";
|
||||
@@ -89,6 +90,18 @@ function ComposerPreview() {
|
||||
</div>;
|
||||
}
|
||||
|
||||
function GoalPreview() {
|
||||
const { t } = useGalleryTranslation();
|
||||
const [status, setStatus] = useState<"active" | "blocked">("active");
|
||||
return <div>
|
||||
<StatePicker label={t("previews.goal.state")} value={status} options={["active", "blocked"]} onChange={setStatus} />
|
||||
<div className="thread-header-container relative h-56 overflow-hidden rounded-control border bg-background">
|
||||
<GoalIsland goal={{ active: status === "active", status, ui_summary: t("previews.goal.summary"), objective: t("previews.goal.objective"),
|
||||
...(status === "blocked" ? { recap: t("previews.goal.recap") } : {}) }} />
|
||||
</div>
|
||||
</div>;
|
||||
}
|
||||
|
||||
function ModelPresetPreview() {
|
||||
const { t } = useTranslation();
|
||||
const { t: g } = useGalleryTranslation();
|
||||
@@ -343,6 +356,9 @@ function ResponseSourcesPreview() {
|
||||
|
||||
const components = "webui/src/components/";
|
||||
export const conversationExamples: ComponentExample[] = [
|
||||
{ title: "previews.goal.title", files: ["thread/GoalIsland"], Preview: GoalPreview,
|
||||
description: "previews.goal.description", options: "previews.goal.options",
|
||||
code: '<GoalIsland goal={{ active: true, status: "active", ui_summary: summary, objective }} />' },
|
||||
{ title: "previews.composer.title", files: ["thread/ThreadComposer"], Preview: ComposerPreview,
|
||||
description: "previews.composer.description", options: "previews.composer.options",
|
||||
code: '<ThreadComposer onSend={send} modelPresets={presets} onModelPresetChange={setPreset} slashCommands={commands} />' },
|
||||
|
||||
Reference in new issue
Block a user