Browse Source

bug-fix url feed

imwald
Silberengel 1 month ago
parent
commit
17e382fe6f
  1. 13
      src/components/RssFeedList/ArticleUrlsSection.tsx
  2. 19
      src/components/RssFeedList/index.tsx
  3. 3
      src/i18n/locales/ar.ts
  4. 3
      src/i18n/locales/de.ts
  5. 3
      src/i18n/locales/en.ts
  6. 3
      src/i18n/locales/es.ts
  7. 3
      src/i18n/locales/fa.ts
  8. 3
      src/i18n/locales/fr.ts
  9. 3
      src/i18n/locales/hi.ts
  10. 3
      src/i18n/locales/it.ts
  11. 3
      src/i18n/locales/ja.ts
  12. 3
      src/i18n/locales/ko.ts
  13. 3
      src/i18n/locales/pl.ts
  14. 3
      src/i18n/locales/pt-BR.ts
  15. 3
      src/i18n/locales/pt-PT.ts
  16. 3
      src/i18n/locales/ru.ts
  17. 3
      src/i18n/locales/th.ts
  18. 3
      src/i18n/locales/zh.ts
  19. 29
      src/lib/rss-web-feed.ts

13
src/components/RssFeedList/ArticleUrlsSection.tsx

@ -2,7 +2,14 @@ import type { ReactNode } from 'react'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
/** Section chrome for the article-URL card list (Nostr threads + merged RSS by URL). */ /** Section chrome for the article-URL card list (Nostr threads + merged RSS by URL). */
export function ArticleUrlsSection({ children }: { children: ReactNode }) { export function ArticleUrlsSection({
children,
subtitleKey = 'Article URLs subtitle'
}: {
children: ReactNode
/** `Article URLs Nostr manual subtitle` when the URLs toggle hides RSS-only URL groups. */
subtitleKey?: string
}) {
const { t } = useTranslation() const { t } = useTranslation()
return ( return (
<section className="space-y-3" aria-labelledby="jumble-article-urls-heading"> <section className="space-y-3" aria-labelledby="jumble-article-urls-heading">
@ -13,9 +20,7 @@ export function ArticleUrlsSection({ children }: { children: ReactNode }) {
> >
{t('Article URLs')} {t('Article URLs')}
</h2> </h2>
<p className="text-[11px] leading-snug text-muted-foreground/90"> <p className="text-[11px] leading-snug text-muted-foreground/90">{t(subtitleKey)}</p>
{t('Article URLs subtitle')}
</p>
</div> </div>
<div className="space-y-4">{children}</div> <div className="space-y-4">{children}</div>
</section> </section>

19
src/components/RssFeedList/index.tsx

@ -566,7 +566,13 @@ export default function RssFeedList() {
}, [rssWebItemsRespectingClutterPref, searchQuery, rssItemMatchesSearch, suppressClawstrLinks]) }, [rssWebItemsRespectingClutterPref, searchQuery, rssItemMatchesSearch, suppressClawstrLinks])
type CombinedFeedRow = type CombinedFeedRow =
| { kind: 'web'; canonicalUrl: string; rssItems: TRssFeedItem[]; latestPub: number } | {
kind: 'web'
canonicalUrl: string
rssItems: TRssFeedItem[]
latestPub: number
fromNostrOrManual: boolean
}
| { kind: 'rss'; item: TRssFeedItem } | { kind: 'rss'; item: TRssFeedItem }
type UnifiedFeedRow = type UnifiedFeedRow =
@ -655,8 +661,8 @@ export default function RssFeedList() {
}, [combinedFeedRows, searchQuery, rssItemMatchesSearch]) }, [combinedFeedRows, searchQuery, rssItemMatchesSearch])
/** /**
* URLs-only view: one card per grouped article URL (same rows as Both), including RSS-sourced URLs * URLs-only: Nostr/manual article URLs only (`fromNostrOrManual`), not URL cards that exist solely from RSS
* and full `rssItems` for titles/snippets previously RSS-only rows were hidden and `rssItems` was cleared. * grouping. RSS-only timeline rows stay on the RSS toggle. Both: every web row plus RSS entries.
*/ */
const feedDisplayBase = useMemo((): const feedDisplayBase = useMemo(():
| { view: 'rss'; items: TRssFeedItem[] } | { view: 'rss'; items: TRssFeedItem[] }
@ -667,7 +673,10 @@ export default function RssFeedList() {
if (feedScope === 'urls') { if (feedScope === 'urls') {
const rows: UnifiedFeedRow[] = combinedFeedRowsForSearch const rows: UnifiedFeedRow[] = combinedFeedRowsForSearch
.filter((r): r is Extract<CombinedFeedRow, { kind: 'web' }> => r.kind === 'web') .filter(
(r): r is Extract<CombinedFeedRow, { kind: 'web' }> =>
r.kind === 'web' && r.fromNostrOrManual
)
.map((r) => ({ .map((r) => ({
kind: 'url' as const, kind: 'url' as const,
canonicalUrl: r.canonicalUrl, canonicalUrl: r.canonicalUrl,
@ -1010,7 +1019,7 @@ export default function RssFeedList() {
</> </>
) : feedScope === 'urls' ? ( ) : feedScope === 'urls' ? (
<> <>
<ArticleUrlsSection> <ArticleUrlsSection subtitleKey="Article URLs Nostr manual subtitle">
{displayedFeed.rows {displayedFeed.rows
.filter((r): r is Extract<UnifiedFeedRow, { kind: 'url' }> => r.kind === 'url') .filter((r): r is Extract<UnifiedFeedRow, { kind: 'url' }> => r.kind === 'url')
.map((row) => ( .map((row) => (

3
src/i18n/locales/ar.ts

@ -1518,6 +1518,8 @@ export default {
'Article URLs': 'Article URLs', 'Article URLs': 'Article URLs',
'Article URLs subtitle': 'Article URLs subtitle':
'One card per link: URLs from Nostr relays (you and people you follow) plus any RSS hit. No RSS row yet → web preview card.', 'One card per link: URLs from Nostr relays (you and people you follow) plus any RSS hit. No RSS row yet → web preview card.',
'Article URLs Nostr manual subtitle':
'Only links from Nostr relay discovery or URLs you added. Items that exist only because they appeared in subscribed RSS feeds are not listed here — use RSS or Both.',
'RSS timeline': 'RSS timeline', 'RSS timeline': 'RSS timeline',
'RSS timeline subtitle': 'RSS timeline subtitle':
'Every item from your subscribed feeds, newest first — classic RSS reader.', 'Every item from your subscribed feeds, newest first — classic RSS reader.',
@ -1535,6 +1537,7 @@ export default {
'Web highlights': 'Web highlights', 'Web highlights': 'Web highlights',
'In your bookmarks': 'In your bookmarks', 'In your bookmarks': 'In your bookmarks',
'{{count}} RSS entries for this URL': '{{count}} RSS entries for this URL', '{{count}} RSS entries for this URL': '{{count}} RSS entries for this URL',
'{{count}} entries for this article URL': '{{count}} entries for this article URL',
'No comments yet': 'No comments yet', 'No comments yet': 'No comments yet',
'No highlights yet': 'No highlights yet', 'No highlights yet': 'No highlights yet',
'Showing {{filtered}} of {{total}} entries': 'Showing {{filtered}} of {{total}} entries', 'Showing {{filtered}} of {{total}} entries': 'Showing {{filtered}} of {{total}} entries',

3
src/i18n/locales/de.ts

@ -1557,6 +1557,8 @@ export default {
'Article URLs': 'Article URLs', 'Article URLs': 'Article URLs',
'Article URLs subtitle': 'Article URLs subtitle':
'One card per link: URLs from Nostr relays (you and people you follow) plus any RSS hit. No RSS row yet → web preview card.', 'One card per link: URLs from Nostr relays (you and people you follow) plus any RSS hit. No RSS row yet → web preview card.',
'Article URLs Nostr manual subtitle':
'Nur Links aus Nostr-Relays (Entdeckung) oder von dir hinzugefügte URLs. Einträge, die nur aus abonnierten RSS-Feeds stammen, erscheinen hier nicht — dafür RSS oder Beides.',
'RSS timeline': 'RSS timeline', 'RSS timeline': 'RSS timeline',
'RSS timeline subtitle': 'RSS timeline subtitle':
'Every item from your subscribed feeds, newest first — classic RSS reader.', 'Every item from your subscribed feeds, newest first — classic RSS reader.',
@ -1574,6 +1576,7 @@ export default {
'Web highlights': 'Web highlights', 'Web highlights': 'Web highlights',
'In your bookmarks': 'In your bookmarks', 'In your bookmarks': 'In your bookmarks',
'{{count}} RSS entries for this URL': '{{count}} RSS entries for this URL', '{{count}} RSS entries for this URL': '{{count}} RSS entries for this URL',
'{{count}} entries for this article URL': '{{count}} Einträge zu dieser Artikel-URL',
'No comments yet': 'No comments yet', 'No comments yet': 'No comments yet',
'No highlights yet': 'No highlights yet', 'No highlights yet': 'No highlights yet',
'Showing {{filtered}} of {{total}} entries': 'Showing {{filtered}} of {{total}} entries', 'Showing {{filtered}} of {{total}} entries': 'Showing {{filtered}} of {{total}} entries',

3
src/i18n/locales/en.ts

@ -1531,6 +1531,8 @@ export default {
'Article URLs': 'Article URLs', 'Article URLs': 'Article URLs',
'Article URLs subtitle': 'Article URLs subtitle':
'One card per link: URLs from Nostr relays (you and people you follow) plus any RSS hit. No RSS row yet → web preview card.', 'One card per link: URLs from Nostr relays (you and people you follow) plus any RSS hit. No RSS row yet → web preview card.',
'Article URLs Nostr manual subtitle':
'Only links from Nostr relay discovery or URLs you added. Items that exist only because they appeared in subscribed RSS feeds are not listed here — use RSS or Both.',
'RSS timeline': 'RSS timeline', 'RSS timeline': 'RSS timeline',
'RSS timeline subtitle': 'RSS timeline subtitle':
'Every item from your subscribed feeds, newest first — classic RSS reader.', 'Every item from your subscribed feeds, newest first — classic RSS reader.',
@ -1548,6 +1550,7 @@ export default {
'Web highlights': 'Web highlights', 'Web highlights': 'Web highlights',
'In your bookmarks': 'In your bookmarks', 'In your bookmarks': 'In your bookmarks',
'{{count}} RSS entries for this URL': '{{count}} RSS entries for this URL', '{{count}} RSS entries for this URL': '{{count}} RSS entries for this URL',
'{{count}} entries for this article URL': '{{count}} entries for this article URL',
'No comments yet': 'No comments yet', 'No comments yet': 'No comments yet',
'No highlights yet': 'No highlights yet', 'No highlights yet': 'No highlights yet',
'Showing {{filtered}} of {{total}} entries': 'Showing {{filtered}} of {{total}} entries', 'Showing {{filtered}} of {{total}} entries': 'Showing {{filtered}} of {{total}} entries',

3
src/i18n/locales/es.ts

@ -1526,6 +1526,8 @@ export default {
'Article URLs': 'Article URLs', 'Article URLs': 'Article URLs',
'Article URLs subtitle': 'Article URLs subtitle':
'One card per link: URLs from Nostr relays (you and people you follow) plus any RSS hit. No RSS row yet → web preview card.', 'One card per link: URLs from Nostr relays (you and people you follow) plus any RSS hit. No RSS row yet → web preview card.',
'Article URLs Nostr manual subtitle':
'Only links from Nostr relay discovery or URLs you added. Items that exist only because they appeared in subscribed RSS feeds are not listed here — use RSS or Both.',
'RSS timeline': 'RSS timeline', 'RSS timeline': 'RSS timeline',
'RSS timeline subtitle': 'RSS timeline subtitle':
'Every item from your subscribed feeds, newest first — classic RSS reader.', 'Every item from your subscribed feeds, newest first — classic RSS reader.',
@ -1543,6 +1545,7 @@ export default {
'Web highlights': 'Web highlights', 'Web highlights': 'Web highlights',
'In your bookmarks': 'In your bookmarks', 'In your bookmarks': 'In your bookmarks',
'{{count}} RSS entries for this URL': '{{count}} RSS entries for this URL', '{{count}} RSS entries for this URL': '{{count}} RSS entries for this URL',
'{{count}} entries for this article URL': '{{count}} entries for this article URL',
'No comments yet': 'No comments yet', 'No comments yet': 'No comments yet',
'No highlights yet': 'No highlights yet', 'No highlights yet': 'No highlights yet',
'Showing {{filtered}} of {{total}} entries': 'Showing {{filtered}} of {{total}} entries', 'Showing {{filtered}} of {{total}} entries': 'Showing {{filtered}} of {{total}} entries',

3
src/i18n/locales/fa.ts

@ -1522,6 +1522,8 @@ export default {
'Article URLs': 'Article URLs', 'Article URLs': 'Article URLs',
'Article URLs subtitle': 'Article URLs subtitle':
'One card per link: URLs from Nostr relays (you and people you follow) plus any RSS hit. No RSS row yet → web preview card.', 'One card per link: URLs from Nostr relays (you and people you follow) plus any RSS hit. No RSS row yet → web preview card.',
'Article URLs Nostr manual subtitle':
'Only links from Nostr relay discovery or URLs you added. Items that exist only because they appeared in subscribed RSS feeds are not listed here — use RSS or Both.',
'RSS timeline': 'RSS timeline', 'RSS timeline': 'RSS timeline',
'RSS timeline subtitle': 'RSS timeline subtitle':
'Every item from your subscribed feeds, newest first — classic RSS reader.', 'Every item from your subscribed feeds, newest first — classic RSS reader.',
@ -1539,6 +1541,7 @@ export default {
'Web highlights': 'Web highlights', 'Web highlights': 'Web highlights',
'In your bookmarks': 'In your bookmarks', 'In your bookmarks': 'In your bookmarks',
'{{count}} RSS entries for this URL': '{{count}} RSS entries for this URL', '{{count}} RSS entries for this URL': '{{count}} RSS entries for this URL',
'{{count}} entries for this article URL': '{{count}} entries for this article URL',
'No comments yet': 'No comments yet', 'No comments yet': 'No comments yet',
'No highlights yet': 'No highlights yet', 'No highlights yet': 'No highlights yet',
'Showing {{filtered}} of {{total}} entries': 'Showing {{filtered}} of {{total}} entries', 'Showing {{filtered}} of {{total}} entries': 'Showing {{filtered}} of {{total}} entries',

3
src/i18n/locales/fr.ts

@ -1531,6 +1531,8 @@ export default {
'Article URLs': 'Article URLs', 'Article URLs': 'Article URLs',
'Article URLs subtitle': 'Article URLs subtitle':
'One card per link: URLs from Nostr relays (you and people you follow) plus any RSS hit. No RSS row yet → web preview card.', 'One card per link: URLs from Nostr relays (you and people you follow) plus any RSS hit. No RSS row yet → web preview card.',
'Article URLs Nostr manual subtitle':
'Only links from Nostr relay discovery or URLs you added. Items that exist only because they appeared in subscribed RSS feeds are not listed here — use RSS or Both.',
'RSS timeline': 'RSS timeline', 'RSS timeline': 'RSS timeline',
'RSS timeline subtitle': 'RSS timeline subtitle':
'Every item from your subscribed feeds, newest first — classic RSS reader.', 'Every item from your subscribed feeds, newest first — classic RSS reader.',
@ -1548,6 +1550,7 @@ export default {
'Web highlights': 'Web highlights', 'Web highlights': 'Web highlights',
'In your bookmarks': 'In your bookmarks', 'In your bookmarks': 'In your bookmarks',
'{{count}} RSS entries for this URL': '{{count}} RSS entries for this URL', '{{count}} RSS entries for this URL': '{{count}} RSS entries for this URL',
'{{count}} entries for this article URL': '{{count}} entries for this article URL',
'No comments yet': 'No comments yet', 'No comments yet': 'No comments yet',
'No highlights yet': 'No highlights yet', 'No highlights yet': 'No highlights yet',
'Showing {{filtered}} of {{total}} entries': 'Showing {{filtered}} of {{total}} entries', 'Showing {{filtered}} of {{total}} entries': 'Showing {{filtered}} of {{total}} entries',

3
src/i18n/locales/hi.ts

@ -1524,6 +1524,8 @@ export default {
'Article URLs': 'Article URLs', 'Article URLs': 'Article URLs',
'Article URLs subtitle': 'Article URLs subtitle':
'One card per link: URLs from Nostr relays (you and people you follow) plus any RSS hit. No RSS row yet → web preview card.', 'One card per link: URLs from Nostr relays (you and people you follow) plus any RSS hit. No RSS row yet → web preview card.',
'Article URLs Nostr manual subtitle':
'Only links from Nostr relay discovery or URLs you added. Items that exist only because they appeared in subscribed RSS feeds are not listed here — use RSS or Both.',
'RSS timeline': 'RSS timeline', 'RSS timeline': 'RSS timeline',
'RSS timeline subtitle': 'RSS timeline subtitle':
'Every item from your subscribed feeds, newest first — classic RSS reader.', 'Every item from your subscribed feeds, newest first — classic RSS reader.',
@ -1541,6 +1543,7 @@ export default {
'Web highlights': 'Web highlights', 'Web highlights': 'Web highlights',
'In your bookmarks': 'In your bookmarks', 'In your bookmarks': 'In your bookmarks',
'{{count}} RSS entries for this URL': '{{count}} RSS entries for this URL', '{{count}} RSS entries for this URL': '{{count}} RSS entries for this URL',
'{{count}} entries for this article URL': '{{count}} entries for this article URL',
'No comments yet': 'No comments yet', 'No comments yet': 'No comments yet',
'No highlights yet': 'No highlights yet', 'No highlights yet': 'No highlights yet',
'Showing {{filtered}} of {{total}} entries': 'Showing {{filtered}} of {{total}} entries', 'Showing {{filtered}} of {{total}} entries': 'Showing {{filtered}} of {{total}} entries',

3
src/i18n/locales/it.ts

@ -1527,6 +1527,8 @@ export default {
'Article URLs': 'Article URLs', 'Article URLs': 'Article URLs',
'Article URLs subtitle': 'Article URLs subtitle':
'One card per link: URLs from Nostr relays (you and people you follow) plus any RSS hit. No RSS row yet → web preview card.', 'One card per link: URLs from Nostr relays (you and people you follow) plus any RSS hit. No RSS row yet → web preview card.',
'Article URLs Nostr manual subtitle':
'Only links from Nostr relay discovery or URLs you added. Items that exist only because they appeared in subscribed RSS feeds are not listed here — use RSS or Both.',
'RSS timeline': 'RSS timeline', 'RSS timeline': 'RSS timeline',
'RSS timeline subtitle': 'RSS timeline subtitle':
'Every item from your subscribed feeds, newest first — classic RSS reader.', 'Every item from your subscribed feeds, newest first — classic RSS reader.',
@ -1544,6 +1546,7 @@ export default {
'Web highlights': 'Web highlights', 'Web highlights': 'Web highlights',
'In your bookmarks': 'In your bookmarks', 'In your bookmarks': 'In your bookmarks',
'{{count}} RSS entries for this URL': '{{count}} RSS entries for this URL', '{{count}} RSS entries for this URL': '{{count}} RSS entries for this URL',
'{{count}} entries for this article URL': '{{count}} entries for this article URL',
'No comments yet': 'No comments yet', 'No comments yet': 'No comments yet',
'No highlights yet': 'No highlights yet', 'No highlights yet': 'No highlights yet',
'Showing {{filtered}} of {{total}} entries': 'Showing {{filtered}} of {{total}} entries', 'Showing {{filtered}} of {{total}} entries': 'Showing {{filtered}} of {{total}} entries',

3
src/i18n/locales/ja.ts

@ -1522,6 +1522,8 @@ export default {
'Article URLs': 'Article URLs', 'Article URLs': 'Article URLs',
'Article URLs subtitle': 'Article URLs subtitle':
'One card per link: URLs from Nostr relays (you and people you follow) plus any RSS hit. No RSS row yet → web preview card.', 'One card per link: URLs from Nostr relays (you and people you follow) plus any RSS hit. No RSS row yet → web preview card.',
'Article URLs Nostr manual subtitle':
'Only links from Nostr relay discovery or URLs you added. Items that exist only because they appeared in subscribed RSS feeds are not listed here — use RSS or Both.',
'RSS timeline': 'RSS timeline', 'RSS timeline': 'RSS timeline',
'RSS timeline subtitle': 'RSS timeline subtitle':
'Every item from your subscribed feeds, newest first — classic RSS reader.', 'Every item from your subscribed feeds, newest first — classic RSS reader.',
@ -1539,6 +1541,7 @@ export default {
'Web highlights': 'Web highlights', 'Web highlights': 'Web highlights',
'In your bookmarks': 'In your bookmarks', 'In your bookmarks': 'In your bookmarks',
'{{count}} RSS entries for this URL': '{{count}} RSS entries for this URL', '{{count}} RSS entries for this URL': '{{count}} RSS entries for this URL',
'{{count}} entries for this article URL': '{{count}} entries for this article URL',
'No comments yet': 'No comments yet', 'No comments yet': 'No comments yet',
'No highlights yet': 'No highlights yet', 'No highlights yet': 'No highlights yet',
'Showing {{filtered}} of {{total}} entries': 'Showing {{filtered}} of {{total}} entries', 'Showing {{filtered}} of {{total}} entries': 'Showing {{filtered}} of {{total}} entries',

3
src/i18n/locales/ko.ts

@ -1520,6 +1520,8 @@ export default {
'Article URLs': 'Article URLs', 'Article URLs': 'Article URLs',
'Article URLs subtitle': 'Article URLs subtitle':
'One card per link: URLs from Nostr relays (you and people you follow) plus any RSS hit. No RSS row yet → web preview card.', 'One card per link: URLs from Nostr relays (you and people you follow) plus any RSS hit. No RSS row yet → web preview card.',
'Article URLs Nostr manual subtitle':
'Only links from Nostr relay discovery or URLs you added. Items that exist only because they appeared in subscribed RSS feeds are not listed here — use RSS or Both.',
'RSS timeline': 'RSS timeline', 'RSS timeline': 'RSS timeline',
'RSS timeline subtitle': 'RSS timeline subtitle':
'Every item from your subscribed feeds, newest first — classic RSS reader.', 'Every item from your subscribed feeds, newest first — classic RSS reader.',
@ -1537,6 +1539,7 @@ export default {
'Web highlights': 'Web highlights', 'Web highlights': 'Web highlights',
'In your bookmarks': 'In your bookmarks', 'In your bookmarks': 'In your bookmarks',
'{{count}} RSS entries for this URL': '{{count}} RSS entries for this URL', '{{count}} RSS entries for this URL': '{{count}} RSS entries for this URL',
'{{count}} entries for this article URL': '{{count}} entries for this article URL',
'No comments yet': 'No comments yet', 'No comments yet': 'No comments yet',
'No highlights yet': 'No highlights yet', 'No highlights yet': 'No highlights yet',
'Showing {{filtered}} of {{total}} entries': 'Showing {{filtered}} of {{total}} entries', 'Showing {{filtered}} of {{total}} entries': 'Showing {{filtered}} of {{total}} entries',

3
src/i18n/locales/pl.ts

@ -1525,6 +1525,8 @@ export default {
'Article URLs': 'Article URLs', 'Article URLs': 'Article URLs',
'Article URLs subtitle': 'Article URLs subtitle':
'One card per link: URLs from Nostr relays (you and people you follow) plus any RSS hit. No RSS row yet → web preview card.', 'One card per link: URLs from Nostr relays (you and people you follow) plus any RSS hit. No RSS row yet → web preview card.',
'Article URLs Nostr manual subtitle':
'Only links from Nostr relay discovery or URLs you added. Items that exist only because they appeared in subscribed RSS feeds are not listed here — use RSS or Both.',
'RSS timeline': 'RSS timeline', 'RSS timeline': 'RSS timeline',
'RSS timeline subtitle': 'RSS timeline subtitle':
'Every item from your subscribed feeds, newest first — classic RSS reader.', 'Every item from your subscribed feeds, newest first — classic RSS reader.',
@ -1542,6 +1544,7 @@ export default {
'Web highlights': 'Web highlights', 'Web highlights': 'Web highlights',
'In your bookmarks': 'In your bookmarks', 'In your bookmarks': 'In your bookmarks',
'{{count}} RSS entries for this URL': '{{count}} RSS entries for this URL', '{{count}} RSS entries for this URL': '{{count}} RSS entries for this URL',
'{{count}} entries for this article URL': '{{count}} entries for this article URL',
'No comments yet': 'No comments yet', 'No comments yet': 'No comments yet',
'No highlights yet': 'No highlights yet', 'No highlights yet': 'No highlights yet',
'Showing {{filtered}} of {{total}} entries': 'Showing {{filtered}} of {{total}} entries', 'Showing {{filtered}} of {{total}} entries': 'Showing {{filtered}} of {{total}} entries',

3
src/i18n/locales/pt-BR.ts

@ -1524,6 +1524,8 @@ export default {
'Article URLs': 'Article URLs', 'Article URLs': 'Article URLs',
'Article URLs subtitle': 'Article URLs subtitle':
'One card per link: URLs from Nostr relays (you and people you follow) plus any RSS hit. No RSS row yet → web preview card.', 'One card per link: URLs from Nostr relays (you and people you follow) plus any RSS hit. No RSS row yet → web preview card.',
'Article URLs Nostr manual subtitle':
'Only links from Nostr relay discovery or URLs you added. Items that exist only because they appeared in subscribed RSS feeds are not listed here — use RSS or Both.',
'RSS timeline': 'RSS timeline', 'RSS timeline': 'RSS timeline',
'RSS timeline subtitle': 'RSS timeline subtitle':
'Every item from your subscribed feeds, newest first — classic RSS reader.', 'Every item from your subscribed feeds, newest first — classic RSS reader.',
@ -1541,6 +1543,7 @@ export default {
'Web highlights': 'Web highlights', 'Web highlights': 'Web highlights',
'In your bookmarks': 'In your bookmarks', 'In your bookmarks': 'In your bookmarks',
'{{count}} RSS entries for this URL': '{{count}} RSS entries for this URL', '{{count}} RSS entries for this URL': '{{count}} RSS entries for this URL',
'{{count}} entries for this article URL': '{{count}} entries for this article URL',
'No comments yet': 'No comments yet', 'No comments yet': 'No comments yet',
'No highlights yet': 'No highlights yet', 'No highlights yet': 'No highlights yet',
'Showing {{filtered}} of {{total}} entries': 'Showing {{filtered}} of {{total}} entries', 'Showing {{filtered}} of {{total}} entries': 'Showing {{filtered}} of {{total}} entries',

3
src/i18n/locales/pt-PT.ts

@ -1526,6 +1526,8 @@ export default {
'Article URLs': 'Article URLs', 'Article URLs': 'Article URLs',
'Article URLs subtitle': 'Article URLs subtitle':
'One card per link: URLs from Nostr relays (you and people you follow) plus any RSS hit. No RSS row yet → web preview card.', 'One card per link: URLs from Nostr relays (you and people you follow) plus any RSS hit. No RSS row yet → web preview card.',
'Article URLs Nostr manual subtitle':
'Only links from Nostr relay discovery or URLs you added. Items that exist only because they appeared in subscribed RSS feeds are not listed here — use RSS or Both.',
'RSS timeline': 'RSS timeline', 'RSS timeline': 'RSS timeline',
'RSS timeline subtitle': 'RSS timeline subtitle':
'Every item from your subscribed feeds, newest first — classic RSS reader.', 'Every item from your subscribed feeds, newest first — classic RSS reader.',
@ -1543,6 +1545,7 @@ export default {
'Web highlights': 'Web highlights', 'Web highlights': 'Web highlights',
'In your bookmarks': 'In your bookmarks', 'In your bookmarks': 'In your bookmarks',
'{{count}} RSS entries for this URL': '{{count}} RSS entries for this URL', '{{count}} RSS entries for this URL': '{{count}} RSS entries for this URL',
'{{count}} entries for this article URL': '{{count}} entries for this article URL',
'No comments yet': 'No comments yet', 'No comments yet': 'No comments yet',
'No highlights yet': 'No highlights yet', 'No highlights yet': 'No highlights yet',
'Showing {{filtered}} of {{total}} entries': 'Showing {{filtered}} of {{total}} entries', 'Showing {{filtered}} of {{total}} entries': 'Showing {{filtered}} of {{total}} entries',

3
src/i18n/locales/ru.ts

@ -1527,6 +1527,8 @@ export default {
'Article URLs': 'Article URLs', 'Article URLs': 'Article URLs',
'Article URLs subtitle': 'Article URLs subtitle':
'One card per link: URLs from Nostr relays (you and people you follow) plus any RSS hit. No RSS row yet → web preview card.', 'One card per link: URLs from Nostr relays (you and people you follow) plus any RSS hit. No RSS row yet → web preview card.',
'Article URLs Nostr manual subtitle':
'Only links from Nostr relay discovery or URLs you added. Items that exist only because they appeared in subscribed RSS feeds are not listed here — use RSS or Both.',
'RSS timeline': 'RSS timeline', 'RSS timeline': 'RSS timeline',
'RSS timeline subtitle': 'RSS timeline subtitle':
'Every item from your subscribed feeds, newest first — classic RSS reader.', 'Every item from your subscribed feeds, newest first — classic RSS reader.',
@ -1544,6 +1546,7 @@ export default {
'Web highlights': 'Web highlights', 'Web highlights': 'Web highlights',
'In your bookmarks': 'In your bookmarks', 'In your bookmarks': 'In your bookmarks',
'{{count}} RSS entries for this URL': '{{count}} RSS entries for this URL', '{{count}} RSS entries for this URL': '{{count}} RSS entries for this URL',
'{{count}} entries for this article URL': '{{count}} entries for this article URL',
'No comments yet': 'No comments yet', 'No comments yet': 'No comments yet',
'No highlights yet': 'No highlights yet', 'No highlights yet': 'No highlights yet',
'Showing {{filtered}} of {{total}} entries': 'Showing {{filtered}} of {{total}} entries', 'Showing {{filtered}} of {{total}} entries': 'Showing {{filtered}} of {{total}} entries',

3
src/i18n/locales/th.ts

@ -1517,6 +1517,8 @@ export default {
'Article URLs': 'Article URLs', 'Article URLs': 'Article URLs',
'Article URLs subtitle': 'Article URLs subtitle':
'One card per link: URLs from Nostr relays (you and people you follow) plus any RSS hit. No RSS row yet → web preview card.', 'One card per link: URLs from Nostr relays (you and people you follow) plus any RSS hit. No RSS row yet → web preview card.',
'Article URLs Nostr manual subtitle':
'Only links from Nostr relay discovery or URLs you added. Items that exist only because they appeared in subscribed RSS feeds are not listed here — use RSS or Both.',
'RSS timeline': 'RSS timeline', 'RSS timeline': 'RSS timeline',
'RSS timeline subtitle': 'RSS timeline subtitle':
'Every item from your subscribed feeds, newest first — classic RSS reader.', 'Every item from your subscribed feeds, newest first — classic RSS reader.',
@ -1534,6 +1536,7 @@ export default {
'Web highlights': 'Web highlights', 'Web highlights': 'Web highlights',
'In your bookmarks': 'In your bookmarks', 'In your bookmarks': 'In your bookmarks',
'{{count}} RSS entries for this URL': '{{count}} RSS entries for this URL', '{{count}} RSS entries for this URL': '{{count}} RSS entries for this URL',
'{{count}} entries for this article URL': '{{count}} entries for this article URL',
'No comments yet': 'No comments yet', 'No comments yet': 'No comments yet',
'No highlights yet': 'No highlights yet', 'No highlights yet': 'No highlights yet',
'Showing {{filtered}} of {{total}} entries': 'Showing {{filtered}} of {{total}} entries', 'Showing {{filtered}} of {{total}} entries': 'Showing {{filtered}} of {{total}} entries',

3
src/i18n/locales/zh.ts

@ -1512,6 +1512,8 @@ export default {
'Article URLs': 'Article URLs', 'Article URLs': 'Article URLs',
'Article URLs subtitle': 'Article URLs subtitle':
'One card per link: URLs from Nostr relays (you and people you follow) plus any RSS hit. No RSS row yet → web preview card.', 'One card per link: URLs from Nostr relays (you and people you follow) plus any RSS hit. No RSS row yet → web preview card.',
'Article URLs Nostr manual subtitle':
'Only links from Nostr relay discovery or URLs you added. Items that exist only because they appeared in subscribed RSS feeds are not listed here — use RSS or Both.',
'RSS timeline': 'RSS timeline', 'RSS timeline': 'RSS timeline',
'RSS timeline subtitle': 'RSS timeline subtitle':
'Every item from your subscribed feeds, newest first — classic RSS reader.', 'Every item from your subscribed feeds, newest first — classic RSS reader.',
@ -1529,6 +1531,7 @@ export default {
'Web highlights': 'Web highlights', 'Web highlights': 'Web highlights',
'In your bookmarks': 'In your bookmarks', 'In your bookmarks': 'In your bookmarks',
'{{count}} RSS entries for this URL': '{{count}} RSS entries for this URL', '{{count}} RSS entries for this URL': '{{count}} RSS entries for this URL',
'{{count}} entries for this article URL': '{{count}} entries for this article URL',
'No comments yet': 'No comments yet', 'No comments yet': 'No comments yet',
'No highlights yet': 'No highlights yet', 'No highlights yet': 'No highlights yet',
'Showing {{filtered}} of {{total}} entries': 'Showing {{filtered}} of {{total}} entries', 'Showing {{filtered}} of {{total}} entries': 'Showing {{filtered}} of {{total}} entries',

29
src/lib/rss-web-feed.ts

@ -31,7 +31,10 @@ export const RSS_WEB_FEED_SCOPE_SETTING = 'rssWebFeedScope'
/** IndexedDB: JSON array of `{ url, addedAt }` for URLs added from “Add URL” (no RSS row yet). */ /** IndexedDB: JSON array of `{ url, addedAt }` for URLs added from “Add URL” (no RSS row yet). */
export const RSS_WEB_MANUAL_URLS_SETTING = 'rssWebManualUrls' export const RSS_WEB_MANUAL_URLS_SETTING = 'rssWebManualUrls'
/** `urls` = one card per article URL (Nostr + RSS merge). `rss` = classic chronological RSS list. `both` = mixed timeline with distinct row UIs. */ /**
* `urls` = article URL cards that come from manual URLs or Nostr discovery only (not RSS-grouped links).
* `rss` = classic chronological RSS list only. `both` = all URL cards (RSS-enriched + Nostr/manual) plus RSS-only rows.
*/
export type RssWebFeedScope = 'urls' | 'rss' | 'both' export type RssWebFeedScope = 'urls' | 'rss' | 'both'
/** Normalize stored scope (legacy `webOnly` / `rssOnly` / `webAndRss` included). */ /** Normalize stored scope (legacy `webOnly` / `rssOnly` / `webAndRss` included). */
@ -298,6 +301,11 @@ export type ArticleUrlFeedWebRow = {
canonicalUrl: string canonicalUrl: string
rssItems: RssFeedItem[] rssItems: RssFeedItem[]
latestPub: number latestPub: number
/**
* True when this URL came from the manual list or Nostr relay discovery. False when the row exists only
* because RSS items were grouped by link (RSS-only article cards).
*/
fromNostrOrManual: boolean
} }
export function buildArticleUrlFeedRows( export function buildArticleUrlFeedRows(
@ -308,10 +316,17 @@ export function buildArticleUrlFeedRows(
): { webRows: ArticleUrlFeedWebRow[]; nonHttpItems: RssFeedItem[] } { ): { webRows: ArticleUrlFeedWebRow[]; nonHttpItems: RssFeedItem[] } {
const { groups, nonHttpItems } = partitionRssItemsForWebFeed(filteredItems, options) const { groups, nonHttpItems } = partitionRssItemsForWebFeed(filteredItems, options)
const excludeClutter = options?.excludeClutterLinks !== false const excludeClutter = options?.excludeClutterLinks !== false
const webByUrl = new Map<string, { rssItems: RssFeedItem[]; latestPub: number }>() const webByUrl = new Map<
string,
{ rssItems: RssFeedItem[]; latestPub: number; fromNostrOrManual: boolean }
>()
for (const g of groups) { for (const g of groups) {
webByUrl.set(g.canonicalUrl, { rssItems: g.items, latestPub: g.latestPub }) webByUrl.set(g.canonicalUrl, {
rssItems: g.items,
latestPub: g.latestPub,
fromNostrOrManual: false
})
} }
const mergeNostrTimestamp = (url: string, ts: number) => { const mergeNostrTimestamp = (url: string, ts: number) => {
@ -319,10 +334,11 @@ export function buildArticleUrlFeedRows(
if (cur) { if (cur) {
webByUrl.set(url, { webByUrl.set(url, {
...cur, ...cur,
latestPub: Math.max(cur.latestPub, ts) latestPub: Math.max(cur.latestPub, ts),
fromNostrOrManual: true
}) })
} else { } else {
webByUrl.set(url, { rssItems: [], latestPub: ts }) webByUrl.set(url, { rssItems: [], latestPub: ts, fromNostrOrManual: true })
} }
} }
@ -342,7 +358,8 @@ export function buildArticleUrlFeedRows(
kind: 'web' as const, kind: 'web' as const,
canonicalUrl, canonicalUrl,
rssItems: v.rssItems, rssItems: v.rssItems,
latestPub: v.latestPub latestPub: v.latestPub,
fromNostrOrManual: v.fromNostrOrManual
}) })
) )
webRows.sort((a, b) => b.latestPub - a.latestPub) webRows.sort((a, b) => b.latestPub - a.latestPub)

Loading…
Cancel
Save