v1.199.9
Fix
Include referenced scripture notes on shared thread page and card previews
- GET /api/shared/thread/:shareToken — resolves scripture references
- POST /api/shared/add-to-harvous — copies referenced scripture notes
- getThreadsWithCountsLimited() — includes referenced notes in counts
Fix
Replace all remaining .toISOString() in Drizzle operations
- sync.ts: lastVisited in thread/note create and update (4 instances)
- spaces.ts: expiresAt in invitation creation
- user.ts: createdAt in Siri Shortcuts note creation
- inbox.ts: date comparisons in auto-archive and auto-delete
Fix
Remove NODE_ENV gate from "already owned" check + clean up debug
- The "Already in your Harvous" check was gated behind
- NODE_ENV === 'production', but Netlify Functions runtime doesn't
- set NODE_ENV — so the check never ran, allowing unlimited duplicates.
- Removed the NODE_ENV guard so the ownership check always runs.
- Also removed temporary debug console.error logging.
Fix
Pass Date objects instead of ISO strings to Drizzle inserts
- Drizzle mode:'date' columns expect Date objects. The noteTimestamp
- in add-to-harvous and inbox accept-all endpoints called .toISOString()
- which produced a string — Drizzle then crashed trying to call
- .toISOString() on the already-stringified value.
Fix
Use message string match for "already owned" detection
- instanceof APIError can fail across module boundaries. Switch to
- checking err.message includes 'Already in your Harvous' instead.
Feature
Add thread note type counts to navigation data
- Enhanced the navigation API to include counts of unorganized thread notes by integrating getThreadNoteTypeCounts.
- Updated ensureUnorganizedThread function to streamline note counting logic, focusing on direct counts.
- Improved handling of note counts in the navigation response for better accuracy and user experience.
