Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 26, 2025

Description

Before:

Price range field defaulted to empty string, allowing users to create a group without selecting a budget option.

After:

Price range now defaults to priceRanges[0].value ($10 - $20), ensuring a valid selection exists on form load.

// Before
budget: '',

// After
budget: priceRanges[0].value,

Testing instructions

  1. Navigate to /create-group-page
  2. Verify the Price Range dropdown displays $10 - $20 by default
  3. Submit form without changing selection - should succeed
  4. Run pnpm test - new test 'has the cheapest price range selected by default' verifies behavior

Additional information

None

[optional] Screenshots

N/A - Unable to screenshot locally due to missing Supabase env vars. Test coverage confirms behavior.

Pre-submission checklist

  • Code builds and passes locally
  • PR title follows Conventional Commit format (e.g. test #001: created unit test for __ component)
  • Request reviews from the Peer Code Reviewers and Senior+ Code Reviewers groups
  • Thread has been created in Discord and PR is linked in gis-code-questions
Original prompt

This section details on the original issue you should resolve

<issue_title>Price range field validation is not working when creating a group</issue_title>
<issue_description>Currently validation is not working on the price range field when creating a new group. The user can proceed to create the group without selecting an option. The default value should be set to the cheapest option.</issue_description>

<agent_instructions>HARD RESTRICTIONS (MUST FOLLOW — do not continue if violated):

  • We use pnpm only.
  • NEVER create package-lock.json, yarn.lock, or lockfiles of any kind.
  • If you attempt to modify a lockfile, halt immediately and ask for clarification.
  • You MAY NOT install dependencies unless I explicitly request it in writing.
    If enforcing these rules prevents progress, STOP and ask me — do not continue anyway.

Implement this ticket in a new branch that you create and assign me as reviewer.

Task:

  • Set a default value for gift budget on the create group page as the minimal values.
  • Add or update tests to verify the change.

Scope Rules:

  • Only modify files directly relevant to this task.
  • Do NOT touch package.json, pnpm-lock.yaml, workflows, .github templates, or unrelated code.
  • Absolutely no refactors unless required to complete this ticket.
  • If the target element is not found, ASK before making assumptions.

PR Rules:

  • Use our PR template exactly.
  • Fill Before/After sections from the real code changes.
  • Title must follow Conventional Commit format.
  • Include Closes #574.
  • Keep changes minimal and readable.

If anything is unclear, ambiguous, or missing context — pause and ask me instead of guessing.
</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@vercel
Copy link

vercel bot commented Nov 26, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
elecretanta Ready Ready Preview Comment Nov 26, 2025 6:14pm
elecretanta-storybook Ready Ready Preview Comment Nov 26, 2025 6:14pm
elecretanta-unit-test Ready Ready Preview Comment Nov 26, 2025 6:14pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 26, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch copilot/fix-price-range-validation

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

- Changed default budget value from empty string to priceRanges[0].value
- Added test to verify the cheapest price range ($10 - $20) is selected by default

Closes #574

Co-authored-by: alexappleget <137813659+alexappleget@users.noreply.github.com>
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.

Price range field validation is not working when creating a group

2 participants