fix(webui): make action feedback easier to notice (#6702)
* fix(webui): make action feedback easier to notice * fix(webui): preserve undo and report confirmed action results * refactor(webui): trim toast preview and redundant coverage * test(webui): advance the undo window for the last topic deletion
This commit is contained in:
1 parent
0f45d74fec
commit
9ccf3b6214
59 files changed
+1621
-508
No files matched your search
@@ -1,10 +1,17 @@
|
||||
import { useState } from "react";
|
||||
import { ThreadComposer } from "@/components/thread/ThreadComposer";
|
||||
import { ToastProvider } from "@/components/ui/toast";
|
||||
|
||||
export function installMissingMicrophonePreview() {
|
||||
Object.defineProperty(navigator.mediaDevices, "getUserMedia", {
|
||||
value: async () => { throw new DOMException("No microphone", "NotFoundError"); },
|
||||
});
|
||||
}
|
||||
|
||||
export function ComposerActionFixture({ parameters }: { parameters: URLSearchParams }) {
|
||||
const [running, setRunning] = useState(false);
|
||||
const [stopRequested, setStopRequested] = useState(false);
|
||||
return <main className="mx-auto w-full max-w-5xl px-4 pt-24">
|
||||
return <ToastProvider><main className="mx-auto w-full max-w-5xl px-4" style={{ paddingTop: "6rem" }}>
|
||||
<ThreadComposer
|
||||
variant={parameters.get("composerVariant") === "thread" ? "thread" : "hero"}
|
||||
placeholder={parameters.has("opening") ? "Opening a new topic…" : undefined}
|
||||
@@ -19,5 +26,5 @@ export function ComposerActionFixture({ parameters }: { parameters: URLSearchPar
|
||||
<button onClick={() => { setRunning(false); setStopRequested(false); }}>Finish response</button>
|
||||
<button onClick={() => document.documentElement.classList.toggle("dark")}>Toggle theme</button>
|
||||
</div>
|
||||
</main>;
|
||||
</main></ToastProvider>;
|
||||
}
|
||||
Reference in new issue
Block a user