Commit graph

666 commits

Author SHA1 Message Date
4bbe2ed188 simplify collection page to single code path
- use unified api for all users (no owner/viewer branching)
- remove client-side filtering (api handles it)
- pass userId to AddToCollectionModal
2025-12-02 15:31:58 -08:00
b8a48771dd update collection adapter/queries for unified api
- add userId param to list methods
- remove public collection methods (now unified)
- update query keys to include userId
2025-12-02 15:31:46 -08:00
35b0560749 add ProfileHeader component, add collection link to profile nav 2025-12-02 15:07:01 -08:00
a6a0a38d75 fix collection modal search: use query factory pattern, remove broken debounce 2025-12-02 15:06:47 -08:00
491026399f fix search api: wrap body in search key, use X-Per-Page header, 50 per page 2025-12-02 15:06:38 -08:00
7808c75452 fix cache key generation for POST requests with object bodies 2025-12-02 15:06:33 -08:00
a664d41e63 fix character card aspect ratio to match actual image dimensions
Character grid images are 280x160 (7:4 ratio, wider than tall).
The previous ratio was inverted. Now using 100px width with correct
aspect-ratio: 280/160.
2025-12-02 11:35:00 -08:00
408f729976 switch modal results grid to flexbox for better layout
Use flexbox with fixed-width cards (70px) instead of CSS Grid. This
prevents excessive vertical spacing when using tall aspect ratio items.
2025-12-02 11:32:04 -08:00
7de75ec8d0 fix character card aspect ratio and duplicate key error
- Use proper 16:33 aspect ratio for character cards instead of square
- Change object-fit from cover to contain to prevent cropping
- Deduplicate search results across pages to prevent duplicate key errors
2025-12-02 11:31:09 -08:00
d107d56f82 fix collection nav link to point to user's collection
The Collection nav link now points to /{username}/collection/characters
instead of /collection. Also updates isNavSelected to properly detect
when on any collection page.
2025-12-02 11:29:09 -08:00
2aa961b5e6 refactor EditCharacterSidebar to use shared CharacterEditPane
Reduces ~240 lines to ~85 lines by using the shared CharacterEditPane
component for edit controls. Both party grid and collection character
editing now use the same underlying UI component.
2025-12-02 11:26:23 -08:00
dea784780a add collection page route and character pane components
- Add collection route structure at [username]/collection/characters
- Create CharacterEditPane as shared component for character customizations
- Create CollectionCharacterPane with Info and My Collection tabs
- Add character grid with filters and infinite scroll
- Fix CollectionFilters a11y warnings
2025-12-02 09:43:31 -08:00
a9de4a60c0 add AddToCollectionModal and SelectableCharacterCard
Large modal for batch-selecting characters to add to collection.
Features server-side search, filtering, multi-select with visual
feedback, and "X selected" link to filter to selection only.
2025-12-02 09:32:28 -08:00
8f28ad8d8f add Dialog large size variant and CollectionFilters
Dialog now supports size='large' for 90vw/85vh modals.
CollectionFilters provides reusable filter controls for
element, rarity, season, series, race, proficiency, gender.
2025-12-02 09:30:31 -08:00
60ac5d4ab2 add collection API layer
Types, adapter, queries, and mutations for managing user collections
(characters, weapons, summons, job accessories). Supports both private
collection management and public collection viewing with privacy.
2025-12-02 09:28:22 -08:00
51db7f7604 remove redundant settings page 2025-12-02 08:52:08 -08:00
8912696a08 add element selector to user settings modal 2025-12-02 08:52:02 -08:00
be92eba4aa fix user settings API to match rails backend params 2025-12-02 08:51:57 -08:00
13f78e4bf8 switch to dynamic font loading from env
loads fonts from AWS S3 when PUBLIC_SIERO_IMG_URL is set,
otherwise falls back to local /fonts directory
2025-12-02 08:39:28 -08:00
513c7660f5 add svelte-sonner for toast notifications 2025-12-02 06:54:12 -08:00
23ae7f70ba add promotions to summon database views 2025-12-02 05:25:56 -08:00
8c45c21939 add promotions to weapon database views 2025-12-02 05:25:49 -08:00
cf694bb1ce add season, series, gacha_available, recruited_by to character database views 2025-12-02 05:25:43 -08:00
96f040a91b add CheckboxGroup component for multiselect fields 2025-12-02 05:25:35 -08:00
f26d3e3883 add season, series, promotions filters to search adapter 2025-12-02 05:25:29 -08:00
67b87c7d1b add season, series, promotions to entity types 2025-12-02 05:25:23 -08:00
b6db09bcc4 add formal promotion to enums 2025-12-02 05:25:10 -08:00
afb81e0f55 add nicknames, links sections to entity detail pages; show recruits in weapon metadata 2025-12-02 02:15:03 -08:00
28aa547c89 fix: summon granblueId binding in edit mode 2025-12-02 01:28:16 -08:00
6683a9e53a import pages: add wiki_raw to payload, misc fixes 2025-12-02 01:25:28 -08:00
5edcf6473a cleanup: remove unused CharacterImagesSection, tweak metadata 2025-12-02 01:25:23 -08:00
38762c8946 add image download buttons to detail scaffold 2025-12-02 01:25:18 -08:00
2771e202cb add CopyableText component for raw data tab 2025-12-02 01:25:14 -08:00
dea02ef359 fix ougiRatio display - access nested object properties 2025-12-02 01:24:57 -08:00
da26645df0 add DatePicker component with type='date' support 2025-12-02 01:24:36 -08:00
64e50e1b50 add batch import button to database index pages 2025-12-02 00:08:47 -08:00
1ea0eee86c add suggestion props to all database section components 2025-12-01 23:52:06 -08:00
bba78d5781 feat: add suggestion UI components for batch import
- SuggestionBadge: sparkle icon with tooltip for accept/dismiss actions
- SuggestionDetailItem: detail item wrapper with suggestion badge support
- TabbedEntitySelector: entity image grid for batch selection

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 23:43:56 -08:00
b28ba551de add batch preview adapter methods 2025-12-01 23:40:55 -08:00
1cbcd91f94 entity adapter: add raw data fetch methods 2025-12-01 09:54:39 -08:00
be75fcbcbd database detail pages: add Info/Images/Raw tabs 2025-12-01 09:54:35 -08:00
395a5c166f SegmentedControl: add size prop (default/small) 2025-12-01 09:54:06 -08:00
7a57680ec1 use ElementLabel/ProficiencyLabel, show all fields in detail pages 2025-12-01 08:35:34 -08:00
371cb7d102 fix: use camelCase granblueId in view mode 2025-12-01 08:35:30 -08:00
20705cc3b2 SegmentedControl: only fire onValueChange on actual changes
Prevents onValueChange from firing during initialization, which
caused pushState errors before router was ready.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 05:02:56 -08:00
83b18645c8 fix: guard pushState until router is initialized 2025-12-01 04:59:16 -08:00
4fda863339 fix: use pushState + popstate for instant tab switching 2025-12-01 04:57:22 -08:00
21bda28910 fix: always use explicit tab path in URL 2025-12-01 04:36:17 -08:00
5063e8e73c fix: use goto() instead of pushState for tab URL sync 2025-12-01 04:33:28 -08:00
af27f0fbbc add URL-based tab routing with pushState sync 2025-12-01 04:29:21 -08:00
5b0d41a020 move teams/[id] route into [[tab=tab]] optional segment 2025-12-01 04:27:42 -08:00
a9dcbd18f8 DetailItem: adjust padding and remove hover styles 2025-12-01 04:11:22 -08:00
068d9f0991 weapons: auto-update max level/skill based on uncap 2025-12-01 04:10:45 -08:00
dea8a3bc24 weapons: move extra/limit/ax to taxonomy, fix uncap stars 2025-12-01 04:10:41 -08:00
c2b2de9e96 TagInput: add contained prop with max-width 2025-12-01 04:10:36 -08:00
179cc13725 adapters: add update methods for characters, weapons, and summons
Add updateCharacter(), updateSummon(), and updateWeapon() methods to
entity adapter. Each method uses PATCH and clears the entity cache
after successful update.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 03:24:15 -08:00
7a86790670 weapons: add recruits character search field
Add CharacterTypeahead component for async character search using Svelecte.
The component debounces input and queries the search API for matching
characters. Added recruits field to weapon creation page.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 03:17:17 -08:00
0d0163edec characters: add nicknames to creation page
Backfill nicknames support to character creation page:
- Add nicknamesEn and nicknamesJp fields to editData
- Import and use TagInput component for nickname entry
- Add nicknames section to form UI
- Update CreateCharacterPayload interface with nickname fields

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 03:10:31 -08:00
fdc50906dc weapons: add creation page and update section components
Create /database/weapons/new route with full weapon creation form:
- Granblue ID validation
- Basic info (name, rarity)
- Uncap settings with cascade logic (Transcendence → ULB → FLB)
- Taxonomy (element, proficiency, series, new_series)
- Stats (HP/ATK with FLB/ULB variants)
- Caps (max_level, max_skill_level, max_awakening_level)
- Nicknames via TagInput
- Dates and external links

