Commit graph

944 commits

Author SHA1 Message Date
389f80a730 docs: CWE-407 security section — bleach O(2^N) exposure and PoC
Add Security section to CLAUDE.md documenting both CWE-407 surfaces:
- Search/feed endpoints (fixed, commit f9cbebb)
- Bleach HTML sanitization: O(2^N) on crafted HTML, no input cap in MPS

Add docs/poc-cwe407.py: proof-of-concept timing harness covering
rbox-search, rbox-page, rbox-dump, mps-search, mps-sitemap vectors.
Authorized use only — run against own staging/dev instance.
2026-03-29 21:19:59 -04:00
7aaf189cbd ops: operation voyeur — credential opsec protocol 2026-03-29 15:46:08 -04:00
9131f5900e bump GIT_HASH 2026-03-28 18:25:43 -04:00
6c89b31830 fix: add X-Requested-With header to markup editor preview fetch — Pyramid xhr=True predicate was rejecting requests 2026-03-28 18:25:21 -04:00
84a21e1e7a bump GIT_HASH 2026-03-28 15:13:05 -04:00
f9cbebb6b5 fix: cap search keywords and feed queries to prevent CWE-407 amplification
- shop.py: strip empty tokens, cap keywords to 10 before passing to model
- product.py: add .limit(200) per keyword query — was unbounded .all()
- feeds.py: add .limit(1000) on product/content feed queries — was unbounded
2026-03-28 15:12:41 -04:00
eec598604b docs: 🔥 == 🔥 in auto-push rule 2026-03-28 11:46:08 -04:00
ba3a6e66b2 docs: auto-push without asking — remove human friction 2026-03-28 11:45:34 -04:00
2bd25672f9 fix: cap ring related items at 42 — was rendering entire ring with forward=len(ring) 2026-03-28 11:44:23 -04:00
01bd9086fe docs: wordpress import pipeline architecture with dot diagrams
Design doc for ingesting WordPress sites into MPS shops. Covers two
input modes (REST API + WXR XML), 4-phase HTML conversion pipeline,
content/media/comment mapping, CLI interface, competitive analysis,
and future enhancements. Includes rendered dot diagrams for the
architecture overview and HTML conversion detail flow.
2026-03-12 11:32:47 -04:00
8649e6aaae docs: karaoke pipeline architecture with dot diagrams
Add docs/karaoke-pipeline.md covering the full streaming pipeline from
MPS through unsandbox API to zerotrust container and back. Includes two
Graphviz dot diagrams (rendered to SVG):

- karaoke-pipeline.dot: full system flow across MPS, API, pool, container
- karaoke-ondemand.dot: watch mode on-demand user flow

Update architecture.md feature toggle matrix and related docs table.
Update CLAUDE.md karaoke section with streaming path and on-demand info.
2026-03-11 17:49:57 -04:00
6fd6bfd756 bump GIT_HASH to 4a12722 2026-03-11 17:20:51 -04:00
4a12722b4d feat: on-demand karaoke processing — button next to random triggers vocal isolation
Karaoke button (🎤) now always visible for audio/video products when the
shop has unsandbox API keys configured. Clicking it triggers on-demand
processing via POST /karaoke/{product_id} if tracks don't exist yet.

Server forks a detached child process (survives uWSGI recycling) to run
process_karaoke, then the existing 10s watch_json refresh picks up the
new URLs when processing completes. Button shows hourglass during
processing and auto-switches to instrumentals on completion.

Changes:
- New route + view: POST /karaoke/{product_id} (on-demand processing)
- watch_json + content.py: add karaoke_eligible flag
- content.j2: data-karaoke-eligible attribute on media container
- watch.js: show button when eligible, trigger processing, detect
  completion via URL refresh, auto-switch to instrumentals
- related_content.j2: mic emoji button, JS controls visibility
- CSS: disabled state for processing button
- 8 new functional tests covering eligibility, processing, edge cases
2026-03-11 17:20:26 -04:00
924921e232 bump GIT_HASH to 5e0d263 2026-03-11 13:03:35 -04:00
5e0d263b7c fix: 3 watch mode defects — crossfade race, filter-aware next, countdown position
1. Crossfade race condition: when a DJ crossfade is active and the user
   clicks a new song, cancelDjCrossfade resets djCrossfadeActive but the
   old song is still near its end — timeupdate immediately re-triggers
   startDjCrossfade, racing with the in-flight fetch. Added
   navigationPending flag to block DJ crossfade and ended handler while
   a user-initiated navigation is in progress.

