- Disable decrement button when progress is at 0 or below to prevent negative values
- Disable increment button when:
* Media has defined episodes and progress is complete (>= total episodes)
* Or when progress has reached next airing episode boundary (nextAiringEpisode - 2)
- Improves user experience by preventing invalid progress adjustments
- Maintains data integrity by stopping users from setting impossible progress values
Added intelligent watchlist refresh mechanism that only refetches data when changes are actually made, preventing unnecessary API calls and improving performance.
Changes:
- Added watchlistNeedsRefresh store to track when watchlist data has changed
- Implemented reactive watcher in App.svelte that uses svelte-spa-router's loc store to detect navigation to home
- Set dirty flag in Anime.svelte after successful status updates and entry deletions
- Added conditional refresh logic that checks user's primary service (AniList, MAL, or Simkl)
- Parallel refresh support for multiple services when logged in
This resolves the issue where clicking the logo would cause full page reloads and unnecessary re-authentication checks, while also ensuring watchlist data stays current when users make changes.
Technical details:
- Uses $loc.location to detect route changes
- IIFE pattern for async operations in reactive statements
- Only refreshes for logged-in primary services
- Flag resets after successful refresh
Related to: Header.svelte client-side routing fix
- Add try-catch-finally error handling to handleSubmit and deleteEntries
functions to ensure submitting state is always reset, even when API calls
fail or timeout. This fixes the infinite loading spinner bug.
- Preserve genres field after AniList updates, matching the existing tags
preservation pattern. Prevents genres array from being lost after form
submission, which was causing "{#each} only works with iterable values"
error when the page re-rendered.
- Add fallback (|| []) to genres each block to prevent rendering errors
when genres is undefined or null for entries without genre data.
These fixes ensure robust error handling and data consistency during anime
list updates across AniList, MAL, and Simkl services.
Fixes: submit button spinner never stopping after form submission
Fixes: "{#each} only works with iterable values" error on genres display
- Anime.svelte: Add genre display section with clickable badges that link
to AniList search results for each genre. Genres are now displayed above
the existing tags section with consistent styling.
- WebsiteLink.svelte: Enhance component to support custom URLs via the `url`
export parameter. Previously, the component only generated URLs based on
service prefixes (a-, m-, s-). Now it accepts a direct URL parameter for
flexible linking to AniList searches and other external resources.
These changes provide users with an improved browsing experience by making
genres interactive and easily searchable.