Update section components:
- WeaponUncapSection: Add cascade logic, extra/limit/ax fields
- WeaponTaxonomySection: Add series dropdowns with options
- WeaponStatsSection: Add ULB stats, caps section

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 03:08:52 -08:00
901fd5a157 weapons: add frontend adapter methods and interfaces
Add weapon creation infrastructure to entity adapter:
- WeaponValidationResult interface for validation response
- CreateWeaponPayload interface for weapon creation
- WeaponDownloadStatus interface for download status
- validateWeaponGranblueId() method
- createWeapon() method
- downloadWeaponImages() method
- getWeaponDownloadStatus() method

Also add getWeaponSeriesOptions() utility function.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 03:06:04 -08:00
1fa6429749 summons: add creation page and section components
- /database/summons/new route with full form
- UncapSection with FLB/ULB/Transcendence cascade
- TaxonomySection with element and series
- StatsSection with HP/ATK at all uncap levels
- Nicknames via TagInput component
- getSummonMaxUncapLevel() utility function

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 03:00:58 -08:00
4973643ee6 entity adapter: add summon creation methods
- SummonValidationResult, CreateSummonPayload, SummonDownloadStatus types
- validateSummonGranblueId(), createSummon(), downloadSummonImages(), getSummonDownloadStatus()
- Matches character creation pattern

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 02:44:45 -08:00
fbe43490d7 ui: add TagInput component for nicknames
- Chip/tag style input for string arrays
- Add/remove tags with Enter or comma
- Backspace removes last tag when input empty
- Supports label, error, maxTags, disabled

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 02:43:44 -08:00
39b1ed9f64 nav: context-aware New button for database routes
- Show "New character/weapon/summon" pill button on database pages
- Keep existing circular + button for team creation elsewhere

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 02:27:47 -08:00
43c291327c components: use centralized image URL helpers 2025-12-01 02:26:29 -08:00
e9463ae5ba api config: add getImageBaseUrl, fix api path for prod/dev 2025-12-01 02:26:16 -08:00
19a2b9e77f utils: use getBasePath for image URLs 2025-12-01 02:26:08 -08:00
220432b40a entity adapter: expand CreateCharacterPayload with all fields 2025-12-01 02:25:52 -08:00
754d5a633c new character page: add all fields, uncap cascade logic, validation 2025-12-01 02:25:46 -08:00
28ad2fb37e DetailItem: add sublabel, width, onchange props; Input: add validation state 2025-12-01 02:25:41 -08:00
e9ba90d656 add image download section to character edit page
- new CharacterImagesSection component
- download button with progress polling
- force re-download option
- status display with progress bar
2025-12-01 00:57:03 -08:00
5f5b579ff0 add /database/characters/new page + API methods
- new page with granblue_id validation
- role check (>= 7) on server
- API methods: validate, create, download images
- permanent edit mode with create button
2025-12-01 00:55:53 -08:00
b58cbbe72f refactor character edit page to use section components
- use DetailScaffold wrapper
- extract metadata, uncap, taxonomy, stats sections
- standardize field naming (camelCase)
- add element-themed checkboxes
2025-12-01 00:52:12 -08:00
1024e155c3 fix button: no translate on circular, fix elemental hover colors 2025-12-01 00:22:52 -08:00
a262388fc7 fix api path for prod (/v1) vs dev (/api/v1) 2025-11-30 23:34:32 -08:00
d412e760ab nav: show register/login when logged out, move guides/collection to menu 2025-11-30 23:16:04 -08:00
7e02884941 input: add no1password prop, tweak counter styling 2025-11-30 23:16:00 -08:00
f79e3f2a10 update auth store redirect to /auth/login 2025-11-30 22:29:08 -08:00
a1bcb0e523 update Navigation login link to /auth/login 2025-11-30 22:29:08 -08:00
06dd832ada add AuthCard component for auth pages 2025-11-30 22:26:25 -08:00
33fa9f9c9c reset fieldset border/padding/margin in Input component 2025-11-30 22:26:25 -08:00
af659b9760 components: update party and character components 2025-11-30 20:06:44 -08:00
c3ed9b2885 api: update entity adapter and queries 2025-11-30 20:06:40 -08:00
db5bfe9f7f sidebar: remove unused modification components 2025-11-30 20:06:36 -08:00
a858877545 sidebar: refactor details components 2025-11-30 20:06:31 -08:00
47885b1429 sidebar: wire up edit sidebars in openDetailsSidebar feature 2025-11-30 20:06:26 -08:00
8ac9dea2d3 sidebar: add EditCharacterSidebar and EditWeaponSidebar 2025-11-30 20:06:21 -08:00
4f132f9947 sidebar: add edit form components for character/weapon modifications 2025-11-30 20:06:15 -08:00
ad10d3fe73 stores: add partyStore for character/weapon updates 2025-11-30 20:06:09 -08:00
393bbdbcb0 sidebar: add MasteryRow component for rings/earring selects 2025-11-30 20:06:04 -08:00
5784b9638d sidebar: add DetailRow and DetailsSection components 2025-11-30 20:05:59 -08:00
c0dc3d0bc1 utils: update grid helpers and modification utilities 2025-11-30 20:05:54 -08:00
8bfa31d925 types: add NO_AWAKENING sentinel and update entity types 2025-11-30 20:05:50 -08:00
c1974c1d40 data: add ax skill definitions 2025-11-30 20:05:46 -08:00
f815ca4f30 ui: update Input, Select, Button, Sidebar components 2025-11-30 20:05:42 -08:00
5df563198b fix: render related characters 2025-11-30 14:57:43 -08:00
d5a22baa0a use Checkbox component in database edit pages with element theming 2025-11-30 13:59:45 -08:00
b8ad70229d fix database dropdown item rendering 2025-11-30 13:59:40 -08:00
3007aadbb0 sync pictureData with available profile images 2025-11-30 06:02:56 -08:00
7406f80edd use contained selects in settings modal 2025-11-30 06:02:56 -08:00
92e93309bf add typeahead component 2025-11-30 06:02:56 -08:00
66b03c9108 fix dropdown trigger props, add onClose alias to sidebar 2025-11-30 06:02:50 -08:00
fcc0a884f5 fix icon color inheritance, tweak select chevron 2025-11-30 06:02:50 -08:00
bc67d22c4b checkbox and switch theming with hover states 2025-11-30 06:02:50 -08:00
5e77bb3093 feat: add weapon series utility and i18n messages 2025-11-30 02:32:07 -08:00
8b078cdfd8 feat: add conflict dialog for duplicate characters/weapons 2025-11-30 02:32:03 -08:00
ff7199fbbb fix: add is-active state to weapon and summon units 2025-11-30 02:31:58 -08:00
d51fe03905 fix: character slot selection glow and empty protagonist
- character grid starts at position 1 (skip protagonist)
- add isEmptySelected state for glow on empty slots
- empty protagonist shows relief.png background only
2025-11-30 02:31:48 -08:00
18328e2d38 fix: party mutation parameter types
- favorite/unfavorite take shortcode string directly
- delete takes {id, shortcode} since API expects UUID
- remix takes shortcode string directly
- update spreads updates at top level
2025-11-30 02:31:42 -08:00
f346a73b61 fix: handle 204 No Content responses in base adapter 2025-11-30 02:31:37 -08:00
2275daec61 fix: PartySegmentedControl rep components now update reactively
The WeaponRep (and other rep components) weren't visually updating when
new items were added to the party. The issue was that Svelte's reactivity
wasn't properly propagating through the {#each} blocks.

Changes:
- PartySegmentedControl: Add derived values for party sub-properties to
  ensure reactivity propagates through snippet boundaries
