Commit graph

633 commits

Author SHA1 Message Date
4224dcb257 move recruited_by to separate view to avoid N+1 2025-12-13 21:40:42 -08:00
981feff814 add grid_artifact and weapon_series to party show includes 2025-12-13 21:39:47 -08:00
56280eb0ff preload crews and favorites to fix remaining N+1s 2025-12-13 21:38:54 -08:00
6f3f0d92ff fix N+1 queries in parties index 2025-12-13 21:32:37 -08:00
ef7c158736 add implementation plans for artifacts, character series, weapon series
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-13 20:54:48 -08:00
b8947dbaf3 add artifact import service spec
tests parsing game artifact data with skill decoding

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-13 20:54:42 -08:00
272f612357 add import services for characters, weapons, summons
parses game JSON inventory data and creates collection records

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-13 20:54:38 -08:00
c498278c89 fix array extraction order in artifact import 2025-12-13 20:12:00 -08:00
36dc4207c9 increase awakening_level max to 20 2025-12-13 20:11:53 -08:00
aa198f072b add import endpoints to collection controllers 2025-12-13 20:10:18 -08:00
860177c0a4 add show_gamertag to user 2025-12-13 20:09:52 -08:00
534414939b add current_membership to crew response 2025-12-13 20:09:44 -08:00
4db5f4224e return artifact enum values as integers 2025-12-13 20:09:34 -08:00
0a069c0324 fix N+1 query in by_event: include user for membership 2025-12-04 03:05:53 -08:00
d4c88997ff add retired flag to phantom players 2025-12-04 03:02:46 -08:00
26718b5a3e gw event improvements: status field, members_during_event endpoint 2025-12-04 03:02:35 -08:00
7d27d3c8b1 allow officers to update joined_at on members and phantoms 2025-12-04 03:02:27 -08:00
0337bc1e92 add by-event score endpoints that auto-create participation 2025-12-04 03:02:22 -08:00
b4f4f9c304 fix total_score to sum individual honors instead of crew scores 2025-12-04 03:02:18 -08:00
5968ed74d5 add joined_at to memberships and phantoms for historical data
- editable field separate from created_at
- active_during scope uses joined_at for filtering
- backfills from created_at in migration
2025-12-04 03:02:13 -08:00
50e2318f59 add filter support to crew members endpoint
GET /crew/members now accepts ?filter param:
- active (default): active members only
- retired: retired members only
- phantom: phantom players only
- all: all members + phantoms

Response includes both members[] and phantoms[] arrays.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 00:07:22 -08:00
4c8f4ffcf3 add phantom players for non-registered crew members
- phantom_players table for tracking scores of non-user members
- claim flow: officer assigns phantom to user, user confirms, scores transfer
- CRUD endpoints plus /assign and /confirm_claim actions
- model/request specs for all functionality (37 examples)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 23:55:15 -08:00
a3a0138526 add request specs for crew controllers (phases 1-2)
- add crews_spec.rb (18 examples)
- add crew_memberships_spec.rb (13 examples)
- add crew_invitations_spec.rb (15 examples)
- fix crew_memberships authorize_crew_captain! as before_action
- update crew_invitations factory to auto-set invited_by officer

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 23:47:25 -08:00
7f57c2c3ee fix gw controller params and add request specs
- use gw_participation_id param (matches route param name)
- use gw_crew_score root key for consistency
- add crew_gw_participations request specs
- add gw_crew_scores request specs
- add gw_individual_scores request specs
- fix batch authorization to return early

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 23:40:38 -08:00
f2a058b6b2 add GW events and scoring system
- create gw_events, crew_gw_participations, gw_crew_scores, gw_individual_scores
- add models, blueprints, controllers for GW tracking
- add model specs and gw_events controller specs

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 23:34:54 -08:00
4d30363187 Add model specs for collection sync functionality
Test sync_from_collection! and out_of_sync? methods for
GridCharacter, GridWeapon, GridSummon, and GridArtifact models.
2025-12-03 23:08:01 -08:00
8fca01d6c7 update crew plan with Phase 2 completion 2025-12-03 23:06:31 -08:00
b75a905e2e add crew invitations system
- create crew_invitations table with status enum
- add CrewInvitation model with accept/reject flow
- add CrewInvitationsController for send/accept/reject
- add invitation error classes
- add invitation routes nested under crews
- add pending invitations endpoint for current user
- 38 passing specs for model and controller
2025-12-03 23:06:07 -08:00
c3e992a0dd add gamertag to user blueprint 2025-12-03 23:01:13 -08:00
0599db101f update crew plan with Phase 1 completion 2025-12-03 22:52:23 -08:00
872b6fdb59 add crew specs and fix error handling
- add transactional fixtures to rails_helper for test isolation
- restructure crew errors to CrewErrors module for Zeitwerk
- add rescue_from for CrewErrors::CrewError in api_controller
- add model specs for Crew and CrewMembership (34 examples)
- add controller specs for crews and memberships (28 examples)
- add crew-related specs to User model (22 examples)
- add factories for crews and crew_memberships
2025-12-03 22:51:34 -08:00
274881e894 add collection refs and out_of_sync to grid blueprints 2025-12-03 22:48:32 -08:00
233dd4fe95 add sync endpoints and collection_id params to controllers 2025-12-03 22:46:17 -08:00
a76d0719c9 add collection refs and sync methods to grid models 2025-12-03 22:42:29 -08:00
e98e59491d add crew controllers, blueprints, routes, and errors
- CrewsController: create, show, update, members, leave, transfer_captain
- CrewMembershipsController: update, destroy, promote, demote
- CrewAuthorizationConcern for member/officer/captain checks
- blueprints for serialization
- custom error classes for crew operations
2025-12-03 22:41:25 -08:00
9b01aa0ff3 add crew and crew_membership models with migrations
- crews table with name, gamertag, granblue_crew_id, description
- crew_memberships with role enum (member/vice_captain/captain)
- partial unique index ensures one active crew per user
- updated User model with crew associations and helper methods
2025-12-03 22:41:19 -08:00
35b8a674ab add collection references to grid tables 2025-12-03 22:40:34 -08:00
658d3d9c49 add rarity filter to collection artifacts index 2025-12-03 21:26:46 -08:00
6cf85a5b3e add artifact import from game data
- Add ArtifactImportService to parse game JSON and create collection artifacts
- Maps game skill_id to our (group, modifier) format using verified mapping
- Handles skill quality -> strength lookup via ArtifactSkill.base_values
- Supports duplicate detection via game_id, with optional update_existing flag
- Quirk artifacts get proficiency from game data; skills stored as empty
- Add POST /collection/artifacts/import endpoint
- Add game_id column to collection_artifacts, collection_weapons,
  collection_summons for tracking game inventory instance IDs
