Skip to content

feat(ui-components): display digital chemistry items in InventoryView - #54

Merged
fcsondheim merged 4 commits into
mainfrom
feat/digitalchem
Oct 28, 2026
Merged

fcsondheim merged 4 commits into
mainfrom
feat/digitalchem

Conversation

@fcsondheim

@fcsondheim fcsondheim commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

Prepares InventoryView for digital chemistry items.

What

  • New modules/InventoryView.DigitalChemistry.tsx, holding all digital-chemistry logic so further display changes stay out of InventoryView.tsx:
    • unpackTypeId(typeId): splits a packed type_id into { typeId: packed >> 32n, variantId: packed & 0xFFFFFFFFn }. Plain type_ids (nothing in the upper 32 bits, e.g. 77810) come back as { typeId: 77810n, variantId: 0n }. Goes through BigInt(), so it accepts a number or a string.
    • isDigitalChemistryItem(typeId): unpacks the type_id and returns true when variantId !== 0n. Normal items always have variant 0.
    • getDatahubTypeId(typeId): the unpacked type id, which is the id Datahub knows every item by.
  • InventoryView.tsx:
    • Datahub lookups (typeIdsKey and the itemDetailsMap lookup) go through getDatahubTypeId.
    • InventoryItemRow renders DigitalChemistryItemRow for 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 an undici override (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

image

Where has this been tested?

  • In-game browser
  • External browser

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Coverage Report for @evefrontier/dapp-kit

Status Category Percentage Covered / Total
🔵 Lines 89.16% 864 / 969
🔵 Statements 87.17% 931 / 1068
🔵 Functions 84.64% 193 / 228
🔵 Branches 74.33% 588 / 791
File CoverageNo changed files found.
Generated in workflow #125 for commit 0a91bf3 by the Vitest Coverage Report Action

@fcsondheim
fcsondheim marked this pull request as ready for review October 28, 2026 09:32
Copilot AI balanced review requested due to automatic review settings October 28, 2026 09:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 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

@fcsondheim
fcsondheim requested review from a team and ccp-raudur October 28, 2026 09:42

@fc-bofai fc-bofai left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks good to me

@fcsondheim
fcsondheim merged commit 6422bd6 into main Oct 28, 2026
4 checks passed
@fcsondheim
fcsondheim deleted the feat/digitalchem branch October 28, 2026 12:08
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.

3 participants