Commit Graph
293 Commits
Author SHA1 Message Date
john-okeefe a16c804692 feat(ui): show per-service login status while accounts are being checked
When the app starts it verifies all three services sequentially, which
could leave the other two login controls looking idle or trigger login
actions before their real state is known. Track which service is
currently being checked and reflect it in the header:

- Add a serviceLoggingIn store (plus setServiceLoggingIn and
  isServiceLoggingIn helpers) to GlobalVariablesAndHelperFunctions.
- Have the loginTo* functions and the startup CheckIf* functions toggle
  their service in the store (seed all three at startup, clear each as
  it resolves).
- In Header, the login buttons show a spinner with 'Checking AniList' /
  'Checking MAL' / 'Checking Simkl' and are disabled while that service
  is being checked, reverting to the normal 'AniList Login' style label
  once its state is known.
- In the avatar menu, the 'Login to X' row shows a spinner with the
  matching 'Checking X' text while that service is logging in.
1.6.0
2026-08-29 13:13:42 -04:00
john-okeefe d08756c36f fix(mal): distinguish silent token refresh from a fresh re-login
Two MAL login issues were caused by the refresh path being conflated
with the full browser OAuth flow:

1. A spurious 'It is now safe to close your browser tab' dialog was
   shown after a *silent* background token refresh, even though the
   browser was never opened. The dialog now belongs only to the
   browser-callback handler (handleMyAnimeListCallback); the refresh
   raises no dialog.

2. When both the access token and the refresh token were invalid, the
   app reported MAL as logged in without a username. Now, if a refresh
   fails (HttpClient error, non-2xx, or an empty access token), the
   stale tokens are cleared and a fresh browser OAuth login is
   automatically initiated instead of silently returning an empty user.

refreshMyAnimeListAuthorizationToken now returns a bool indicating
whether a fresh access token was actually obtained, letting
GetMyAnimeListLoggedInUser decide between retrying with the refreshed
token or falling back to a full re-login.
2026-08-29 13:13:37 -04:00
john-okeefe b42456f255 chore(gitignore): ignore build binaries and archive artifacts
Ignore compiled binaries and packaging archives that are generated
during a build, without hiding tracked build source files:

- build/bin: the compiled application binary
- *.tar / *.tar.gz: packaging archives (e.g. Wails .ptmp temp dirs)
- /AniTrack: the root app binary (fix the previous './AniTrack'
  pattern, which gitignore did not match)
2026-08-29 13:13:25 -04:00
john-okeefe 49ac5bef03 chore(wailsjs): regenerate Go bindings for the AniList Browse feature
Re-run the Wails binding generator so the frontend reflects the browse
Go types that were added in earlier commits (AniListBrowse plus the
Media / MediaList model refinements):

- App.d.ts / App.js: expose the new AniListBrowse() method
- models.ts: add the Media model, the anonymous tags element type,
  and type MediaList.media as Media instead of a generic object
2026-08-29 13:12:22 -04:00
john-okeefe b9f4c12839 chore(deps): upgrade Wails to v2.15.0 and bump golang.org/x dependencies
Reinstall the Go toolchain and rebuild wails against v2.15.0, then run
'go mod tidy' to update the dependency graph:

- github.com/wailsapp/wails/v2  v2.12.0 -> v2.15.0
- golang.org/x/crypto  v0.52.0 -> v0.53.0
- golang.org/x/net     v0.55.0 -> v0.56.0
- golang.org/x/sys     v0.45.0 -> v0.46.0
- golang.org/x/term    v0.43.0 -> v0.44.0
- golang.org/x/text    v0.37.0 -> v0.39.0

The regenerated Wails runtime bindings (runtime.d.ts / runtime.js) are
included as they surface new APIs shipped in v2.15: the cross-platform
notification API (InitializeNotifications, SendNotification, etc.) and
the EventsOffAll event helper.
2026-08-29 13:12:18 -04:00
john-okeefe 54c109ae3b rewrote standard media call and added browse function 2026-07-22 15:22:58 -04:00
john-okeefe d3bc93f6c9 tested for standardizing media call 2026-07-22 15:22:38 -04:00
john-okeefe 0384f570c5 added AniList Browse Fetch for new feature 2026-07-21 16:53:25 -04:00
john-okeefe 6925cd4e08 fixed gitignore to just ignore the Anitrack binary at root 2026-07-21 16:52:47 -04:00
john-okeefe 23960e0613 chore: upgrade Go to 1.25 and update dependencies
- Bump Go toolchain from 1.24.0 to 1.25.0
- Upgrade Wails from v2.10.1 to v2.12.0
- Upgrade tidwall/gjson from v1.18.0 to v1.19.0
- Upgrade labstack/echo from v4.13.3 to v4.15.2
- Upgrade labstack/gommon from v0.4.2 to v0.5.0
- Upgrade samber/lo from v1.49.1 to v1.53.0
- Upgrade gorilla/websocket to v1.5.3 (new transitive dep)
- Upgrade go-webview2 from v1.0.19 to v1.0.23
- Upgrade danieljoos/wincred from v1.2.2 to v1.2.3
- Upgrade godbus/dbus/v5 from v5.1.0 to v5.2.2
- Upgrade jchv/go-winloader to latest
- Upgrade mattn/go-isatty from v0.0.20 to v0.0.22
- Upgrade tidwall/match from v1.1.1 to v1.2.0
- Upgrade golang.org/x/crypto, net, sys, term to latest
- Add go-toast/v2 as new transitive dependency from Wails
1.5.5
2026-05-27 20:17:09 -04:00
john-okeefe 669b41c62c chore: bump version to 1.5.5 2026-05-27 20:02:16 -04:00
john-okeefe c54a11e7bd fix(build): improve Linux install script reliability and idempotency
- Fix tilde expansion: replace quoted '~' paths with $HOME so they
  actually resolve to the user's home directory instead of being
  treated literally
- Add existence checks before copying files so the script is
  idempotent and skips already-installed resources
- Add progress/status echo messages for each installation step
  so the user can see what is being done
2026-05-27 20:01:39 -04:00
john-okeefe b6bdee4df6 chore: bump version to 1.5.1 2026-05-27 17:41:27 -04:00
john-okeefe cbda217d18 chore: add compiled AniTrack binary to .gitignore
The project's compiled binary (AniTrack) was not covered by existing
gitignore patterns. Only platform-specific extensions like .exe, .dll,
.so, and .dylib were ignored. Add the bare binary name to prevent the
locally-built executable from appearing as an untracked file.
2026-05-27 17:41:19 -04:00
john-okeefe ceb756a1a8 chore: regenerate Wails TypeScript models for FlexString type
Auto-generated by wails generate module. The FlexString custom type
produces unconventional namespace names in the generated TypeScript but
does not affect runtime behavior.
2026-05-27 17:36:05 -04:00
john-okeefe 3621b66437 fix: handle MAL API returning numbers instead of strings for zero-value statistics
The MyAnimeList API inconsistently returns statistics status fields (watching,
completed, on_hold, dropped, plan_to_watch) as quoted strings for non-zero
values (e.g. "8217") but as bare numbers for zero values (e.g. 0). This caused
JSON unmarshal errors for anime with zero counts in any status field.

Introduce a FlexString custom type that implements json.Unmarshaler to accept
both JSON strings and JSON numbers, always storing the result as a string. The
type definition lives in MALTypes.go and the unmarshal logic in MALFunctions.go
to keep static types and behavior separate.
1.5.1
2026-05-27 17:28:54 -04:00
john-okeefe 7f92b1714e chore: bump version to 1.5.0
Update productVersion from 1.0.0 to 1.5.0 in Wails project
configuration to reflect the addition of AniList watchlist sorting,
extracted refresh button component, and pagination improvements.
1.5.0
2026-04-24 23:02:21 -04:00
john-okeefe cd142f7601 chore: remove release notes file 2026-04-24 23:01:29 -04:00
john-okeefe fe48e6a8c4 docs: add release notes for v1.0.0
Add comprehensive release notes documenting the first stable release of
AniTrack, including highlights such as webkit2gtk 4.1 Linux builds,
comprehensive error handling across all services, AniList watchlist
sorting, and various UI polish improvements.
2026-04-24 23:01:00 -04:00
john-okeefe 24d4d24edf fix(frontend): remove extraneous top margin from pagination controls
Remove the mt-5 class from the pagination container div to eliminate
unnecessary spacing between the pagination buttons and the per-page
selector.
2026-04-24 23:00:54 -04:00
john-okeefe b68abfc1c9 refactor(frontend): extract refresh button into standalone component and put sort dropdown in watchlist header
Move the refresh button out of the WatchList component header and into
its own RefreshWatchListButton.svelte component, placing it at the top
of the Home route page with right-alignment. This gives the refresh
control better visibility at the page level rather than being buried
inside the watchlist header.

Replace the removed refresh button in the WatchList header with the new
Sort dropdown component, giving users sort controls directly alongside
the watchlist title.
2026-04-24 23:00:50 -04:00
john-okeefe eadc96fb4f feat(frontend): add AniList watchlist sort dropdown component
Implement a Sort.svelte component that provides a dropdown menu allowing
users to dynamically reorder their AniList watchlist by various parameters
including media title, score, status, progress, popularity, and dates.

The component binds to the global aniListSort store and fetches updated
watchlist data from the backend whenever the user selects a new sort option,
providing immediate visual feedback.
2026-04-24 23:00:35 -04:00
john-okeefe 6a662cdf6e chore: bump version to 1.0.0
Update productVersion from 0.7.0 to 1.0.0 in Wails project
configuration to reflect the first major release milestone.
1.0.0
2026-04-24 19:39:08 -04:00
john-okeefe 2a9777872f chore: update author email address
Change contact email from jokeefe@fastmail.com to admin@linuxhg.com
in the Wails project configuration.
2026-04-24 19:38:56 -04:00
john-okeefe b03d4ab7e3 build: add Makefile with webkit2_41 build tag for Linux
Wails v2 defaults to linking against webkit2gtk-4.0, but modern Linux
distributions (e.g. Fedora) only ship webkit2gtk-4.1. The webkit2_41
build tag tells Wails to link against the correct library.

Provides two targets:
- make dev: run wails dev with the correct tag
- make build: build the production binary with the correct tag
- make clean: remove build artifacts
2026-04-24 17:10:29 -04:00
john-okeefe ff1b8fb742 chore: remove release notes for v0.6.5 2026-04-24 17:10:21 -04:00
john-okeefe cbd4c7cd01 docs: add release notes for v0.6.5
Add detailed release notes for the v0.6.5 patch release covering:
- Enhanced button disabled states in Anime and Pagination components
- Fixed media cover image sizing in WatchList
- AvatarMenu service status indicator
- TypeScript type safety fixes in Pagination event handlers
- Code formatting standardization across components
2026-04-24 17:10:03 -04:00
john-okeefe 335d757255 chore: remove release notes file
Release notes will be managed externally. Keeping repository focused on source code only.
2026-03-30 20:17:09 -04:00
john-okeefe a3b4857175 docs: add release notes for v0.7.0
Comprehensive release notes documenting:
- Major error handling improvements
- Backend API changes (AniList, MAL, Simkl)
- Frontend error modal and state management
- Bug fixes and stability improvements
- Technical details and upgrade instructions
0.7.0
2026-03-30 20:12:47 -04:00
john-okeefe 6e4b9c041a chore: remove vite timestamp file
Remove generated vite timestamp file that was accidentally tracked.
2026-03-30 20:08:39 -04:00
john-okeefe ae54fd20dd feat(frontend): integrate error handling into application
App.svelte:
- Import and render ErrorModal component
- Add ErrorModal to main app layout below Header

CheckIfAniListLoggedInAndLoadWatchList.svelte:
- Import error state helpers (setApiError, clearApiError)
- Wrap LoadAniListUser in try-catch with error handling
- Wrap LoadAniListWatchList in try-catch with error handling
- Update CheckIfAniListLoggedInAndLoadWatchList with error handling
- Remove old alert() calls in favor of modal system

Home.svelte:
- Import isApiDown and apiError stores
- Add conditional rendering for API down state
- Display user-friendly "API Unavailable" message when apiError is set
- Show warning icon and helpful messaging

Error handling is now fully integrated across the frontend application.
2026-03-30 20:08:34 -04:00
john-okeefe 2c7e2d0eff feat(frontend): add error modal component
Add new ErrorModal component for API error display:
- Auto-displays when apiError store is set
- Shows service name, error message, and status code
- Provides "Retry Connection" button to attempt reconnection
- Provides "Dismiss" button to close modal and continue
- Integrates with all three services (AniList, MAL, Simkl)
- Uses flowbite-svelte Modal and Button components
- Proper Svelte event handling with on:click

