Skip to content

fix(launch): no suggested first buy in a stock nobody holds yet - #94

Merged
kevincodex1 merged 1 commit into
mainfrom
fix/first-buy-unissued-stock
Oct 14, 2026
Merged

kevincodex1 merged 1 commit into
mainfrom
fix/first-buy-unissued-stock

Conversation

@kevincodex1

@kevincodex1 kevincodex1 commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

The form pre-fills a ~$25 first buy, and for a priced stock with no supply (COINc today) it still suggested 0.14 COINc before a wallet connected: an amount no wallet can hold. A connected wallet already dropped it as a short balance, but the preview said otherwise.

suggestFirstBuy now answers "not-issued" for a quote with issued === false (from /api/quotes), wallet or not, and defaultFirstBuy has no amount for it, so no "suggest again" either. The first-buy step says "Nothing suggested: no COINc has been issued yet, so there is none to buy with." A stock whose issue state is unknown keeps the suggestion.

Summary by CodeRabbit

  • Improvements
    • When the quote asset has not been issued, the first-buy form no longer suggests an amount. It explains that no quote tokens have been issued and that the launch remains free. Existing suggestions for issued quote assets are unchanged.

The form pre-fills a ~$25 first buy, and for a priced stock with no
supply (COINc today) it still suggested 0.14 COINc before a wallet
connected: an amount no wallet can hold. A connected wallet already
dropped it as a short balance, but the preview said otherwise.

suggestFirstBuy now answers "not-issued" for a quote with
issued === false (from /api/quotes), wallet or not, and defaultFirstBuy
has no amount for it, so no "suggest again" either. The first-buy step
says "Nothing suggested: no COINc has been issued yet, so there is none
to buy with." A stock whose issue state is unknown keeps the suggestion.
@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 74fac0b8-a3d8-48f1-adf7-8b0769966f9f
📥 Commits

Reviewing files that changed from the base of the PR and between 16a4ed9 and 55319b7.

📒 Files selected for processing: 4
  • app/src/components/launchpad/LaunchForm.tsx
  • app/src/components/launchpad/launch-form.test.ts
  • app/src/lib/launchpad/first-buy.test.ts
  • app/src/lib/launchpad/first-buy.ts

Limit details: You’ve used all 3 included reviews currently available. Your 46 included PR review attempts over the past 7 days set your current allowance at 3 reviews per hour.

📝 Walkthrough

First-buy suggestions now return no amount when the quote asset is explicitly unissued. The launch form explains that no quote tokens are available and that the launch remains free.

Changes: Unissued Quote First-Buy Handling

Layer / File(s) Summary
Handle unissued quotes in first-buy suggestions
app/src/lib/launchpad/first-buy.ts, app/src/lib/launchpad/first-buy.test.ts
The suggestion logic returns no amount with reason "not-issued" when quote.issued is false. Tests cover this case and confirm that true, null, and undefined retain existing suggestions.
Explain the no-suggestion state in the launch form
app/src/components/launchpad/LaunchForm.tsx, app/src/components/launchpad/launch-form.test.ts
The launch form displays an explanation for the "not-issued" reason. The component test checks the message.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: ayush7614, vasanthdev2004

Merge Risk: ⚪ Minimal · up to 55319

Stocks with confirmed zero supply receive no automatic first-buy suggestion, while unknown supply retains the existing suggestion behavior. The change is ready to merge.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 4 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: preventing a suggested first buy when the stock has not been issued.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Usage-based review receipt

Note

This review was completed with usage-based billing: files reviewed beyond your plan's included limits are billed at $0.25/file. View usage-based billing.

Comment @coderabbitai help to get the list of available commands.

@kevincodex1
kevincodex1 merged commit 1a7b0d3 into main Oct 14, 2026
10 checks passed
@kevincodex1
kevincodex1 deleted the fix/first-buy-unissued-stock branch October 14, 2026 07:48
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