-
Notifications
You must be signed in to change notification settings - Fork 13
Feat/points #1317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/points #1317
Changes from all commits
75f2a6a
e84ad24
d55e833
47ef1f6
cb23e54
50ea224
a1b5a6d
f55d538
3859b6d
b6e7861
9933112
115ae03
ebd4cf5
62aebd8
89fe0d3
b3ce8f7
e79c4b8
17c389d
81ec4d3
687f16d
abb978b
4917888
704e983
aa480e9
eb724c4
0a9beb0
97f62f6
b87f956
7ef0a79
b1f6889
02d0e4b
1b29d85
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,25 @@ | ||
| # @dev Add cursor rules here. This goes in the LLM context window on every query when using cursor. | ||
|
|
||
| ## Random | ||
|
|
||
| - never open SVG files, it crashes you. Only read jpeg, png, gif, or webp. | ||
| - never run jq command, it crashes you. | ||
|
|
||
| ## Code quality | ||
|
|
||
| - Use explicit imports where possible | ||
| - Make a best effort to keep code quality high. Reuse existing components and functions, dont hardcode hacky solutions. | ||
| - When making changes, ensure you're not breaking existing functionality, and if there's a risk, explicitly WARN about it. | ||
| - If you notice an opportunity to refactor or improve existing code, mention it. DO NOT make any changes you were not explicitly told to do. Only mention the potential change to the user. | ||
| - Performance is important. Cache where possible, make sure to not make unnecessary re-renders or data fetching. | ||
| - Separate business logic from interface. This is important for readability, debugging and testability. | ||
|
|
||
| ## Testing | ||
|
|
||
| - Where tests make sense, test new code. Especially with fast unit tests. | ||
| - tests should live where the code they test is, not in a separate folder | ||
|
|
||
| ## Documentation | ||
|
|
||
| - document major changes in docs.md/CHANGELOG.md | ||
| - if you add any other documentation, the best place for it to live is usually docs/ | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,8 @@ docs/PR.md | |
|
|
||
| **.patch | ||
|
|
||
| PR.md | ||
|
|
||
| # dependencies | ||
| /node_modules | ||
| /.pnp | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| .cursorrules |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| # Changelog | ||
|
|
||
| All notable changes should be documented in this file. Be concise. | ||
|
|
||
| The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
| and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
|
||
| ## [Unreleased] | ||
|
|
||
| ### Added | ||
| - **Points System V2** with tier-based progression (0-4 Tier) | ||
| - **QR Payment Perks** with tier-based eligibility and merchant promotions | ||
| - Hold-to-claim interaction for perks with progressive screen shake animation | ||
| - PWA haptic feedback that intensifies during perk claiming | ||
| - Activity feed perk indicators with yellow star icons and strikethrough amounts | ||
| - Transaction details "Peanut got you!" banner for claimed perks | ||
| - Dev tools page (`/dev/shake-test`) for testing animations and haptics | ||
|
|
||
| ### Changed | ||
| - QR payment flow now fetches payment locks in parallel with KYC checks for latency reduction | ||
| - Perk claiming uses optimistic UI updates for instant feedback (claim happens in background) | ||
| - Dev pages excluded from production builds for faster compile times | ||
| - Removed Points V1 legacy fields from `Account` and `IUserProfile` interfaces | ||
|
|
||
| ### Fixed | ||
| - BigInt type handling in points balance calculations (backend) | ||
|
Comment on lines
+23
to
+26
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion | 🟠 Major Promote legacy field removal to a “Removed” section and mark as BREAKING. Removing Points V1 fields is a breaking change for integrators. Move it out of “Changed”, add a “Removed” section, and note migration impact. ## [Unreleased]
### Added
@@
### Changed
- QR payment flow now fetches payment locks in parallel with KYC checks for latency reduction
- Perk claiming uses optimistic UI updates for instant feedback (claim happens in background)
- Dev pages excluded from production builds for faster compile times
- Removed Points V1 legacy fields from `Account` and `IUserProfile` interfaces
+ QR payment flow now fetches payment locks in parallel with KYC checks to reduce latency
+ Perk claiming uses optimistic UI updates for instant feedback (claim happens in the background)
+ Dev pages excluded from production builds for faster compile times
+
+### Removed
+- [BREAKING] Removed Points V1 legacy fields from `Account` and `IUserProfile` interfaces.
+ - Migration: update consumers to use Points V2 types and fields (e.g., TierInfo, balances). Add a short migration note or link.
🤖 Prompt for AI Agents |
||
| - Perk status now correctly reflects `PENDING_CLAIM` vs `CLAIMED` states in activity feed | ||
| - Modal focus outline artifacts on initial load | ||
| - `crypto.randomUUID` polyfill for older Node.js environments in SSR | ||
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,15 @@ | ||
| export async function register() { | ||
| if (process.env.NEXT_RUNTIME === 'nodejs') { | ||
| // Polyfill crypto.randomUUID for Node.js SSR (required by DaimoPayProvider) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. question: what does this have to do with points and perks?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i was getting errors, this solved it no idea why this isnt an issue in other branches as well |
||
| const nodeCrypto = await import('crypto') | ||
| if (!globalThis.crypto) { | ||
| // @ts-ignore - polyfill for SSR | ||
| globalThis.crypto = nodeCrypto.webcrypto | ||
| } | ||
| if (!globalThis.crypto.randomUUID) { | ||
| globalThis.crypto.randomUUID = nodeCrypto.randomUUID | ||
| } | ||
|
|
||
| await import('./sentry.server.config') | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
!