Repository navigation
Closed
Labels
esiEVE Online ESI integrationEVE Online ESI integrationready-for-agentSpec'd and safe for the night shift to buildSpec'd and safe for the night shift to build
Description
Parent
What to build
A "Fetch from EVE" button next to each of Cargo before and Cargo after on the Abyss page. It fills the field with the cargo value of the active ship's cargo hold, read from ESI.
Cargo reader (ESI):
- Takes a signed-in client and returns a cargo valuation: value in millions, the number of unpriced item types, and when ESI last answered for the asset list.
- Gets
ship_item_idfrom the character's ship endpoint (theesi-location.read_ship_type.v1scope is already requested), so whichever ship EVE says is active at that moment is the one used. - From the paged asset list it keeps items whose
location_idis that ship and whoselocation_flagisCargo. Drone bay, fitted modules and loaded ammo (other flags in the same ship), other ships, hangars and items inside containers are all out. - Blueprint copies are left out, as in the current asset reader. Items are valued with the existing market price reader: CCP's average price, or the adjusted price when there is no average.
- Unpriced items are left out of the value and counted by item type.
- Reuse or reshape the existing asset and price readers. The current asset reader totals quantities by type and throws away location and flag, which this reader needs.
- Malformed ESI responses raise ValueError, like the existing readers.
- Confirm against real data that the cargo hold's flag is
Cargoand thatlocation_idis the ship's item id. Use a real character's asset list (ask the owner if you can't sign in) and note what you found in the PR.
Abyss page:
- Each field has its own button and status note. A successful fetch fills the field to two decimals. The note reads "From EVE at HH:MM" (ESI's fetched-at time, not now), adds " · N unpriced" when N > 0, and says ESI can lag up to an hour and the value can be edited.
- The fetched value stays editable.
- Errors (signed out, ESI error, rate limit) appear in the note in the critical colour, the same way the old wallet fetch did, and the field is left as it was.
Acceptance criteria
- Only items in the active ship with flag
Cargocount: not other flags in the same ship, not other ships, not hangars, not container contents - Ammo in the cargo hold counts
- Asset paging is followed
- Blueprint copies are left out
- Unpriced item types are counted and left out of the value
- The fetched-at time from ESI is passed through
- Malformed ship, asset or price bodies raise ValueError
- Both Fetch buttons fill their own field and note, including the unpriced count
- Fetch errors show in the note in the critical colour and leave the field untouched
- Signed out, the fields still work by hand and Fetch says to sign in
- Real-data check of the
Cargoflag and location id, written up in the PR - Tests:
- Cargo reader against a fake ESI client serving canned ship, asset and price bodies, covering the cases above (prior art: the existing fake client and item builder in the loot tests, and the wallet tests)
- GUI through
gui.Appwith the cargo reader mocked: fill, stamp, unpriced count, error note
- Full test suite green
Blocked by
Metadata
Metadata
Assignees
Labels
esiEVE Online ESI integrationEVE Online ESI integrationready-for-agentSpec'd and safe for the night shift to buildSpec'd and safe for the night shift to build
Activity
Fazorath commentedon Oct 28, 2026
Done in #54, merged into the #38 branch issue-38-cargo-runs. It reaches main when that branch does (along with #45 and #48).
Merge pull request #60 from Fazorath/issue-38-cargo-runs