Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion plugins/connect/app.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ describe("connect settings section", () => {
slot.queryByRole("button", { name: "Add mobile device" }),
).toBeNull();
// The rest of the paired card is unaffected.
slot.getByRole("button", { name: "Show QR for phone" });
slot.getByRole("button", { name: "Re-pair" });
});

it("add mobile device mints a machine code and shows the QR payload, the code, and a countdown", async () => {
Expand Down
24 changes: 1 addition & 23 deletions plugins/connect/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// One settingsSection "Remote access", driven by the `status` rpc and live
// `connect` realtime pushes. Four states, each matched to the redesign mock:
// not paired (promise + two numbered steps + auto-submitting code field),
// pairing (inline typed-code errors), connected (URL hero chip + QR toggle +
// pairing (inline typed-code errors), connected (URL hero chip +
// mobile-app pairing + shared ports + isolated disconnect), reconnecting
// (amber wash + dimmed body). Disconnect confirms in a dialog, then lands on
// the unpaired card with a transient receipt.
Expand Down Expand Up @@ -1148,7 +1148,6 @@ function ConnectedContent({
const [disconnecting, setDisconnecting] = useState(false);
const [disconnectError, setDisconnectError] = useState<string | null>(null);
const [repairOpen, setRepairOpen] = useState(false);
const [qrOpen, setQrOpen] = useState(false);

const disconnect = useCallback(() => {
setDisconnecting(true);
Expand Down Expand Up @@ -1194,27 +1193,6 @@ function ConnectedContent({

{status.url !== null ? <UrlHero url={status.url} showOpen /> : null}

{status.url !== null ? (
<div className="space-y-2">
<div className="flex items-center gap-2">
<Button
type="button"
variant="ghost"
size="sm"
className="text-muted-foreground"
onClick={() => setQrOpen((open) => !open)}
>
<Icon name="GridView" className="size-3.5" />
Show QR for phone
</Button>
<span className="text-xs text-muted-foreground">
scan to open on another device
</span>
</div>
{qrOpen ? <QrCodeImage value={status.url} /> : null}
</div>
) : null}

{repairOpen ? (
<div className="space-y-2 rounded-md border border-border bg-surface-recessed/50 px-3 py-3">
<p className="text-xs text-muted-foreground">
Expand Down
Loading