mirror of
https://github.com/dergigi/boris.git
synced 2026-01-26 02:04:58 +01:00
fix(archive): add 'a' coord tag to mark-as-read reactions for articles; archiveController maps a-tag instantly; add debug
This commit is contained in:
@@ -621,7 +621,16 @@ const ContentPanel: React.FC<ContentPanelProps> = ({
|
||||
currentArticle.pubkey,
|
||||
currentArticle.kind,
|
||||
activeAccount,
|
||||
relayPool
|
||||
relayPool,
|
||||
{
|
||||
aCoord: (() => {
|
||||
try {
|
||||
const dTag = currentArticle.tags.find(t => t[0] === 'd')?.[1]
|
||||
if (!dTag) return undefined
|
||||
return `${30023}:${currentArticle.pubkey}:${dTag}`
|
||||
} catch { return undefined }
|
||||
})()
|
||||
}
|
||||
)
|
||||
// Update archiveController immediately
|
||||
try {
|
||||
|
||||
@@ -635,6 +635,10 @@ const Me: React.FC<MeProps> = ({
|
||||
|
||||
// Debug logs for archive filter issues
|
||||
if (readingProgressFilter === 'archive') {
|
||||
const ids = archiveController.getMarkedIds()
|
||||
const readIds = new Set(readsWithProgress.map(i => i.id))
|
||||
const matches = ids.filter(id => readIds.has(id))
|
||||
const nonMatches = ids.filter(id => !readIds.has(id)).slice(0, 5)
|
||||
console.log('[archive][me] counts', {
|
||||
reads: reads.length,
|
||||
readsWithProgress: readsWithProgress.length,
|
||||
@@ -642,8 +646,10 @@ const Me: React.FC<MeProps> = ({
|
||||
links: links.length,
|
||||
linksWithProgress: linksWithProgress.length,
|
||||
filteredLinks: filteredLinks.length,
|
||||
markedIds: archiveController.getMarkedIds().length,
|
||||
sampleMarked: archiveController.getMarkedIds().slice(0, 3)
|
||||
markedIds: ids.length,
|
||||
sampleMarked: ids.slice(0, 3),
|
||||
matches: matches.length,
|
||||
nonMatches
|
||||
})
|
||||
}
|
||||
const sections: Array<{ key: string; title: string; items: IndividualBookmark[] }> =
|
||||
|
||||
Reference in New Issue
Block a user