Spin the Add remote user button; stop the search prefilter dropping typos

"Add remote user" was the one call site swapping its label instead of
using LoadingButton, so it alone had no spinner.

Global search's couldMatch was a strict subsequence test while cmdk's
scorer steps over one query character for a transposition, so a typo it
would have scored never reached it. The prefilter now carries that one
skip, which recovers every single-transposition query in a sweep of the
index shapes and admits nothing cmdk scores zero.
This commit is contained in:
2026-09-14 14:40:17 +02:00
parent 46f9575870
commit 94c9260452
2 changed files with 27 additions and 10 deletions
@@ -21,6 +21,7 @@ import {
} from "@/components/ui/dialog"
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
import { LoadingButton } from "@/components/ui/loading-button"
import { Separator } from "@/components/ui/separator"
import useCustomToast from "@/hooks/useCustomToast"
import { handleError } from "@/utils"
@@ -242,14 +243,15 @@ export function RemoteAccess() {
</p>
</div>
<div>
<Button
<LoadingButton
className="rounded-full"
variant="outline"
disabled={!joinCode.trim() || addRemoteUser.isPending}
loading={addRemoteUser.isPending}
disabled={!joinCode.trim()}
onClick={() => addRemoteUser.mutate()}
>
{addRemoteUser.isPending ? "Adding…" : "Add remote user"}
</Button>
Add remote user
</LoadingButton>
</div>
</div>