Skip to content

Commit c31dced

Browse files
authored
Merge pull request #906 from XMOJ-Script-dev/monochrome-ui
Add toggleable Minimalist Monochrome UI
2 parents 8c30579 + dbdfbb2 commit c31dced

File tree

4 files changed

+518
-32
lines changed

4 files changed

+518
-32
lines changed

CLAUDE.md

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,48 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
55
## Project Overview
66

77
XMOJ-Script is a browser userscript that enhances the XMOJ online judge platform (xmoj.tech). This repository consists of:
8-
- **Main userscript** (`XMOJ.user.js`): ~5000 line single-file userscript with all features. As this file is very large you should use the xmoj-code-navigator agent to help you whenever possible.
8+
- **Main userscript** (`XMOJ.user.js`): ~5000 line single-file userscript with all features. **See "Working with XMOJ.user.js" section below for CRITICAL instructions on using the xmoj-code-navigator agent.**
99
- **Update/version management scripts** (`Update/`): Automation for version bumping and releases
1010
- **Metadata and documentation**: `Update.json` tracks version history, README and contributing guides
1111

1212
The `backend/` directory is a git submodule pointing to https://github.com/XMOJ-Script-dev/XMOJ-bbs and should be modified in that repository, not here.
1313

14+
## Working with XMOJ.user.js (CRITICAL)
15+
16+
**IMPORTANT: Due to the large size of XMOJ.user.js (~5000 lines), you MUST use the xmoj-code-navigator agent whenever you need to explore, search, or understand any part of this file.**
17+
18+
### When to use xmoj-code-navigator
19+
20+
Use the Task tool with `subagent_type="xmoj-code-navigator"` for:
21+
22+
- **Finding specific functions or features**: "Where is the auto-refresh functionality implemented?"
23+
- **Understanding code sections**: "How does the login authentication work?"
24+
- **Locating code patterns**: "Find all API calls to the backend"
25+
- **Searching for specific implementations**: "Show me the dark mode toggle implementation"
26+
- **Verifying if code exists**: "Does XMOJ.user.js have a function for parsing XML?"
27+
- **ANY exploration task involving XMOJ.user.js**
28+
29+
### Why use this agent
30+
31+
Loading the entire XMOJ.user.js file into context:
32+
- Wastes context window space
33+
- Makes responses slower
34+
- Is unnecessary when you only need specific sections
35+
36+
The xmoj-code-navigator agent efficiently locates and retrieves only the relevant code sections you need.
37+
38+
### Example usage
39+
40+
```
41+
Instead of: Read tool on XMOJ.user.js (loads entire 5000 lines)
42+
Use: Task tool with xmoj-code-navigator agent to find specific sections
43+
```
44+
45+
**Exception**: Only use Read tool on XMOJ.user.js when:
46+
- You need to edit a specific line number you already know
47+
- You're making targeted edits and already know the exact location
48+
- You need to verify a small, specific section (use offset and limit parameters)
49+
1450
## Development Workflow
1551

1652
### Branch Structure and PR Requirements

Update.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3299,6 +3299,28 @@
32993299
}
33003300
],
33013301
"Notes": "Adds WebSocket-based real-time notification system for BBS mentions and mail notifications. Notifications now arrive within 1-2 seconds instead of requiring page focus. Includes automatic reconnection with exponential backoff and fallback to polling when WebSocket is unavailable."
3302+
},
3303+
"2.7.4": {
3304+
"UpdateDate": 1771211196807,
3305+
"Prerelease": true,
3306+
"UpdateContents": [
3307+
{
3308+
"PR": 906,
3309+
"Description": "Add toggleable Minimalist Monochrome UI"
3310+
}
3311+
],
3312+
"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."
3313+
},
3314+
"3.0.0": {
3315+
"UpdateDate": 1771211353041,
3316+
"Prerelease": true,
3317+
"UpdateContents": [
3318+
{
3319+
"PR": 906,
3320+
"Description": "Add toggleable Minimalist Monochrome UI"
3321+
}
3322+
],
3323+
"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."
33023324
}
33033325
}
33043326
}

0 commit comments

Comments
 (0)