Commit graph

902 commits

Author SHA1 Message Date
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
7a6fadeeaa bump GIT_HASH to 666ca41 2026-03-05 06:10:08 -05:00
666ca41184 fix: use full shop slug URL in sandbox functional tests
Tests were using /s/{shop.id} which returns 302 redirect instead of
/s/{shop.id}/{shop.slug} which returns 200 directly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 06:09:57 -05:00
e662f29e86 feat: referrer trend line chart, sandbox + S3 storage functional tests
- Add _daily_referrer_counts() for 28-day external referrer line chart
  bucketing in shop and product analytics views
- Add SVG line chart sections for referrer trends in both analytics
  templates (analytics.j2 and analytics_product.j2)
- Add functional tests for sandbox mode enable/disable, toolbar
  conditional rendering, and form isolation
- Add functional tests for user S3 storage settings (save, clear,
  validation) and presigned upload endpoint
- Add test for data-has-bucket attribute on sandbox toolbar

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 22:51:55 -05:00
38bb64b97b Add /styleguide route with live component reference
New styleguide page at /styleguide showing all design system
components: colors (light/dark), typography, buttons (core +
semantic + small/cancel), form elements, wells, alerts, SERP
product cards, layout patterns, task bar, theme system docs,
comment actions, ribbon, and footer structure.

Includes theme toggle button for previewing both modes.
Extends base.j2, wired through routes.py and views/misc.py.
2026-03-04 18:49:02 -05:00
e2f57e9abb fix: harden rm -rf with retry loop and existence check in CI build 2026-03-04 14:42:29 -05:00
17079bd0a8 bump GIT_HASH to 6a175da 2026-03-04 13:29:02 -05:00
6a175dad29 feat: skip presigned URL refresh when paused + SPA shop settings
watch.js: presigned URL refresh now skips src swap when media is paused.
Tracks lastUrlRefreshTs so that when the user resumes playback after a
long pause, the play listener detects the stale URL and refreshes before
continuing. No more re-buffering or disruption for idle media.

shop.py: detect X-Requested-With header on settings POST and return JSON
with flash messages instead of redirect, enabling SPA behavior.

shop-settings.js: new progressive enhancement script intercepts settings
form submits via fetch, renders flash messages inline into #alerts div.
Falls back to normal POST + redirect when JS is disabled or on error.
2026-03-04 13:28:50 -05:00
b3aa6078b2 bump GIT_HASH to 31cc9c3 2026-03-04 12:35:27 -05:00
31cc9c394a fix: update product ago dates during SPA navigation in watch mode
watch.py now returns human_created_timestamp, human_updated_timestamp,
and show_dates in the JSON response. watch.js updatePageContent() rebuilds
the .product-meta-dates element on each navigation so Created/Updated
dates reflect the current product instead of staying stale from initial load.
2026-03-04 12:35:13 -05:00
49c2bdd22d bump GIT_HASH to 9c7c2fa 2026-02-28 14:27:39 -05:00
9c7c2fae64 fix: retry rm -rf in CI build to handle runner race condition 2026-02-28 14:27:28 -05:00
bdcb69258a bump GIT_HASH to 136a305 2026-02-28 08:08:51 -05:00
136a3050fd fix: eliminate 173 duplicate inherited tests and harden async ring tests
Extract _AuthenticatedBase class from AuthenticatedFunctionalTests so
TestBeacon and TestAnalytics inherit only setUp/helpers without
duplicating all parent test methods (112 + 92 → 25 + 6 tests).

Add check_same_thread=False for SQLite engines so background reforge
threads can safely use the shared connection pool.

Return thread from reforge_discovery_ring_async and replace sleep-based
waits with thread.join() for deterministic, CI-resilient assertions.
2026-02-28 08:08:40 -05:00
9d5d762b37 bump GIT_HASH to 0579c87 2026-02-27 16:04:33 -05:00
0579c87c43 feat: add per-shop S3 mirror bucket for automatic upload sync
Shop owners can configure their own S3-compatible bucket (DigitalOcean
Spaces, AWS S3, MinIO, Backblaze B2, etc.) to automatically mirror all
uploaded files. The MPS main bucket remains the origin/CDN — the shop
bucket is a fire-and-forget backup.

Sync runs in daemon threads after each copy_object, capturing credentials
as plain strings for thread safety with fresh boto3 clients per thread.
Backfill button copies all existing files via double-fork process.
2026-02-27 16:04:23 -05:00
d5bf831bcd docs: add artifact storage section to sandbox docs
Document per-user S3 bucket configuration, upload flow diagram,
supported services, and updated file reference table.
2026-02-27 12:58:16 -05:00
d2d9554356 bump GIT_HASH to f07c37b 2026-02-27 12:57:31 -05:00
f07c37b67a feat: add per-user S3 bucket for sandbox artifact uploads
Users can configure their own S3-compatible bucket credentials in User
Settings > Artifact Storage. When configured, sandbox mode shows an
"Upload to Bucket" button that pushes exported artifacts (filtered images,
video captures) directly to the user's bucket via presigned POST.

