Skip to content

refactor: use discriminated and packed types from generation#1201

Merged
pyphilia merged 7 commits intomainfrom
remove-unused-hooks
Feb 17, 2026
Merged

refactor: use discriminated and packed types from generation#1201
pyphilia merged 7 commits intomainfrom
remove-unused-hooks

Conversation

@pyphilia
Copy link
Contributor

@pyphilia pyphilia commented Feb 9, 2026

Since the backend returns discriminated generated types Item and PackedItem, I've changed the codebase to use these types directly.

  • To match with the backend, Item is the discriminated simple item. GenericItem is the base non-discriminated item.
  • Because the factories, some functions, types come from sdk, I need to cast them.

@pyphilia pyphilia requested a review from spaenleh February 10, 2026 15:35
@pyphilia pyphilia marked this pull request as ready for review February 10, 2026 15:35
Copy link
Member

@spaenleh spaenleh left a comment

Choose a reason for hiding this comment

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

Looks good !

I was having a bit of trouble understanding the difference between PackedItem Item and GenericItem.

If I am correct:

  • PackedItem and Item are the discriminated variants (with one being packed)
  • GenericItem is the "not-discriminated" version ?

I hope we can make the differences clearer ... maybe not now, but something to keep in mind maybe ?

@pyphilia pyphilia force-pushed the remove-unused-hooks branch from 18cfe87 to 8df048f Compare February 17, 2026 10:56
@sonarqubecloud
Copy link

@pyphilia pyphilia added this pull request to the merge queue Feb 17, 2026
github-merge-queue bot pushed a commit that referenced this pull request Feb 17, 2026
* refactor: remove unused hooks

* refactor: use packed item from generation

* refactor: use item as much as possible

* refactor: rename types based on generation

* refactor: fix tests

* refactor: refactor import

* refactor: apply changes

---------

Co-authored-by: kim <kim.phanhoang@epfl.ch>
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 17, 2026
@pyphilia pyphilia added this pull request to the merge queue Feb 17, 2026
Merged via the queue into main with commit 4ca8020 Feb 17, 2026
5 checks passed
@pyphilia pyphilia deleted the remove-unused-hooks branch February 17, 2026 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants