[frontend] 9 JS files massively exceed AGENTS.md ~400 line limit #787

Open
opened 2026-06-03 00:36:33 +02:00 by sleepy · 0 comments
Owner

Finding

Per AGENTS.md rule: "Split files that exceed ~400 lines or contain multiple concerns."

The following frontend JS files massively exceed this limit:

File Lines
static/js/document.js 9,427
static/js/slashCommands.js 5,968
static/js/notes.js 5,015
static/js/emailLibrary.js 4,899
static/js/chat.js 4,495
static/js/settings.js 4,348
static/js/galleryEditor.js 3,798
static/js/calendar.js 3,348
static/js/documentLibrary.js 3,324

Plus 10+ additional files between 1,000–3,000 lines.

Impact

  • These files are impossible to review for security or correctness
  • Multiple concerns mixed in single files (e.g. document.js mixes editing, diff, email, animation, rendering)
  • High barrier to contribution and testing

Recommendation

Split each file by feature/concern into modules under ~400 lines. Start with the worst offenders (document.js, slashCommands.js, notes.js).

## Finding Per AGENTS.md rule: _"Split files that exceed ~400 lines or contain multiple concerns."_ The following frontend JS files massively exceed this limit: | File | Lines | |------|-------| | `static/js/document.js` | **9,427** | | `static/js/slashCommands.js` | **5,968** | | `static/js/notes.js` | **5,015** | | `static/js/emailLibrary.js` | **4,899** | | `static/js/chat.js` | **4,495** | | `static/js/settings.js` | **4,348** | | `static/js/galleryEditor.js` | **3,798** | | `static/js/calendar.js` | **3,348** | | `static/js/documentLibrary.js` | **3,324** | Plus 10+ additional files between 1,000–3,000 lines. ## Impact - These files are impossible to review for security or correctness - Multiple concerns mixed in single files (e.g. document.js mixes editing, diff, email, animation, rendering) - High barrier to contribution and testing ## Recommendation Split each file by feature/concern into modules under ~400 lines. Start with the worst offenders (document.js, slashCommands.js, notes.js).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sleepy/odysseus#787
No description provided.