Uses Tailwind CSS for styling with red error theme and helpful messaging.
2026-03-30 20:08:29 -04:00
john-okeefe 9a9f055c38 feat(frontend): add API error state management
Add centralized error state system:
- New ApiError interface (service, message, statusCode, canRetry)
- apiError writable store for current error state
- isApiDown writable store for API availability status
- setApiError() helper to set error states
- clearApiError() helper to reset error states

Provides reactive error state across entire application.
2026-03-30 20:08:23 -04:00
john-okeefe bc497521e7 feat(simkl): add comprehensive error handling
SimklFunctions.go:
- Update SimklHelper to return (json.RawMessage, error)
- Add status code validation (200-299 range)
- Update SimklGetUserWatchlist to return (SimklWatchListType, error)
- Update SimklSyncEpisodes to return (SimklAnime, error)
- Update SimklSyncRating to return (SimklAnime, error)
- Update SimklSyncStatus to return (SimklAnime, error)
- Update SimklSearch to return (SimklAnime, error)
- Update SimklSyncRemove to return (bool, error)
- Add proper error wrapping for all failure scenarios

SimklUserFunctions.go:
- Replace log.Fatalf with log.Printf in server error handling (line 119)
- Replace log.Fatal with log.Printf in JSON marshaling (line 141)

All Simkl API calls now properly propagate errors to frontend.
2026-03-30 20:08:20 -04:00
john-okeefe 48a6005725 feat(mal): add comprehensive error handling
MALFunctions.go:
- Update MALHelper to return (json.RawMessage, string, error)
- Add network error handling and proper request error checking
- Update GetMyAnimeList to return (MALWatchlist, error)
- Update MyAnimeListUpdate to return (MalListStatus, error)
- Update GetMyAnimeListAnime to return (MALAnime, error)
- Update DeleteMyAnimeListEntry to return (bool, error)

MALUserFunctions.go:
- Replace log.Fatalf with log.Printf in server error handling
- Prevent server shutdown on OAuth callback errors

All MAL API calls now properly propagate errors to frontend.
2026-03-30 20:08:16 -04:00
john-okeefe 93a94d0797 chore: bump version to 0.7.0
Preparing release for comprehensive error handling improvements across all API integrations (AniList, MAL, Simkl).
2026-03-30 20:08:08 -04:00
john-okeefe a2576b044c feat: implement dynamic sort parameter for AniList watchlist
Add configurable sort functionality to AniList watchlist system:

- Add aniListSort writable store to GlobalVariablesAndHelperFunctions
- Update Pagination component to subscribe to and use dynamic sort parameter
- Refactor CheckIfAniListLoggedInAndLoadWatchList to use sort from store
- Remove hardcoded MediaListSort.UpdatedTimeDesc in favor of configurable sort
- Improve code formatting with arrow functions and consistent spacing
- Add sort parameter to all GetAniListUserWatchingList calls

This allows users to customize their watchlist sorting preference instead of being limited to the default 'updated time descending' sort order.
2026-03-29 10:23:58 -04:00
john-okeefe 2ee2d85e9e feat: add Sort component placeholder
Add new Sort component to infrastructure for future sort functionality implementation in the watchlist UI.
2026-03-29 10:23:55 -04:00
john-okeefe 1090f112f3 refactor: standardize code formatting in AvatarMenu component
- Convert from 4-space to 2-space indentation for consistency
- Improve import statement formatting and alignment
- Fix semicolon usage throughout the component
- Add conditional avatar dot indicator: green when all services (AniList, MAL, Simkl) are logged in, yellow otherwise
- Add missing newline at end of file
- General code style improvements for better readability and consistency with project standards
2026-03-22 22:00:48 -04:00
john-okeefe 58c9f449e0 chore: bump version to 0.6.5 0.6.5 2026-03-22 21:46:05 -04:00
john-okeefe f016c90353 chore: bump version to 0.6.5
Update product version in preparation for release.
2026-03-22 21:45:57 -04:00
john-okeefe 6bbe0f0f48 Add disabled state to pagination navigation buttons
- Disable decrement button when on first page (page <= 1)
- Disable increment button when on last page (page >= lastPage)
- Prevents users from triggering invalid page navigation requests
- Improves UX by providing visual feedback for boundary conditions

