Commit graph

142 commits

Author SHA1 Message Date
Devin AI
98f1e36108 Remove unused imports from base.adapter.ts
Co-Authored-By: Justin Edmund <justin@jedmund.com>
2025-11-28 19:15:57 +00:00
Devin AI
40dc502027 Remove legacy API layer (APIClient, core.ts, resources/)
- Move transformResponse and transformRequest functions from client.ts to schemas/transforms.ts
- Update imports in base.adapter.ts and schemas/party.ts
- Delete unused APIClient class and related exports from client.ts
- Delete src/lib/api/resources/ directory (search.ts, weapons.ts, characters.ts, summons.ts)
- Delete src/lib/api/core.ts (unused helper functions)
- Delete src/lib/api/index.ts (empty file)

The adapters layer (src/lib/api/adapters/) is now the single, canonical HTTP layer.
The services layer (src/lib/services/) remains as the business logic layer on top of adapters.

Co-Authored-By: Justin Edmund <justin@jedmund.com>
2025-11-28 19:06:41 +00:00
d8eb6b965a Update description sidebar padding and title 2025-09-24 00:45:40 -07:00
b564a5e5e0 Update layout
Sidebar now animates properly. Navigation has progressive blur behind it on scroll
2025-09-24 00:45:28 -07:00
06a91bd532 Add Youtube video rendering to DescriptionRenderer 2025-09-24 00:43:06 -07:00
a1eef8c8a5 update dependencies 2025-09-23 22:10:44 -07:00
0324adb0a4 update services and uncap utilities 2025-09-23 22:10:22 -07:00
53df1db2bc update themes and global styles 2025-09-23 22:10:01 -07:00
0c03332988 update ui components for better interaction 2025-09-23 22:09:39 -07:00
d6b868a9fd add auth store and update auth flow 2025-09-23 22:09:14 -07:00
838e09d17b add sidebar components for descriptions and details 2025-09-23 22:08:51 -07:00
fc32e18ea8 refactor api adapters to use new pattern 2025-09-23 22:06:42 -07:00
9ed6a00f5f feat: auto-close sidebar on navigation
- Added beforeNavigate hook to close sidebar when navigating between pages
- Prevents search sidebar from staying open when browsing different sections
- Ensures clean UI state transitions between pages
2025-09-20 21:36:49 -07:00
fc711a7a5d feat: adapt SearchSidebar to use new sidebar system with component-based content 2025-09-20 12:54:18 -07:00
f5361c5ace fix: use close.svg icon directly in SidebarHeader for visibility 2025-09-20 12:49:37 -07:00
eace0530fa fix: update CharacterRep and SummonRep to use correct adapter field names and shared image utilities 2025-09-20 12:33:08 -07:00
713886a290 fix: prevent duplicate icon rendering in Button component when iconOnly is true 2025-09-20 03:02:55 -07:00
2cf29275b6 Fix database pages to use camelCase field names
- Update database grid navigation to use granblueId
- Update column definitions to use granblueId
- Fix all detail pages to use camelCase field names from transformed API responses
- Fix field names for HP/ATK stats, abilities, and metadata
2025-09-20 02:57:27 -07:00
0797892ea4 Fix last updated field to use camelCase field names 2025-09-20 02:47:08 -07:00
eaa9e1c847 Fix database pages and images
- Update DatabaseProvider to use SearchAdapter instead of direct fetch
- Fix RequestCache error by using cacheTTL instead of cache
- Update image cells to use shared image utilities with correct parameters
- Use only camelCase field names (granblueId) from transformed responses
2025-09-20 02:46:13 -07:00
100a04eda6 Fix adapter field names and runed import
- Update Party interface to use transformed field names (weapons/characters/summons)
- Fix runed import to use useDebounce instead of debounced
- Clean up debug logging
2025-09-20 02:26:54 -07:00
1a6a112efd fix: adapter initialization and image loading
- Add centralized adapter config with proper baseURL
- Fix API response transformation (object -> weapon/character/summon)
- Update components to use image service and correct property names
- Fix Svelte 5 $derived syntax and missing PartyAdapter.list method

Images now display correctly in grids.
2025-09-20 01:54:40 -07:00
842321efd2 feat: Complete Phase 4 & 5 - Finish adapter migration
Phase 4 - Page Server Components:
- Migrated database page servers to use EntityAdapter directly
- Removed fetch parameter from all page server loads

Phase 5 - Utility Files:
- Deleted lib/api.ts (functionality inlined)
- Deleted lib/server/detail/load.ts (no longer needed)
- Updated DatabaseProvider to use PUBLIC_SIERO_API_URL directly
- Updated OAuth to use native fetch type

