fix(ui): stop controller-nav Enter from clicking Replay Intro on auth inputs

The companion's auto-login fills the password and dispatches Enter in the
same tick, before Vue re-enables the disabled submit button. Controller-nav's
'Enter in input clicks the next enabled button' pattern then hit the Replay
Intro button — clearing neode_intro_seen and hard-navigating to /, so every
app connect replayed the intro cinematic in a loop. The auth inputs all have
their own Enter handlers, so they opt out via data-controller-no-submit.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Dorian 2026-07-18 11:54:12 +01:00
parent a27c7bafbf
commit 70587210fb

View File

@ -64,6 +64,7 @@
type="password"
autocomplete="new-password"
data-form-type="other"
data-controller-no-submit
class="w-full px-4 py-3 bg-transparent border border-white/20 rounded-lg text-white placeholder-white/40 focus:outline-none focus:border-white/40 focus:ring-1 focus:ring-white/20 transition-colors"
:placeholder="t('login.enterPasswordSetup')"
@keydown.enter="confirmPasswordInputRef?.focus()"
@ -83,6 +84,7 @@
type="password"
autocomplete="new-password"
data-form-type="other"
data-controller-no-submit
class="w-full px-4 py-3 bg-transparent border border-white/20 rounded-lg text-white placeholder-white/40 focus:outline-none focus:border-white/40 focus:ring-1 focus:ring-white/20 transition-colors"
:placeholder="t('login.confirmPasswordPlaceholder')"
@keydown.enter="handleSetupWithSound"
@ -127,6 +129,7 @@
pattern="[0-9]*"
maxlength="8"
autocomplete="one-time-code"
data-controller-no-submit
:aria-label="t('login.totpLabel')"
class="w-full px-4 py-3 bg-transparent border border-white/20 rounded-lg text-white text-center text-2xl tracking-[0.5em] placeholder-white/40 focus:outline-none focus:border-orange-400/60 focus:ring-1 focus:ring-orange-400/30 transition-colors"
:placeholder="useBackupCode ? 'XXXX-XXXX' : '000000'"
@ -165,6 +168,12 @@
🎮 Demo mode Password: <span class="font-mono font-semibold">{{ DEMO_PASSWORD }}</span>
</div>
<!-- All auth inputs opt out of controller-nav's Enterclick-next-button
pattern (data-controller-no-submit): they submit via their own Enter
handlers, and while the submit button is still disabled the "next
focusable" is Replay Intro the companion's auto-login injects
Enter before Vue re-enables the button, which replayed the intro
in a loop on every app connect. -->
<div class="mb-6">
<label for="login-password" class="block text-sm font-medium text-white/80 mb-2">
{{ t('login.password') }}
@ -175,6 +184,7 @@
type="password"
autocomplete="current-password"
data-form-type="other"
data-controller-no-submit
class="w-full px-4 py-3 bg-transparent border border-white/20 rounded-lg text-white placeholder-white/40 focus:outline-none focus:border-white/40 focus:ring-1 focus:ring-white/20 transition-colors"
:placeholder="t('login.enterPasswordPlaceholder')"
@keydown.enter="handleLoginWithSound"