Fix ring double-advance defect in DJ crossfade, use defect not bug in CLAUDE.md
completeDjCrossfade was advancing ringPosition after syncRingPosition already set it correctly at the halfway mark, causing autoplay to skip one song ahead of what the sidebar displayed. Removed the redundant advance — syncRingPosition handles positioning via updatePageContent.
This commit is contained in:
parent
7f8a5e631a
commit
3ade78d512
2 changed files with 19 additions and 14 deletions
17
CLAUDE.md
17
CLAUDE.md
|
|
@ -1,9 +1,18 @@
|
|||
# Claude Development Notes
|
||||
|
||||
## Production URL
|
||||
## Production
|
||||
|
||||
- Application: `https://my.makepostsell.com`
|
||||
- Version check: `https://my.makepostsell.com/version`
|
||||
- Prod shell: `tmux-hosts` — look for `my.makepostsell.com` (typically tmux window `0:2`)
|
||||
- Media CDN: `plan-period-files.nyc3.cdn.digitaloceanspaces.com` (DigitalOcean Spaces)
|
||||
|
||||
### Media Architecture
|
||||
|
||||
Files are NEVER streamed through uwsgi. The server only generates presigned URLs (15 min TTL). The client's browser/JS fetches directly from the Spaces CDN:
|
||||
- **Downloads**: presigned `get_object` URLs → client fetches from CDN
|
||||
- **Uploads**: presigned `post` → client uploads directly to Spaces
|
||||
- **Thumbnails**: public CDN URLs with `?ts=` cache busting
|
||||
|
||||
## Project Setup
|
||||
|
||||
|
|
@ -69,7 +78,7 @@ env/bin/py.test --cov=make_post_sell.models.cart --cov-report=term-missing make_
|
|||
|
||||
### Current Coverage
|
||||
- Cart model unit tests cover critical business logic like `requires_payment` threshold (64 cents)
|
||||
- Integration tests verify the original AttributeError bug fix for free coupon checkout
|
||||
- Integration tests verify the original AttributeError defect fix for free coupon checkout
|
||||
- Functional tests provide end-to-end coverage of cart/checkout/payment flows
|
||||
|
||||
## Database Location
|
||||
|
|
@ -172,7 +181,7 @@ op.add_column(
|
|||
## Cryptocurrency RPC Access
|
||||
|
||||
### Monero Wallet RPC
|
||||
When debugging or manually testing Monero RPC calls, use digest authentication with these credentials (from Makefile):
|
||||
When investigating or manually testing Monero RPC calls, use digest authentication with these credentials (from Makefile):
|
||||
- Username: `test_user`
|
||||
- Password: `test_pass`
|
||||
- URL: `http://127.0.0.1:18083/json_rpc`
|
||||
|
|
@ -211,7 +220,7 @@ Always use `uuid_str` when you need a string copy of the identifier. Models inhe
|
|||
|
||||
**TESTING INTEGRITY**: NEVER skip, delete, or disable unit tests or integration tests when they break. When tests fail:
|
||||
1. **FIX THE TESTS** - Update them to work with new functionality
|
||||
2. **FIX THE CODE** - If the tests reveal actual bugs, fix the underlying issue
|
||||
2. **FIX THE CODE** - If the tests reveal actual defects, fix the underlying issue
|
||||
3. **ADD MORE TESTS** - Ensure new functionality is properly covered
|
||||
|
||||
Disabling or removing tests weakens the codebase and is unacceptable. Tests are critical safety nets that prevent regressions.
|
||||
|
|
|
|||
|
|
@ -813,16 +813,12 @@
|
|||
}
|
||||
standbyMedia.style.display = 'none';
|
||||
|
||||
// Advance ring or pop queue
|
||||
if (data) {
|
||||
if (queue.length > 0 && queue[0].id === data.product_id) {
|
||||
queue.shift();
|
||||
saveQueue();
|
||||
renderQueue();
|
||||
} else if (ringProductIds.length) {
|
||||
ringPosition = (ringPosition + ringDirection + ringProductIds.length) % ringProductIds.length;
|
||||
saveRingState();
|
||||
}
|
||||
// Pop queue if this was a queued item (ring position already
|
||||
// synced by updatePageContent → syncRingPosition at halfway mark)
|
||||
if (data && queue.length > 0 && queue[0].id === data.product_id) {
|
||||
queue.shift();
|
||||
saveQueue();
|
||||
renderQueue();
|
||||
}
|
||||
|
||||
cancelCountdown();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue