- add ContentNode interface for content rendering
- replace any with proper types in content.ts (15 -> 6 errors)
- use Record<string, unknown> for dynamic content objects
- add type assertions for content arrays
- replace any with Prisma types (Post, Project, Album, Media)
- use Component type for Svelte component parameters
- use Snippet type for Svelte 5 render slots
- use Record<string, unknown> for dynamic objects
- add proper type guards for error handling
- fix editor extension types with proper generics
- all frontend components now have zero any type errors
- fix edra placeholder components with proper editor context types
- fix gallery image types with proper type assertions
- fix ProseMirror transaction types in link manager
- fix command types in composer toolbar
- replace any with unknown where type is dynamic
- use Leaflet types (L.Map, L.Marker, L.LeafletEvent) for map components
- use Post and Project types from Prisma for form components
- use JSONContent type for editor instances
- use Snippet type for Svelte 5 render functions
- use EditorView type for TipTap/ProseMirror views
- use proper type guards for error handling
- add editor interface types for save/clear methods
- use Prisma.JsonValue and Prisma input types throughout
- add proper type guards for array and object checks
- replace any with Record<string, unknown> where appropriate
- all API/RSS routes now have zero any type errors
- add ProjectUpdateBody interface for partial updates
- use Prisma.ProjectUpdateInput for update operations
- replace all remaining any types in projects endpoints
- consistent use of proper types across all API routes
- add AlbumPhoto, BlockContent, AppleMusicData types
- add ProjectCreateBody interface for request validation
- use Prisma.ProjectWhereInput for query filters
- use Prisma.JsonValue for JSON fields
- add proper type guards for content validation
- add ContentNode, GalleryItem, TextNode, ParagraphNode, DocContent types
- use Prisma.JsonValue for JSON column content
- use Prisma.ProjectUpdateInput and Prisma.PostUpdateInput for update payloads
- improve type guards for content filtering
- replace any[] with never[] for empty placeholder arrays
- add GalleryItem type for media/gallery item unions
- add EdraCommand import for editor command types
- add Post, Media imports from Prisma
- add BlockContent, DraftPayload, PostPayload, PhotoPayload types
- replace any with proper types in form handlers and callbacks
- use unknown for truly dynamic data, Record types for object props
Replace broken text extraction logic with renderEdraContent() which correctly handles TipTap marks including links, bold, italic, etc.
Before: Links were stripped from RSS content (only plain text extracted)
After: Full HTML with proper links, formatting preserved in CDATA sections
Files updated:
- src/routes/rss/+server.ts: Main RSS feed
- src/routes/rss/universe/+server.ts: Universe RSS feed
Fixes issue where content.blocks was expected but TipTap uses content.type='doc' format.
Migrate remaining Svelte 4 reactive statements to Svelte 5 $derived:
- media/audit/+page.svelte: Convert allSelected, hasSelection, selectedSize to $derived
- universe/compose/+page.svelte: Convert postType, initialContent to $derived
- Also migrated all let declarations to $state() in audit page for consistency
All reactive statements now use Svelte 5 runes mode.
Make page headers sticky with subtle shadow on scroll. Fix min-height to 90px to prevent jumping when switching tabs. Modernize layout to use full viewport height.
Convert admin components from Svelte 4 to Svelte 5 syntax using $props, $state, $derived, and $bindable runes. Simplifies AdminNavBar logic and improves type safety.
Extract BrandingToggle and BrandingSection components. Consolidate $effect blocks, add $derived state, and apply BEM naming. Reduces component size by 47% while improving maintainability.
Add live preview to branding form showing featured image, background color, and logo. Add database fields and toggles to control visibility of each element in project headers.
Add return false to drop handler so ProseMirror's Dropcursor extension can handle the actual node movement. Previously the handler would intercept drops but not perform any movement.
Task 4 was already ~90% complete when we started Phase 3:
- createListFilters utility already exists and is fully functional
- Uses Svelte 5 runes ($state, $derived) for reactivity
- Generic type-safe configuration with FilterConfig<T>
- Integrated into projects and posts list pages
- Removed ~100 lines of duplicated filtering logic
Changes in this commit:
- Add comprehensive completion documentation (task-4-list-filters-completion.md)
- Update admin modernization plan with Task 4 completion status
- Add test script to package.json for future testing
- Document testing approach (integration-tested, not unit-tested)
Testing notes:
- Rune-based code cannot be unit tested outside Svelte compiler
- Extensively integration-tested through projects/posts pages
- Manual QA complete for all filtering and sorting scenarios
Implementation details documented:
- 8 common sort functions (dateDesc, dateAsc, stringAsc, etc.)
- Filter equality matching with 'all' bypass
- Reactive updates via $derived
- Type-safe API with ListFiltersResult<T>
Media page intentionally uses manual filtering due to server-side
pagination requirements.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Update task-3 plan document with:
- Completion status and commit reference
- Implementation results summary
- Checkboxes for completed phases
- Updated success criteria checklist
All implementation work is complete, manual QA testing pending.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Extract reusable form patterns following Svelte 5 best practices:
**New Store Factory** (`project-form.svelte.ts`)
- Centralizes form state management with `$state` and `$derived` runes
- Provides validation, payload building, and field mutation methods
- Type-safe with ProjectFormData interface
- Reusable across different contexts
**New Helpers**
- `useDraftRecovery.svelte.ts`: Generic draft restoration with auto-detection
- `useFormGuards.svelte.ts`: Navigation guards, beforeunload warning, Cmd+S shortcut
- `DraftPrompt.svelte`: Extracted UI component for draft recovery prompts
**Refactored ProjectForm.svelte**
- Reduced from 720 lines to 417 lines (42% reduction)
- Uses new composable helpers instead of inline logic
- Cleaner separation between UI orchestration and business logic
- All form state now managed through formStore
- Draft recovery, navigation guards fully extracted
**Benefits**
- Reusable patterns for PostForm, EssayForm, etc.
- Easier to test helpers in isolation
- Consistent UX across all admin forms
- Better maintainability and code organization
Closes Task 3 of admin modernization plan (Phase 2)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Document the planned refactoring of ProjectForm.svelte to use:
- Store factory for form state management
- Reusable draft recovery helper
- Reusable form guards helper
- Simplified component structure
This will reduce ProjectForm from ~719 lines to ~200-300 lines and
establish patterns for PostForm, EssayForm, and other admin forms.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Fix a race condition where the clickOutside action's update() method
would remove and re-add the event listener every time it was called,
even when the enabled state hadn't changed. This caused clicks to be
missed during the setTimeout delay.
Changes:
- Track previous enabled state before updating
- Only use setTimeout when transitioning from disabled to enabled
- Immediately re-add listener when enabled state stays true
- No listener changes when enabled state stays false
This ensures click-outside events are consistently detected without
gaps in event listener registration.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Replace manual click event listener with clickOutside action for the
pane backdrop click handling. This simplifies the code and ensures
consistent click-outside behavior.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Replace manual click event listener with clickOutside action for the
publish menu dropdown. This simplifies the code and ensures consistent
click-outside behavior across all admin dropdowns.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Updated components to use the new clickOutside action instead of manual
event listener management:
- ProjectListItem: Add clickOutside action and dropdown coordination
- AdminSegmentedController: Replace $effect with clickOutside action
- BubbleTextStyleMenu: Simplify click-outside handling
- BubbleColorPicker: Simplify click-outside handling
- Posts/Projects pages: Remove redundant page-level click handlers
The clickOutside action provides a cleaner, more maintainable way to
handle click-outside behavior with proper lifecycle management.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>