Skip to content

Commit 0add3cf

Browse files
committed
Add a launch screen with the mark, cover every document in the web sign-in with the skeleton until it shows text, and find production's account button for signing out
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012xYtaUjbkB1hwLtK4TEzhq
1 parent ed5f730 commit 0add3cf

8 files changed

Lines changed: 49 additions & 12 deletions

File tree

‎.github/workflows/ios-shell-video.yml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ on:
3030
description: Real backend - sign in with Google in the web view first (sends one prompt to the account's phone)
3131
type: boolean
3232
default: false
33+
real_sign_out:
34+
description: Real backend on the session cookie - end with the web app's Sign out (ends the session the secret holds)
35+
type: boolean
36+
default: false
3337

3438
permissions: {}
3539

@@ -232,8 +236,10 @@ jobs:
232236
TEST_RUNNER_OPENBOT_SHELL_GOOGLE_EMAIL: ${{ secrets.OPENBOT_SHELL_GOOGLE_EMAIL }}
233237
TEST_RUNNER_OPENBOT_SHELL_GOOGLE_PASSWORD: ${{ secrets.OPENBOT_SHELL_GOOGLE_PASSWORD }}
234238
TEST_RUNNER_OPENBOT_SHELL_GOOGLE_TOTP_SECRET: ${{ secrets.OPENBOT_SHELL_GOOGLE_TOTP_SECRET }}
239+
REAL_SIGN_OUT: ${{ inputs.real_sign_out }}
235240
run: |
236241
echo "$(date +%s) record" >> "$RUNNER_TEMP/timing"
242+
if [ "$REAL_SIGN_OUT" = "true" ]; then export TEST_RUNNER_OPENBOT_SHELL_REAL_SIGN_OUT=1; fi
237243
if [ "$CONFIGURATION" = "Release" ]; then
238244
# Fresh install, no hook: the sign-in a person does today.
239245
export TEST_RUNNER_OPENBOT_SHELL_RUN_GOOGLE_WEBVIEW=true
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{ "info" : { "author" : "xcode", "version" : 1 } }
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"colors" : [
3+
{ "color" : { "color-space" : "srgb", "components" : { "alpha" : "1.000", "blue" : "1.000", "green" : "1.000", "red" : "1.000" } }, "idiom" : "universal" },
4+
{ "appearances" : [ { "appearance" : "luminosity", "value" : "dark" } ],
5+
"color" : { "color-space" : "srgb", "components" : { "alpha" : "1.000", "blue" : "0.000", "green" : "0.000", "red" : "0.000" } }, "idiom" : "universal" }
6+
],
7+
"info" : { "author" : "xcode", "version" : 1 }
8+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"images" : [
3+
{ "filename" : "LaunchMark.png", "idiom" : "universal", "scale" : "3x" }
4+
],
5+
"info" : { "author" : "xcode", "version" : 1 }
6+
}
47.5 KB
Loading

‎ios-shell/OpenBotShell/ShellController.swift‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -589,8 +589,8 @@ final class ShellController: NSObject, WebControllerDelegate {
589589
// the bridge): as soon as the page shows text, or after 8 s at most.
590590
checkPageDrawn()
591591
} else if model.signIn == .webFallback {
592-
// The identity provider's page: no skeleton over another site.
593-
endPageLoad("other-site")
592+
// The identity provider's page: the skeleton until it shows text.
593+
checkPageDrawn()
594594
}
595595
}
596596

@@ -601,7 +601,9 @@ final class ShellController: NSObject, WebControllerDelegate {
601601
func webControllerDidCommit(_ controller: WebController) {
602602
model.mainFrameCommits += 1
603603
// Every new document on the web app's origin starts empty: the skeleton covers it until it draws.
604-
if model.webVisible, let url = controller.webView.url, config.isOwnOrigin(url), !model.pageLoading {
604+
// In the web sign-in, any site's new document (an identity provider's redirects) too.
605+
if model.webVisible, let url = controller.webView.url, url.absoluteString != "about:blank",
606+
config.isOwnOrigin(url) || model.signIn == .webFallback, !model.pageLoading {
605607
beginPageLoad("commit")
606608
}
607609
if failureSource == .some(.web) || failureSource == nil { clearLoadFailure() }

‎ios-shell/OpenBotShellUITests/RealBackendUITests.swift‎

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ class RealBackendTestCase: ShellTestCase {
358358
screenshot("j10-relaunched")
359359

360360
guard signOut else {
361-
note("sign-out skipped: it would end the session the secret holds")
361+
note("sign-out skipped: it would end the session the secret holds (video input real_sign_out runs it)")
362362
return
363363
}
364364
// Sign out from the web app's own menu: on production the drawer (its sidebar toggle), then
@@ -367,13 +367,21 @@ class RealBackendTestCase: ShellTestCase {
367367
webElement(app, label: "Show sidebar").tap()
368368
sleep(2)
369369
}
370-
let screen = app.windows.firstMatch.frame
371-
let candidates = (app.webViews.popUpButtons.allElementsBoundByIndex + app.webViews.buttons.allElementsBoundByIndex)
372-
.filter { $0.exists && $0.frame.midX < 80 && $0.frame.midY > screen.height * 0.7 && $0.frame.height > 10 }
373-
.sorted { $0.frame.midY > $1.frame.midY }
370+
// Production's account button is not exposed as a button: look at anything in the drawer's
371+
// bottom-left corner, and failing that tap where its avatar sits.
372+
let web = app.webViews.firstMatch
373+
let area = web.frame
374+
let corner = web.descendants(matching: .any).allElementsBoundByIndex.prefix(600).filter { element in
375+
guard element.exists else { return false }
376+
let frame = element.frame
377+
return frame.width > 12 && frame.width < 220 && frame.height > 12 && frame.height < 80
378+
&& frame.midX < area.minX + 70 && frame.midY > area.minY + area.height * 0.8
379+
}.sorted { $0.frame.midY > $1.frame.midY }
374380
var signedOut = false
375-
for candidate in candidates.prefix(3) where candidate.isHittable {
376-
candidate.tap()
381+
var attempts: [() -> Void] = corner.prefix(3).map { element in { element.tap() } }
382+
attempts.append { web.coordinate(withNormalizedOffset: CGVector(dx: 24 / max(area.width, 1), dy: 0.94)).tap() }
383+
for attempt in attempts {
384+
attempt()
377385
let item = webElement(app, label: "Sign out")
378386
if item.waitForExistence(timeout: 3) {
379387
screenshot("j11-account-menu")
@@ -523,7 +531,9 @@ final class RealBackendDebugUITests: RealBackendTestCase {
523531
XCTFail("production rejected the session cookie (it may be stale or copied wrong)")
524532
return
525533
}
526-
realSignedInJourney(app, relaunch: { self.launch(base: nil, moment: "relaunch", reset: false) }, signOut: false)
534+
// Signing out ends the session the secret holds: only when asked (video input real_sign_out).
535+
let signOut = ProcessInfo.processInfo.environment["OPENBOT_SHELL_REAL_SIGN_OUT"] == "1"
536+
realSignedInJourney(app, relaunch: { self.launch(base: nil, moment: "relaunch", reset: false) }, signOut: signOut)
527537
}
528538

529539
/// The hosted sign-in in the system sheet, without credentials: what is reachable there.

‎ios-shell/project.yml‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@ targets:
2828
CFBundleShortVersionString: $(MARKETING_VERSION)
2929
CFBundleVersion: $(CURRENT_PROJECT_VERSION)
3030
OpenBotBaseURL: https://my.open.bot
31-
UILaunchScreen: {}
31+
# The system background and the OpenBot mark, the same as the first screen's, so launch
32+
# shows no blank white frame.
33+
UILaunchScreen:
34+
UIColorName: LaunchBackground
35+
UIImageName: LaunchMark
3236
UIApplicationSceneManifest:
3337
UIApplicationSupportsMultipleScenes: false
3438
UISupportedInterfaceOrientations:

0 commit comments

Comments
 (0)