Peer review: a few small issues + what's working well - #4
Open
kmpat339 wants to merge 8 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Negatives: Added a series of comments highlighting these issues
Typo + inconsistent message in
middleware/auth.js: Line 15's comment says "remebers" instead of "remembers," and the 401 message on line 21 has a trailing space ("Not authenticated ") that doesn't match the one on line 8.duesTierstored as the string"null"instead of actualnullindb/users-db.js(4 places).groupIdright above it correctly uses realnull— this inconsistency means a strict=== nullcheck anywhere would silently fail.routes/events.jsline 24 even has a comment (// "null"/undefined → 0) working around it.Leftover project name in
db/config.js/package.json:DB_NAMEand the package name are still"group-sync", notClubSync.README AI Use Disclosure formatting:
-Julianreads like a signature but is placed before his section instead of after — compare to- Seanfurther down, which correctly follows his section.Misspelled folder name:
desgin/should bedesign/.Missing fallback message in
GroupWidget.jsx: on a failed leave-club request,setErrorfalls back to a default message (data.message ?? "Could not leave the club.") but theshowToastcall right below it doesn't, so a bad/empty JSON response would show a toast withundefinedtext.Positives
middleware/auth.js—requireRole(minRole)returning a reusable Express middleware via closure is a nice pattern that keeps route files free of repeated permission checks.checkEligibilityinroutes/events.jsreturns a clear, specific reason on failure (e.g. "This event requires the gold tier") instead of a generic error — matches what the README says was a real usability-study finding, and it shows.req.user.groupIdup front so a user never accidentally sees another club's events/members, which is easy to get wrong in a multi-tenant app like this.