beardofedu / beardofedu/copilot-agentic-updates-deck

[Demo][Copilot App] Fix cart discount math in quote endpoint

Open Beginner friendly
#6 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
HTML
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

## Demo goal
Use a second parallel session in Copilot App for isolated-branch work.

## Problem
`WELCOME10` currently subtracts a fixed 10 units instead of 10%.

## Requested change
- Change discount to 10% of subtotal
- Add guardrail so discount cannot exceed subtotal
- Return rounded currency values to 2 decimals

## Presenter cue
Run in parallel with issue #5 to demonstrate isolated branches and concurrent progress.

## Files
- `demo-app/server.js`

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in demo-app/server.js and locate the quote endpoint handling the WELCOME10 code. Verify how it calculates the subtotal and discount, then implement the stated percentage, cap, and two-decimal rounding requirements. Done means WELCOME10 subtracts 10% without exceeding the subtotal and returned currency values are rounded to 2 decimals.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
86/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.