- WeaponRep: Pre-compute rows as explicit $derived value and use keyed
  {#each} blocks for proper change detection

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 00:23:44 -08:00
f457343e26
Complete TanStack Query v6 migration (#445)
## Overview

Complete migration from service layer to TanStack Query v6 with
mutations, queries, and automatic cache management.

## What Was Completed

### Phase 1: Entity Queries & Database Pages 
- Created `entity.queries.ts` with query options for weapons,
characters, and summons
- Migrated all database detail pages to use TanStack Query with
`withInitialData()` pattern
- SSR with client-side hydration working correctly

### Phase 2: Server Load Cleanup 
- Removed PartyService dependency from teams detail server load
- Server loads now use adapters directly instead of service layer
- Cleaner separation of concerns

### Phase 3: Party.svelte Refactoring 
- Removed all PartyService, GridService, and ConflictService
dependencies
- Migrated to TanStack Query mutations for all operations:
  - Grid operations: create, update, delete, swap, move
  - Party operations: update, delete, remix, favorite, unfavorite
- Added swap/move mutations for drag-and-drop operations
- Automatic cache invalidation and query refetching

### Phase 4: Service Layer Removal 
- Deleted all service layer files (~1,345 lines removed):
  - `party.service.ts` (620 lines)
  - `grid.service.ts` (450 lines)
  - `conflict.service.ts` (120 lines)
  - `gridOperations.ts` (unused utility)
- Deleted empty `services/` directory
- Created utility functions for cross-cutting concerns:
  - `localId.ts`: Anonymous user local ID management
  - `editKeys.ts`: Edit key management for anonymous editing
  - `party-context.ts`: Extracted PartyContext type

### Phase 5: /teams/new Migration 
- Migrated party creation wizard to use TanStack Query mutations
- Replaced all direct adapter calls with mutations (7 locations)
- Maintains existing behavior and flow
- Automatic cache invalidation for newly created parties

## Benefits

### Performance
- Automatic request deduplication
- Better cache utilization across pages
- Background refetching for fresh data
- Optimistic updates for instant UI feedback

### Developer Experience
- Single source of truth for data fetching
- Consistent patterns across entire app
- Query devtools for debugging
- Less boilerplate code

### Code Quality
- ~1,088 net lines removed
- Simpler mental model (no service layer)
- Better TypeScript inference
- Easier to test

### Architecture
- **100% TanStack Query coverage** - no service layer, no direct adapter
calls
- Clear separation: UI ← Queries/Mutations ← Adapters ← API
- Automatic cache management
- Consistent mutation patterns everywhere

## Testing

All features verified:
- Party creation (anonymous & authenticated)
- Grid operations (add, remove, update, swap, move)
- Party operations (update, delete, remix, favorite)
- Cache invalidation across tabs
- Error handling and rollback
- SSR with hydration

## Files Modified

### Created (3)
- `src/lib/types/party-context.ts`
- `src/lib/utils/editKeys.ts`
- `src/lib/utils/localId.ts`

### Deleted (4)
- `src/lib/services/party.service.ts`
- `src/lib/services/grid.service.ts`
- `src/lib/services/conflict.service.ts`
- `src/lib/utils/gridOperations.ts`

### Modified (13)
- `src/lib/api/mutations/grid.mutations.ts`
- `src/lib/components/grids/CharacterGrid.svelte`
- `src/lib/components/grids/SummonGrid.svelte`
- `src/lib/components/grids/WeaponGrid.svelte`
- `src/lib/components/party/Party.svelte`
- `src/routes/teams/new/+page.svelte`
- Database entity pages (characters, weapons, summons)
- Other supporting files

## Migration Complete

This PR completes the TanStack Query migration. The entire application
now uses TanStack Query v6 for all data fetching and mutations, with
zero remaining service layer code.

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-29 22:32:15 -08:00
6ad3b65f7f chore: remove unused resource pattern files (Phase 3)
removed ~27kb of completely unused code:
- search.resource.svelte.ts and test (custom query pattern)
- party.resource.svelte.ts (deprecated, unused)
- job.resource.svelte.ts (unused)
- CLEANUP_PLAN.md (outdated)

all functionality replaced by TanStack Query patterns in phases 1 & 2
2025-11-29 03:39:50 -08:00
149f30c538
Make parties more DRY (#444)
We extracted utility functions from the Party.svelte component in order
to make things more DRY.
2025-11-29 03:29:28 -08:00
devin-ai-integration[bot]
f9bb43f214
feat: migrate components to TanStack Query v6 (Phase 2) (#442)
# feat: migrate components to TanStack Query v6 (Phase 2)

## Summary

This PR migrates 4 components from the custom
`createInfiniteScrollResource` pattern to TanStack Query v6's
`createInfiniteQuery`:

- **JobSkillSelectionSidebar** - Job skill search with infinite scroll
and category filtering
- **SearchContent** - Search modal for weapons/characters/summons with
element/rarity/proficiency filters
- **User Profile Page** (`[username]/+page.svelte`) - User's teams and
favorites with tab switching
- **Teams Explore Page** (`teams/explore/+page.svelte`) - Public teams
listing

All components now use:
- TanStack Query v6 infinite query pattern with thunk for reactivity
- `IsInViewport` from runed for intersection-based infinite scroll
- Debounced search (debounce the value, not the query)
- Proper loading, error, and empty states
- SSR integration with `initialData` pattern

## Updates since last revision

- **Fixed duplicate key error in SearchContent.svelte** - The API can
return the same item across multiple pages during infinite scroll (e.g.,
due to items being added/removed between page fetches). This caused
Svelte's keyed each block to throw `each_key_duplicate` errors. Fixed by
deduplicating results by `id` using a Map before rendering.

## Review & Testing Checklist for Human

This is a medium-risk change affecting core user-facing pages. Please
verify:

- [ ] **Infinite scroll works on all 4 pages** - Scroll to bottom and
verify more items load automatically
- [ ] **No duplicate items appear in search results** - After the fix,
scrolling through many pages of search results should not show
duplicates
- [ ] **SSR hydration** - Verify no flash of loading state on initial
page load (data should be pre-rendered)
- [ ] **User profile tab switching** - Test switching between "Teams"
and "Favorites" tabs; verify correct data loads
- [ ] **Search debouncing** - Type quickly in JobSkillSelectionSidebar
and SearchContent; verify queries aren't fired on every keystroke
- [ ] **Error states** - Simulate network failure and verify retry
button works

**Recommended Test Plan:**
1. Navigate to `/teams/explore` - verify teams load and infinite scroll
works
2. Navigate to a user profile page - verify teams load, switch to
favorites tab, verify favorites load
3. Open the search sidebar - search for weapons/characters/summons,
scroll through many pages, verify no duplicate key errors and no
duplicate items
4. Open job skill selection - search and filter skills, verify results

### Notes

- The Party component mutations migration (Follow-Up Prompt 5) was
deferred to a follow-up PR due to complexity
- Deprecated resource classes remain in codebase for now; removal
planned for separate PR
- Pre-existing paraglide module errors in build are unrelated to this PR
- Type assertions (`as unknown as`, `as any`) are used to handle
different query result structures between favorites and parties queries

**Link to Devin run:**
https://app.devin.ai/sessions/5aa7ea29edf34f569f95f13acee9e0d9
**Requested by:** Justin Edmund (justin@jedmund.com) / @jedmund

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Justin Edmund <justin@jedmund.com>
2025-11-29 01:11:24 -08:00
devin-ai-integration[bot]
5764161803
feat: add TanStack Query v6 integration with SSR support (#441)
## Summary

This PR establishes the foundation for migrating from custom Svelte 5
resource classes to TanStack Query v6 for server state management. It
adds:

**Query Options Factories** (in `src/lib/api/queries/`):
- `party.queries.ts` - Party fetching with infinite scroll support
- `job.queries.ts` - Job and skill queries with pagination
- `user.queries.ts` - User profile, parties, and favorites queries

**Mutation Configurations** (in `src/lib/api/mutations/`):
- `party.mutations.ts` - Party CRUD with cache invalidation
- `grid.mutations.ts` - Weapon/character/summon mutations with
optimistic updates
- `job.mutations.ts` - Job and skill update mutations

**Deprecation Notices**:
- Added `@deprecated` JSDoc to `search.resource.svelte.ts` and
`party.resource.svelte.ts` with migration examples

**SSR Integration** (Phase 4):
- Created `+layout.ts` to initialize QueryClient for SSR support
- Updated `+layout.svelte` to receive QueryClient from load function
- Added SSR utilities in `src/lib/query/ssr.ts`:
  - `withInitialData()` - for pages using +page.server.ts
- `prefetchQuery()` / `prefetchInfiniteQuery()` - for pages using
+page.ts
  - `setQueryData()` - for direct cache population
- Added documentation in `src/lib/query/README.md`

**Component Wiring Examples** (Phase 5):
- `JobSelectionSidebar.svelte` - Migrated from `createJobResource()` to
`createQuery(() => jobQueries.list())`. Demonstrates client-side query
pattern with automatic loading/error states.
- `teams/[id]/+page.svelte` - Added `withInitialData()` pattern for SSR
integration. Server-fetched party data is used as initial cache value
with background refetching support.

**Migration Guide**:
- Added `src/lib/query/MIGRATION.md` with follow-up prompts for
remaining component migrations (JobSkillSelectionSidebar, search modal,
user profile, teams explore, Party mutations, resource class removal)

## Updates Since Last Revision

Fixed TypeScript type errors in the TanStack Query integration:
- `party.queries.ts`: Made `total` and `perPage` optional in
`PartyPageResult` interface to match adapter return type
- `ssr.ts`: Fixed `withInitialData` to properly handle null values using
`NonNullable<TData>` return type
- `job.mutations.ts`: Fixed slot indexing by casting through `unknown`
to `keyof typeof updatedSkills`

Type checks now pass for all files modified in this PR (16 remaining
errors are pre-existing project issues unrelated to this PR - paraglide
modules not generated, hooks.ts implicit anys).

## Review & Testing Checklist for Human

- [ ] **Verify app loads correctly**: The `+layout.ts` and
`+layout.svelte` changes are critical path - confirm the app still
renders
- [ ] **Test JobSelectionSidebar**: Open job selection sidebar and
verify jobs load correctly, search/filter works, and retry button works
on error
- [ ] **Test teams/[id] page**: Navigate to a party detail page and
verify it renders without loading flash (SSR data should be immediate)
- [ ] **Review type casts**: Check `job.mutations.ts:135` - the `as
unknown as keyof typeof` cast for slot indexing is a workaround for
jobSkills having string literal keys ('0', '1', '2', '3') while slot is
a number
- [ ] **Verify withInitialData behavior**: The `NonNullable<TData>`
return type change in `ssr.ts` should work correctly with `data.party`
which can be `Party | null`

**Recommended test plan**: 
1. Run `pnpm install` to ensure dependencies are up to date
2. Start dev server and verify the app loads without errors
3. Navigate to a party detail page (`/teams/[shortcode]`) - should
render immediately without loading state
4. Open job selection sidebar (click job icon on a party you can edit) -
verify jobs load and filtering works
5. Test error handling by temporarily breaking network - verify retry
button appears

### Notes


- Pre-existing project issues remain (paraglide modules not generated,
hooks.ts implicit anys) - these are unrelated to this PR
- Local testing could not run due to missing node_modules (vite not
found) - project setup issue
- TanStack Query devtools installation was skipped due to Storybook
version conflicts
- The existing `search.queries.ts` file was used as the pattern
reference for new query factories
- SSR approach uses hybrid pattern: existing `+page.server.ts` files
work with `withInitialData()`, while new pages can use `prefetchQuery()`
in `+page.ts`
- Migration guide includes 6 follow-up prompts for completing the
remaining component migrations

**Link to Devin run**:
https://app.devin.ai/sessions/33e97a98ae3e415aa4dc35378cad3a2b
**Requested by**: Justin Edmund (justin@jedmund.com) / @jedmund

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Justin Edmund <justin@jedmund.com>
2025-11-29 00:36:59 -08:00
53405da7eb refactor: improve grid service type safety (partial Phase 3.2)
- Created GridItemData type (GridWeapon | GridSummon | GridCharacter)
- Typed GridOperation.data field with GridItemData instead of any
- Typed draggedItem and targetItem parameters with object shapes
- Made targetPosition flexible (number | string) for swaps/moves
- Added type guard for move operation to ensure type safety

Partial implementation of Phase 3.2 - reduced any usages in grid operations.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 21:51:44 -08:00
3b2782ec89 refactor: consolidate Awakening type definition
Phase 3.1: Remove duplicate Awakening interface
- Removed unused src/lib/types/Awakening.d.ts
- Using entities.ts as single source of truth for Awakening type
- Awakening now properly uses LocalizedName interface
- No breaking changes (unused file had zero imports)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 21:48:21 -08:00
271dcb3c81 refactor: add wx-svelte-grid Cell type for database cells
Phase 2.2: Add proper type definitions for wx-svelte-grid
- Created Cell interface export in wx-svelte-grid declarations
- Updated all 9 database cell components to use Cell type
- Removed custom Props interfaces with loose IRow typing
- Improved IntelliSense support for grid component props

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 21:46:48 -08:00
c074ea8bda refactor: unify visibility types to string literals
Changed from numeric (0/1/2) to string literals ('public'/'private'/'unlisted')
- Created PartyVisibility type with const assertion
- Updated Party and PartyPreview interfaces
- Updated PartyUpdatePayload interface
- Updated Zod schemas for validation
- Updated test mocks to use string literals
- Added deprecated conversion helpers for backward compat

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 21:43:55 -08:00
ca16ca145b refactor: remove type assertions in component props
- create proper UncapStarProps and TranscendenceStarProps interfaces
- use discriminated union for StarRender type
- add function overloads for createStarProps with type safety
- remove 'as any' casts from star component spreading
- remove optionalProps workaround in SegmentedControl
- stop spreading HTMLAttributes to RadioGroupPrimitive (not supported)
2025-11-28 21:40:08 -08:00
654eabbeba fix: third-party library type issues
- remove unsupported class prop from bits-ui SelectPrimitive.Root
- add type assertion for RadioGroupPrimitive spread props (as any)
- remove wx-svelte-grid Cell import (not exported)
- simplify LastUpdatedCell props with index signature for grid props
2025-11-28 21:05:00 -08:00
009758a997 fix: API adapters and type mapping
- transform job skills pagination meta to include page/perPage
- fix UserInfo avatar type (optional properties -> required when present)
- add visibility number-to-string mapping in party service (0=public, 1=private, 2=unlisted)
- change mapToApiPayload return type from Partial<Party> to CreatePartyParams
- fix raid/job mapping to use IDs instead of nested objects
- add generic type argument to RestDataProvider<any>
- add type assertion in optionalProps (value as T[keyof T])
2025-11-28 21:04:51 -08:00
073bed01d3 fix: component props and type assertions
- make UncapIndicator StarRender props optional for transcendence stars
- add type assertion for star props spreading (as any)
- fix element name type (string -> literal union with type assertion)
- fix PartySegmentedControl props (value/onValueChange -> selectedTab/onTabChange)
- remove userGender prop (component gets it from context)
- add type assertions for ResourceType and ImageVariant comparisons
- add required id/shortcode to Party object in teams/new
- fix auth hooks expiresAt (undefined -> empty string default)
- add type assertion for Select value binding (excludes null/boolean)
2025-11-28 21:04:39 -08:00
c821873ac6 fix: test fixtures and awakening type issues
- remove recruits property from Character test mock (doesn't exist in type)
- add missing subaura property to Summon test mocks
- consolidate Awakening imports to use entities source
- make awakening type/level optional in GridWeapon/GridSummon
- fix null handling in AwakeningDisplay (null -> undefined)
2025-11-28 21:04:26 -08:00
6dc10ce414 fix: Phase 8 - fix test fixture and adapter issues (24 -> 22 errors)
Fixed remaining test mock data to match actual type schemas.

Changes:
1. entity.adapter.test.ts:
   - Removed invalid maxLevel property from Character mock
   - Character interface doesn't have maxLevel

2. grid.adapter.test.ts:
   - Added missing required properties to Weapon mock:
     - maxSkillLevel: 15
     - maxAwakeningLevel: 5
     - ax: true
     - axType: 1
   - Removed invalid series property from Summon mock
     - Summon interface doesn't have series property

3. settings/+page.svelte:
   - Fixed users.update call (removed extra fetch parameter)

All test mocks now match their corresponding type definitions from
entities.ts, ensuring tests can compile and run correctly.

Result: 24 → 22 errors (-2)

Overall progress: 53 → 22 errors (58% reduction)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 20:07:34 -08:00
e0810781f4 fix: Phase 7d - fix null/undefined handling (28 -> 24 errors)
Fixed multiple null/undefined type errors by adding proper null checks
and default values.

Changes:
1. CharacterRep.svelte:
   - Changed import from '$lib/types/enums' to '$lib/utils/element'
   - getElementClass in utils/element accepts undefined, enums version doesn't

2. ItemHeader.svelte:
   - Convert null to undefined for gridUncapLevel and gridTranscendence
   - getCharacterPose expects 'number | undefined', not 'number | null | undefined'

3. UncapStatusDisplay.svelte:
   - Added null coalescing for transcendenceStep check
   - Changed from `transcendenceStep > 0` to `(transcendenceStep ?? 0) > 0`

4. base.adapter.ts:
   - Provide default no-op function for optional onError callback
   - Required<AdapterOptions> needs all properties defined

Result: 28 → 24 errors (-4)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 20:04:02 -08:00
9fb2e2485d fix: Phase 7c - fix Touch/drag-drop types (32 -> 28 errors)
Fixed TypeScript errors where custom drag data was being stored on the
native Touch type, which doesn't allow extension.

The issue: `currentTouch` was typed as `Touch | null` but the code was
trying to store custom properties (item, source, type) on it for pending
drag operations initiated by mouse pointer events.

The fix: Created a new `PendingDragData` interface to properly type the
custom drag data being stored for mouse events.

Changes:
- src/lib/composables/drag-drop.svelte.ts:
  - Added PendingDragData interface with item, source, type
  - Changed TouchState.currentTouch from `Touch | null` to `PendingDragData | null`
  - This allows storing pending drag data without conflicting with native Touch type

Result: 32 → 28 errors (-4)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 20:01:46 -08:00
c2329c2f7f fix: Phase 7b - suppress MSW optional dependency errors (34 -> 32 errors)
Fixed TypeScript errors for optional MSW (Mock Service Worker) test dependency.

MSW is intentionally optional - tests work with or without it. The dynamic
imports are wrapped in try-catch to gracefully handle when MSW is not installed.

Added @ts-expect-error comments to suppress TypeScript module resolution errors
for the optional dynamic imports, while maintaining the runtime fallback behavior.

Changes:
- src/lib/api/adapters/test-setup.ts:
  - Added @ts-expect-error for 'msw/node' dynamic import
  - Added @ts-expect-error for 'msw' dynamic import
  - Preserves optional dependency pattern

Result: 34 → 32 errors (-2)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 19:56:51 -08:00
e23276b4de fix: Phase 7 partial - fix test mock data errors (36 -> 34 errors)
Fixed multiple test fixture type errors to match actual schema definitions.

Changes:
1. Removed leftover optionalProps() call in users.ts (missed in Phase 2)
2. Fixed Character race field in entity.adapter.test.ts
   - Changed from object {race1, race2} to array [1, 2]
   - Matches entity.adapter.ts Character interface expectation
3. Added missing ULB stat fields to Weapon mocks in grid.adapter.test.ts
   - Added maxHpUlb and maxAtkUlb to hp/atk objects
   - Required by entities.ts Weapon interface

Result: 36 → 34 errors (-2)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 19:55:52 -08:00
aa87ccb7d7 fix: Phase 6 - fix ImageVariant type export (37 -> 36 errors)
Fixed TypeScript error where ImageVariant type wasn't accessible in the
same file that re-exported it.

The issue: Re-exporting a type with `export type { X } from 'module'`
doesn't create a local binding that can be used in the same file.

The fix: Import the type first to create a local binding, then re-export it.

Changes:
- src/lib/features/database/detail/image.ts:
  - Added: import type { ResourceType, ImageVariant } from '$lib/utils/images'
  - Kept: export type { ResourceType as ResourceKind, ImageVariant }
  - This allows ImageVariant to be used in the ImageArgs interface below

Result: 37 → 36 errors (-1)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 19:52:02 -08:00
ebc0e48e92 fix: Phase 5 - fix environment variable imports (38 -> 37 errors)
Resolved PUBLIC_SIERO_OAUTH_URL import issue by removing the intermediate
config.ts file and importing environment variables directly where needed.

Changes:
- Removed src/lib/config.ts (unnecessary abstraction layer)
- Updated src/lib/auth/oauth.ts to import PUBLIC_SIERO_API_URL directly
- Updated src/routes/auth/refresh/+server.ts to import directly
- Construct OAUTH_BASE locally as `${PUBLIC_SIERO_API_URL}/oauth`

This fixes the TypeScript error where svelte-check couldn't resolve
PUBLIC_SIERO_OAUTH_URL from the config file, even though the variable
was properly defined in .env and .svelte-kit/ambient.d.ts.

Result: 38 → 37 errors (-1)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 19:33:15 -08:00
7caa34452f fix: Phase 4 - fix test fixture type errors (42 -> 38 errors)
Fixed all test fixture mock data to match actual type definitions across
4 test files. Resolved 9 distinct type errors by correcting mock object
structures.

Files modified:
- entity.adapter.test.ts: Fixed Character mock to use nested hp/atk objects
- grid.adapter.test.ts: Fixed GridWeapon/GridCharacter/GridSummon mocks
  - Added proper entity objects (mockWeapon, mockCharacter, mockSummon)
  - Fixed transcendenceStage -> transcendenceStep
  - Removed invalid partyId/weaponId/characterId/summonId properties
- party.adapter.test.ts: Fixed Party mock
  - Changed visibility from 'public' string to 0 number
  - Removed invalid skills array from Job object
  - Added complete RaidGroup with all required properties
- user.adapter.test.ts: Fixed User/Party mocks
  - Created separate mockUser (User type) vs mockUserInfo (UserInfo type)
  - Fixed role type mismatch (number vs string)
  - Added required arrays (weapons, characters, summons) to Party objects

Result: 42 → 38 errors (-4)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 19:29:53 -08:00
45b51d8880 fix: Phase 3 - fix adapter type issues (43 -> 42 errors)
Fixed three key type definition issues in the adapter layer:

1. Added missing element property to Party interface
   - Added `element?: number` to Party type
   - Used throughout codebase but was missing from interface

2. Aligned onError callback types for consistency
   - Changed ResourceOptions.onError from Error to AdapterError
   - Now matches AdapterOptions.onError type signature

3. Exported Grid types from grid.adapter.ts
   - Re-exported GridWeapon, GridCharacter, GridSummon
   - Makes types available for test files

Files modified:
- src/lib/types/api/party.ts: Added element property
- src/lib/api/adapters/types.ts: Fixed onError callback type
- src/lib/api/adapters/grid.adapter.ts: Added type re-exports

Result: 43 → 42 errors (-1)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 19:25:23 -08:00
5d98bba30c fix: Phase 2 - remove optionalProps() shim misuse (45 -> 43 errors)
Removed inappropriate use of optionalProps() type shim from our own
codebase where we control the types. Type shims should only be used
for third-party library incompatibilities.

Files modified:
- base.adapter.ts: Removed shim from RequestOptions spreading
- grid.service.ts: Removed 3 usages from update methods
- party.service.ts: Removed import
- users.ts: Removed import and usage
- UserSettingsModal.svelte: Direct object construction
- drag-drop.svelte.ts: Direct object for DragOperation.target

Result: 45 → 43 errors (-2)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 19:23:14 -08:00
365f84fae1 fix: improve users.ts avatar object handling
- Build avatar object separately with proper types before assignment
- Apply optionalProps before passing to updateProfile

This maintains 53 errors (65% reduction from original 151).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 18:57:01 -08:00
36e2916dea fix: add undefined to Button Props interface
- Add | undefined to all optional properties in Button Props interface
- This fixes 4 type errors related to Button component usage with exactOptionalPropertyTypes

Reduces errors from 57 to 53 (65% reduction from original 151).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 18:56:08 -08:00
a88dd89873 fix: resolve component prop exactOptionalPropertyTypes issues
- Add | undefined to DropZone Props interface (item, canDrop, onDrop)
- Fix users.ts by properly typing updates object with | undefined
- Apply optionalProps to SegmentedControl restProps spreading

Maintains 57 errors (some regressed, some fixed).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 18:55:03 -08:00
5dc207dc9c fix: add undefined to optional interface properties for exactOptionalPropertyTypes
- Update UserUpdateParams to include | undefined for all optional fields
- Add | undefined to CreatePartyParams and UpdatePartyParams interfaces
- Add | undefined to CreateGrid*Params interfaces (Weapon, Character, Summon)
- Transform UserUpdateParams to nested avatar structure in users.ts
- Remove unnecessary optionalProps wrappers (now handled by interface definitions)
- Fix TeamView awakening prop with conditional spreading

Reduces errors from 63 to 60.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 18:52:03 -08:00
84be6ea30f fix: resolve string undefined assignment errors
- Fix jobUtils proficiency type narrowing by storing intermediate values
- Add default empty string for openDescriptionSidebar title parameter
- Remove explicit undefined assignments in search resource tests

Reduces errors from 68 to 63.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 18:44:20 -08:00
a74653ee93 fix: apply exactOptionalPropertyTypes shims to adapters and services
- Add optionalProps shim to base.adapter.ts for RequestInit compatibility
- Apply optionalProps to UserSettingsModal updateData
- Use conditional spreading for Navigation Button element prop
- Apply optionalProps to drag-drop target object creation
- Apply optionalProps to party.service create/update methods
- Apply optionalProps to grid.service CRUD operations
- Fix transcendenceStage -> transcendenceStep typo in grid.service
- Update UserUpdateParams interface to include | undefined
- Update DragOperation interface properties to include | undefined

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 18:42:38 -08:00
16e24e337b fix: correct function signatures and remove redundant code
- DatabaseProvider.ts: Remove redundant normalizer check
  - Normalizer is applied by parent class, no need to apply twice
  - Fixes "Property 'normalizer' does not exist" error
- image.ts: Separate type and value exports for proper type resolution
- CharacterImageCell.svelte: Fix getCharacterImage parameter order
  - Changed (id, pose, variant) to (id, variant, pose)
- SearchContent.svelte: Fix getCharacterImage parameter order

Fixes ImageVariant type errors and property access errors.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 18:28:21 -08:00
b54ac91638 fix: correct type comparison errors
- jobUtils.ts: Remove string comparison for job.row (row is typed as number)
  - job.row === '1' comparison is always false, removed
- grid.service.ts: Fix swap operation to compare position with position
  - Changed i.id === operation.targetPosition to i.position === operation.targetPosition
  - targetPosition is a number (position), not a string (id)

Fixes "This comparison appears to be unintentional because the types have no overlap" errors.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 18:26:18 -08:00
b7aa0bf27b fix: handle optional properties with exactOptionalPropertyTypes
- errors.ts: Only assign retryAfter when defined, not undefined
- user.adapter.ts: Build UserProfileResponse conditionally
  - Only include optional properties (total, totalPages, perPage) when defined
  - Use intermediate variables to ensure type safety

Fixes exactOptionalPropertyTypes violations where `T | undefined` cannot be
assigned to optional property `prop?: T`.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 18:17:01 -08:00
bbaa5bf221 fix: add null/undefined guards for array access and navigation
- MasteryDisplay.svelte: Use optional chaining for split()[0] array access
  - formatRingStat().split('+')[0] -> split('+')[0]?.trim() ?? ''
  - formatEarringStat().split('+')[0] -> split('+')[0]?.trim() ?? ''
- TeamView.svelte: Same fix for formatAxSkill().split('+')[0]
- +layout.svelte: Add null guards for 'to' parameter and 'mainContent' in callback
  - Check !to before accessing to.url
  - Re-check !mainContent inside requestAnimationFrame callback

Fixes "Object is possibly 'undefined'" and "is possibly 'null'" errors with
noUncheckedIndexedAccess: true and strict null checks.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 18:15:09 -08:00
de73c1937e fix: correct function call argument counts
- party.service.ts: Remove invalid `headers` parameter from adapter calls
  - create(), update(), remix() methods don't accept headers parameter
- party.ts schema: Add key type to z.record() calls
  - z.record() requires 2 arguments: z.record(keySchema, valueSchema)

Fixes "Expected N arguments, but got M" errors.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 18:09:05 -08:00
2da99a7bf8 fix: add type annotations for implicit any parameters
- database/weapons/+page.svelte: Add types to template functions (nameObj, rarity)
- database/summons/+page.svelte: Add types to template functions (nameObj, rarity)
- JobSkillSlot.svelte: Add type annotations to snippet parameters (locked, skill, skillIconUrl, slot)
- BasicInfoSection.svelte: Add types to map callbacks (r, p)
- DatabaseProvider.ts: Add type to normalizer callback parameter (item)

Fixes "Parameter 'X' implicitly has an 'any' type" errors (12 instances fixed).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 18:07:34 -08:00
e52f6ef479 fix: consolidate WeaponKey type definition
- Update entities.ts WeaponKey to include all required fields (granblue_id, series, group, order)
- Use snake_case naming (granblue_id) to match API/database conventions
- Update modifiers.ts to import from entities.ts and use snake_case property
- Removes duplicate WeaponKey type and eliminates type conflicts

Fixes "Property 'granblueId' does not exist on type 'WeaponKey'" and type assignment errors.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 18:05:46 -08:00
c750f5b069 fix: add null guards for uncapLevel usage
- UncapIndicator.svelte: Use nullish coalescing for uncapLevel comparison
- UncapStatusDisplay.svelte: Guard uncapLevel in badge active checks

Fixes "'uncapLevel' is possibly 'null'" errors.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 18:05:39 -08:00
a748884faf fix: consolidate SearchResult type definition
- Remove duplicate generic SearchResult<T> from types.ts
- Export SearchResult from search.adapter.ts via index.ts
- Eliminates type conflict between two incompatible SearchResult definitions

This fixes "Type 'SearchResult' is not assignable to type 'SearchResult<any>'" errors.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 18:05:33 -08:00
a4b9e0e30a fix: bits-ui component type mismatches with exactOptionalPropertyTypes
- Select.svelte: Use conditional spreading for optional `disabled` prop and `value` prop
- Switch.svelte: Conditionally spread `name` and `value` props
- Segment/RepSegment: Remove HTMLButtonAttributes extension and handle disabled prop properly
- Replace inline `import('svelte').Snippet` with proper import statements

Fixes type errors where bits-ui prop types don't include explicit `undefined` for optional properties, which conflicts with `exactOptionalPropertyTypes: true`.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 18:05:27 -08:00
Devin AI
67eb624bfc fix: type errors cleanup (161 -> 130 errors)
- Fix Party.svelte: add null checks for existingChar/existingWeapon/existingSummon
- Fix DropdownItem.svelte: replace asChild with child snippet pattern for bits-ui v2
- Fix UncapStar.svelte, TranscendenceStar.svelte: tabIndex -> tabindex
- Fix Party.svelte, Navigation.svelte: remove asChild prop usage
- Fix images.ts: add | undefined to pose/element params for exactOptionalPropertyTypes
- Fix ItemHeader.svelte, UncapIndicator.svelte: accept number | null | undefined
- Fix GridRepCollection.svelte, GuidebookUnit.svelte: PartyView -> Party type
- Fix search.adapter.ts: add optional type property to SearchResult
- Update various Props interfaces for exactOptionalPropertyTypes compliance

Co-Authored-By: Justin Edmund <justin@jedmund.com>
2025-11-28 21:58:11 +00:00
Devin AI
791d0b52d0 fix: DetailScaffold.svelte optional props (162 -> 161 errors)
Co-Authored-By: Justin Edmund <justin@jedmund.com>
2025-11-28 21:23:03 +00:00
Devin AI
0d3aca286a fix: sidebar.svelte.ts Component type to accept any props (166 -> 163 errors)
Co-Authored-By: Justin Edmund <justin@jedmund.com>
2025-11-28 21:17:55 +00:00
Devin AI
3b89628e7e fix: Party.svelte editKey type (string | null -> string | undefined)
Co-Authored-By: Justin Edmund <justin@jedmund.com>
2025-11-28 21:15:37 +00:00
Devin AI
bcf69a0a96 fix: SearchSidebar.svelte params construction (175 -> 172 errors)
Co-Authored-By: Justin Edmund <justin@jedmund.com>
2025-11-28 21:12:31 +00:00
Devin AI
65f9ee041f fix: SearchSidebar.svelte granblue_id -> granblueId (177 -> 175 errors)
Co-Authored-By: Justin Edmund <justin@jedmund.com>
2025-11-28 21:11:14 +00:00
Devin AI
606fa91b93 fix: Party.svelte mainWeapon derived state (181 -> 177 errors)
Co-Authored-By: Justin Edmund <justin@jedmund.com>
2025-11-28 21:10:03 +00:00
Devin AI
6e735f08a3 fix: more type errors (191 -> 181 errors)
- Fix DetailItem.svelte to accept boolean and null values
- Fix proficiency access in database/characters/[id]/+page.svelte

Co-Authored-By: Justin Edmund <justin@jedmund.com>
2025-11-28 21:08:56 +00:00
Devin AI
cf7a036575 fix: type errors in svelte-main branch (219 -> 191 errors)
- Fix paraglide aliases in svelte.config.js
- Fix Checkbox.svelte: use indeterminate prop, remove restProps spread
- Fix Switch.svelte: simplify Props interface, remove restProps spread
- Fix Button.svelte: add null checks for icon prop
- Fix sidebar.svelte.ts: use explicit undefined types for exactOptionalPropertyTypes
- Fix Party.svelte: fix import extension, remove ConflictService argument
- Fix job.resource.svelte.ts: add error property to success states, fix groupJobsByTier null checks

Co-Authored-By: Justin Edmund <justin@jedmund.com>
2025-11-28 21:06:05 +00:00
Devin AI
cab0a84588 fix: type errors in svelte-main branch (372 -> 217 errors)
- Fix Button variant errors (outlined -> ghost, contained -> primary)
- Fix search.queries.ts import path and property names (snake_case -> camelCase)
- Fix PartyContext export from party.service.ts
- Fix User type missing avatar property
- Fix exactOptionalPropertyTypes violations in Unit components
- Fix MenuItems Props interface
- Fix RequestOptions, SearchParams, SearchFilters types
- Fix UpdateUncapParams type
- Fix Select.ItemIndicator and maxLength errors
- Fix Summon/Weapon hp/atk properties in entity.adapter.ts

Co-Authored-By: Justin Edmund <justin@jedmund.com>
2025-11-28 20:32:38 +00:00
Devin AI
dfbb1e4e48 fix: type errors and cleanup for svelte-main branch
- Fix RequestOptions cache type incompatibility in adapters/types.ts
- Add missing properties to Character type in entity.adapter.ts and entities.ts
- Create adapters index.ts for module exports
- Update users.ts to use userAdapter instead of removed core module
- Fix UserSettingsModal.svelte switch import and type errors
- Add type shims for wx-svelte-grid and $env/static/public
- Accept upstream versions for SearchSidebar.svelte and teams/new/+page.svelte
- Add CLEANUP_PLAN.md documenting remaining work

Reduces type errors from ~412 to ~378. See CLEANUP_PLAN.md for remaining fixes.

Co-Authored-By: Justin Edmund <justin@jedmund.com>
2025-11-28 20:08:10 +00:00
a208a3c1ea fix: merge conflict 2025-11-28 11:50:07 -08:00
devin-ai-integration[bot]
7a0e3b4f3d
Low-risk cleanup: unused imports, gitignore, auth types, test routes (#439)
## Summary

This PR performs low-risk cleanup tasks on the svelte-main branch:

1. **Remove unused imports** from `base.adapter.ts` - `snakeToCamel` and
`camelToSnake` were imported but never used
2. **Add `/.next` to `.gitignore`** - This is a SvelteKit project but
had a stale Next.js build artifact showing in git status
3. **Fix broken auth import** - `map.ts` was importing
`UserInfoResponse` from `$lib/api/resources/users` which never existed.
Created the type in `oauth.ts` based on actual usage in `buildCookies()`
4. **Remove test/example routes** - Deleted development scaffolding that
had no references elsewhere:
   - `src/lib/components/examples/SearchExample.svelte`
   - `src/routes/test-sidebar/+page.svelte`
   - `src/routes/test/drag-drop/+page.svelte`

## Review & Testing Checklist for Human

- [ ] **Verify `UserInfoResponse` type matches actual API response** - I
inferred the type from usage in `map.ts`, but haven't verified against
the actual `/users/info` endpoint response from hensei-api. Fields:
`id`, `username`, `role`, `avatar.picture`, `avatar.element`,
`language`, `gender`, `theme`
- [ ] **Confirm test routes are not needed** - These appeared to be dev
scaffolding with no code references, but verify they're not used in any
manual QA workflows
- [ ] **Test auth flow** - Login/signup should still work correctly with
the new type location

**Recommended test plan:** Log in to the app and verify user info
(avatar, language, theme preferences) loads correctly after
authentication.

### Notes

- The broken `$lib/api/resources/users` import was pre-existing (the
file never existed), not caused by the previous API layer cleanup PR
- Running `pnpm check` confirms the auth/map error is resolved;
remaining type errors are unrelated pre-existing issues

Link to Devin run:
https://app.devin.ai/sessions/611580bc2db94e20a48c3692d3cbd432
Requested by: Justin Edmund (justin@jedmund.com) / @jedmund

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Justin Edmund <justin@jedmund.com>
2025-11-28 11:21:24 -08:00
devin-ai-integration[bot]
9b54039a15
Remove legacy API layer (APIClient, core.ts, resources/) (#438)
# Remove legacy API layer (APIClient, core.ts, resources/)

## Summary

This PR consolidates the API layer by removing unused legacy code. The
codebase had two API patterns:
1. **Adapters layer** (`src/lib/api/adapters/`) - The newer, canonical
HTTP layer with retry logic, caching, and proper error handling
2. **Legacy layer** (`src/lib/api/client.ts`, `core.ts`, `resources/`) -
An older pattern using SvelteKit proxy endpoints that was no longer
imported anywhere

The legacy layer was confirmed unused via grep analysis. The only
exception was `transformResponse` and `transformRequest` functions in
`client.ts` which were still used by `BaseAdapter` and
`schemas/party.ts` - these have been moved to `schemas/transforms.ts`.

**Files deleted:**
- `src/lib/api/client.ts` (732 lines - APIClient class was dead code)
- `src/lib/api/core.ts` (helper functions, unused)
- `src/lib/api/index.ts` (empty file)
- `src/lib/api/resources/` directory (search.ts, weapons.ts,
characters.ts, summons.ts - all unused)

**Files modified:**
- `src/lib/api/schemas/transforms.ts` - Added `transformResponse`,
`transformRequest`, and their helper functions
- `src/lib/api/adapters/base.adapter.ts` - Updated import path
- `src/lib/api/schemas/party.ts` - Updated import path

## Review & Testing Checklist for Human

- [ ] **Verify transform functions work correctly** - The
`transformResponse` and `transformRequest` functions handle critical
data transformation (snake_case ↔ camelCase, object ↔ entity field
renaming). Test that party data loads correctly with proper field names.
- [ ] **Test party CRUD operations** - Create, update, and delete a
party to verify the adapters layer still works end-to-end
- [ ] **Test grid operations** - Add/remove weapons, characters, and
summons to verify the entity field renaming still works correctly
- [ ] **Check for any runtime errors** - The local type checking
couldn't run due to missing dev dependencies, so CI is the first line of
defense

**Recommended test plan:**
1. Load an existing party page and verify all data displays correctly
2. Create a new party and add weapons/characters/summons
3. Edit an existing party (update name, add/remove items)
4. Verify search functionality works for weapons/characters/summons

### Notes
- Local lint/typecheck commands failed due to missing dependencies
(prettier-plugin-svelte, eslint-config-prettier) - relying on CI for
type verification
- The services layer (`src/lib/services/`) was intentionally kept as
it's a business logic layer that wraps the adapters

Link to Devin run:
https://app.devin.ai/sessions/611580bc2db94e20a48c3692d3cbd432
Requested by: Justin Edmund (justin@jedmund.com) / @jedmund

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Justin Edmund <justin@jedmund.com>
2025-11-28 11:09:08 -08:00
5dc0a75cce misc fixes for grid service and resources
- let backend compute default uncap levels
- fix InfiniteScroll resource lifecycle (don't destroy on unmount)
- improve party resource error handling with type narrowing
- use SvelteMap/SvelteDate for reactivity
2025-11-28 11:04:36 -08:00
b1bfe82507 fix party job/skill API calls
- use shortcode instead of id for job updates
- wrap job_id in party object for rails API
- only send editable skill slots (1-3), skip null values
- add updateAccessory method stub
2025-11-28 11:04:26 -08:00
5403aebe48 fix job skill types and slot styling
- update JobSkill type with emp/base boolean flags
- use new skill fields in jobUtils and components
- update job adapter with locale and filter params
- restyle empty skill slots with cleaner placeholder
- simplify ML badge to not show level number
2025-11-28 11:04:16 -08:00
0379cff81e add active unit highlighting with element focus rings
- track active item in sidebar store
- add element accent colors and focus ring mixins
- units show pulsing focus ring when selected in sidebar
- refactor units to use shared menu components
- update context menu test page
2025-11-28 11:04:04 -08:00
9a4a863ccd add shared unit menu components
- UnitMenuContainer for context/dropdown menu wrapper
- MenuItems for reusable action items
- GearMenuButton for hover-triggered dropdown
- shared scss styles for both menu variants
2025-11-28 11:03:52 -08:00
e582629552 refactor SearchSidebar with tanstack query
- replace manual fetch with createInfiniteQuery
- debounced search input with reactive filters
- pagination handled automatically via infinite scroll
- cleaner state management via query result
2025-11-28 11:03:42 -08:00
aa16d58175 add tanstack query with infinite scroll support
- integrate @tanstack/svelte-query into layout
- add query client factory and query keys
- new InfiniteScrollQuery component for paginated data
- search query options for weapons/characters/summons
- update dev port to 5174
2025-11-28 11:00:57 -08:00
50f7643763 update extra summons grid 2025-09-30 03:44:38 -07:00
a88411eb46 add context menu to job components 2025-09-30 03:43:41 -07:00
0ab2782697 wire up context menus to unit components 2025-09-30 03:42:57 -07:00
030c5916c7 add context menu ui components and i18n 2025-09-30 03:42:14 -07:00
f325836bf6 wrap extra sections in container component 2025-09-30 01:12:40 -07:00
45fc9237ad add purple theme styling for extra weapons 2025-09-30 01:11:44 -07:00
47b3a11fef update extra weapons grid with header and container 2025-09-30 01:11:39 -07:00
267658bb28 add extra weapon container components 2025-09-30 01:11:33 -07:00
d8e18c00e1 update ui components 2025-09-29 23:48:02 -07:00
6b40a3dec6 update grid and unit components 2025-09-29 23:47:45 -07:00
a00b8a8d18 update utility functions 2025-09-29 23:47:11 -07:00
cf34092ccc improve api adapters 2025-09-29 23:47:01 -07:00
1298ae1a35 add mastery display 2025-09-29 23:46:04 -07:00
4161a615ba add job system 2025-09-29 23:45:50 -07:00
9537c57485 refactor details sidebar 2025-09-29 23:45:28 -07:00
1b2bee497b refactor segmented control 2025-09-29 23:44:37 -07:00
79c0de3128 remove barrel files and update imports 2025-09-29 23:37:37 -07:00
3666b8db86 add perpetuity ring toggle and fix grid api response handling 2025-09-25 01:08:25 -07:00
d13412dfb9 fix transcendence star positioning and update uncap styles 2025-09-25 00:26:29 -07:00
6762c2dab4 use new modifier utils in unit components 2025-09-25 00:26:17 -07:00
739c415284 add canonical/user version toggle to details sidebar 2025-09-25 00:25:07 -07:00
249877efe6 add sidebar modification display components 2025-09-25 00:24:36 -07:00
f090d2fe41 add modifier utils for weapon keys, awakenings, and stat modifications 2025-09-25 00:22:58 -07:00
47d64d6fe1 fix: use camelCase for pagination meta after transform 2025-09-24 22:53:05 -07:00
3bbebeb588 fix: prevent grid rep titles from stretching container 2025-09-24 22:52:50 -07:00
999f03f42c add infinite scrolling to explore and profile pages 2025-09-24 22:24:53 -07:00
9bb9bd6320 add user settings modal and page 2025-09-24 22:02:25 -07:00
5678e13afb Don’t show selection on all /teams routes 2025-09-24 14:40:30 -07:00
6034157d07 add element-based backgrounds to detail sidebar 2025-09-24 03:49:20 -07:00
506d33bf57 fix character rep image urls 2025-09-24 03:35:07 -07:00
89daa8e565 update character unit to use new image function 2025-09-24 03:29:53 -07:00
bb3aa1a252 migrate existing image utilities 2025-09-24 03:29:41 -07:00
f8e9c411f7 use detail/base images in sidebar 2025-09-24 03:28:49 -07:00
91524ed064 add centralized image utility system 2025-09-24 03:28:26 -07:00
bc2e7d6bdb fix dropdown double button issue 2025-09-24 02:52:24 -07:00
e2c71ad28d add element theming and avatar to navigation 2025-09-24 02:52:01 -07:00
e6b95f7c12 extract avatar utilities and update user profile 2025-09-24 02:51:51 -07:00
7889b7c59b fix button component renderAs logic 2025-09-24 02:51:23 -07:00
94ad52252e Update to use Button component
Also removes redundant styles
2025-09-24 01:53:59 -07:00
8db94e37e7 Update Button component to have shape and element 2025-09-24 01:53:26 -07:00
6ace86a00e Fix various spacing and sizing issues on party details 2025-09-24 01:24:57 -07: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
0324adb0a4 update services and uncap utilities 2025-09-23 22:10:22 -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
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
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
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
3e7ccf8fdb Refactored Button component 2025-09-17 22:06:45 -07:00
be09e67d42 added methods for getting options from type utils 2025-09-17 21:51:26 -07:00
54491b1158 add detail UI components and uncap utility 2025-09-17 13:39:28 -07:00
0b771fc405 enhance navigation with database submenu 2025-09-17 13:39:15 -07:00
a5ffdcb68a add arrow icons 2025-09-17 13:38:47 -07:00
7c7ed8b579 chore: update dependencies and misc files 2025-09-17 10:48:15 -07:00
0bab6e0d7e refactor: restructure party component layout 2025-09-17 10:47:59 -07:00
e4c59e14f6 feat: add grid API endpoints and drag-drop support 2025-09-17 10:46:49 -07:00
666109ef7d feat: enhance database pages with uncap columns 2025-09-17 10:45:44 -07:00
6f428f2aa3 refactor: migrate UI components to inline styles 2025-09-17 10:44:52 -07:00
ff711331d4 feat: add uncap indicators to units and database 2025-09-17 10:43:32 -07:00
9764c80771 fix: add X-Per-Page header for database pagination 2025-09-17 10:41:56 -07:00
45f04c2593 Add row click navigation to database grids 2025-09-17 07:12:54 -07:00
6b5f2b4868 Add race and gender utility mappings 2025-09-17 07:12:37 -07:00
5c814b8054 Add database provider for REST API integration 2025-09-17 06:44:07 -07:00
d3d4b8a767 Fix grid styling with row height and vertical centering 2025-09-17 06:43:48 -07:00
78a617db0e Use local square images instead of hotlinking 2025-09-17 06:43:20 -07:00
30ab61fbc9 Add database cell components for icons and images 2025-09-17 06:43:03 -07:00
d262eba8b2 Create element and proficiency label components 2025-09-17 06:42:45 -07:00
2cf3c2067e Add element and proficiency utility mappings 2025-09-17 06:42:28 -07:00
76bad64ece add database link to navigation for role 7+ 2025-09-17 05:33:30 -07:00
7538b5ae04 add api endpoints for database items 2025-09-17 05:33:10 -07:00
034e8e48cd add database pages with svar grid 2025-09-17 05:32:38 -07:00
1c5caccf5e fix ui components svelte 5 compatibility 2025-09-16 20:10:04 -07:00
cc46a695d5 use visual segmented control in party views 2025-09-16 20:09:36 -07:00
acf49c718c refactor rep components to accept flexible props 2025-09-16 20:09:20 -07:00
fed7b5ae50 implement visual party segmented control 2025-09-16 20:08:57 -07:00
ad2e04623f add parties list endpoint for explore page 2025-09-16 20:08:28 -07:00
16e18525da Fix drag-drop swapping
Add parent +server.ts files to fix routing conflicts
Pass actual target item IDs instead of placeholder strings
2025-09-16 17:19:26 -07:00
888e53fa62 add drag-drop support with API integration
- created drag-drop composable with touch/mouse support
- added DraggableItem and DropZone components
- integrated grids with drag-drop functionality
- added API endpoints for position updates and swaps
- handles cross-container dragging for all grid types
2025-09-16 03:45:22 -07:00
1d0495f1f2 Add drag-drop system for grids
- Core composable with touch support & operation queue
- DraggableItem & DropZone components
- Proper position mapping for containers
- Cross-container swap/move operations
- Visual feedback states

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-16 02:43:58 -07:00
627989bea1 add ui component test page 2025-09-16 01:35:47 -07:00
dc9898f334 add segmented control / tabs component 2025-09-16 01:34:29 -07:00
1b0294a683 add switch and checkbox components 2025-09-16 01:34:06 -07:00
205e1045a6 add select component with bits-ui 2025-09-16 01:33:46 -07:00
7f7661f542 add input component built on bits-ui 2025-09-16 01:33:24 -07:00
07f4721d5d enhance button with more variants from hensei-web 2025-09-16 01:33:00 -07:00
2fbb181078 add ui components 2025-09-15 21:26:14 -07:00
ef30e57eba remove fluid-dnd drag and drop 2025-09-15 21:26:01 -07:00
e26b5c2e20 add context menus to units and party 2025-09-15 21:24:49 -07:00
da4c3d09f9 add grid api endpoints and services 2025-09-15 21:24:37 -07:00
3624edbd1c Update explore grid component 2025-09-15 04:10:37 -07:00
251c56b86d Update services for editing support 2025-09-15 04:10:22 -07:00
ff6074675b Update rep components with improved styling 2025-09-15 04:10:02 -07:00
7e862ed56a Update grid components for editing support 2025-09-15 04:09:18 -07:00
c9bd155ed6 Update unit components with editing context 2025-09-15 04:08:11 -07:00
795d9761d7 Enable party editing with search sidebar 2025-09-15 04:05:37 -07:00
efd13206e0 Add search sidebar and panel components 2025-09-15 04:05:03 -07:00
e8fa1545f8 Add API type definitions 2025-09-15 04:04:39 -07:00
1b6da60aa3 Add API client and resource modules 2025-09-15 04:04:09 -07:00
7cb055a79f Add tooltip support with bits-ui 2025-09-15 04:03:19 -07:00
c8da5c4762 Checkpoint for reps 2025-09-12 05:22:33 -07:00
be0a8df439 Fix zod validation for login 2025-09-11 10:47:12 -07:00
32c1c9016e Add new services for business logic 2025-09-11 10:46:29 -07:00
cf351ef1fc Add ported grid components 2025-09-11 10:46:02 -07:00
f978be2bfd Add Button component 2025-09-11 10:45:43 -07:00
23eb537fdd Add navigation 2025-09-11 10:45:30 -07:00
cbd92e2d52 Flesh out API layer 2025-09-11 03:53:43 -07:00
bf6ff79391 Rudimentary import for SEO 2025-09-09 03:20:38 -07:00
8166ee31dd Re-export OAUTH_BASE from env var 2025-09-09 03:20:27 -07:00
d5caf3d784 Add validation for login form 2025-09-09 03:19:36 -07:00
e988b02f0c Add auth helper libraries 2025-09-09 03:18:53 -07:00
0edf8c4191 Added WIP structure for API library 2025-09-09 03:18:04 -07:00
660cc8d028 Add export keyword types 2025-09-09 03:17:38 -07:00
7b05fa0497 Migrate type defs 2025-09-09 00:27:26 -07:00
c360543d82 Init Svelte migration repo 2025-09-08 13:43:09 -07:00