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:
Gigi
2025-10-20 11:17:30 +02:00
parent c21f96f5bb
commit 8cde36c08c
4 changed files with 41 additions and 6 deletions

View File

@@ -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 {

View File

@@ -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[] }> =