fix(webui): stabilize earlier-history loading and reclaim space (#6349)
* fix(webui): retain smoothly revealed history loading headers * refactor(webui): simplify history loading feedback * fix(webui): keep retained history headers clear of preceding text * fix(webui): reclaim completed history loading space * refactor(webui): group history projection handoff with navigation * test(webui): synchronize history motion observations * fix(webui): collapse history completion geometry handoff
This commit is contained in:
1 parent
73a55e0b2f
commit
743c51e81f
24 files changed
+1658
-356
No files matched your search
@@ -152,7 +152,7 @@ createRoot(document.getElementById("root")!).render(<TooltipProvider>
|
||||
: parameters.get("case") === "typography"
|
||||
? <ClientProvider client={railClient} token="fixture"><TypographyFixture /></ClientProvider>
|
||||
: parameters.get("case") === "history-boundary"
|
||||
? <ClientProvider client={railClient} token="fixture" webuiCapabilities={["webui.prompt-navigation.v1"]}><HistoryBoundaryFixture local={parameters.has("local")} navigate={parameters.has("navigate")} /></ClientProvider>
|
||||
? <ClientProvider client={railClient} token="fixture" webuiCapabilities={["webui.prompt-navigation.v1"]}><HistoryBoundaryFixture local={parameters.has("local")} navigate={parameters.has("navigate")} tasks={parameters.has("tasks")} /></ClientProvider>
|
||||
: parameters.get("case") === "diagrams"
|
||||
? <DiagramFixture parameters={parameters} />
|
||||
: parameters.get("case") === "thread-loading"
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { Profiler, useState } from "react";
|
||||
import { ThreadViewport } from "@/components/thread/ThreadViewport";
|
||||
import { SubagentTasksProvider } from "@/components/thread/SubagentTasks";
|
||||
import { useClient } from "@/providers/ClientProvider";
|
||||
import { useSessionHistory } from "@/hooks/useSessions";
|
||||
import { usePromptHistory } from "@/hooks/usePromptHistory";
|
||||
import type { UIMessage } from "@/lib/types";
|
||||
@@ -9,7 +11,8 @@ const localMessages: UIMessage[] = Array.from({ length: 280 }, (_, index) => ({
|
||||
content: `Cached message ${index}`, createdAt: index + 1,
|
||||
}));
|
||||
|
||||
export function HistoryBoundaryFixture({ local = false, navigate = false }: { local?: boolean; navigate?: boolean }) {
|
||||
export function HistoryBoundaryFixture({ local = false, navigate = false, tasks = false }: { local?: boolean; navigate?: boolean; tasks?: boolean }) {
|
||||
const { client, token } = useClient();
|
||||
const [key, setKey] = useState("websocket:boundary-a");
|
||||
const history = useSessionHistory(local ? null : key);
|
||||
const messages = local ? localMessages : history.messages;
|
||||
@@ -21,11 +24,13 @@ export function HistoryBoundaryFixture({ local = false, navigate = false }: { lo
|
||||
<Profiler id="history-boundary" onRender={(_, phase, actualDuration) => {
|
||||
window.dispatchEvent(new CustomEvent("history-boundary-render", { detail: { phase, actualDuration } }));
|
||||
}}>
|
||||
<SubagentTasksProvider client={client} token={token} sessionKey={key} enabled={tasks} liveEvents={false}>
|
||||
<ThreadViewport messages={messages} isStreaming={false} conversationKey={key}
|
||||
conversationReady={local || !history.loading} hasMoreBefore={history.hasMoreBefore}
|
||||
loadingOlder={history.loadingOlder} olderError={history.olderError} onLoadOlder={history.loadOlder}
|
||||
navigation={navigate ? navigation : undefined} userMessageOffset={history.userMessageOffset}
|
||||
composer={<div className="border-t px-4 py-6" style={{ height: 96 }}>History boundary fixture</div>} />
|
||||
</SubagentTasksProvider>
|
||||
</Profiler>
|
||||
</main>;
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user