Supports DigitalOcean Spaces, AWS S3, MinIO, Backblaze B2, and any
S3-compatible service. Files never touch the MPS server — two-step
presign pattern matches existing product upload architecture.
2026-02-27 12:57:10 -05:00
d3c6a3cdd2 bump GIT_HASH to 64a71f0 2026-02-27 11:55:06 -05:00
64a71f0bb2 fix: set crossOrigin on images for sandbox canvas export
CDN already serves Access-Control-Allow-Origin: * but browsers only
send the Origin header when img.crossOrigin is set. sandbox.js now
sets crossOrigin="anonymous" on all images at init and after SPA
navigation so canvas.toBlob() can read pixels for export.
2026-02-27 11:54:52 -05:00
9dda6ca36b docs: add sandbox mode architecture and filter reference
Architecture diagrams, export pipeline, face detection pipeline,
filter preset reference table, CORS requirements, localStorage keys,
mobile behavior, and stacking with shop color filter.
2026-02-27 11:43:10 -05:00
ed108fe8f5 bump GIT_HASH to fd55a1a 2026-02-27 11:41:43 -05:00
fd55a1a5e2 feat: add sandbox mode with creative filter toolbar
Client-side creative filter system for MPS shops. When enabled, visitors
see a floating toolbar with 32 filter presets (basic, warm, cool, dramatic,
color shifts, Instagram-style, SVG), 7 adjustment sliders, image/video
canvas export, and on-demand MediaPipe face detection (eye glow, face mask).

All processing is browser-side. Server only stores the sandbox_mode toggle.
Filters apply to individual media elements (stacks with shop color_filter).
localStorage persists filter state. Watch mode SPA re-applies on navigation.
2026-02-27 11:41:21 -05:00
f0af5c564a bump GIT_HASH to 1d5b473 2026-02-26 22:32:26 -05:00
1d5b473276 fix: add SQLite busy_timeout and fix regex escape warning
Set PRAGMA busy_timeout=30000 on SQLite connections to prevent
"database is locked" errors under concurrent access. Fix invalid
escape sequence in email regex by using raw string.
2026-02-26 22:32:11 -05:00
738497ed2f bump GIT_HASH to 1c6bcbe 2026-02-26 17:28:24 -05:00
1c6bcbe94d feat: add line charts, keyword tracking, and referrer domains to analytics
- Add SVG line charts for session duration, engagement, and bounce rate trends (28 days)
- Track referrer_domain and referrer_query on PageSession (new migration)
- Refactor classify_referrer() to extract domain and search engine query params
- Surface internal search keywords (ShopSearchRequest) on shop analytics
- Show top referrer domains and search engine queries on both analytics pages
- Add wide bar row CSS modifier for longer domain labels
2026-02-26 17:28:05 -05:00
6acebd8835 bump GIT_HASH to da29e6d 2026-02-26 16:42:35 -05:00
da29e6d3e2 feat: add permalink to product analytics page 2026-02-26 16:42:11 -05:00
9e7b4c6896 bump GIT_HASH to 40828ca 2026-02-24 12:14:14 -05:00
40828ca31b fix: cap ring related products to 45 and add 502 retry in watch mode
Previously every watch JSON request and product page load called
get_ring_related_products with forward=len(ring), loading ALL products
in the shop from the DB. For large rings this caused worker memory to
spike, triggering uwsgi reload-on-rss kills and producing 502s.

Cap related items to 42 forward + 3 backward (matching the sidebar
display limit). The watch JSON endpoint now accepts a dir query param
so the client can signal travel direction — when going backward the
allocation flips to 3 forward + 42 backward.

Also adds retry with backoff (up to 2 retries, 1s/2s delay) in
fetchWatchData() for transient 502/503/504 responses during worker
recycling.
2026-02-24 12:13:45 -05:00
7145f2b313 fix: disable pytest-timeout — crashes xdist workers on CI
Both signal and thread timeout methods break pytest-xdist: signal
corrupts workers, thread kills them mid-operation. The real fix was
timeout=10 on PayPal requests. Global test timeout is not needed.
2026-02-23 15:24:00 -05:00
97f5c8fbf4 fix: use thread timeout method for pytest-xdist compatibility
signal-based timeouts corrupt xdist worker processes, causing mass
test failures on CI. thread method is the documented alternative
for parallel test execution.
2026-02-23 15:08:17 -05:00
ec32f655ed bump GIT_HASH to cdc6582 2026-02-23 14:51:43 -05:00
cdc6582a8f fix: add timeouts to PayPal sandbox tests and pytest-timeout safety net
PayPal sandbox tests used requests.post/get() with no timeout parameter.
When the CI runner at build.unturf.com cannot reach api-m.sandbox.paypal.com,
these calls block until TCP timeout (minutes), stalling all xdist workers
and causing the 1-hour CI timeout.

- Add timeout=10 to all requests calls in PayPal sandbox tests
- Add pytest-timeout with 60s default so no single test can hang the suite
2026-02-23 14:51:19 -05:00
c4926a8ab9 bump GIT_HASH to f4fc645 2026-02-23 12:50:53 -05:00
f4fc645586 feat: expand ring to all positions so fresh mode has full inventory
The related content list only showed 42 forward items. When fresh mode
hid watched items, most were filtered out leaving a sparse list with
huge gaps. Now all ring positions are included so fresh mode always
has plenty of unwatched items to display.

- Pass forward=len(ring) to get_ring_related_products in all callers
- Cap forward in the function to prevent backward/forward overlap
- Add loading="lazy" to thumbnails beyond offset 7 (template + JS)
- Override mobile overflow hiding in fresh mode so unwatched overflow
  items remain visible
2026-02-23 12:50:33 -05:00
4311a9b2b6 bump GIT_HASH to f00a43c 2026-02-21 15:57:32 -05:00
f00a43c208 fix: replace hamburger icon with dice on random button 2026-02-21 15:57:18 -05:00
3bd615c9bf bump GIT_HASH to 5b4d6ff 2026-02-21 14:25:11 -05:00
5b4d6ffc13 fix: call update_s3_acls after karaoke track upload
All three karaoke upload paths (single product upload, async backfill,
CLI backfill script) now call update_s3_acls after writing tracks to S3,
ensuring karaoke track ACLs match the product's current visibility.
2026-02-21 14:24:59 -05:00
01a69db9e7 docs: auto-push when new tests cover new paths and suite is green 2026-02-21 13:57:14 -05:00