Skip to content

improve(plan): warn when a plan's sale is a large share of CX volume - #478

Open
Raukk wants to merge 2 commits into
PRUNplanner:mainfrom
Raukk:feat/cx-volume-warning
Open

improve(plan): warn when a plan's sale is a large share of CX volume#478
Raukk wants to merge 2 commits into
PRUNplanner:mainfrom
Raukk:feat/cx-volume-warning

Conversation

@Raukk

@Raukk Raukk commented Aug 13, 2026

Copy link
Copy Markdown

Adds a warning under each output row of the plan material I/O table showing what share of the sell exchange's traded volume the plan's daily surplus represents — e.g. "6.1% of AI1 7D vol". The row turns yellow/red at user-configurable thresholds (defaults 5% / 15%, new settings under Preferences), checks both the 7d and 30d windows (the worse one colours the row), and flags exchanges that barely trade at all. The sell exchange comes from the plan's CX configuration's empire SELL/BOTH preference, falling back to UNIVERSE.

Goal: catch "this plan's numbers assume selling volume the market can't absorb" before a player builds it. Warns only — nothing is blocked and calculations are unchanged.

As always, let me know if I messed anything up.

Flags material I/O outputs whose daily sale is a large share of the
sell exchange's 7d/30d traded volume, or lands on an illiquid market.
Thresholds are user preferences (yellow 5% / red 15% by default).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PFsCfBfPMjbxDYBoh65xYC
@netlify

netlify Bot commented Aug 13, 2026

Copy link
Copy Markdown

👷 Deploy request for prunplanner-preview pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 8ea9b23

@codacy-production

codacy-production Bot commented Aug 13, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 46 complexity · 0 duplication

Metric Results
Complexity 46
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

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