Skip to content

fix(ios): consolidate Xcode schemes and prevent credential auto-capitalization - #1128

Merged
pkmetski merged 5 commits into
mainfrom
pkmetski/ios-schemes-and-add-source-credential-fix
Sep 29, 2026
Merged

pkmetski merged 5 commits into
mainfrom
pkmetski/ios-schemes-and-add-source-credential-fix

Conversation

@pkmetski

Copy link
Copy Markdown
Owner

Changes

fix(ios): consolidate Xcode schemes; delete redundant iosApp scheme

Three schemes existed for two targets (Riffle, iosApp, iosAppUnitTests), making Xcode's scheme picker confusing — iosApp was a duplicate of Riffle that appeared first. The iosApp scheme is deleted. The Riffle scheme is updated to include both test targets (iosAppTests, iosAppUnitTests) so xcodebuild -scheme Riffle test runs all suites without manual target selection. The iOS harness CI workflow is updated to use -scheme Riffle.

fix(add-source): prevent iOS keyboard auto-capitalizing password field

passwordKeyboardOptions used KeyboardType.Password, which sets isSecureTextEntry=true on the iOS UITextField. This flag overrides UITextAutocapitalizationType.none at the OS level regardless of KeyboardCapitalization.None, silently capitalizing the first character of the password (test → Test → HTTP 401 from ABS, which has a case-sensitive password field).

Fix: use KeyboardType.Text for the password field. PasswordVisualTransformation in AddSourceScreen.kt continues to mask the field visually on both platforms.

All five interactive controls in AddSourceScreen now carry testTag constants (AGENTS.md requirement).

Tests

  • CredentialKeyboardOptionsTest (commonTest — runs on Android host and iosSimulatorArm64): asserts passwordKeyboardOptions.keyboardType != KeyboardType.Password and capitalization == None for both credential fields. Fails if anyone reverts the fix.
  • AddAbsSourceRealServerTests.testAddAbsSourceWithRealServer (iosAppTests): drives the add-source UI against the real ABS instance at http://media-server:13378 with test/test. Verified passing in 23s. The existing stub-server variant (AddAbsSourceFlowTests) accepts any credentials and cannot catch auth regressions; this test does.

Verification

CredentialKeyboardOptionsTest: 4/4 passed on Android host and iosSimulatorArm64.
AddAbsSourceRealServerTests.testAddAbsSourceWithRealServer: passed (23s) against the real ABS server on iPhone 17 simulator.

🤖 Generated with Claude Code

Three schemes existed for two targets, making the Xcode scheme picker
confusing. The iosApp scheme was a duplicate of Riffle; it is removed.
The remaining Riffle scheme is updated to include both test targets
(iosAppTests, iosAppUnitTests) so `xcodebuild -scheme Riffle test` runs
all suites. The iOS harness workflow is updated to use -scheme Riffle.
KeyboardType.Password sets isSecureTextEntry=true on iOS, which overrides
UITextAutocapitalizationType.none regardless of KeyboardCapitalization.None.
This silently capitalizes the first character of the password, turning "test"
into "Test" and causing valid credentials to return 401.

Fix: use KeyboardType.Text for the password field. PasswordVisualTransformation
in AddSourceScreen.kt continues to mask the field visually on both platforms.

Also adds testTags to all interactive controls in AddSourceScreen (AGENTS.md
requirement: every interactive control must carry a testTag).

Regression test: CredentialKeyboardOptionsTest asserts that passwordKeyboardOptions
does not use KeyboardType.Password and that capitalization is None for both
credential and password fields. Runs in commonTest on both Android host and
iosSimulatorArm64 (already wired in ios.yml).
Adds AddAbsSourceRealServerTests.testAddAbsSourceWithRealServer — an
end-to-end test that connects to the developer ABS instance at
http://media-server:13378 (test/test) through the add-source UI rather
than via a stub. The stub-server variant (AddAbsSourceFlowTests) cannot
catch auth regressions because it accepts any credentials; this test
catches them. Verified: 23s, passes on the simulator against the real
server.
AddAbsSourceRealServerTests.testAddAbsSourceWithRealServer connected to
http://media-server:13378 (a Tailscale-only hostname) which CI runners
cannot reach — both retry attempts timed out. The CredentialKeyboardOptionsTest
(commonTest) already pins that passwordKeyboardOptions cannot revert to
KeyboardType.Password; that is the regression guard for the keyboard fix.
@pkmetski
pkmetski merged commit adfda4d into main Sep 29, 2026
19 of 20 checks passed
@pkmetski
pkmetski deleted the pkmetski/ios-schemes-and-add-source-credential-fix branch September 29, 2026 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant