Conversation
- Centralize unit availability logic in `TraversalUtils.isUnitAvailable` - Extract unit-settlement transition logic to `UnitSystem.enterSettlement` and `UnitSystem.exitSettlement` - Refactor `InputHandler.ts` and state slices to use centralized traversal utilities - Improve type safety in `interactionSlice.ts` and `unitSlice.ts` by removing `any` casts and improving imports - Fix inconsistent indentation and minor formatting issues - Remove redundant `package-lock.json` in favor of `pnpm-lock.yaml` Co-authored-by: b0x1 <21123655+b0x1@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
- Centralize unit availability logic in `TraversalUtils.isUnitAvailable` - Extract unit-settlement transition logic to `UnitSystem.enterSettlement` and `UnitSystem.exitSettlement` - Refactor `InputHandler.ts` and state slices to use centralized traversal utilities - Improve type safety in `interactionSlice.ts` and `unitSlice.ts` by removing `any` casts and improving imports - Fix inconsistent indentation and minor formatting issues in `interactionSlice.ts` - Migrate CI workflow to use `pnpm` and replace `package-lock.json` with `pnpm-lock.yaml` - Fix missing `Player` import in `UnitSystem.ts` Co-authored-by: b0x1 <21123655+b0x1@users.noreply.github.com>
@jules Fix merge conflicts.
- Centralize unit availability logic in `TraversalUtils.isUnitAvailable` - Extract unit-settlement transition logic to `UnitSystem.enterSettlement` and `UnitSystem.exitSettlement` - Refactor `InputHandler.ts` and state slices to use centralized traversal utilities - Improve type safety in `interactionSlice.ts` and `unitSlice.ts` by removing `any` casts and improving imports - Fix inconsistent indentation and minor formatting issues in `interactionSlice.ts` - Migrate CI workflow to use `pnpm` and replace `package-lock.json` with `pnpm-lock.yaml` - Fix missing `Player` import in `UnitSystem.ts` - Resolve merge conflicts with main and incorporate upstream fixes for settlement population and UnitPanel ambiguity logic. Co-authored-by: b0x1 <21123655+b0x1@users.noreply.github.com>
This maintenance patch improves code quality by applying DRY principles and reducing complexity in the state and interaction layers.
Key changes include:
TraversalUtils.isUnitAvailable.UnitSystem.enterSettlementandUnitSystem.exitSettlement, making the state layer thinner and more maintainable.anyandas unknown as import(...)assertions ininteractionSlice.tsandunitSlice.ts, replacing them with proper imports and safe type guards. Fixed indentation and removed redundant parentheses in combat resolution logic.package-lock.jsonto ensurepnpmremains the single source of truth for dependencies.All changes have been verified with the full test suite and ESLint.
PR created automatically by Jules for task 17801901258963431048 started by @b0x1