Add PWA offline support, podcast generation pipeline, and comprehensive tests#5
Open
JordanTranchina wants to merge 67 commits into
Open
Conversation
… 'Coming soon' in README.
…ough chrome extension. feat: Configure Supabase credentials, improve single-user session handling, and enhance save operation feedback in the extension.
feat: Configure extension and update docs
…Spec's Future Enhancements.
feat(tts): Implement basic TTS with background service
…ability, and share target integration with IndexedDB and service worker.
…e submission logic into a reusable function.
…c into a reusable function.
Fix PWA Share Target & Improve UX
feat: Podcast Data Extraction (Step 1)
…ng output locally and in Supabase.
- Added `podcast/script.py`: Core logic for Gemini interaction and persona management. - Added `podcast/requirements.txt`: Python dependencies for the podcast pipeline. - Implemented Supabase integration for persisting generated scripts and metadata. - Configured GitHub Secrets support for automated cloud runs.
…ngine feat: AI Scriptwriting (Vibe Engine) Implementation
…dual audio files for each line.
feat: Implement Audio Generation (Issue #8)
feat: secure secrets and automate podcast generation
…te Supabase anonymous keys in JavaScript configurations.
…xtension Update Supabase keys to modern publishable keys
…ith-persistent-episodes Fix Podcast Generation and Artifact Upload
feat: Upload podcast audio to Supabase Storage (#26)
…t modules, along with CI integration.
feat: Introduce comprehensive unit and E2E testing for web and podcast modules, along with CI integration.
- Add supabase/functions/podcast-rss/index.ts: Deno edge function that serves a valid RSS 2.0 / iTunes podcast feed from podcast_episodes table (HH:MM:SS duration, XML escaping, deployed to Supabase with --no-verify-jwt) - Add tests/unit/podcast-rss.test.js: Jest unit tests for formatDuration, formatRFC822, escapeXml, and buildRssXml (92 tests passing) - Add .claude/launch.json: dev launcher config for web server on port 8080 - Fix package.json: exclude .claude/worktrees from Jest test discovery Closes #10
feat(#10): Add podcast RSS feed edge function
…neration Use ffprobe (ships with ffmpeg) to read MP3 duration and os.path.getsize for file size immediately after assembly, then persist both alongside the audio_url in the podcast_episodes table. - Add get_audio_metadata(file_path) -> (duration_seconds, size_bytes) - Update update_episode_audio_url() to accept and write optional duration/size - Update test_script.py: fix existing update test + add 4 new tests for get_audio_metadata (success path, ffprobe failure fallback) and the new duration/size update path
…pointers feat: Add pytest.ini to set testpaths.
- Replace deprecated with + - Use + with instead of + - Upgrade model alias from gemini-flash-latest to gemini-2.0-flash - Update mocks in test_script.py to patch genai.Client - Swap requirements.txt entry to google-genai All 33 tests pass.
chore: migrate from google-generativeai to google-genai SDK
Two bugs prevented saves from reaching Supabase when sharing from Android: 1. Missing Authorization header in save.html caused RLS policy to reject the INSERT, silently falling back to the offline queue every time. 2. The offline pending queue (IndexedDB) was never synced back to the cloud. Added getPendingShares/deletePendingShare to db.js, implemented syncPendingShares() in app.js, and call it on init and on reconnect. https://claude.ai/code/session_01WgxxrUffuvF1ZD2iXw89GK
|
👀 Like those ideas, interested to see if @kbroose and his agent will accept this PR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces three major feature areas to Stash:
Key Changes
PWA & Offline Experience
web/db.js(new) – IndexedDB wrapper for caching articles and pending saves with offline-first read/write operationsweb/sw.js(modified) – Enhanced Service Worker with improved cache versioning, offline fallback strategy, and background sync supportweb/app.js(modified) – AddedsetupRealtime()for Supabase real-time subscriptions,syncPendingShares()for offline queue processing, and PWA install prompt handlingweb/manifest.json(modified) – Added maskable icon support and improved PWA metadataweb/save.html(modified) – Redesigned with stealth overlay UI for saving state, spinner animations, and improved mobile UXweb/styles.css(modified) – Code formatting and PWA-specific styling improvementsdocumentation/Stash PWA Specification.md(new) – Complete PWA product and technical specificationPodcast Generation Pipeline
podcast/script.py(new) – Core orchestrator: fetches articles, generates conversational scripts via Gemini 2.0 Flash, synthesizes audio with Edge TTS, assembles episodes, and uploads to Supabasepodcast/extract.py(new) – Supabase article fetching with text cleaning and filtering logicpodcast/assembly.py(new) – FFmpeg-based audio concatenation with ID3 metadata taggingsupabase/functions/podcast-rss/index.ts(new) – Deno edge function generating iTunes-compatible RSS feeds from podcast episodessupabase/migrations/20260126_create_podcast_episodes.sql(new) – Database schema for podcast episodes with RLS policies.github/workflows/podcast.yml(new) – Daily cron job (8 AM UTC) to generate podcasts with manual dispatch supportdocumentation/PODCAST_TECH_SPEC.md(new) – Technical architecture and cost analysis for the podcast pipelinedocumentation/Product Spec.md(new) – Product vision and feature specification for Listen LaterTesting Infrastructure
tests/unit/web.test.js(new) – Jest tests for web app utility functions with mocked Supabase clienttests/unit/extension.test.js(new) – Tests for extension background script logic (voice selection, site name extraction, payload building)tests/unit/podcast-rss.test.js(new) – Tests for RSS generation helpers (duration formatting, RFC-822 dates, XML escaping)tests/e2e/web.e2e.test.js(new) – Puppeteer-based E2E tests loading the web app in headless Chrome with mocked Supabasepodcast/tests/test_script.py(new) – Pytest coverage for script generation, Gemini API interaction, markdown fence cleanup, and Supabase operationspodcast/tests/test_extract.py(new) – Tests for article fetching and text cleaning logicpodcast/tests/test_assembly.py(new) – Tests for audio assembly and ffmpeg command constructionpodcast/tests/conftest.py(new) – Pytest configuration with Supabase client mocking.github/workflows/pr-test.yml(new) – CI workflow running Python pytest and JavaScript Jest on pullhttps://claude.ai/code/session_01WgxxrUffuvF1ZD2iXw89GK