Skip to content

feat(rsi): add store SKUs, upgrades and buy-backs to the RSI cart - #182

Merged
mortik merged 1 commit into
mainfrom
feat/add-to-cart
Nov 19, 2026
Merged

mortik merged 1 commit into
mainfrom
feat/add-to-cart

Conversation

@mortik

@mortik mortik commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Adds an addToCart action, so Fleetyards' hangar planner can put its buy list into the RSI cart (fleetyards/fleetyards#6409).

What changed

  • addToCart takes up to 50 items, each a store SKU, an upgrade (from the store, or bought back when it names a pledge) or a buy-back. Items are named by numeric ids only, and anything else gets a 400.
  • The CSRF token for the cart mutations comes from the csrf-token meta tag on the cart page.
  • Items are added one at a time, and the answer gives a result per item. RSI's refusals map to unavailable, buybackInvalid, buybackNotAlone or failed, with RSI's message attached.
  • Requests are queued so two cart requests never interleave their upgrade contexts.
  • health lists the new action, so older Fleetyards pages never call it.

The calls were captured from a signed-in session on RSI's own pages, then replayed directly with the same headers. The reference is in Fleetyards' docs/findings/rsi-cart.md.

Test plan

  • vitest run: 114 passed, including the new cart.test.ts
  • vue-tsc --noEmit
  • Load the unpacked build and add a ship, a CCU and a buy-back from a Fleetyards buy list. The calls were only replayed from a page on robertsspaceindustries.com, so whether RSI accepts the mutations from the extension's origin is still unproven.

🤖

@mortik
mortik added this pull request to the merge queue Nov 19, 2026
Merged via the queue into main with commit 779f4fe Nov 19, 2026
4 checks passed
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.

1 participant