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. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VfgHWr7AQDiLsTQVu7hpKB
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user