refactor: remove football-related technical debt from codebase - #246
Merged
aalonsolopez merged 20 commits intoMay 18, 2026
Conversation
Eliminate 52 football remnants from the OFM-to-OLManager migration across 3 phases: critical domain changes, medium i18n/cleanup, low deprecations. Phase A - Critical: - Rename StandingEntry: goals_for/against -> maps_won/lost, kill_difference() - Remove formation from Team (struct + V53 migration) - Remove clean_sheets, footedness, yellow_cards/red_cards, draws - #[deprecated] on Position enum (use LolRole instead) - Replace CompactTeamMatchStatsData with LoL stats - Rewrite SquadTab.helpers.ts: buildPitchRows -> buildLaneRows - PlayStyle -> DraftStrategy (backend + frontend + V54 migration) - Remove football_nation from WorldEditorTab, store types, scripts Phase B - Medium: - Rename i18n keys: footballHerald->lolEsports, pitchInteractionHint->riftInteractionHint - Rename footballTermGuard.ts -> guard.ts - Rename FOOTBALL_IDENTITIES -> LEGACY_NATIONAL_IDENTITIES - Remove openfootlogo.svg references - Migrate test data from 4-4-2 to LoL 5-role rosters Phase C - Low: - Clean up Rust/frontend comments (football -> legacy/LoL) - Remove offsides from test fixtures - Archive migration proposals to docs/legacy/archived-proposals/ - Update lec_world.json description from OpenFootManager to OLManager Fixes: - Add missing locale argument to finish_live_match_internal (blocked game load) Stadium/arena rename excluded by user request.
- Add missing getStandingKillsFor and getStandingKillsAgainst wrappers in types.ts - Fix TournamentsTab test: Fixtures -> Matches (post i18n rename) - Game now loads correctly, all 646 frontend tests pass
- Replace openfootlogo.svg with olmanager-logo.svg - Restore img tag in MainMenu.tsx pointing to new logo - New SVG logo with shield crest + Open League Manager text
Renamed 5 player attributes and removed 3 dead goalkeeper fields: - pace -> reaction_speed - strength -> durability - passing -> coordination - tackling -> interception - defending -> positional_defense - REMOVED: handling, reflexes, aerial (dead code, unused) All renamed fields have #[serde(alias)] for backward compat.
- TeamData: play_style -> draft_strategy - EngineTeamData: play_style -> draft_strategy - LeagueStandingSnapshot: removed drawn, goals_for->maps_won, goals_against->maps_lost - Fixed 80+ test files with outdated field references - Removed draws/drawn/formation from test data
Covers Team, Player, and Staff attributes with their in-game effects, usage locations, and multiplier formulas. Includes LolStaffEffects output chain (coaching→8 multipliers) and full match flow diagram.
- Removed deprecated Position enum (17 football variants) and all references - Removed CoachingSpecialization enum (7 variants, 3 unused) and specialization field - Removed shared.rs from engine (dead code: PlayerSnap, TraitContext, DraftStrategyPhase, etc.) - Removed default_engine_attr helper - Updated tests, DB queries, staff effects, and training mappings accordingly
- Added logo_url: Option<String> to Team struct - Populated from team name slug on world load - Removed FALLBACK_TEAM_LOGOS hardcoded mapping - Renamed resolveExampleTeamLogo → resolveTeamLogo with optional logoUrl param
… paths - Rename lec_world.json to world.json, generate-lec-world.mjs to generate-world.mjs - Rename lec-default to default in Rust and frontend - Add logo_url to each team in world.json (local /teams-icons/slug.webp) - Fix Movistar KOI slug from mad-lions to movistar-koi - Move team shields to public/teams-icons/ as WebP - Remove shifters external lolesports URL (local shield now) - Update Rust fallback path from /team-logos/ to /teams-icons/
…ibutes - Fix Rust world_source check from lec-default to default - Fix attrsFor() to merge 16 old attrs into 9 new LoL attrs - Remove weak_foot from generated player data - Regenerate world.json with 9-attribute format
Release 0.2.1 hotfix
…nup into 0.2.1 Integrates cleanup branch with 3 conflict resolutions: renamed football_position_to_lol_role to position_to_lol_role, removed profile_image_url field, renamed PlayStyle to DraftStrategy.
…ebt-from-codebase
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #214
Summary
Removed 52 football-era remnants from the OFM-to-OLManager migration. The refactor spans 4 phases: domain model cleanup, DB schema migration, frontend adaptation, and player attribute renaming.
Rebased onto 0.2.1 (main) and targeting develop for merge.
Changes
Phase A — Critical (Domain + DB + Core Frontend)
positiontoLolRoleacross domain, engine, and frontendfootball_nationfrom team/player seed datastadium_name/stadium_capacity→ renamed toarena_name/arena_capacityPositionenum entirely — now uses unifiedLolRolePhase B — DB Schema + Data Cleanup
Phase C — Frontend + Tests
LolRoleinstead ofPositionPhase D — Player Attributes Renamed (16 to 9 LoL stats)
Full attribute rename table included in original PR #216.
Test Results
cargo test --workspace: All 500+ Rust tests passnpm test: All frontend tests pass273 files changed, 6318 insertions(+), 30228 deletions(-)