Repository navigation
Overview: one truthful connection state, no other plugins' notices, numbers that fit, video button - #31
Merged
Conversation
…umbers that fit, video card - Other plugins' admin notices no longer show on the MonoRanks screens. WordPress's own stay. - "Key revoked" next to live data is gone: a working read clears the mark, a 401 is checked before it counts, and a really revoked key shows Reconnect plus clearly old scores, nothing else. - Backlinks and other big numbers never clip: compact from 10,000 with the whole number in a tooltip, tiles wrap by the room they have, with the admin menu open and in RTL. - "Watch how it works" card, off until MONORANKS_VIDEO_ID is set. YouTube loads only on click, disclosed in readme.txt. - Review fixes: false "Content sent", raw category ids in Recent changes, Undo refused after a cleaned value, unpair leaving results behind, Settings without Connect on a revoked key, raw errors, long empty-card lines.
…tead of the card The card, its poster, the dismiss route and the user setting are gone. readme.txt: the YouTube paragraph matches, and the video sits under the description's opening line.
…der docs; PR before and after shots WordPress.org takes screenshot-N-de.png and -es.png, but the plugin has no German or Spanish translation yet, so those stay out of .wordpress-org.
Machine-drafted with the app's terms; no person has read them yet. Bundled like Persian: languages/monoranks-de_DE and -es_ES. Long words showed real layout gaps, so the top bar wraps on phones, the change log and page tables give their buttons room, changes and tile numbers no longer spill (German keeps 10.556, so a longer number takes a smaller size), and the Posts hover card is wider.
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.
No release in this PR: version and changelogs are untouched. Merging does push
readme.txtto WordPress.org right away (assets.yml, Stable tag 0.2.0 is released), so the two videos on the listing, the new screenshots and the YouTube disclosure go live at merge, before the new code ships in a release. The screenshots will show the new Video button until then.The "Reconnect" card next to full data
Cause, from the code. Two separate faults made one picture:
Overview.tsxshowed the Connect card when the key was marked revoked, and the data whenever a cached overview existed. Nothing tied the two together, so old data sat next to "Key revoked" with no word that it was old.key_statewas set by any single 401 and only a successful POST cleared it. A read that worked (GET /overview200) never did.The 401 itself is not proof of a dead key. These answer 401 with a live key:
apps/web/lib/connector-auth.ts:16and:36). A key withsites:readbut notcontent:writereads data fine and fails every send.Reproduced locally, with MonoRanks answers faked and nothing written:
Not known: which path hit the live site. It was not touched, and a truly revoked key with cached scores gives the same picture. After this update the screen settles it by itself: the key is asked about again within 5 minutes. If "Key revoked" is still there, the key really is revoked.
The fix
Connection::updatereads the database first, so a late request cannot bring back an old or removed key.Actions::applyrefuses on the server too.Other plugins' notices
src/Notices.php, on the two MonoRanks screens only: right before WordPress prints notices, every callback whose code is not inwp-admin/,wp-includes/or this plugin is taken off the hooks for that request. Notices printed outside those hooks or added by a script stay hidden.Checked with fake plugin notices (class method, closure at the highest priority,
all_admin_notices, printed inin_admin_header, injected by script):Numbers that fit
From 10,000 a tile number is compact (
+10.6K,30.9K,۳۰٫۹ هزار) with the whole number in a tooltip. Tiles and card rows now wrap by the room they really have, not by window width, so an open admin menu no longer breaks them.Same data: 10,556 won, 6,583 lost, 30,896 linking sites. Hover shows the whole number.
Checked by script with Playwright (Chrome window never resized): Overview and Settings, en and fa, 1280, 1024, 961, 782 and 390 px, with 30,896 / 10,556 / 6,583 backlinks and 1,248,003 clicks: no clipped or spilling text, no sideways page scroll. Also the revoked state in fa, and dark at 1024.
The same pass found and fixed: the top bar overflowing at 390 px, hidden tooltips making the page scroll sideways in RTL, and the Pages to fix table squeezing titles at 390 px (the severity pill and column names step aside there).
Video button
"Video" with a small play icon in the top bar, just before Help, on Overview and Settings. Shown only while
MONORANKS_VIDEO_IDis valid. The card from earlier commits is gone, with its poster, dismiss route and user setting.readme.txt: "External services" covers YouTube with terms and privacy links, the overview video sits under the opening line of the description, and the setup video at the top of Installation. No "Unreleased" text.Checked at 1280, 782, 390 and 844x390, en and fa. Playback itself was not watched: from the test browser YouTube answered 200 and then asked for a sign-in as a bot check.
Listing screenshots
New design, same four screens and order as the readme captions, in
.wordpress-org/:screenshot-N.png,screenshot-N-de.png,screenshot-N-es.png,screenshot-N-fa_IR.png. Names follow the plugin assets handbook. Taken with Playwright on a throwaway clean WordPress with example data, so the local site's language was never changed. Post titles and other example content stay English in every language.Merging also pushes all of these to WordPress.org right away (
assets.yml).German and Spanish translations
No person has read these. They are machine-drafted and should be reviewed by a native speaker.
languages/monoranks-de_DE.*andmonoranks-es_ES.*.apps/web/messages/de.jsonandes.json, including their forms of address: German "Sie", Spanish "tú". Placeholders are checked by script against the English.readme.txtis not translated: the plugin has no such convention, and that happens on translate.wordpress.org.de_DEandes_ESare covered. Other variants (de_AT,es_MXand so on) stay English. A language pack from translate.wordpress.org wins over these files when one exists.Checked by script, de, es, en and fa, 1280, 782 and 390 px, with data, not connected and revoked, details open: no spill, no sideways scroll, no button over three words in de or es. Posts hover card and editor box checked in de and es.
Long words showed real gaps, now fixed in every language:
10.556stays whole), so a longer tile number takes a smaller size and never breaks inside the digits.Not changed in Persian: "Delete all data" is four words, and the AI rules label is cut with a tooltip in the change list at narrow widths.
Fixed in the review
term:category:12for category pages, and an empty row for a deleted post.content:write, which makes every read fail. It now names all three scopes.http_500on a badge. Now "Last try failed", with the raw text on hover.Not changed
Bugs and behaviour
apps/web/lib/connector-auth.ts:16,36(app repo): missing scope should answer 403, not 401. This is the other half of the cause; the plugin now copes either way.src/Api.php:36: any successful POST moves "Last sent" (status, change alerts, fix reports), not only content.src/Column.php:66,src/PostPanel.php:85: with a revoked key the Posts list and the editor box still show old scores without saying so.resources/admin/src/screens/Overview.tsx:303: a key that works but cannot read scores shows "MonoRanks not reached" while waiting for its first check.src/Writer.php:65: a redirect to its own source is not refused and would loop. Only approved values reach it.src/AiAccess.php:77:/llms.txtis not served on a site installed in a subfolder.src/Actions.php:41: a new key for a different website keeps the old results until the next pull.src/Insights.php:118: opening a MonoRanks screen can wait up to about 14 seconds on a slow MonoRanks when the cache is stale.resources/admin/src/components/ui/tip.tsx:25: an open tooltip near the screen edge can be cut at 390 px. The whole number on a big tile opens from its start edge, so it is safe.Text and translation
resources/admin/src/screens/Settings.tsx:93: "Next check" removes the date by looking for(, so a translation using other brackets would show it in full.src/Overview.php:76: "Image Purge page caches after every write; report it in the result (0.1.18) #12" keeps Latin digits on fa.resources/admin/src/screens/Settings.tsx:89: the hover text on "Last try failed" is still raw English.resources/admin/src/screens/Grow.tsx:155and others: strings with placeholders in the app have no translator comments (the extractor warns).wp-content/languages/pluginswins over the bundled file, which does have them. On real sites this depends on translate.wordpress.org.WordPress.org risks (none blocking; 0.2.0 passed)
src/AuthorizeScreen.php:38: prints a<style>tag instead of enqueuing it. Reviewers often flag this.src/Admin.php:55: one redirect after activation. Allowed and limited, but a common review comment.uninstall.php:9: cleans the current site only, not every site of a network.src/Rest.php:18: the public ping route shows the plugin version and whether the site is connected. Explained in the code, not in the readme.Tests
NoticesTestandVideoTestplus new cases inApiTestandConnectionTest.OverviewLogTest.npm run typecheckandnpm run buildpass;build/is committed.tests/e2ewas not run locally (needs Docker). CI runs it.Suggested changelog for the release