2025-12-03 14:20:21 -08:00
1cbfa90428 update artifact skill tier ratings based on community data
- Remap Group I skills: TA Rate and Debuff Success as ideal;
  Elemental ATK as good; ATK/HP/CA DMG/DEF as neutral;
  Skill DMG/Crit/DA/Debuff Resist as bad
- Remap Group II skills: all caps and supplemental damage as ideal;
  tradeoff skills as good; chain amplify/situational defensive as neutral;
  regeneration and turn-based reduction as bad
- Remap Group III skills: 10+ turn amp and stackable supp as ideal;
  CD reduction/cap up/farming skills as good; conditional buffs as neutral;
  healing bonus/linked/buff removal/turn skip as bad
- Fix synergy pairs to use correct modifier references matching
  actual skill definitions from artifact_skills.json
2025-12-03 13:51:20 -08:00
4715591545 add artifact image download endpoints
- POST /artifacts/:id/download_image (sync single size)
- POST /artifacts/:id/download_images (async all sizes)
- GET /artifacts/:id/download_status (poll job status)
2025-12-03 13:37:24 -08:00
70e6d50371 add artifact image download service and job 2025-12-03 13:37:10 -08:00
e5d80bde23 add ArtifactDownloader for artifact images
downloads square (s) and wide (m) sizes from game CDN
2025-12-03 13:37:04 -08:00
fd1c363352 add POST /artifacts/grade endpoint
allows grading artifact skills without persisting a record
2025-12-03 13:32:57 -08:00
c3dbab896c include grade in artifact blueprints by default 2025-12-03 13:32:53 -08:00
7cf237b7b3 update ArtifactGrader with scrap/keep/reroll actions
recommendations now suggest:
- scrap: low score, bad skills, or no valuable skills
- keep: high score or all ideal skills
- reroll: mediocre artifacts with improvement potential
2025-12-03 13:32:48 -08:00
623661eb2c fix artifact test factories and specs
use unique granblue_ids, default to empty skills, fix element matching
2025-12-03 13:27:40 -08:00
8787aa34a3 include reroll_slot and grades in artifact responses 2025-12-03 13:27:35 -08:00
58cb970457 add ArtifactGrader service for skill evaluation
grades artifacts based on skill tiers, base strength, and synergy.
provides reroll recommendations for suboptimal lines.
2025-12-03 13:27:31 -08:00
e6539ad7e1 add reroll_slot to artifact models 2025-12-03 13:27:26 -08:00