Repository navigation
Smoother connect: open MonoRanks after activation, honest fixes status, quieter first load - #28
Merged
Merged
Conversation
…s, quieter first load Found in a fresh-install test of the connect flow. - After activating the plugin by itself on a single site, the next admin page is the MonoRanks screen (once, for the user who activated it; not for bulk, network or WP-CLI activation, or users without manage_options). The Plugins row shows "Connect" while not connected and "Settings" after. - Settings no longer claims fixes are written with an app password when there is none. It checks every admin for the MonoRanks Application Password and shows "Fixes: Not set up · Allow" otherwise. Allow opens MonoRanks' approve step for this website, which leads to WordPress's own approve screen. - The "What to do next" cards show "Checking…" after one slow or failed answer instead of "could not be reached, tries again within the hour". The first pull gets a longer timeout, and failed pulls are retried after 2 minutes, then 10, then hourly, by one scheduled event at a time. - The paste-key form's button reads "Save key". - A stale connect link no longer shows "Could not connect" above "Connected". - Connect opens MonoRanks in the same tab, so the return lands there. Version 0.1.25.
…again after Disconnect - Pairing (the direct approve path) starts the first content send in WP-Cron right away, as a pasted key or a one-time code already did. It no longer waits for MonoRanks to ask, which left "Not sent yet" on the Overview. - The Overview's Content row says "Sending…" while the first send runs, and "Not sent. Use "Sync content now"." only when a send failed. - The public ping reports whether the plugin holds a key, so MonoRanks can offer Connect again after a Disconnect here. - Integration tests: ping, pairing starts the send, the failed-send line, and Disconnect telling MonoRanks.
Member
Author
|
Follow-up commit fae8aa2:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found in a fresh-install test of the connect flow. Pairs with monoranks/monoranks#302 (sign-up and sign-in screens from the plugin; the "Allow" link below works best with its sign-in redirect on the approve step). Not merged, not tagged, not released: for local review first.
Changes
manage_options(activated_plugin+ transient). The Plugins row gets Connect while not connected, Settings after.Settings::data()now reports whether a MonoRanks Application Password exists for any admin (matched by MonoRanks' app id, or the name "MonoRanks" for old ones; the current user first). Only then: "Fixes written with: App password · Revoke" (Revoke goes to the right user's profile). Otherwise: "Fixes: Not set up · Allow". Allow goes to MonoRanks' approve step for this website (/api/wordpress/start?site=…&wp=…&connect=1&return=…&state=…), which opens WordPress's own approve screen and comes back to Settings. The connect page would only say "Already connected" for a site connected by code or key. Hidden when Application Passwords are off.failscounter in the cache), through one scheduled WP-Cron event, plus the existing lock, so MonoRanks is not hammered. The screen re-asks the plugin up to 4 times, a minute apart, while a card is checking. After repeated failures: "Could not reach MonoRanks. Retrying soon."target="_self", Settings and Overview), so the return lands in the same tab. The visibilitychange/poll refresh is kept for people who open it in a new tab anyway.Version 0.1.25 in the header, constant, readme Stable tag and both changelogs (owner style). New strings translated in fa_IR;
languages/rebuilt withbin/i18n.sh;build/rebuilt withnpm run build.WordPress.org readme deploy on merge
readme.txtchanges, so.github/workflows/assets.ymlwill run on merge to main, but its guard step checksgh release view v<Stable tag>. Stable tag is now 0.1.25, which has no release yet (latest is v0.1.24), so the step setsok=noand the asset update step is skipped. The readme goes to WordPress.org only with the v0.1.25 release (deploy.yml).Tests
vendor/bin/phpunit: 129 tests OK. New: activation redirect (set, skipped for other plugins, network, bulk, multisite, non-admins, AJAX; used once, same user only), row link, hidden contradiction notice, app password detection (app id, name, other admin, revoke link), Allow URL, Grow retry backoff, fails counter, scheduled retry, first failure reads as "pending", longer first-pull timeout.phpunit -c phpunit-integration.xml.dist --exclude-group tsf,yoast: 13 OK, incl. newAppPasswordTest(real Application Passwords, another admin's password counts, other apps don't).npm run typecheck,npm run build(bundle committed).target=_self.Local end-to-end (headless, fresh WordPress on :8091, app branch on :3200)
Activation → Settings, row shows "Connect | Deactivate"; Connect stays in the same tab; sign-up shows "Connect localhost"; switch to sign-in works; (a) one-time-code path → "Fixes: Not set up · Allow"; Allow → WordPress "Yes, I approve" → back to Settings with "Fixes written with: App password · Revoke"; (b) direct approve from a new account → same truthful status; no "Could not connect" after a stale link; first Overview load with failing reads shows "Checking…".