Commit Graph

341 Commits

Author SHA1 Message Date
Your Name c659c0267d Fix: Hide PWA install button when installed, improve clustering, add debug logs
Fixes three major issues:

1. PWA Install Button (TopBar.jsx):
   - Import isRunningAsPWA() and canInstall() from pwaInstall.js
   - Add state to track if button should be shown
   - Listen to beforeinstallprompt and appinstalled events
   - Hide button when app is already installed or running as PWA

2. Search Suggestions Debug (SmartSearchBar.jsx, recoSearch.js):
   - Add console.log statements to trace search flow
   - Track: search query, results count, errors
   - Helps diagnose why suggestions don't appear
   - recoSearch: Log each endpoint attempt and response

3. Clustering Improvements (usePostsEngine.js, postPriority.js):
   - Reduce maxFullCards: 15 → 12 (fewer full cards)
   - Increase clusterRadius: 0.0015 → 0.002 (~200m for better grouping)
   - Increase minScoreForCard: 35 → 50 (stricter threshold)
   - Reduce default recoScore: 50 → 40 (lower baseline)
   - Add console.log for prioritization results
   - Result: More posts shown as simple markers, less clutter

Debug logs will be visible in browser console to diagnose issues

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-23 15:23:44 -05:00
Your Name 76adb74833 Add intelligent post clustering and simple markers
Implement smart prioritization system to reduce map clutter:
- Create priority scoring based on reco score, category, freshness, distance, engagement
- Cluster nearby posts and show best post as full card, others as simple markers
- Simple markers: circular icons with category colors, hover preview, click to expand
- Max 15 full cards displayed, rest shown as compact markers
- Optimize search debounce: 220ms → 150ms for faster suggestions

New files:
- postPriority.js: Scoring and clustering algorithm

Updated:
- markerManager.js: Add createSimpleMarkerForPost() with hover cards
- usePostsEngine.js: Use prioritizePosts() to separate full cards vs simple markers
- SmartSearchBar.jsx: Faster debounce (150ms), increased limit to 12 suggestions

Result: Less visual clutter, better UX with prioritized content

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-23 15:15:53 -05:00
Your Name 6d94b6ac12 Fix PWA: hide install prompt when already installed or running as PWA
- Add isRunningAsPWA() detection (standalone mode, iOS, Android)
- Add localStorage tracking to remember installation state
- Skip prompt if already running as PWA or previously installed
- Increase auto-prompt delay from 5s to 10s for better UX
- Export canInstall() to check installation availability
- Mark as installed when appinstalled event fires

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-23 15:03:09 -05:00
Your Name 290e713796 Add autocomplete suggestions with smart zoom
- Update recoSearch to use /api/suggestions endpoint
- Improve zoom levels for different types:
  * Cities: zoom 11
  * Regions: zoom 7
  * Posts: zoom 16
  * Profiles: zoom 14
- Support lat/lon in normalized results
- Real-time suggestions as user types

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-23 11:59:11 -05:00
Your Name a3903906df Integrate smart feed and unified search
- Update fetchSmartFeed() to call backend /api/smart-feed
- Update fetchUnifiedSearch() to call backend /api/unified-search
- Replace fetchPosts() with fetchSmartFeed() in usePostsEngine
- Add /api/unified-search as primary search endpoint
- Search now queries posts, profiles, and places together
- Map now shows personalized and trending posts

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-23 11:32:59 -05:00
Your Name 2c3722146a Fix map center drift by using geographic center instead of bounds center
Problem: Map position drifted north/higher on each reload because
bounds.getCenter() returns a visually offset center when pitch is applied

Solution:
- Use map.getCenter() for accurate geographic center (not affected by pitch)
- Save and restore bearing (rotation) along with pitch
- Store: lat, lon, zoom, pitch, bearing

Before: bounds.getCenter() → visual center (offset by 3D tilt)
After: map.getCenter() → true geographic center

This ensures the map returns to the exact same position after reload,
regardless of the 3D tilt angle.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-22 23:05:44 -05:00
Your Name f22b9dfe06 Fix pitch persistence to prevent view drift on reload
Problem: Map pitch was always forced to 45° instead of being restored,
causing the view to appear shifted higher after each reload

- Save current pitch value to localStorage on moveend
- Restore pitch from localStorage on map initialization
- Remove forced pitch=45 on map load event
- Default to 45° only if no saved pitch exists

This prevents the map from drifting north/higher with each page reload
while maintaining the 3D tilt effect.

Auth: Session persistence already implemented via localStorage tokens
- Tokens are saved in localStorage and restored on mount
- Auto-refresh runs every 30s to keep session alive
- If session issues persist, check browser console for specific errors

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-22 22:59:30 -05:00
Your Name d845fd7a5a Fix marker stability and reduce image preview size
- Use deterministic hash-based offset calculation for stable marker positions
- Markers now stay in same position across zoom/pan operations
- Check geographic distance instead of pixel distance for clustering
- Reduce image preview from 60px to 40px for compact modal
- Reduce button font size to save space

