Repository navigation
feat(ui-components): display digital chemistry items in InventoryView - #54
Merged
Merged
Conversation
Coverage Report for @evefrontier/dapp-kit
File CoverageNo changed files found. |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The review reports no active issues with the packed digital chemistry ID support and associated dependency updates.
No open issues 🎉
What changed in this PR
Prepares the shared inventory UI for packed digital chemistry item IDs, allowing Datahub lookups to use base type IDs while displaying variant information separately.
Changes:
- Adds helpers to unpack type IDs and a dedicated digital chemistry row component.
- Updates inventory metadata lookups and ID rendering to use unpacked IDs.
- Updates Nx and Vitest dependencies, adds an Undici override, and refreshes the lockfile.
| File | Description |
|---|---|
packages/libs/ui-components/modules/InventoryView.tsx |
Uses base type IDs for lookups and delegates digital chemistry row rendering. |
packages/libs/ui-components/modules/InventoryView.DigitalChemistry.tsx |
Adds ID unpacking, variant detection, and variant-aware rendering. |
packages/libs/dapp-kit/package.json |
Updates Vitest and its UI dependency. |
packages/apps/assembly/package.json |
Updates Vitest and its UI dependency. |
package.json |
Updates Nx and Vitest dependencies and adds the Undici override. |
bun.lock |
Records updated dependency versions and resolutions. |
Review effort: Balanced
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.
Prepares
InventoryViewfor digital chemistry items.What
modules/InventoryView.DigitalChemistry.tsx, holding all digital-chemistry logic so further display changes stay out ofInventoryView.tsx:unpackTypeId(typeId): splits a packedtype_idinto{ typeId: packed >> 32n, variantId: packed & 0xFFFFFFFFn }. Plaintype_ids (nothing in the upper 32 bits, e.g.77810) come back as{ typeId: 77810n, variantId: 0n }. Goes throughBigInt(), so it accepts a number or a string.isDigitalChemistryItem(typeId): unpacks thetype_idand returns true whenvariantId !== 0n. Normal items always have variant 0.getDatahubTypeId(typeId): the unpacked type id, which is the id Datahub knows every item by.InventoryView.tsx:typeIdsKeyand theitemDetailsMaplookup) go throughgetDatahubTypeId.InventoryItemRowrendersDigitalChemistryItemRowfor digital chemistry items. Otherwise it shows the unpacked type id in the ID column and the fallback name.bun audit fix: bumps nx, vitest and @vitest/ui, and adds anundicioverride (package.json,bun.lock).Why
Once the indexer returns packed
type_ids, digital chemistry items would otherwise show the raw packed number and fail their Datahub lookup. Checking the variant instead of the length of the id is more reliable:type_ids for normal items can be any length. This isolates their handling now, ahead of further display changes for these items.Screenshots / Gifs
Where has this been tested?