Repository navigation
Conversation
|
| App Name | WordPress | |
| Configuration | Release-Alpha | |
| Build Number | 33358 | |
| Version | PR #25801 | |
| Bundle ID | org.wordpress.alpha | |
| Commit | 6a719d5 | |
| Installation URL | 10nmn546bf0r8 |
|
| App Name | Jetpack | |
| Configuration | Release-Alpha | |
| Build Number | 33358 | |
| Version | PR #25801 | |
| Bundle ID | com.jetpack.alpha | |
| Commit | 6a719d5 | |
| Installation URL | 2t4ba39snumv0 |
🤖 Build Failure AnalysisThis build has failures. Claude has analyzed them - check the build annotations for details. |
5b8b264 to
976ef69
Compare
| // login screen. Swap the window root to the signed-in app (no epilogue, so no taps). | ||
| windowManager.showUI() | ||
| } | ||
| } |
There was a problem hiding this comment.
I intentionally kept the sign in flow manual, mainly because I want to avoid introducing another code path to the sign in flow, like this function here. The current auto-sign flow only changes where to get the token/credentials (web or env var).
If we want to fully automated sign in, do you think we can move the logic to the view controller that shows the buttons? Something like:
func viewDidAppear() {
if autoSignWPCom {
continueWithWPComButtonAction()
}
}
For self-hosted site auto-sign in, we can do similar, something like
.onAppear {
self.siteAddress = siteUrlEnvVar()
continueButtonAction()
}
With this direction, the sign in code path stays the same, manually or fully automated.
BTW, the autoSignInUITestSite is a left-over dead code and should be deleted.
There was a problem hiding this comment.
From Claude:
Good call. The separate sign-in path is gone. The login screen now calls the "Continue with WordPress.com" button action itself when it first appears with a token, so automatic and manual sign-in go through the same code. It only does this once per launch, so logging out stays on the login screen. I also deleted autoSignInUITestSite.
| - Add every unit test target to `WordPressUnitTests.xctestplan`. | ||
| - Run the full suite with `xcodebuild -workspace WordPress.xcworkspace -scheme WordPress -testPlan WordPressUnitTests test`. Do not use `swift test`. | ||
| - To verify changes end-to-end on an iOS simulator, follow @docs/simulator-sign-in.md to sign in to the app. | ||
| - To sign a Simulator into WordPress.com, run `make sim-login` (it targets the running simulator; the WordPress.com token comes from `~/.wpcom-token` or `WPCOM_TOKEN`, and it prompts if none is set). See @docs/simulator-sign-in.md for options and self-hosted sign-in. |
There was a problem hiding this comment.
it targets the running simulator
There may be multiple running simulators. Or, maybe I want a new one.
the WordPress.com token comes from
~/.wpcom-tokenorWPCOM_TOKEN
I feel like this belongs to personal configuration. What do you think?
Overall, I feel like the new script adds too many restrictions to what the agent can do intuitively. Currently, I can say "Create a new simulator, sign in to the test account (WP.com or a self-hosted site), perform this end-to-end verification on the Jetpack app", and the agent has enough info (from the AGENTS.md and the sign in doc) to help with that. With this new change, the agent can't get how to do that from the prompts themselves. I have not tried the new script, but I suspect the agent would read the makefile and the new script to understand what it does and then perform the actions.
The new script wraps an oneline simctl command, which AI agents should be able to see in the docs/simulator-sign-in.md. Maybe it solves other problems that I don't see?
There was a problem hiding this comment.
From Claude:
Agreed. I dropped the script, the make sim-login target and the AGENTS.md change. Where the token lives is personal setup, so it doesn't belong in the repo. One part of the script was worth keeping: the agent never saw the token. Pasting the token into a raw simctl command puts it in the agent's transcript. So the doc's command now reads the token from a file inside the command, -wpcom-token "$(cat <token-file>)", and tells agents not to print the file.
|
Version |
|
Version |
Adds `make example-app-login` (wrapping `scripts/example-app-signin.sh`), which launches the Swift example app on an iOS Simulator with `-wpcom-token`, or the Android example app on an emulator with a `wpcom-token` intent extra. The app stores the token as its WordPress.com account at launch, so no OAuth app credentials or taps are needed. The token is read from `WPCOM_TOKEN` or `~/.wpcom-token` (or a hidden prompt), never the command line. Modelled on wordpress-mobile/WordPress-iOS#25801. Co-Authored-By: Claude <noreply@anthropic.com>
…#1652) * fix: show the Swift example app's WP.com Sign Out button on iPhone The `.toolbar` was attached to the `NavigationView`, which drops toolbar items once it collapses to a single column on iPhone, so there was no way to sign out. Attach it to the sidebar column instead. Co-Authored-By: Claude <noreply@anthropic.com> * Sign the example apps into WordPress.com from a launch-argument token Adds `make example-app-login` (wrapping `scripts/example-app-signin.sh`), which launches the Swift example app on an iOS Simulator with `-wpcom-token`, or the Android example app on an emulator with a `wpcom-token` intent extra. The app stores the token as its WordPress.com account at launch, so no OAuth app credentials or taps are needed. The token is read from `WPCOM_TOKEN` or `~/.wpcom-token` (or a hidden prompt), never the command line. Modelled on wordpress-mobile/WordPress-iOS#25801. Co-Authored-By: Claude <noreply@anthropic.com> * Read the example-app sign-in token from wp_com_test_credentials.json Resolve the token from `WPCOM_TOKEN`, then the repo's `wp_com_test_credentials.json` `bearer_token` (the one the WordPress.com integration tests use), then `~/.wpcom-token`, and fail with a pointer to the credentials file otherwise. This replaces the hidden paste-and-save prompt, which assumed a developer had a token to hand but nowhere to keep it. Co-Authored-By: Claude <noreply@anthropic.com> * Say which source the example-app sign-in token came from Prints `Using the WordPress.com token from <source>` (never the token itself), so it's clear whether `WPCOM_TOKEN`, `wp_com_test_credentials.json`, or `~/.wpcom-token` won. Co-Authored-By: Claude <noreply@anthropic.com> * Add a changelog entry for the example-app WordPress.com sign-in Co-Authored-By: Claude <noreply@anthropic.com> * Treat placeholder OAuth credentials as unset in the Android example app `generateWpComCredentials` emitted `client_id: 0` / `client_secret: ""` from `wp_com_test_credentials.json-example` as real credentials, enabling a WordPress.com OAuth button that can't work. The placeholders are required for a bearer-token-only file to satisfy `integration_test_credentials`, so require both values to be non-zero/non-empty or generate both as `null`, matching the Swift example app. Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
|
Version |
|
Version |
Nothing passes the `-ui-test-select-wpcom-site` launch argument it reads, so the helper never runs.
Signing a Simulator in with a launch-argument token still needed a tap on "Continue with WordPress.com". The login screen now runs that same button action itself when it first appears with a token, so automatic and manual sign-in share one code path. It runs once per launch, so signing out stays on the login screen. The argument is now `-wpcom-token`; `-ui-test-wpcom-token` still works. The doc reads the token from a file inside the command, which keeps it out of shell history and agent transcripts.
6a719d5 to
23f2db2
Compare
Generated by 🚫 Danger |
docs/ui-tests.md said running the JetpackUITests plan in Xcode skips the suites that run against the fixtures. It runs them, and each of their tests fails at launch, because an Xcode build can't include the fixtures. Also drop references to Scripts/sim-signin.sh, which #25801 no longer adds.
#25801 signs in from the -wpcom-token launch argument through the login screen, the same way a manual sign-in does. A fresh sign-in then ends on the "Enable Notifications?" screen instead of My Site, and every test that resets the app timed out waiting for My Site.
crazytonyli
left a comment
There was a problem hiding this comment.
A small issue: When the app is already logged in and the launch argument is passed to the app, logging out would auto sign in again.


Lets a Simulator sign in to WordPress.com from a launch-argument token with no taps, using the same code path as tapping "Continue with WordPress.com".
Summary
-wpcom-token. The older-ui-test-wpcom-tokenstill works.autoSignInUITestSitehelper. Nothing passes the-ui-test-select-wpcom-siteargument it reads.Why only once per launch
The token stays in the process's launch arguments after sign-in. Signing out shows a new login screen, and without a guard it would sign straight back in. A static flag on
LoginPrologueViewControllerlimits the automatic sign-in to the first time the screen appears in each launch.What isn't covered
The token still shows in
pswhilesimctl launchruns, as any launch argument does.Test plan
On a new iPhone 18 Pro simulator (iOS 27.2), with a Jetpack Debug build of this branch. The token was read from a file in every launch command:
-wpcom-token "$(cat <token-file>)"→ the app signed in with no tap and showed "Enable Notifications", the same screen a manual sign-in shows on a fresh install.-ui-test-wpcom-token→ the app signed in and opened My Site.swift format lintpass on the changed files.Related