Summary
Remove obvious boilerplate JSDoc comments from frontend/src/api/client.ts that merely restate method names without adding information.
Background / Context
The API client file has ~80 methods, almost all with JSDoc comments that restate the method name in slightly different words. For example:
/** Fetches all exams */ before fetchExams()
/** Deletes an exam */ before deleteExam(id)
/** Generic GET request */ before get<T>(path)
/** Login with username and password */ before login(username, password)
These comments add zero information beyond what the method signature already communicates. Meanwhile, the actually complex function handleResponse (which parses error JSON with fallback, extracts nested error.code/error.message, and handles 204 responses) has no JSDoc at all.
Problem
Boilerplate comments create visual noise and train developers to ignore all comments — including ones that might actually matter. They also create a maintenance burden (comments drift out of sync with renamed methods).
Goal / Expected Behavior
Obvious restating-the-name JSDoc comments are removed. Any JSDoc documenting non-trivial behavior (e.g., auth strategy, error shapes, retry logic) is preserved. The code is cleaner and more scannable.
Scope
This issue should cover:
- Removing JSDoc comments that merely restate the method name
- Preserving any JSDoc that documents non-obvious behavior
Out of Scope
This issue should not cover:
- Adding new JSDoc comments (e.g., documenting
handleResponse)
- Changing any method implementations
- Modifying API types or interfaces
- Other frontend files
Chosen Implementation Approach
Manual review of each JSDoc comment in client.ts. Remove if the comment adds nothing beyond the method name + types. Keep if it documents non-obvious behavior.
Implementation Plan
The implementor should:
- Read through each JSDoc comment in
client.ts
- For each, ask: "Does this comment tell me something I can't already see from the method name and type signature?"
- Remove comments that fail this test (expected: ~15 of ~17 JSDoc blocks)
- Preserve comments that document non-trivial behavior, such as:
- The auth strategy comment on the
api object (if it mentions credentials: 'include' or cookie-based auth)
getSolutionStatus comment mentioning "canonical solution generation" (adds context beyond the method name)
- Run any frontend linting/build to verify no issues
Relevant Files / Areas
frontend/src/api/client.ts — the only file to modify
Tests Required
The implementor must add or update automated tests covering:
- No new tests needed — this is comment removal
- Existing frontend tests and TypeScript compilation must pass
At minimum, tests should verify:
cd frontend && npx tsc --noEmit passes (TypeScript compilation)
- Any existing frontend test suite passes
Manual Verification / Self-Check
Before claiming this issue is done, the implementor must:
- Run:
cd frontend && npx tsc --noEmit
- Verify the remaining JSDoc comments (if any) document non-trivial behavior
- Verify no method implementations were changed
- Record the exact commands run and results in the PR description
Reviewer Acceptance Checklist
The reviewer should verify that:
Dependencies
None.
Follow-Up Work
- Consider adding meaningful JSDoc to
handleResponse and the ApiError shape to document the actually complex parsing logic. This is additive work and not required for this issue.
Definition of Done
This issue is done when:
- Boilerplate JSDoc comments are removed from
client.ts
- Any remaining JSDoc adds genuine value
- TypeScript compilation passes
- No code logic was changed
Summary
Remove obvious boilerplate JSDoc comments from
frontend/src/api/client.tsthat merely restate method names without adding information.Background / Context
The API client file has ~80 methods, almost all with JSDoc comments that restate the method name in slightly different words. For example:
/** Fetches all exams */beforefetchExams()/** Deletes an exam */beforedeleteExam(id)/** Generic GET request */beforeget<T>(path)/** Login with username and password */beforelogin(username, password)These comments add zero information beyond what the method signature already communicates. Meanwhile, the actually complex function
handleResponse(which parses error JSON with fallback, extracts nestederror.code/error.message, and handles 204 responses) has no JSDoc at all.Problem
Boilerplate comments create visual noise and train developers to ignore all comments — including ones that might actually matter. They also create a maintenance burden (comments drift out of sync with renamed methods).
Goal / Expected Behavior
Obvious restating-the-name JSDoc comments are removed. Any JSDoc documenting non-trivial behavior (e.g., auth strategy, error shapes, retry logic) is preserved. The code is cleaner and more scannable.
Scope
This issue should cover:
Out of Scope
This issue should not cover:
handleResponse)Chosen Implementation Approach
Manual review of each JSDoc comment in
client.ts. Remove if the comment adds nothing beyond the method name + types. Keep if it documents non-obvious behavior.Implementation Plan
The implementor should:
client.tsapiobject (if it mentionscredentials: 'include'or cookie-based auth)getSolutionStatuscomment mentioning "canonical solution generation" (adds context beyond the method name)Relevant Files / Areas
frontend/src/api/client.ts— the only file to modifyTests Required
The implementor must add or update automated tests covering:
At minimum, tests should verify:
cd frontend && npx tsc --noEmitpasses (TypeScript compilation)Manual Verification / Self-Check
Before claiming this issue is done, the implementor must:
cd frontend && npx tsc --noEmitReviewer Acceptance Checklist
The reviewer should verify that:
Dependencies
None.
Follow-Up Work
handleResponseand theApiErrorshape to document the actually complex parsing logic. This is additive work and not required for this issue.Definition of Done
This issue is done when:
client.ts