Skip to content

Make forge flips really detailed - #1528

Open
Ekwav wants to merge 6 commits into
mainfrom
detailed-forge-flips
Open

Make forge flips really detailed#1528
Ekwav wants to merge 6 commits into
mainfrom
detailed-forge-flips

Conversation

@Ekwav

@Ekwav Ekwav commented Jul 23, 2026

Copy link
Copy Markdown
Member

No description provided.

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.

Pull request overview

This PR enhances the “forge flips” (and craft flips) UX by adding a detailed, interactive cost breakdown that can expand/collapse subcrafts, combine duplicate materials into a single shopping list, and compare “buy orders” vs “no-wait (NPC + insta-buy)” acquisition costs.

Changes:

  • Introduces a shared CostBreakdown UI (combined shopping list + recipe breakdown + craft-depth control + no-wait mode) and wires it into both forge flip details and craft details.
  • Adds new crafting utilities to combine ingredient trees, limit expansion depth, and estimate direct-buy cost using acquisition plans.
  • Improves acquisition pricing logic (handling inconsistent backend price fields), adds deep-link opening for craft details, and adds Cypress coverage for the new flows.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
utils/Parser/APIResponseParser.tsx Extends parseProfitableCrafts to allow parsing a subset while using another set for subcraft expansion.
utils/Formatter.tsx Adjusts acquisition price selection to preserve “order=min / insta=max” invariant across inconsistent backend fields.
utils/CraftingUtils.ts Adds helpers for craft depth limiting, combined shopping lists, and direct-buy cost estimation.
components/CraftsList/CostBreakdown/CostBreakdown.tsx New shared detailed breakdown component (shopping list + recipe tree + toggles).
components/CraftsList/CostBreakdown/CostBreakdown.module.css Styles for the new breakdown UI.
components/CraftsList/IngredientList/IngredientList.tsx Upgrades ingredient rows with acquisition compare button, collapse/expand behavior, and richer savings display.
components/CraftsList/IngredientList/IngredientList.module.css Adds button styling for the new controls.
components/CraftsList/CraftDetails/CraftDetails.tsx Switches craft details from raw ingredient list to the shared CostBreakdown.
components/CraftsList/CraftsList.tsx Adds deep-link support (?craft=) by initially opening a specific craft and rendering enough items to include it.
components/ForgeFlips/ForgeFlips.tsx Reworks forge flip cards + click details modal to use CostBreakdown, adds “no-wait flips only” filtering, and loads subcraft data on demand.
components/ForgeFlips/ForgeFlips.module.css New layout/styling for the enhanced forge flips UI.
components/Tooltip/Tooltip.tsx Adds initiallyOpen to support deep-linked/open-by-default modal tooltips.
components/Premium/PremiumPurchaseWizard/Steps/DurationSelectionStep.tsx Expands the Starter quarterly CoflCoins display string with total pricing details.
app/crafts/page.tsx Adds ?craft= query parsing to open a craft detail from deep links.
cypress/e2e/forge.cy.ts New end-to-end coverage for forge flip breakdown + no-wait behavior.
cypress/e2e/crafts.cy.ts Extends crafts E2E to assert new breakdown sections and craft deep-link opening behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread components/ForgeFlips/ForgeFlips.tsx
Comment thread app/crafts/page.tsx
Comment on lines +12 to +15
export default async function Page({ searchParams }: { searchParams: Promise<{ craft?: string | string[] }> }) {
let api = initAPI(true)
let [crafts, bazaarTags] = await Promise.all([api.getProfitableCrafts(), api.getBazaarTags()])
let [crafts, bazaarTags, params] = await Promise.all([api.getProfitableCrafts(), api.getBazaarTags(), searchParams])
let openCraftTag = Array.isArray(params.craft) ? params.craft[0] : params.craft
Comment on lines 95 to +99
let popover = (
<Popover id={`acquisition-plan-${ingredient.item.tag}`} style={{ maxWidth: 360 }}>
<Popover.Header>Buy {numberWithThousandsSeparators(plan.totalCount)}× {ingredient.item.name}</Popover.Header>
<Popover.Header>
Buy {numberWithThousandsSeparators(plan.totalCount)}× {ingredient.item.name}
</Popover.Header>
Comment on lines +62 to +66
<Form.Check
type="switch"
id="modal-no-wait-costs"
label="No-wait flips only — use NPC + insta-buy costs"
checked={noWait}
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.

2 participants