Conversation
New "极简黑白界面风格" option under Beautify settings that overhauls the visual design with a monochrome palette, serif typography (Playfair Display + Source Serif 4), zero border-radius, and line-based visual structure. Key changes: - Comprehensive monochrome CSS with dark mode support (charcoal bg) - CSS variables for automatic light/dark theme switching - Sharp-cornered cards, modals, toasts with inverted headers - Monochrome buttons with filled primary / outlined secondary - Colored status buttons preserved (success/danger/warning/info) - Faster animations (100ms) and dropdown transitions - Problem switcher with solid bg, hidden on narrow screens - Copy button visibility fix in inverted headers - Image containment (max-width: 100%) - Table cell center alignment - Non-blocking status page fetches to reduce layout shift - Font loading via <link> element to avoid FOUC - Fully toggleable: disabling reverts to original Bootstrap styles Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…j-code-navigator agent - Emphasize the importance of using xmoj-code-navigator for exploring, searching, and understanding XMOJ.user.js - Provide guidelines on when and how to use the xmoj-code-navigator agent - Explain the benefits of using the agent over loading the entire file
- Replace std status emojis with text labels ([STD]/[OK]/[ERR]) - Replace loader.gif with Bootstrap spinner - Add table margin-top for spacing from elements above - Use bare element selectors for table header styling - Fix table cell text-align center - Soften dark mode colors (charcoal #1a1a1a bg, #e5e5e5 text) - Fix copy button visibility in inverted headers - Hide problem switcher on narrow screens - Differentiate btn-primary (filled) from btn-secondary (outlined) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
2 issues found across 3 files (changes from recent commits).
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="XMOJ.user.js">
<violation number="1" location="XMOJ.user.js:3">
P2: Do not manually bump the userscript version; the UpdateVersion workflow owns this field. Revert this change and let CI update it.</violation>
</file>
<file name="package.json">
<violation number="1" location="package.json:3">
P2: Manual version bump in package.json violates the automated versioning workflow; this should be left for the UpdateVersion automation to keep all version files in sync.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8c39384e67
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
XMOJ.user.js
Outdated
| borderRadius: '0', | ||
| boxShadow: '0 4px 8px rgba(0, 0, 0, 0.5)', | ||
| margin: '16px auto', | ||
| margin: '0', | ||
| maxWidth: '100%', |
There was a problem hiding this comment.
Gate navbar geometry override behind MonochromeUI
The new NavbarStyler.applyStyles values are now always monochrome (borderRadius: '0', margin: '0', maxWidth: '100%') regardless of the MonochromeUI toggle, so users with NewTopBar enabled but MonochromeUI disabled still get the monochrome top-bar layout. This also conflicts with the non-monochrome overlay styling in createOverlay (which still assumes rounded corners), so the “disable MonochromeUI to restore original styling” behavior is no longer true in this path.
Useful? React with 👍 / 👎.
- Navbar applyStyles now conditionally applies monochrome (flat, full-width) or original (rounded, margin) styles based on MonochromeUI setting - Fixes inconsistency where createOverlay assumed rounded corners but navbar was always flat - Switch Google Fonts CDN from fonts.googleapis.com to fonts.loli.net for China accessibility Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 908a3f07e5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
XMOJ.user.js
Outdated
| let Std = StdList ? StdList.find((Element) => { | ||
| return Element == Number(PID); | ||
| }); | ||
| }) : undefined; |
There was a problem hiding this comment.
Skip UploadStd when standard list fetch failed
When GetStdList returns Success: false, StdList remains null, but this check treats that state the same as “problem not in list,” so the later else path uploads every AC submission in RefreshResult. In that failure scenario, a transient list-fetch error can trigger redundant UploadStd requests for already-uploaded problems and show misleading [OK]/[ERR] statuses; uploads should be gated on a successful standard-list fetch.
Useful? React with 👍 / 👎.
When GetStdList returns Success: false, StdList remains null. Previously this fell through to the else branch, triggering redundant UploadStd requests for already-uploaded problems. Now the entire upload block is skipped when StdList is null. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
2 issues found across 2 files (changes from recent commits).
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="XMOJ.user.js">
<violation number="1" location="XMOJ.user.js:3">
P2: Do not manually edit the userscript @version header. Version numbers are auto-managed by the UpdateVersion workflow and must remain unchanged in PRs.</violation>
</file>
<file name="Update.json">
<violation number="1" location="Update.json:3314">
P2: Update.json version entries are auto-generated; manually adding a new version (3.0.0) violates the repository’s automated versioning workflow. Remove manual edits and let UpdateVersion.js generate the entry.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| // ==UserScript== | ||
| // @name XMOJ | ||
| // @version 2.7.3 | ||
| // @version 3.0.0 |
There was a problem hiding this comment.
P2: Do not manually edit the userscript @Version header. Version numbers are auto-managed by the UpdateVersion workflow and must remain unchanged in PRs.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At XMOJ.user.js, line 3:
<comment>Do not manually edit the userscript @version header. Version numbers are auto-managed by the UpdateVersion workflow and must remain unchanged in PRs.</comment>
<file context>
@@ -1,6 +1,6 @@
// ==UserScript==
// @name XMOJ
-// @version 2.7.4
+// @version 3.0.0
// @description XMOJ增强脚本
// @author @XMOJ-Script-dev, @langningchen and the community
</file context>
| ], | ||
| "Notes": "Added a new toggleable \"极简黑白界面风格\" (Minimalist Monochrome UI) setting under Beautify options. Features serif typography, zero border-radius, line-based visual structure, and automatic dark mode support with charcoal tones." | ||
| }, | ||
| "3.0.0": { |
There was a problem hiding this comment.
P2: Update.json version entries are auto-generated; manually adding a new version (3.0.0) violates the repository’s automated versioning workflow. Remove manual edits and let UpdateVersion.js generate the entry.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At Update.json, line 3314:
<comment>Update.json version entries are auto-generated; manually adding a new version (3.0.0) violates the repository’s automated versioning workflow. Remove manual edits and let UpdateVersion.js generate the entry.</comment>
<file context>
@@ -3310,6 +3310,17 @@
],
"Notes": "Added a new toggleable \"极简黑白界面风格\" (Minimalist Monochrome UI) setting under Beautify options. Features serif typography, zero border-radius, line-based visual structure, and automatic dark mode support with charcoal tones."
+ },
+ "3.0.0": {
+ "UpdateDate": 1771211353041,
+ "Prerelease": true,
</file context>
What does this PR aim to accomplish?:
Add a new toggleable UI theme option ("MonochromeUI") that overhauls the visual design with a minimalist monochrome aesthetic: serif typography (Playfair Display + Source Serif 4), sharp corners, line-based borders, and inverted headers. The setting is under Beautify → 极简黑白界面风格 and defaults to on. When disabled, the original Bootstrap styling is fully restored.


How does this PR accomplish the above?:
:rootand[data-bs-theme='dark']define--mono-black,--mono-white,--mono-gray-*, and font families. Dark mode uses charcoal (#1a1a1a) instead of pure black for eye comfort.border-radius: 0,box-shadow: noneon all elements.!important.btn-primaryfilled (black bg),btn-secondaryoutlined.btn-success/danger/warning/infopreserve functional colors as outline style..status_y/n/wkeep colored backgrounds. Std submission status uses text labels ([STD],[OK],[ERR]) instead of emojis. Loading spinner uses Bootstrapspinner-borderinstead of GIF.text-decoration) scoped to.containercontent, excluding nav/buttons/dropdowns.<link>element.ImproveACRatefetch andGetStdListAPI call no longer block withawait, reducing layout shift on status page.max-width: 100%.UtilityEnabled("MonochromeUI")gates all changes. Disabling fully restores original Bootstrap styles including blur overlay, rounded navbar, original animations.By submitting this pull request, I confirm the following:
git rebase)Summary by cubic
Adds a toggleable Minimalist Monochrome UI (default on) with serif typography, sharp corners, and a charcoal dark mode. Ships as 3.0.0 and restores the original Bootstrap UI when turned off.
New Features
Bug Fixes
Written for commit dbdfbb2. Summary will update on new commits.