From 27501f638119b775c6f1957c456e773addca0926 Mon Sep 17 00:00:00 2001 From: Phil Skentelbery Date: Tue, 9 Dec 2025 14:58:37 -0700 Subject: [PATCH] feat: v1.2.0-rc.2 - Media display fixes and feed enhancements MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Added - Feed Media Enhancement with Media RSS namespace support - RSS enclosure, media:content, media:thumbnail elements - JSON Feed image field for first image - ADR-059: Full feed media standardization roadmap ## Fixed - Media display on homepage (was only showing on note pages) - Responsive image sizing with CSS constraints - Caption display (now alt text only, not visible) - Logging correlation ID crash in non-request contexts ## Documentation - Feed media design documents and implementation reports - Media display fixes design and validation reports - Updated ROADMAP with v1.3.0/v1.4.0 media plans 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- CHANGELOG.md | 19 + ...ADR-059-full-feed-media-standardization.md | 281 +++++++++ docs/design/feed-media-handling-options.md | 334 ++++++++++ docs/design/feed-media-option2-design.md | 424 +++++++++++++ docs/design/media-display-fixes.md | 311 ++++++++++ docs/design/v1.1.2-caption-alttext-update.md | 153 +++++ docs/design/v1.2.0-media-css-design.md | 114 ++++ docs/projectplan/ROADMAP.md | 26 +- .../reports/2025-11-28-media-display-fixes.md | 177 ++++++ .../2025-12-09-feed-media-implementation.md | 347 +++++++++++ .../2025-12-09-media-display-validation.md | 228 +++++++ starpunk/__init__.py | 2 +- starpunk/feeds/json_feed.py | 6 + starpunk/feeds/rss.py | 150 ++++- starpunk/routes/public.py | 14 +- static/css/style.css | 79 +++ templates/index.html | 4 + templates/note.html | 18 +- templates/partials/media.html | 16 + tests/test_feeds_rss.py | 571 ++++++++++++++++++ tests/test_media_upload.py | 130 +++- 21 files changed, 3360 insertions(+), 44 deletions(-) create mode 100644 docs/decisions/ADR-059-full-feed-media-standardization.md create mode 100644 docs/design/feed-media-handling-options.md create mode 100644 docs/design/feed-media-option2-design.md create mode 100644 docs/design/media-display-fixes.md create mode 100644 docs/design/v1.1.2-caption-alttext-update.md create mode 100644 docs/design/v1.2.0-media-css-design.md create mode 100644 docs/reports/2025-11-28-media-display-fixes.md create mode 100644 docs/reports/2025-12-09-feed-media-implementation.md create mode 100644 docs/reports/2025-12-09-media-display-validation.md create mode 100644 templates/partials/media.html create mode 100644 tests/test_feeds_rss.py diff --git a/CHANGELOG.md b/CHANGELOG.md index 7336c30..ca633d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.2.0-rc.2] - 2025-12-09 + +### Added +- **Feed Media Enhancement** - Media RSS and JSON Feed image support for improved feed reader compatibility + - RSS feeds now include Media RSS namespace (xmlns:media) for structured media metadata + - RSS enclosure element added for first image (per RSS 2.0 spec) + - Media RSS media:content elements for all images with type, medium, and fileSize attributes + - Media RSS media:thumbnail element for first image preview + - JSON Feed items include "image" field with first image URL (per JSON Feed 1.1 spec) + - Image field absent (not null) when no media attached + - Both feed formats maintain existing HTML embedding for universal reader support + - Provides enhanced display in modern feed readers (Feedly, Inoreader, NetNewsWire) + +### Fixed +- **Media Display on Homepage** - Images now display correctly on homepage, not just individual note pages +- **Responsive Image Sizing** - Images constrained to container width with proper CSS +- **Caption Display** - Captions now used as alt text only, not displayed as visible text +- **Logging Correlation ID** - Fixed crash in non-request contexts (app init, memory monitor) + ## [1.2.0-rc.1] - 2025-11-28 ### Added diff --git a/docs/decisions/ADR-059-full-feed-media-standardization.md b/docs/decisions/ADR-059-full-feed-media-standardization.md new file mode 100644 index 0000000..9140085 --- /dev/null +++ b/docs/decisions/ADR-059-full-feed-media-standardization.md @@ -0,0 +1,281 @@ +# ADR-059: Full Feed Media Standardization (Option 3) + +## Status +Proposed (For v1.3.0 Backlog) + +## Context +StarPunk v1.2.0 introduced media attachments for notes (images). The initial implementation embeds media as HTML in feed description fields. Option 2 (implemented in v1.2.x) adds Media RSS extension elements and JSON Feed image fields for better feed reader compatibility. + +This ADR documents Option 3: Full Standardization, which provides comprehensive media support across all syndication formats, including video, audio, and advanced features. This is planned for v1.3.0 or later. + +## Decision +Document the scope of "Full Standardization" for feed media support to be implemented in a future release. This option goes beyond Option 2's basic Media RSS support to include: + +1. **Complete Media RSS Specification Support** +2. **Podcast RSS Support (RSS 2.0 enclosures for audio)** +3. **Video Support** +4. **Multiple Image Sizes/Thumbnails** +5. **Full JSON Feed 1.1 Media Compliance** + +## Scope of Full Standardization + +### 1. Complete Media RSS Implementation + +**Research Required**: Full Media RSS specification at https://www.rssboard.org/media-rss + +**Elements to Implement**: +- `` with full attribute support: + - `url` (required) - Direct URL to media file + - `fileSize` - Size in bytes + - `type` - MIME type + - `medium` - Type: "image", "audio", "video", "document", "executable" + - `isDefault` - Boolean for default rendition + - `expression` - "full", "sample", "nonstop" + - `bitrate` - Kilobits per second + - `framerate` - Frames per second (video) + - `samplingrate` - Samples per second (audio) + - `channels` - Audio channels + - `duration` - Seconds + - `height` / `width` - Dimensions in pixels + - `lang` - RFC-3066 language code + +- `` - Container for multiple renditions of same content +- `` - Multiple sizes with url, width, height, time +- `` - Media title (type="plain" or "html") +- `` - Media description (type="plain" or "html") +- `` - Comma-separated keywords +- `` - Categorization with scheme attribute +- `` - Credit attribution with role and scheme +- `` - Copyright information +- `` - Content rating (scheme-based) +- `` - MD5/SHA-1 hash for integrity +- `` - Embeddable player URL + +**Effort Estimate**: 8-12 hours + +### 2. Podcast RSS Support + +**Research Required**: +- Apple Podcast RSS specification +- Google Podcast RSS requirements +- Podcast Index namespace (podcast:) + +**Elements to Implement**: +- iTunes namespace (`xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"`): + - `` - Episode summary + - `` - Audio duration (HH:MM:SS) + - `` - Episode artwork + - `` - Content rating + - `` - Episode number + - `` - Season number + - `` - "full", "trailer", "bonus" + - `` - Author name + - `` - Owner contact + +- Standard RSS `` for audio: + - `url` - Direct audio file URL + - `length` - File size in bytes + - `type` - MIME type (audio/mpeg, audio/mp4, etc.) + +**Database Changes**: +- Add `duration` column to `note_media` table +- Add `media_type` enum (image, audio, video) +- Consider `podcast_metadata` table for series-level data + +**Effort Estimate**: 10-16 hours + +### 3. Video Support + +**Research Required**: +- Video hosting considerations (storage, bandwidth) +- Supported formats (mp4, webm, ogg) +- Transcoding requirements +- Poster image generation + +**Implementation Scope**: +- Accept video uploads via Micropub media endpoint +- Generate poster thumbnails automatically +- Include in Media RSS with proper video attributes: + - `medium="video"` + - `framerate`, `duration`, `bitrate` + - Associated `` for poster + +- HTML5 `