Commit 96fcf22
authored
chore: project-wide comment cleanup + 4 small-bug fixes (#393)
Swept the whole codebase (12 disjoint slices, ~211 files) to remove
AI/bot/ process noise from comments and make them read like professional
engineering comments — about the code, not the process:
- Stripped bot-reviewer attributions (Copilot/Codex/Sourcery review #N,
"finding YYYY-MM-DD"), process/PR meta ("in this PR", "as discussed"),
and standalone wave/cycle/date WHEN-stamps that git already records.
- Rewrote each to keep the WHY (security/ordering/rationale) without the
noise; deleted purely redundant "what" comments.
- Preserved load-bearing anchors exactly: CLAUDE.md A-rule refs,
decision #N, Phase N flag tags, G-/L-finding security-addendum anchors,
RFC/NIST/spec citations, real Claude/Anthropic API product references,
and all @smoke/@regression/@cycle CI grep tags + test/describe titles
(untouched).
Small bugs found + fixed during the sweep:
- onboarding.service.js: note.create used an unknown Prisma field
`visibility:'private'` (Note has `private`) — would throw a validation
error and 500 the onboarding "upload_note" first-action. Now `private:
true`.
- DataAndBatteryTab.jsx: success toast was the JS string 'Data &
battery preferences saved.' so it rendered the literal "&". Now
plain "&".
- moderationEngine.js: JSDoc said "scans via OpenAI Moderation API" but
the code calls Claude Haiku — corrected the doc.
- achievements.engine.js: JSDoc referenced a non-existent function name.
Backend 3,507 + frontend 876 tests pass; lint + build clean. No behavior
change beyond the two real fixes above. Riskier items (settings export
field drift, a moderation ternary precedence) were REPORTED, not changed
— left for review.212 files changed
Lines changed: 730 additions & 858 deletions
File tree
- backend
- scripts
- src
- lib
- html
- jobs
- moderation
- zodSchemas
- middleware
- modules
- achievements
- admin
- ai
- attachments
- auth
- courses
- feed
- legal
- library
- messaging
- moderation
- notes
- notifications
- onboarding
- payments
- plagiarism
- scholar
- scholar.sources
- sections
- settings
- sharing
- sheets
- studyGroups
- users
- webauthn
- test
- integration
- unit
- frontend/studyhub-app
- src
- components
- ai
- buttons
- video
- features/achievements
- lib
- pages
- admin
- ai
- feed
- library/components
- messages
- notes
- notifications
- scholar
- integration
- settings
- studyGroups
- tests
- mobile-flows
- mobile
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
170 | 169 | | |
171 | 170 | | |
172 | 171 | | |
| |||
301 | 300 | | |
302 | 301 | | |
303 | 302 | | |
304 | | - | |
| 303 | + | |
305 | 304 | | |
306 | 305 | | |
307 | 306 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
708 | 708 | | |
709 | 709 | | |
710 | 710 | | |
711 | | - | |
| 711 | + | |
712 | 712 | | |
713 | 713 | | |
714 | 714 | | |
| |||
898 | 898 | | |
899 | 899 | | |
900 | 900 | | |
901 | | - | |
902 | | - | |
| 901 | + | |
| 902 | + | |
903 | 903 | | |
904 | 904 | | |
905 | 905 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
328 | | - | |
329 | | - | |
| 328 | + | |
330 | 329 | | |
331 | 330 | | |
332 | 331 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
252 | | - | |
| 252 | + | |
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
90 | | - | |
91 | | - | |
| 89 | + | |
| 90 | + | |
92 | 91 | | |
93 | 92 | | |
94 | 93 | | |
| |||
0 commit comments