Skip to content

New Update Modal + SEO - #169

Merged
MaryWylde merged 5 commits into
mainfrom
dev
Aug 6, 2026
Merged

New Update Modal + SEO#169
MaryWylde merged 5 commits into
mainfrom
dev

Conversation

@MaryWylde

Copy link
Copy Markdown
Contributor

No description provided.

MaryWylde and others added 5 commits August 5, 2026 14:52
Ahrefs counts a decorative alt="" as a missing alt attribute, so the
cookie close button, the /uxcp country flags and the longevity
environment icons showed up across ~90 pages in the audit.

Alt text is derived from content already on the page — the country name
and the Strapi item name — so it stays correct and localized as the
content changes.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The locale-root canonical was built from asPath, and the `asPath === '/'`
guard only catches the bare root. Add any query string and the path fell
through as "/?x=1", which cleanURL trimmed back to "/" — yielding
https://keepsimple.io/ru/ and /hy/, both of which 308 to the slashless
form. Ahrefs surfaced it via a scanner's ?phpinfo=1 probe, but it hit
every UTM-tagged link to the RU and HY homepages too.

English is unaffected: it has no locale prefix, so the path is "/" and
the domain root never redirects.

Also flip the 404 page from "index, follow" to "noindex, follow" — it
was inviting Google to index the error page.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…smissed

Dismissal is stored in sessionStorage keyed to the CMS updatedAt, so a
newly published update still shows once while the same one stays hidden
across reloads and locale switches.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
fix(uxcore): keep the new-update modal closed for the session once di…
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

Claude finished @MaryWylde's task in 3m 25s —— View job


Claude's PR Review

Todo list

  • Gather context (diff against origin/main, read changed files)
  • Review NewUpdateModal changes (session dismissal logic)
  • Review SEO changes (SeoGenerator x2, 404.tsx)
  • Review Box/EnvironmentSubSection/CountryBiasMap changes
  • Post final review summary

Summary

Small, well-scoped PR: session-based dismissal for the "new update" modal, a canonical-URL fix (avoid pointing at a 308 redirect for locale root paths), noindex on the 404 page, and several accessibility alt-text fixes. No structural or convention issues found.

NewUpdateModalContainer.tsx (src/uxcore/components/NewUpdateModal/NewUpdateModalContainer.tsx:29,52-59)

  • Dismissal keyed off res.updatedAt via sessionStorage, correctly scoped inside useEffect/an event handler (SSR-safe, no top-level window/sessionStorage access).
  • sessionStorage.setItem on close is wrapped in try/catch for private-mode environments — good defensive touch. Minor nit (not blocking): the read at line 29 isn't in its own try/catch, so if sessionStorage access itself throws, it'll be caught by the outer catch and logged as [new-update] fetch failed, which is a slightly misleading label for a storage error vs. an actual fetch failure. Not worth a fix on its own.
  • Import reordering in NewUpdateModal.tsx is consistent with this repo's simple-import-sort groups (@uxcore/* sorts into the same third-party-like bucket as next/react, alphabetically first) — not a violation.

SEO (SeoGenerator.tsx ×2, 404.tsx)

  • The canonicalPath regex fix (.replace(/^\/(?=$|[?#])/, '')) correctly targets the case where a locale-prefixed path collapses to a lone / (e.g. /?ref=x on a ru/hy locale), which previously produced /ru/ and triggered a 308 to /ru. Verified the regex is anchored so it won't strip a leading slash from real paths like /uxcore/1-slug.
  • 404.tsx now emits noindex, follow instead of index, follow — correct, prevents the error page from being indexed while still letting crawlers follow links off it.

Accessibility fixes (Box.tsx, EnvironmentSubSection.tsx, FlagImage.tsx + 3 call sites)

  • All replace empty/missing alt text with meaningful descriptions. FlagImage correctly threads an optional countryName prop through all three call sites (BiasPanel, CountryList, CountryMap) with a sensible fallback to the country code.

No inline comments — nothing here needs a code change. Nice, focused fix set.

@MaryWylde
MaryWylde merged commit e547b0f into main Aug 6, 2026
3 checks passed
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