mirror of
https://github.com/dergigi/boris.git
synced 2026-01-29 19:54:39 +01:00
debug: add targeted logging to diagnose listUpdatedAt timestamp issue
This commit is contained in:
@@ -356,6 +356,14 @@ class BookmarkController {
|
||||
// Newest first (descending)
|
||||
return (b.listUpdatedAt || 0) - (a.listUpdatedAt || 0)
|
||||
})
|
||||
|
||||
// DEBUG: Show top 5 sorted bookmarks
|
||||
console.log(`🔍 Top 5 bookmarks after sorting:`)
|
||||
sortedBookmarks.slice(0, 5).forEach((b, i) => {
|
||||
const listDate = b.listUpdatedAt ? new Date(b.listUpdatedAt * 1000).toISOString() : 'MISSING'
|
||||
console.log(` ${i + 1}. listUpdatedAt: ${b.listUpdatedAt} (${listDate})`)
|
||||
console.log(` content: ${(b.content || '').substring(0, 40)}`)
|
||||
})
|
||||
|
||||
const bookmark: Bookmark = {
|
||||
id: `${activeAccount.pubkey}-bookmarks`,
|
||||
|
||||
@@ -154,8 +154,18 @@ export async function collectBookmarksFromEvents(
|
||||
}
|
||||
|
||||
const pub = Helpers.getPublicBookmarks(evt)
|
||||
const processedPub = processApplesauceBookmarks(pub, activeAccount, false, evt.created_at)
|
||||
|
||||
// DEBUG: Check timestamps
|
||||
if (processedPub.length > 0) {
|
||||
const first = processedPub[0]
|
||||
console.log(`📋 Bookmark list event kind:${evt.kind}`)
|
||||
console.log(` evt.created_at: ${evt.created_at} (${evt.created_at ? new Date(evt.created_at * 1000).toISOString() : 'MISSING'})`)
|
||||
console.log(` first bookmark listUpdatedAt: ${first.listUpdatedAt} (${first.listUpdatedAt ? new Date(first.listUpdatedAt * 1000).toISOString() : 'MISSING'})`)
|
||||
}
|
||||
|
||||
publicItemsAll.push(
|
||||
...processApplesauceBookmarks(pub, activeAccount, false, evt.created_at).map(i => ({
|
||||
...processedPub.map(i => ({
|
||||
...i,
|
||||
sourceKind: evt.kind,
|
||||
setName: dTag,
|
||||
|
||||
Reference in New Issue
Block a user