Fixes: Markers no longer jump around when zooming
Fixes: Modal stays compact with image preview

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-22 22:51:05 -05:00
Your Name c3e9426e64 Improve map UX: compact modal, visible crosshair, smart marker overlap
- Reduce create post modal height (max 45vh) and add scroll
- Lower modal position (bottom: 8%) to keep map visible
- Move crosshair higher (top: 30%) for better visibility
- Implement smart marker offsetting for nearby posts
- Add visual connection line from offset markers to true position
- Create cascade effect for clustered markers (45° circular pattern)
- Maintain pointer accuracy when zooming

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-22 22:44:50 -05:00
Your Name 2c4c9a7065 Add image upload and category icons to map cards
- Add image upload functionality with file picker and URL input
- Display custom uploaded images or category-specific FontAwesome icons
- Add icon styles for all themes (dark, blue, light)
- Map unique icons to each category and subcategory (News, Friends, Events, Market)
- Update card templates to show 72x72px icon/image on the left
- Add image preview and validation (max 5MB, images only)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-22 22:36:20 -05:00
Your Name d8b4be20fd carche 2025-12-22 02:30:42 -05:00
Your Name 5ec6ce1c09 update frontend 2025-12-22 02:17:39 -05:00
Your Name 57580e418e update frontend 2025-12-22 02:16:28 -05:00
Your Name d25bbf21a2 update frontend 2025-12-22 02:10:45 -05:00
Your Name c043dbf8dc update frontend 2025-12-22 02:08:45 -05:00
Your Name 0983aa9ba2 update frontend 2025-12-22 02:07:22 -05:00
Your Name 500b0fc0bd update frontend 2025-12-21 23:37:00 -05:00
Your Name 339e62b0c8 feat: PWA fully working + sharing preview fixed 2025-12-21 23:07:54 -05:00
Your Name b8a527ea00 update frontend 2025-12-21 22:54:50 -05:00
Your Name 7159d94bb7 update frontend 2025-12-21 22:51:10 -05:00
Your Name c20987dc29 update frontend 2025-12-21 22:40:48 -05:00
Your Name 72c859cfd4 presque xorewcr 2025-12-21 22:28:52 -05:00
Your Name dcea292c4c update frontend 2025-12-21 22:09:20 -05:00
Your Name 460c7b76c7 update frontend 2025-12-21 22:00:52 -05:00
Your Name 48edeb03fe update frontend 2025-12-21 21:59:31 -05:00
Your Name 5b3d35cd25 update frontend 2025-12-21 21:20:31 -05:00
Your Name 80d75a7a57 update frontend 2025-12-21 20:26:17 -05:00
Your Name 4d2f81f434 update frontend 2025-12-21 20:19:33 -05:00
Your Name dee963cd0e update frontend 2025-12-21 20:16:34 -05:00
Your Name ea31d3e69a update frontend 2025-12-21 20:06:05 -05:00
Your Name 555342d377 update frontend 2025-12-21 20:01:42 -05:00
Your Name 7ea3b2c4fa update frontend 2025-12-21 19:54:35 -05:00
Your Name 862e9f4303 update frontend 2025-12-21 19:48:12 -05:00
Your Name 9314caec42 update frontend 2025-12-21 19:44:26 -05:00
Your Name e102911c06 update frontend 2025-12-21 19:36:13 -05:00
Your Name 783d8b79cd update frontend 2025-12-21 19:33:47 -05:00
Your Name 8508f0f98f update frontend 2025-12-21 19:32:19 -05:00
Your Name eb018a0bee update frontend 2025-12-21 19:28:10 -05:00
Your Name 8a954a2ff9 update frontend 2025-12-21 19:26:34 -05:00
Your Name 57d2949130 update frontend 2025-12-21 19:25:03 -05:00
Your Name a909b02e37 update frontend 2025-12-21 19:23:14 -05:00
Your Name f2f902f24b update frontend 2025-12-21 19:21:18 -05:00
Your Name b5db6e0ca8 update frontend 2025-12-21 19:19:22 -05:00
Your Name 13646408eb update frontend 2025-12-21 19:17:48 -05:00
Your Name 26a8bf84e8 update frontend 2025-12-21 19:17:06 -05:00
Your Name 5e8a8ee46e update frontend 2025-12-21 19:12:15 -05:00
Your Name 89674cb0df update frontend 2025-12-21 19:10:47 -05:00
Your Name e47daa2efb update frontend 2025-12-21 19:09:10 -05:00
Your Name 1144e87358 update frontend 2025-12-21 19:05:05 -05:00
Your Name af7262868c update frontend 2025-12-21 19:02:04 -05:00