Commit Graph

14 Commits

Author SHA1 Message Date
Wayne Sutton
4b187cff53 fix: use frontmatter image for OG meta instead of default 2025-12-20 16:34:48 -08:00
Wayne Sutton
98a43b86a2 feat: implement chunked backfilling for aggregate component
- Add backfillAggregatesChunk mutation that processes 500 records at a time
- Uses pagination and ctx.scheduler.runAfter to chain batch processing
- Prevents Convex 16MB memory limit issues with large datasets
- Progress visible in Convex dashboard logs
- Track seen session IDs across chunks for unique visitor counting
- Update howstatsworks.md with chunked backfilling documentation
- Add v1.11.1 changelog entries
2025-12-20 14:59:05 -08:00
Wayne Sutton
0057194701 fix: use direct counting for stats until aggregates are backfilled
The aggregate components only contained new page views (after installation),
not the ~6000+ historical views. Changed getStats to use direct counting
from pageViews table to ensure all historical data is displayed correctly.

This is a temporary fix until we implement chunked backfilling to handle
the large dataset without exceeding memory limits.
2025-12-20 14:54:11 -08:00
Wayne Sutton
8d28e36458 feat(stats): switch to aggregate component for O(log n) counts
- Add @convex-dev/aggregate package for efficient aggregation
- Update convex.config.ts with pageViewsByPath, totalPageViews, uniqueVisitors aggregates
- Update recordPageView to insert into aggregate components
- Update getStats to use aggregate counts instead of O(n) table scans
- Add backfillAggregates internal mutation for existing data
- Update prds/howstatsworks.md with old vs new comparison
- Update changelog.md with v1.11.0 entry
- Update files.md with aggregate component info
2025-12-20 14:39:53 -08:00
Wayne Sutton
4ae8579f48 docs: update site description across 9 files and add metadata table to setup guide 2025-12-20 11:33:14 -08:00
Wayne Sutton
997b9cad21 docs: update blog post and TASK.md with v1.9.0 scroll-to-top and v1.10.0 fork configuration
Updated:
- content/blog/raw-markdown-and-copy-improvements.md
  - Changed title from 'v1.7 and v1.8' to 'v1.7 to v1.10'
  - Added Fork configuration section (v1.10.0) with 9-file table
  - Added Scroll-to-top section (v1.9.0) with configuration options
  - Updated summary to include all features from v1.7 to v1.10
  - Fixed image path to /images/v17.png
  - Updated sync command guidance for dev vs prod
- TASK.md
  - Added new To Do items for future features
  - Removed duplicate Future Enhancements section
- content/pages/docs.md
  - Added Mobile menu section
  - Added Copy Page dropdown table with all options
  - Added Markdown tables section
- content/pages/about.md
  - Updated Features list with new v1.8.0 features
- content/blog/setup-guide.md
  - Added image field to pages schema
  - Updated Project structure with new directories
  - Added /raw/{slug}.md to API endpoints
  - Added Mobile Navigation and Copy Page Dropdown sections
  - Added featured image documentation with ordering details

Documentation now covers all features from v1.7.0 through v1.10.0.
2025-12-20 11:05:38 -08:00
Wayne Sutton
87e02d00dc feat: add featured section, logo gallery, Firecrawl import, and API export
Featured Section
- Frontmatter-controlled featured items with featured: true and featuredOrder
- Card view with excerpts and list/card toggle button
- View preference saved to localStorage
- New Convex queries for featured posts and pages with by_featured index

Logo Gallery
- Continuous marquee scroll with clickable logos
- CSS animation, grayscale with color on hover
- Configurable speed, position, and title
- 5 sample logos included

Firecrawl Content Importer
- npm run import <url> scrapes external URLs to markdown drafts
- Creates local files in content/blog/ with frontmatter
- Then sync to dev or prod (no separate import:prod command)

API Enhancements
- New /api/export endpoint for batch content fetching
- AI plugin discovery at /.well-known/ai-plugin.json
- OpenAPI 3.0 spec at /openapi.yaml
- Enhanced llms.txt documentation

Documentation
- AGENTS.md with codebase instructions for AI agents
- Updated all sync vs deploy tables to include import workflow
- Renamed content/pages/changelog.md to changelog-page.md

Technical
- New components: FeaturedCards.tsx, LogoMarquee.tsx
- New script: scripts/import-url.ts
- New dependency: @mendable/firecrawl-js
- Schema updates with featured, featuredOrder, excerpt fields
2025-12-18 12:28:25 -08:00
Wayne Sutton
e5b22487ca feat(search): add real-time full text search with Command+K modal using Convex search indexes and Phosphor Icons 2025-12-17 22:02:52 -08:00
Wayne Sutton
97081dc82d fix(stats): resolve write conflicts in activeSessions table
- Add 10-second dedup window to heartbeat mutation for idempotency
- Add frontend debouncing (5s) with refs to prevent duplicate calls
- Track pending heartbeat state to block overlapping async calls
- Early return when session already updated with same path

Backend (convex/stats.ts):
- Add HEARTBEAT_DEDUP_MS constant (10 seconds)
- Check if session was recently updated before patching

Frontend (src/hooks/usePageTracking.ts):
- Add isHeartbeatPending, lastHeartbeatTime, lastHeartbeatPath refs
- Wrap sendHeartbeat in useCallback with debounce logic
- Import useCallback from React

Fixes write conflict retries shown in Convex dashboard for stats:heartbeat
2025-12-15 12:52:34 -08:00
Wayne Sutton
b280cb4605 docs: add npm run sync:prod notes for production
Clarify when to use development vs production sync commands
in setup-guide, about-this-blog, and markdown-with-code-examples
2025-12-15 09:25:42 -08:00
Wayne Sutton
6c10829b1c feat: add real-time stats page with live visitor tracking and page view analytics 2025-12-14 23:07:11 -08:00
Wayne Sutton
078fbe6698 fix: add edge functions for dynamic RSS, sitemap, and API proxying to Convex HTTP endpoints 2025-12-14 17:00:46 -08:00
Wayne Sutton
c6c12ecd58 fix: update OG image meta tags and rename to Markdown Site 2025-12-14 14:51:22 -08:00
Wayne Sutton
462729de58 chore: prepare v1.0.0 for Netlify deployment
Update version to 1.0.0 across package.json and changelog. Configure netlify.toml with Convex deployment URL (agreeable-trout-200.convex.site). Verify TypeScript type-safety for src and convex directories. Confirm Netlify build passes with SPA 404 fallback configured. Update TASK.md with deployment steps and files.md with complete file structure.
2025-12-14 11:30:22 -08:00