This change prevents unnecessary API calls and improves user experience by clearly indicating when navigation bounds have been reached. The buttons will now be disabled at the appropriate boundaries, matching the behavior already present in the numbered page navigation section.
2026-03-22 21:17:20 -04:00
john-okeefe d841fee1e7 Fix TypeScript type safety in Pagination event handlers
- Add proper type annotations to changePage function parameter using KeyboardEvent with HTMLInputElement currentTarget
- Add proper type annotations to changeCountPerPage function parameter using Event with HTMLSelectElement currentTarget
- Replace all e.target references with e.currentTarget to access properly typed DOM elements
- Add hover state styling to active page button for better UI feedback

This change resolves TypeScript errors where EventTarget type didn't have access to element-specific properties like 'value'. Using currentTarget instead of target provides the correct type since currentTarget refers to the element that has the event listener attached, ensuring type-safe access to input and select element properties.
2026-03-22 21:09:13 -04:00
john-okeefe f29d8f378e Format Pagination component code for consistency
- Update indentation from 4-space to 2-space convention throughout the component
- Reformat import statements to follow consistent spacing and alignment
- Standardize function and variable declarations with proper spacing
- Improve code readability with consistent formatting across all elements
- Clean up HTML template structure with proper indentation
- Add newline at end of file for standards compliance

This change ensures the Pagination component follows the project's code style conventions and improves maintainability through consistent formatting.
2026-03-22 20:50:24 -04:00
john-okeefe 35e93c0ca9 Fix media cover image sizing in WatchList component
- Add explicit width (230px) and height (330px) to media cover images
- Apply object-cover class to maintain aspect ratio and prevent distortion
- Ensures uniform sizing across all media cover images in the watch list

This change improves visual consistency in the UI by standardizing the display dimensions of anime/manga cover images.
2026-03-22 20:48:56 -04:00
john-okeefe 8c169d549a Add disabled state constraints to progress adjustment buttons in Anime component
- 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
2026-03-22 20:27:15 -04:00
john-okeefe b2a8a504f3 fix: resolve syntax error in App.svelte
Fixed TypeScript compilation error caused by import statement and function declaration being on the same line.

Changes:
- Separated import statement and onMount declaration onto different lines
- Resolved svelte-preprocess type error
- File now compiles correctly

This was a typo from previous commit where the loc import line was incorrectly merged with the existing onMount function declaration.
0.6.0
2026-03-21 13:28:33 -04:00
john-okeefe c85a53a278 chore: remove VSCode extensions.json
Removed the .vscode/extensions.json file from the frontend directory.

This file contained workspace-level VSCode extension recommendations which are better managed:
- At user level through personal VSCode settings
- Through project README documentation
- Via devcontainer or editors preferences if needed

Cleanup reduces repository clutter and avoids imposing specific extension recommendations on contributors.
2026-03-21 13:25:49 -04:00
john-okeefe 2cf3844e76 chore: bump version to 0.6.0
Incremented version from 0.5.3 to 0.6.0 for release with new features.

This release includes:
- Smart watchlist refresh on navigation
- Improved WatchList UI with manual refresh button
- Client-side routing for logo navigation
- Better UX with automatic data updates

Version bump reflects significant feature additions and improvements to the user experience.
2026-03-21 13:25:46 -04:00
john-okeefe 6ed5fe8b71 feat: improve WatchList UI with refresh button
Enhanced the WatchList component with better layout and manual refresh functionality.

Changes:
- Added Refresh WatchList button with loading state handling
- Restructured header layout using flexbox with justify-between
- Title on left, refresh button on right, vertically aligned with items-center
- Improved button styling with consistent py-2 px-4 padding
- Added CheckIfAniListLoggedInAndLoadWatchList import for refresh functionality
- Maintained mb-4 spacing for consistent vertical rhythm

This gives users manual control over watchlist updates and provides better visual balance to the header section.

UI improvements:
- Horizontal flex container for proper left/right alignment
- Responsive button sizing
- Clear visual separation between title and action
2026-03-21 13:25:45 -04:00