sync: dev to extern-contrib

Merged
GI
11d ago
+1701-400

sync-branches: New code has just landed in dev, so let's bring extern-contrib up to speed!


Summary by cubic

Brings dev into extern-contrib, fixing the account settings and profile pages after the site migration, enforcing Chinese across the UI, and keeping the navbar spacer visible under browser cosmetic filters.

  • Restores account menu, changelog access, badge editing, and AC code export on the migrated account page; old account links redirect to the current page.
  • Restores profile identity info, rating, tags, solved problems, and last-online time, and rewrites the submission/correct history chart to a single clear chart with theme-aware styling.
  • Forces XMOJ_LANG=zh at document-start for classic and web pages, hides language options in account forms, and removes the language switcher.
  • Prevents browser cosmetic filters from hiding the navbar spacer.
  • Adds Playwright and unit tests covering account settings, Chinese enforcement, profile rendering, and the navbar spacer.

Summary by Sourcery

Upgrade the userscript with unified Chinese localization, richer profile and account-management features, and more resilient page and API handling.

New Features:

  • Add a unified Chinese-language experience across classic and contest web pages, including account-language enforcement and resilient fallback handling.
  • Enhance user profiles with solved-problem listings, activity and result charts, avatars, ratings, last-online status, and administrator badge actions.
  • Add badge loading and editing tools to the migrated account settings page while preserving the native account form.
  • Redirect obsolete account-settings links to the migrated account page and update related navigation.

Bug Fixes:

  • Prevent profile and account-page enhancements from destroying native forms, listeners, or server-provided content.
  • Improve API failure handling with timeouts, transport-error reporting, and protection against late responses.

Enhancements:

  • Refactor profile and account-page processing to avoid executing unsafe embedded scripts and to preserve native page behavior.

Build:

  • Bump the script and package version to 3.8.3 and include the expanded test suites in the test command.

Documentation:

  • Update the documented contest-page behavior to reflect the unified Chinese interface.

Tests:

  • Add browser and unit coverage for account settings, Chinese-language enforcement, profile rendering, charts, badge operations, redirects, and API failure recovery.

Chores:

  • Add update metadata for the new release.