fix(ux): 10 UI/UX bugs from pre-release audit (toward no-bug launch gate)

Found via parallel screen audit; each confirmed in code:
- AuthGate: auto-prompt biometrics on lock (useEffect was imported but unused)
- CodeBlock: horizontal scroll for long code lines (were wrapped/mangled)
- DiffView: horizontal scroll instead of numberOfLines=1 truncation
- chat: biometric-cancel on send shows feedback instead of silently dropping msg
- chat: send failure restores input + attachments and alerts
- chat: removed dead /compact + /clear builtin commands (advertised, no-op)
- sessions: delete + rename failures alert instead of silent; rename guarded
  against double-submit
- sessions: onRefresh spinner no longer hangs forever if a refresh rejects
- add/edit connection: validate URL has http(s):// scheme before save/test

typecheck clean, 65/65 unit tests pass. Runtime UI behavior still needs on-device
verification per the pre-posting test gate (HANDOFF §0b).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
engineer
2026-06-08 05:34:12 -07:00
parent 609bd45889
commit 42fa36f3cd
7 changed files with 103 additions and 57 deletions

View File

@@ -16,6 +16,7 @@ import { useConnections } from "../../src/stores/connections"
import type { ConnectionType } from "../../src/lib/types"
import { probeConnection, shareReport } from "../../src/lib/diagnostics"
import { captureDiagnostic } from "../../src/lib/sentry"
import { parseUrl } from "../../src/lib/diagnostics-classify"
const CONNECTION_TYPES: Array<{
type: ConnectionType
@@ -68,6 +69,10 @@ export default function EditConnectionScreen() {
Alert.alert("Error", "Please enter a server URL")
return
}
if (!parseUrl(url).valid) {
Alert.alert("Invalid URL", "Enter a full URL including http:// or https://, e.g. http://192.168.1.100:4096")
return
}
setIsTesting(true)
const result = await testConnection(
@@ -111,6 +116,10 @@ export default function EditConnectionScreen() {
Alert.alert("Error", "Please enter a server URL")
return
}
if (!parseUrl(url).valid) {
Alert.alert("Invalid URL", "Enter a full URL including http:// or https://, e.g. http://192.168.1.100:4096")
return
}
setIsSaving(true)
await updateConnection(connection.id, {

View File

@@ -17,6 +17,7 @@ import { useConnections } from "../../src/stores/connections"
import type { ConnectionType } from "../../src/lib/types"
import { probeConnection, shareReport } from "../../src/lib/diagnostics"
import { captureDiagnostic } from "../../src/lib/sentry"
import { parseUrl } from "../../src/lib/diagnostics-classify"
export default function AddConnectionScreen() {
const colorScheme = useColorScheme()
@@ -121,6 +122,10 @@ export default function AddConnectionScreen() {
Alert.alert("Error", "Please enter a server URL")
return
}
if (!parseUrl(url).valid) {
Alert.alert("Invalid URL", "Enter a full URL including http:// or https://, e.g. http://192.168.1.100:4096")
return
}
setIsConnecting(true)
await addConnection(