Migration Complete:
- All 32 files migrated from api/core to adapter pattern
- Zero remaining dependencies on lib/api/core
- Clean separation of concerns with dedicated adapters
2025-09-20 01:16:58 -07:00
8332ecc158 refactor: Complete Phase 3 - Migrate API route handlers from core to utilities
- Created dedicated utility functions for API route proxies (buildApiUrl, extractHeaders, handleApiError)
- Migrated all 20 API route handlers to use new utilities instead of api/core
- Routes continue to act as proxies to Rails API (correct architecture)
- Removed dependency on buildUrl from api/core in all route handlers
- Updated migration plan to reflect completed Phase 3
2025-09-20 01:11:08 -07:00
87a65408f9 test: Add comprehensive tests for UserAdapter
- Tests for all UserAdapter methods (getInfo, getProfile, getFavorites, etc.)
- Tests for error handling and caching behavior
- Fixed caching tests to explicitly enable caching (disabled by default)
- Added cache clearing after profile updates
- All 21 tests passing successfully
2025-09-20 00:46:28 -07:00
683c28e172 feat: Create UserAdapter and complete Phase 1 & 2 of migration
- Created new UserAdapter for user profile and favorites operations
- Updated routes/teams/explore and routes/[username] to use adapters directly
- Deleted resource facade files (parties.ts, grid.ts, users.ts)
- All services and initial routes now use adapters without backward compatibility
- Updated migration plan to track completed work
2025-09-20 00:42:13 -07:00
2605a539b6 refactor: Remove backward compatibility in adapter migration
- Update services to use adapters directly without FetchLike
- Remove constructor fetch dependency from services
- Add favorite/unfavorite methods to PartyAdapter
- Simplify API resource files to act as facades temporarily
- Services now instantiate without fetch parameter
- Direct adapter usage improves type safety and reduces complexity
2025-09-20 00:37:26 -07:00
fd172e6558 test: Add comprehensive tests for grid and entity adapters
- Add tests for GridAdapter covering weapons, characters, and summons
- Add tests for EntityAdapter covering canonical data access
- Test CRUD operations, positioning, uncap updates, and caching
- Verify snake_case transformation and error handling
- Ensure proper cache management with TTL support
2025-09-20 00:19:00 -07:00
49fc0fb069 feat: Implement GridAdapter and EntityAdapter
- Add GridAdapter for managing user grid item instances
- Support CRUD, position management, and uncap operations
- Add EntityAdapter for read-only canonical game data
- Separate user instances from game reference data
- Export all adapters from index
2025-09-20 00:11:51 -07:00
4f8beab3ea fix: Update PartyAdapter to match corrected API endpoints
- Remove non-existent batch update methods for grid items
- Add gridUpdate for atomic batch operations
- Add preview management methods
- Split job management into separate endpoints
- Update tests to match new API structure
2025-09-20 00:04:36 -07:00
114427241f feat: Implement PartyAdapter with comprehensive functionality
- Add PartyAdapter for party CRUD and grid management
- Create reactive PartyResource with optimistic updates
- Support user parties listing with filters
- Handle grid conflicts and job updates
- Include comprehensive test coverage
2025-09-19 23:19:24 -07:00
20c6de3834 docs: add search example component demonstrating adapter usage
- Create comprehensive example showing search functionality
- Demonstrate filtering, debouncing, and error handling
- Show proper integration with Svelte 5 reactive patterns
2025-09-19 23:07:24 -07:00
99e58d0b3c feat: add reactive search resource using Svelte 5 runes
- Create SearchResource class with reactive state management
- Implement debounced search using Runed utilities
- Support concurrent searches for different entity types
- Add request cancellation and state management
- Include tests for resource functionality
2025-09-19 23:06:59 -07:00
ece44a54a3 feat: add search adapter for entity searches
- Implement SearchAdapter extending BaseAdapter
- Support searching weapons, characters, and summons
- Add filtering by element, rarity, proficiency, etc.
- Include pagination support
- Add comprehensive test coverage
2025-09-19 23:06:46 -07:00
51c30edc50 feat: implement base adapter with retry logic and caching
- Add BaseAdapter class with request/response transformation
- Implement comprehensive error handling and normalization
- Add retry logic with exponential backoff for network/server errors
- Support request cancellation and deduplication
- Include response caching with configurable TTL
- Add full test coverage for adapter functionality
2025-09-19 23:03:36 -07:00
ea00cecd68 build: add runed dependency for reactive state management 2025-09-19 23:03:22 -07:00
6f9479f697 Fix double load 2025-09-19 13:59:55 -07:00
a642cdd857 fix: linter fixes 2025-09-17 22:16:10 -07:00
24bf7da892 CSS changes to DatabaseGridWithProvider 2025-09-17 22:15:57 -07:00
5c407f3ef7 Small changes to Navigation 2025-09-17 22:15:37 -07:00
5c8e23a38e Added editable mode to character detail 2025-09-17 22:15:24 -07:00
0e92b9baf5 small changes and fixes to character datagrid 2025-09-17 22:15:01 -07:00
b71c2c2109 Add role to summons and weapons detail pages 2025-09-17 22:14:42 -07:00
a8dfe28b07 added details components for database section 2025-09-17 22:14:19 -07:00
bca4843885 Refactored Select component 2025-09-17 22:10:38 -07:00
5466a70916 Refactored Input component 2025-09-17 22:08:37 -07:00
be2f723962 Remove everything in stories folder for now 2025-09-17 22:08:19 -07:00
3e7ccf8fdb Refactored Button component 2025-09-17 22:06:45 -07:00
c09154b138 Remove test-ui route 2025-09-17 22:04:49 -07:00
7fb9ef2d9a Tweaked CSS variables
Added some new variables for elevation, rounder corners, and tweaked some other things
2025-09-17 22:04:26 -07:00