Commit graph

124 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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