Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
4028066
moved errors to a global context, and abstracted some loader function…
Casjb Mar 26, 2026
7e57006
added delay to loader appearance so it doesnt flash on fast loads
Casjb Mar 26, 2026
125d255
Refactor loading logic and replace LoadResourceIndex with generic com…
Casjb Mar 26, 2026
d6a5313
Refactor loading logic to improve state management in components.
Casjb Mar 26, 2026
c8a8828
Refactor loading logic to add opacity control for better UX.
Casjb Mar 26, 2026
a42fafe
improved resource display component re-mount logic to use a composite…
Casjb Mar 26, 2026
a8887df
Update pagination logic to use URL search parameters for state.
Casjb Mar 26, 2026
640805f
Add context menu support for league renaming in the leagues component.
Casjb Mar 26, 2026
7384750
improving validation and fields in league modal and context menu
Casjb Mar 27, 2026
d04ea31
Enhance loading state management to handle undefined actions gracefully.
Casjb Apr 7, 2026
6fe8919
added light / dark themes and a page at /test/theme to view themes
Casjb Apr 8, 2026
f5d0d66
basic tailwind setup with custom themes
Casjb Apr 8, 2026
4ae5607
refactored theme test page to use tailwind setup
Casjb Apr 8, 2026
3283dbb
Add Pokeball component with light/dark theme support and SVG assets.
Casjb Apr 8, 2026
3d70a8f
implemented new pokeball component
Casjb Apr 8, 2026
dd7c0bd
added link to /test/theme page on /test page
Casjb Apr 8, 2026
548b46b
added fixme.md as a todo list for fixes
Casjb Apr 8, 2026
813569d
finally changed dash comments to real tsx comments
Casjb Apr 8, 2026
f36fa99
sanitised page num query param
Casjb Apr 8, 2026
33951bc
removed nested interactive elements in favour of just <link>
Casjb Apr 8, 2026
26744aa
Enhance form submission handling with loading state and async support.
Casjb Apr 8, 2026
8618979
added a div block to each link in DisplayResourceGeneric.tsx
Casjb Apr 8, 2026
ddfa1f9
Refactor league loading logic to enhance error handling and clarity.
Casjb Apr 8, 2026
37d9568
Update dark mode state initialization based on current class list.
Casjb Apr 8, 2026
4358695
Update league renaming logic to conditionally reload on success.
Casjb Apr 8, 2026
388fae1
Add useRef to track latest input values for async validation.
Casjb Apr 8, 2026
4d9ccb1
Enhance uniqueness check error logging for clarity and accuracy.
Casjb Apr 8, 2026
1e4d910
Refactor resource creation to improve error handling and loading states.
Casjb Apr 8, 2026
48eb594
Ensure dark mode detection is robust with environment checks.
Casjb Apr 8, 2026
9e2bd57
Conditionally render theme test route for development environment.
Casjb Apr 8, 2026
9d20ae3
Update GlobalLoader background color to use color-bg-overlay.
Casjb Apr 8, 2026
ac5fa38
Improve accessibility by adding aria attributes and error IDs.
Casjb Apr 8, 2026
2eba466
Add error handling and prevent multiple submissions in context menu.
Casjb Apr 8, 2026
b0ee2e7
Refactor league ID handling to improve validation and error handling.
Casjb Apr 8, 2026
e503d00
Add validation reset for context menu submission error handling.
Casjb Apr 8, 2026
1e80807
Handle global error by throwing error message in league data fetch.
Casjb Apr 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions frontend/fixme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Fix List (CodeRabbit Review)

## Bugs — fix immediately

- [ ] `League.tsx` — add null check before `Object.hasOwn(leagueJson, 'user_id')`, throws if fetch returns null
- [ ] `CreationModal.tsx` — race condition on `errors` state in `handleSubmit`, use local tracking variable instead of reading stale state
- [ ] `CreationModal.tsx` — `validateUnique` is passed `value` instead of `fieldName` as second argument
- [ ] `useResource.ts` — guard `response.items ?? []`, undefined will break rendering
- [ ] `Leagues.tsx` — rename reloads even if API call failed, check response before calling `setReloadKey`
- [ ] `DisplayResourceGeneric.tsx` — add button never shows when `totalPages === 0`, condition should be `totalPages === 0 || pageNum === totalPages`

## Defensive — good practice

- [ ] `fetchLeaguesIndex.ts` — add `response.ok` check, 4xx/5xx silently proceed to `.json()`
- [ ] `fetchLeaguesSpecific.ts` — same missing `response.ok` check
- [ ] `renameLeague.ts` — same missing `response.ok` check
- [ ] `errorSlice.ts` — replace `??` with `||` to catch empty string payloads
- [ ] `ProtectedRoutes.tsx` — add cleanup to `useEffect` so loader doesn't get stuck on unmount

## Polish

- [ ] `ExtendableContextMenu.tsx` — hardcoded `white`/`black` colours, swap for `var(--color-bg-card)` and `var(--color-border)`
- [ ] `ExtendableContextMenu.tsx` — tautological ternary `'Submit' : 'Submit'`, change to `'Validating...' : 'Submit'`
- [ ] `CreationModal.tsx` — tautological ternary `'Create' : 'Create'`, change to `'Validating...' : 'Create'`
- [ ] `ThemeTest.tsx` — initial dark state hardcoded to `true`, should read from DOM: `!document.documentElement.classList.contains('light')`

## Skipped

- `App.tsx` route comments — intentional, ignore
- `ErrorBanner.tsx` aria label — defer to accessibility pass
Loading