2. getNextItem/getNextUnwatchedItem now respect media type filters.
   Previously, filtering to "video only" still showed an image in the
   countdown because the ring walked by position without checking
   data-media-type. Now skips filtered items.

3. Countdown overlay moved from position:absolute inside the video/audio
   container (covering native controls) to a flow-positioned element
   between the media and title. Removed watch-countdown-static class
   since all countdown instances now use the same in-flow layout.
2026-03-11 13:03:18 -04:00
a71a3d4c6e bump GIT_HASH to 92dc61f 2026-03-08 00:45:15 -05:00
92dc61fc50 fix: address 4 defects from CodeRabbit review
- reforge_discovery_ring_async: add non-production guard matching sync version
- is_trial_active/is_trial_expired: check trial_ended flag
- has_primary_s3: include primary_s3_region in validation
- gift card migration downgrade: add missing json_gift_cards drop + existence guards
2026-03-08 00:45:04 -05:00
df8f4993c6 Merge branch 'explore/design-tokens' into 'master'
feat: integrate design tokens from www.makepostsell.com styleguide

See merge request engineering/make-post-sell/make_post_sell!58
2026-03-08 04:28:22 +00:00
cca3172c9b bump GIT_HASH to e2169ec 2026-03-07 21:14:46 -05:00
e2169ecbbf sidebar: show full ring instead of 42-item window
The related content sidebar now shows all ring items from the current
position forward, matching content.py behavior. This means the sidebar
never "runs out" of items — Fresh mode hides watched items and reveals
the full remaining ring. Items beyond offset 7 still use the
related-content-overflow CSS class for mobile.
2026-03-07 21:14:25 -05:00
2bf4ab1736 bump GIT_HASH to 25d2554 2026-03-07 20:36:10 -05:00
25d255447e fix: seed discovery ring from server on initial page load
The ring was only populated from localStorage or during SPA navigation.
First visits (empty localStorage) or cross-shop visits (stale ring)
left ringProductIds empty, causing the related content sidebar to show
only the current product. Now:

- On page load, if localStorage ring is empty, fetch from watch JSON
- Invalidate stale rings when current product is not in the saved ring
2026-03-07 20:36:05 -05:00
5385e14a29 bump GIT_HASH to 84f96f9 2026-03-07 20:21:02 -05:00
84f96f90c8 fix remaining MPS-14/15/16 audit gaps
- Skip discovery ring reforge for non-production shops (MPS-14)
- Block settings POST when trial expired, except environment and
  bucket settings needed for onboarding (MPS-15)
- BYOB upload enforcement is a soft prompt (trial tip in settings)
  rather than hard block — new users need to upload during trial
2026-03-07 20:20:56 -05:00
63bdc3c589 bump GIT_HASH to 9c3e0e5 2026-03-07 19:36:34 -05:00
9c3e0e5e54 implement remaining MPS-14/15/16 gaps: trial enforcement, BYOB backfill, search exclusion
- Add trial_active_required decorator to product_new, product_edit, cart_checkout,
  all checkout completions, and gift_card_add_to_cart (MPS-15)
- Make karaoke backfill and s3_mirror backfill shop-aware for BYOB buckets (MPS-16)
- Auto-test BYOB bucket connection on save, like mirror does (MPS-16)
- Add trial onboarding tip in bucket settings for trial shops (MPS-16)
- Filter non-production shops from search results (MPS-14)
- Filter non-production shops from email digests (MPS-14)
- Fix environment allowance to allow minimum 2 non-prod shops (MPS-14)
- Add 12 integration tests (6 trial + 6 BYOB), 724 total tests pass
2026-03-07 19:36:16 -05:00
13fabb5d3f bump GIT_HASH to bfe2289 2026-03-07 19:02:07 -05:00
bfe2289313 docs: update CLAUDE.md testing requirements, architecture, and design system
- CLAUDE.md: add mandatory test coverage rule (all 3 layers required),
  document BYOB shop-aware S3 methods, update test count to 712
- architecture.md: mark MPS-14/15/16 complete, add environment/trial/BYOB
  to feature toggle matrix, add BYOB to S3 storage diagram
- design-system.md: add environment and trial banner components
2026-03-07 19:01:57 -05:00
395e703a20 bump GIT_HASH to 2cb1e79 2026-03-07 18:14:44 -05:00
2cb1e79400 feat: implement MPS-14 (environment), MPS-15 (trial), MPS-16 (BYOB)
MPS-14: Add environment column (production/staging/development) to shops.
Non-production shops excluded from feeds, search, and discovery.
Environment banner in base template. Settings UI and creation selector.

MPS-15: Add 21-day free trial with trial_started_timestamp on shop
creation. Properties: is_trial_active, is_trial_expired, trial_days_remaining,
is_active. Grandfathered pre-trial shops (NULL timestamp = paid).
Trial banner in base template.

MPS-16: BYOB (Bring Your Own Bucket) - per-shop S3 storage with
primary_s3_* columns. Shop-aware request methods (shop_uploads_client,
shop_bucket_name, shop_cdn_endpoint) that fall back to MPS default.
All templates and views updated from global to shop-aware S3 references.
Bucket settings UI in shop settings.

Migration: 9884324a48e3 (idempotent, 11 new columns on mps_shop).
Tests: 14 unit tests + 8 functional tests (712 total, all pass).
2026-03-07 18:14:31 -05:00
0fc8b62aa1 bump GIT_HASH to d988e15 2026-03-07 17:41:08 -05:00
d988e15ff9 fix: make random and next buttons much bigger in watch mode controls 2026-03-07 17:40:42 -05:00
add2e85248 docs: add tickets MPS-14 (dev/stage shops), MPS-15 (free trial), MPS-16 (BYOB) 2026-03-07 17:30:05 -05:00
e15971be83 bump GIT_HASH to 46c1b2d 2026-03-07 17:15:26 -05:00
46c1b2d521 test: add gift card integration tests; update docs and CLAUDE.md
7 integration tests for gift card models, cart integration, deduction,
transactions, coupon+gift card combo, validation, and JSON purchases.
Update architecture.md (feature toggle matrix, ticket index, diagram).
Update design-system.md (gift card component section).
Add post-work chores checklist to CLAUDE.md.
2026-03-07 17:15:00 -05:00
4935e41448 bump GIT_HASH to e90e080 2026-03-07 17:11:52 -05:00
e90e080c44 test: add gift card functional tests
Six new tests covering gift card page access, settings enable/disable,
settings validation, manage page, and applying invalid gift card codes.
2026-03-07 17:11:38 -05:00
3b1d00cbfb bump GIT_HASH to 5d50165 2026-03-07 15:39:00 -05:00
5d501652c2 feat: add gift card system for shops (MPS-10 through MPS-13)
Variable-amount gift cards purchasable with any payment method.
Code-based redemption at checkout (applied to cart like coupons).
Partial use across multiple purchases, never expire. Shop owners
control min/max amounts and can disable individual cards.

Models: GiftCard, GiftCardTransaction, CartGiftCard + migration.
Views: purchase page, cart apply/remove, shop admin manage/detail/toggle.
Templates: gift_card.j2, gift_card_manage.j2, gift_card_detail.j2.
Cart integration: gift cards deduct after coupons in all checkout paths.
Tests: 10 new unit tests covering model logic (677 total pass).
2026-03-07 15:38:40 -05:00
2082783f03 Improve responsive layout and prevent horizontal overflow
Adjust login card spacing for smaller screens and add overflow hidden to main content sections. Refine logo sizing across viewport sizes to prevent it from dominating on mobile devices.
2026-03-07 09:05:21 -05:00
901741b2da docs: add design system reference and cross-link architecture docs
New docs/design-system.md covers token architecture, file map, token
category tables, theme system, typography utilities, component library
index, CSS conventions, and load order.

Add Related Docs section to architecture.md linking design system,
JavaScript, sandbox mode, and testing performance docs.
2026-03-06 18:22:05 -05:00
853fc9d2e5 fix: prevent word wrapping on nav links, buttons, and footer links
- Add white-space: nowrap to section.log-in links, .user-display-name,
  .cart-and-count, .mps-button, .mps-footer-links a, .mps-footer-group-title
