fix(web): use the schema-aware guard for the clipboard fallback check

instanceof on an Effect Schema class trips the instanceOfSchema
diagnostic; Schema.is is the sanctioned check.

Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
Theo BrowneandClaude Fable 5 committed 2026-08-14 17:39:38 -07:00
1 parent 00a4f8bd3d
commit 9c93f3fdf5
1 file changed
+2 -1
@@ -85,6 +85,7 @@ function useOnboardingTargetEnvironment(mode: ConnectionMode) {
const AGENT_ONBOARDING_THREAD_ID = ThreadId.make("onboarding-agent-setup");
const IMPORT_RECENT_WINDOW_MS = 30 * 24 * 60 * 60 * 1000;
const isClipboardApiUnavailableError = Schema.is(ClipboardApiUnavailableError);
export function WelcomeWizard({
localAvailable,
@@ -1105,7 +1106,7 @@ function CommandBlock({
timeout: 1500,
target: "command",
onError: (error) => {
if (!(error instanceof ClipboardApiUnavailableError)) return;
if (!isClipboardApiUnavailableError(error)) return;
const scratch = document.createElement("textarea");
scratch.value = command;
document.body.append(scratch);