From a3ec0473904f318db05404eda7fc474f80f4734e Mon Sep 17 00:00:00 2001 From: Gil Desmarais Date: Sat, 21 Mar 2026 15:27:27 +0100 Subject: [PATCH 1/3] Link included feeds to instance feed directory --- frontend/src/__tests__/App.test.tsx | 3 ++- frontend/src/components/AppPanels.tsx | 12 +++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/frontend/src/__tests__/App.test.tsx b/frontend/src/__tests__/App.test.tsx index af6bf619..87703b90 100644 --- a/frontend/src/__tests__/App.test.tsx +++ b/frontend/src/__tests__/App.test.tsx @@ -400,6 +400,7 @@ describe('App', () => { }); it('shows the utility links in a user-focused order', () => { + window.history.replaceState({}, '', 'http://localhost:3000/#result'); render(); fireEvent.click(screen.getByRole('button', { name: 'More' })); @@ -419,7 +420,7 @@ describe('App', () => { ); expect(screen.getByRole('link', { name: 'Try included feeds' })).toHaveAttribute( 'href', - 'https://html2rss.github.io/web-application/how-to/use-included-configs/' + 'https://html2rss.github.io/feed-directory/#!url=http%3A%2F%2Flocalhost%3A3000%2F' ); expect(screen.getByRole('link', { name: 'Install from Docker Hub' })).toHaveAttribute( 'href', diff --git a/frontend/src/components/AppPanels.tsx b/frontend/src/components/AppPanels.tsx index 59a8fd95..19d6f51d 100644 --- a/frontend/src/components/AppPanels.tsx +++ b/frontend/src/components/AppPanels.tsx @@ -255,6 +255,16 @@ export function UtilityStrip({ onClearToken, }: UtilityStripProps) { const [isOpen, setIsOpen] = useState(false); + const includedFeedsHref = (() => { + const directoryUrl = new URL('https://html2rss.github.io/feed-directory/'); + if (typeof window === 'undefined') return directoryUrl.toString(); + + const instanceUrl = new URL(window.location.href); + instanceUrl.search = ''; + instanceUrl.hash = ''; + directoryUrl.hash = `!url=${encodeURIComponent(instanceUrl.toString())}`; + return directoryUrl.toString(); + })(); if (hidden) return null; @@ -271,7 +281,7 @@ export function UtilityStrip({ {isOpen && (