- Prevents sloppy word breaks on "My Account", "Cart $0.00", etc.
2026-03-06 10:42:10 -05:00
e65e80c8b7 fix: login card and landing page CSS specificity issues
- Remove .well from login-card to prevent padding/bg override
- Add border-radius and border directly to .login-card
- Bump specificity on .landing-feature-card.well and .landing-cta-card.well
- Constrain hero CTA button min-width to 180px
- Add display:block to .login-form-input for reliable full-width
2026-03-06 10:41:06 -05:00
ef56f6ebc6 bump GIT_HASH to df65ed6 2026-03-06 10:32:18 -05:00
df65ed663d feat: redesign SaaS landing page, login form, and add Class Act styleguide section
- Treat 127.0.0.1 as SaaS domain in dev (fixes missing footer/logo)
- Landing page: hero with type-display, 6 feature cards grid, bottom CTA
- Login form: elevation card, styled input, mps-button-green submit, hint block
- CSS: login-card, landing-hero, landing-features, responsive breakpoints
- Styleguide: Landing Page section with class reference, Class Act section
  documenting the passwordless unified auth flow with diagram
- Update functional test for new landing copy
2026-03-06 10:31:58 -05:00
1b773af9d3 bump GIT_HASH to 1c8992a 2026-03-06 10:11:01 -05:00
1c8992a8bd refactor: consolidate dark mode theme into tokens.css, tokenize #2d3748
Move :root and [data-theme="dark"] variable blocks from common.css into
tokens.css so the entire theme system lives in one file. Replace ~38
hardcoded #2d3748 dark button backgrounds with var(--dark-button-bg).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 10:10:46 -05:00
77c7faba40 refactor: migrate hardcoded values in common.css to design tokens
Replace ~150 hardcoded color, spacing, radius, font, and border values
with CSS custom property references from tokens.css. Every replacement
uses var() with the original value as fallback, ensuring zero visual
change while establishing the token-based foundation.

Categories migrated:
- Colors: button backgrounds, link color, status text, alert bg/text/border
- Surfaces: wells, content bg, table stripes, card bg, input bg
- Borders: input borders, thumbnails, comment replies, crypto cards
- Border radius: buttons, inputs, wells, serp items, alerts, cards
- Typography: font-family, font-size, font-weight on buttons/labels
- Spacing: padding, margins on buttons, inputs, coupons, notices
- Motion: theme toggle transition uses duration/easing tokens

Dark mode [data-theme="dark"] blocks left untouched — they override
via the existing variable system and will be consolidated in a future pass.
2026-03-06 09:38:34 -05:00
815876daf1 feat: integrate design tokens from www.makepostsell.com styleguide
- Add tokens.css as foundation layer (loaded before common.css)
  - Color system: brand, surface, text, border, state, alert tokens
  - Typography: major third scale with 14 semantic classes
  - Spacing: 4px base, 12-step scale with utility classes
  - Shape: 7 radius levels from none to pill
  - Elevation: 5 shadow levels with dual-shadow technique
  - Motion: 4 easing curves, 7 durations, entrance animations
  - Loading: skeleton shimmer + spinner (3 sizes)
  - Scroll reveal, state layers, ripple effect, focus rings
  - Accessibility: prefers-reduced-motion, :focus-visible
- Rewrite styleguide.j2 to comprehensive design system reference
  - New sections: tokens, elevation, motion, spacing, shape, states,
    loading, status notices, cart buttons, checkout layout, toggle
  - All app components documented with live demos
  - TOC navigation for all sections
- Add STYLEGUIDE rule to CLAUDE.md
- Wire tokens.css into base.j2 before common.css

Exploration branch — tokens.css provides new variables alongside
existing common.css variables. No visual regressions expected as
common.css values take precedence for shared property names.
2026-03-06 09:18:12 -05:00
32a19a339c docs: add MPS-6 through MPS-9 tickets, architecture diagram, update JS docs
- MPS-6: referrer analytics (domain, query, trend line charts)
- MPS-7: sandbox mode creative filter system
- MPS-8: user S3 bucket + artifact storage
- MPS-9: shop S3 mirror bucket
- architecture.md: system diagram, request flow, data pipeline, S3 layout
- JAVASCRIPT.md: add sandbox.js, signals.js, MediaPipe SDK entries
- sandbox-mode.md: mark S3 upload as implemented
- mps-2.md: document referrer_domain + referrer_query columns

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 06:19:56 -05:00