| Age | Commit message (Collapse) | Author |
|
Change 'Manage Subscription' from HTMX link to regular form POST.
HTMX AJAX requests can't follow redirects to external domains like
Stripe.
|
|
- Remove user-facing error messages for portal configuration -
Just log the error server-side and return 500 status - Use Bootstrap
card-header class for proper padding on section headers - This fixes
icons touching the card borders
Portal errors will now be logged but won't break the UI.
Amp-Thread-ID:
https://ampcode.com/threads/T-8edacbeb-b343-49ca-b524-1c999272acb6
Co-authored-by: Amp <amp@ampcode.com>
|
|
- Catch Stripe exceptions when portal not configured - Redirect to
account page with user-friendly error message - Display error alert
on account page when present - Change portal return URL to /account
instead of /
Fixes issue when Stripe billing portal settings haven't been configured
in test/production dashboard.
Amp-Thread-ID:
https://ampcode.com/threads/T-8edacbeb-b343-49ca-b524-1c999272acb6
Co-authored-by: Amp <amp@ampcode.com>
|
|
- Display account information (email, creation date) - Show
subscription details (plan, status, features) - Display cancellation
warning if subscription ending - Add Upgrade button for free users -
Add Manage Subscription button for paid users (goes to Stripe portal) -
Add logout button in Actions section - Replace Coming Soon placeholder
with functional UI
Addresses account management epic tasks.
Amp-Thread-ID:
https://ampcode.com/threads/T-8edacbeb-b343-49ca-b524-1c999272acb6
Co-authored-by: Amp <amp@ampcode.com>
|
|
- Add 'Remove' button for non-pending queue items (error, processing,
cancelled) - Keep 'Cancel' button for pending items - Update
delete_queue_item to check referer and return appropriate response -
Use HX-Trigger for queue updates from user page, HX-Redirect for admin
- Add confirmation dialog for remove action - Allow admins to delete
any job, users can only delete their own
Amp-Thread-ID:
https://ampcode.com/threads/T-8edacbeb-b343-49ca-b524-1c999272acb6
Co-authored-by: Amp <amp@ampcode.com>
|
|
- Remove 'Logged in as' user email display - Convert button-styled
links to standard Bootstrap nav-link style - Left-align navigation
links (removed me-auto from wrapper) - Remove logout button from navbar
(will be in account page) - Use proper ul/li structure for navbar items
The navbar is now cleaner and follows Bootstrap navbar conventions.
Amp-Thread-ID:
https://ampcode.com/threads/T-8edacbeb-b343-49ca-b524-1c999272acb6
Co-authored-by: Amp <amp@ampcode.com>
|
|
- Add mx-1 (horizontal margin) to code element for better text spacing
- Pre-fill email input with demo@example.com in dev/test mode -
Makes it faster to test login flow in development
Amp-Thread-ID:
https://ampcode.com/threads/T-8edacbeb-b343-49ca-b524-1c999272acb6
Co-authored-by: Amp <amp@ampcode.com>
|
|
|
|
- Add explicit type annotations to TIER_LIMITS dict - Add type
annotation to tier_info dict in get_tier_info - Remove unnecessary
type: ignore comments - Use .get() consistently for dict access
Improves type safety and removes 3 type: ignore suppressions.
Amp-Thread-ID:
https://ampcode.com/threads/T-8edacbeb-b343-49ca-b524-1c999272acb6
Co-authored-by: Amp <amp@ampcode.com>
|
|
Moved format_duration function from Web.py to UI.py for better code
organization. This is a UI utility function used for displaying
episode durations, so it belongs in the shared UI module rather than
the web-specific module.
Amp-Thread-ID:
https://ampcode.com/threads/T-8edacbeb-b343-49ca-b524-1c999272acb6
Co-authored-by: Amp <amp@ampcode.com>
|
|
- Replace Exception with httpx.HTTPError, httpx.TimeoutException,
re.error in extract_og_metadata - Replace Exception with ValueError,
KeyError in auth verification - Replace Exception with httpx errors
and ValueError in submit_article - Replace Exception with ValueError,
KeyError, AttributeError in RSS feed generation - Replace Exception
with ValueError, KeyError in cancel/retry/delete job handlers
Improves error handling specificity and removes BLE001 linter
suppressions.
Amp-Thread-ID:
https://ampcode.com/threads/T-8edacbeb-b343-49ca-b524-1c999272acb6
Co-authored-by: Amp <amp@ampcode.com>
|
|
|
|
- Remove /billing page and BillingPage component - Add callout box
on home page showing articles remaining for free users - Upgrade Now
button goes directly to Stripe checkout - Change tier from 'pro'
to 'paid' throughout - Update redirect URLs to go to / instead of
/billing - Remove Billing button from navbar, add Manage Account
link for all users - Add /account route with coming soon page -
Hide payment banner for paid users
Amp-Thread-ID:
https://ampcode.com/threads/T-7de89e42-947c-4243-be19-0cb75be607e7
Co-authored-by: Amp <amp@ampcode.com>
|
|
I don't need the complexity of multiple plans, just one for now
to test.
|
|
amp worked on this overnight, and I cleaned it up a bit this morning. I
think its all correct now.
|
|
This is a big test, and probably over-dependencied, but it's nice to
have an end-to-end test as an overall bug-catcher.
|
|
I think the calls to Log.setup() were accidentally creating multiple
loggers, hopefully this fixes the problem.
|
|
|
|
Add to AGENTS.md: - SQLite migration limitations (no UNIQUE
constraints via ALTER TABLE) - Migration logging best practices -
Testing external API integrations (Stripe pattern) - Mock webhook
testing approach - Local webhook testing with CLI tools - Handling API
version differences with fallback field names - Database inspection
for debugging integrations
These patterns emerged from implementing and debugging the Stripe
billing integration.
|
|
- Use billing_cycle_anchor instead of current_period_start/end in test
- Reflects actual Stripe API v2025-10-29 subscription structure -
Test validates upgrade flow works with newer API versions - Removes
debug logging (list of available keys)
|
|
- Use billing_cycle_anchor or start_date as fallback for period start -
Calculate period end by adding 1 month if not provided - Handles newer
Stripe API versions that don't include current_period_* fields - Fixes
issue where subscription.created webhook couldn't update user plan -
Works with Stripe API Version 2025-10-29.clover and newer
|
|
Log available keys when period dates are missing to help debug why
subscription webhooks fail to update user plan.
|
|
- Test simulates complete Stripe checkout flow end-to-end -
Step 1: checkout.session.completed with client_reference_id -
Step 2: customer.subscription.created with subscription details -
Verifies customer linking and plan upgrade to pro tier - Tests ensure
webhook flow works without calling real Stripe API - Validates that
client_reference_id properly links session to user
|
|
- Handle case where client_reference_id is None or missing - Fall back
to checking metadata.user_id if client_reference_id not available -
Add try/except for int() conversion with proper error logging - Use
safe .get() for session ID in error messages - Prevents TypeError:
int() argument must be a string when webhook has None value
|
|
- Skip signature verification if STRIPE_WEBHOOK_SECRET is not set -
Add warning log when verification is skipped - Parse webhook payload
as JSON directly in test mode - Enables local testing with 'stripe
trigger' without configuring webhook secret - Production still requires
proper webhook secret for security
|
|
- Remove UNIQUE constraints from ALTER TABLE statements
(SQLite doesn't support adding constraints via ALTER TABLE)
- Add better logging for migration failures (debug level) - Rely on
application logic to ensure uniqueness instead of DB constraint -
This fixes the silent failure where stripe_customer_id and
stripe_subscription_id columns weren't being added
|
|
- Add TestWebhookHandling class with tests for subscription webhooks -
Test normal subscription creation flow with mock data - Test handling
of incomplete webhook data (missing fields) - Add STRIPE_TESTING.md
with comprehensive testing guide:
- How to use Stripe test mode and test cards - How to use Stripe
CLI to trigger test webhooks - Instructions for running unit tests -
Database migration instructions for production - End-to-end testing
workflow - Common troubleshooting issues
Tests verify webhook handling works without calling real Stripe API.
|
|
- Replace direct dict key access with .get() for all subscription
fields - Add validation and early return for missing required fields -
Add logging warnings when subscription data is incomplete - Handles
both dict and Stripe object access patterns safely - Fixes KeyError:
'current_period_start' when processing webhooks
|
|
- Add hamburger toggle button positioned on right side - Navbar
collapses on small screens (< lg breakpoint) - Mobile view shows
vertically stacked elements:
- Logged in as: email - Free: X articles left [Upgrade Now] (free
users) - Billing (paid users only) - Admin Queue (admins only)
- Logout
- Remove 'Plan: Pro' text for paid users (just show Billing button)
- Add rounded corners to navbar with 'rounded' class - Remove 1px
bottom border in dark mode - Toggle controlled by Bootstrap's collapse
component
|
|
- Navbar now uses dark background (#2b3035) in dark mode - Add
border-bottom to separate navbar from content in dark mode - Ensure
navbar-text elements have proper light color (#dee2e6) in dark mode -
Maintains light mode appearance with bg-body-tertiary
|
|
- Change Upgrade Now button from btn-warning to btn-success -
Convert user info card to Bootstrap navbar with horizontal layout -
Free tier: quota text and Upgrade Now button inline with navbar-text
styling - Paid tier: plan name displayed inline as navbar-text -
Email, plan info, and action buttons all in single horizontal bar -
Uses bg-body-tertiary for automatic light/dark mode compatibility
|
|
- Replace '[Upgrade Now]' text link with proper btn-warning button -
Add arrow-up-circle icon to Upgrade Now button - Hide Billing button
for free tier users (they now have Upgrade Now) - Keep Billing button
visible for paid tier users
|
|
- Create shared UI module (Biz/PodcastItLater/UI.py) with:
- create_bootstrap_styles() - create_auto_dark_mode_style() -
create_htmx_script() - create_bootstrap_js()
- Update Admin.py to use shared UI module and add dark mode support -
Update Web.py to use shared UI module - Admin Queue and User Management
pages now support automatic dark mode
|
|
Subscribe link now appears inline next to label. Click copies URL to
clipboard and shows 'Copied!' feedback for 2 seconds. Link truncates
if too long to fit in bounding box.
|
|
Free tier users now see 'Free: X articles left [Upgrade Now]' banner.
Paid users see plan name with icon as before. Banner replaces the
old plan display in user info card.
|
|
Simplified pricing to two tiers: - Free: 10 articles total (lifetime)
- Pro: $29/month unlimited articles
Removed STRIPE_PRICE_ID_PERSONAL from configuration.
|
|
Free tier now has 10 articles total (lifetime) instead of 10 per month.
Period boundaries for free users now span from account creation to
far future.
|
|
New accounts now default to 'active' status instead of 'pending'.
Users can start using the service immediately after signup.
|
|
- Implement Biz.PodcastItLater.Billing with checkout sessions, billing
portal, webhook handling - Add subscription database schema: plan_tier,
stripe fields, period dates, stripe_events table - Three-tier pricing:
free (10/month), personal (/month, 50 articles), pro (9/month,
unlimited) - Usage tracking and enforcement with tier-based limits
- Full billing UI with plan display, usage stats, pricing cards,
upgrade buttons - Dashboard shows current tier with billing button -
Update Web.nix with Stripe environment variables - Fix POST redirects
to Stripe with 303 status code for CloudFront compatibility
Amp-Thread-ID:
https://ampcode.com/threads/T-c139e5b5-1901-4cd6-8030-5623bfe1df35
Co-authored-by: Amp <amp@ampcode.com>
|
|
Without this, run.sh would continue if bild failed, and you might
end up running an out of date artifact.
|
|
|
|
The bg-light class was forcing the 'Logged in as' card to stay
light even in dark mode. Removing it allows Bootstrap's default card
background to adapt to dark mode.
|
|
- Set all CSS variables on :root instead of html/body - Added RGB
variants needed by Bootstrap - Added secondary, tertiary, and border
color variants - Removed unnecessary light mode media query
This should now properly apply dark theme when system prefers dark
mode.
|
|
- Removed JavaScript theme switcher (not needed) - Removed toggle
buttons from all pages - Added automatic dark mode CSS based on
prefers-color-scheme media query - Added color-scheme meta tag
for native UI hints - Uses inline CSS instead of external file
(build system constraint) - Zero JavaScript - pure CSS solution -
Automatically follows system/browser dark mode preference
Task: t-64tkB5
|
|
- Added theme switcher script with localStorage persistence -
Respects system dark mode preference (prefers-color-scheme) - Added
theme toggle button to HomePage and BillingPage - Uses Bootstrap 5.3
data-bs-theme attribute for dark mode - Theme persists across page
loads - Icon changes between moon (light) and sun (dark)
Task: t-64tkB5
|
|
- Implemented complete Stripe integration (Billing.py)
- Checkout sessions for subscription upgrades - Billing portal for
subscription management - Webhook handling for subscription events
- Usage tracking with tier-based limits (free: 10, personal: 50,
pro: unlimited)
- Added billing page UI (BillingPage component)
- Current plan display with usage stats - Pricing cards for all
tiers with upgrade buttons - Manage subscription button for paid
users - Success/error messaging
- Database migrations for billing
- Added plan_tier, stripe_customer_id, stripe_subscription_id - Added
subscription_status, period dates, cancel_at_period_end - Created
stripe_events table for webhook idempotency - Added get_usage()
method for usage tracking
- Made UI mobile-friendly and responsive
- Added viewport meta tags to all pages - Replaced pages.HtmlPage
with raw html.html for meta tag control - Responsive button layouts
with flexbox wrapping - Responsive pricing cards (1 col mobile,
2 col tablet, 3 col desktop) - Touch-friendly forms and buttons
(44px minimum) - Responsive padding and containers - Admin tables
with horizontal scroll
- Added Stripe testing guide (STRIPE_TESTING.md)
- Fixed CSS bug in pricing cards (cardh-100 text rendering) - Updated
tasks: completed t-144e7lF, t-1pIV0ZF, t-1s8ADC0
Amp-Thread-ID:
https://ampcode.com/threads/T-42fd5fb3-3dc5-4cbc-a9a3-78db9e13187e
Co-authored-by: Amp <amp@ampcode.com>
|
|
- Enforce tier limits before article submission - Display current
plan in user info card (Free/Personal/Pro) - Add Billing button to
dashboard navigation - Show friendly upgrade prompt when limit reached
- Link to /billing page for plan management
Limits enforced: - Free: 10 articles/month - Personal: 50
articles/month - Pro: Unlimited
Related to task t-144e7lF
|
|
- Document using 'task create' instead of TODO/FIXME comments -
Document using Omni/Ide/typecheck.sh for fast Python typechecking -
Create task t-1pIV0ZF for billing page UI implementation
|
|
- Add stripe to Omni/Bild/Deps/Python.nix (alphabetically sorted) -
Fix all type annotations in Billing.py for mypy - Document how to add
Python packages in AGENTS.md - Add billing routes to Web.py (checkout,
portal, webhook)
This enables Stripe integration in PodcastItLater.
Related to task t-144e7lF
|
|
Add complete Stripe integration backend ready for testing once stripe
package is available in Nix environment.
Components: - Billing.py: Stripe Checkout, Billing Portal, webhook
handling - Database migrations for subscription tracking - Usage
tracking with tier-based limits - Idempotent webhook processing with
stripe_events table
Tier limits: free (10/mo), personal (50/mo), pro (unlimited)
Webhook events handled: - checkout.session.completed (link customer to
user) - customer.subscription.{created,updated,deleted} (sync state)
- invoice.payment_failed (mark past_due)
Requires: Stripe Python package in Nix, Web.py routes (next commit)
Related to task t-144e7lF
Amp-Thread-ID:
https://ampcode.com/threads/T-8feaca83-dcc2-46cb-8f71-d0785960a2f7
Co-authored-by: Amp <amp@ampcode.com>
|