Skip to content

refactor: Make inventory class-based#678

Open
RDIL wants to merge 3 commits intomasterfrom
reece/inventory-refactor
Open

refactor: Make inventory class-based#678
RDIL wants to merge 3 commits intomasterfrom
reece/inventory-refactor

Conversation

@RDIL
Copy link
Member

@RDIL RDIL commented Mar 21, 2026

Scope

Two big changes here:

  1. inventory is a class now, so the stateful parts are not stored on a module level
  2. controller instance can be overridden for tests, so that code which hasn't yet been migrated to the IoC model can use the intended controller instance.

Test Plan

  • Start the server, verify that logging in still works

Checklist


General

  • I've run Prettier to format any changed files
  • I've verified that my changes work, and included a test plan

Testing

  • I have added or considered adding unit/integration tests that cover any code changes

RDIL added 3 commits March 21, 2026 17:28
Two big changes here:
1. inventory is a class now, so the stateful parts are not stored on a module level
2. controller instance can be overridden for tests, so that code which hasn't yet been migrated to the IoC model can use the intended controller instance.
@RDIL RDIL requested a review from alex73630 March 21, 2026 21:39
Copy link
Contributor

@alex73630 alex73630 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM

Of course it would be better to have it checked against tests but I know that this change is required to get tests running.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants