feat(feed-directory): rebuild browse UI as layered, testable module tree - #1243
Merged
Conversation
Replace the monolithic client script with typed domain/app/ui modules, theme-aware two-column layout, URL-synced filters, base-language matching, and pagination. Hide the Starlight TOC sidebar on this page for full width.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
FeedDirectory.astro,feed-directory.js, andcatalogClient.jswithsrc/components/feed-directory/(adapters, domain, app, ui, CSS) mounted fromfeed-directory/FeedDirectory.astro.adapters/catalog-api.ts:GET /api/v1/configsenvelope validation, row normalization toFeedDirectoryEntry, andcatalog_versiongate (supported:[1]).browser-storage,browser-location,browser-download) so domain code stays free ofwindow/document.directory-state.tsfor filter/pagination transitions andFeedDirectoryApp.tsfor fetch/render orchestration;ui/render.tsbuilds HTML from a view model.vitest.config.ts,make test,make check) with unit tests for catalog parsing, filters, language matching, OPML, and directory state.q,topic,lang,sort,page), base language codes (dematchesde-DE), disabled Starlight TOC on/feed-directory/for full width.CONTEXT.mdglossary (catalog seam, instance persistence), expandedAGENTS.mdmodule layout and verification gates; removed legacyinstanceUrl.js.Why
The prior browse UI was hard to scan and lived in one large script bundle. The rebuild keeps the same thin-client contract over a running
html2rss-webinstance while making layout, filtering, and instance deep links maintainable. Follow-on commits after the initial tree split wire parsing and browser I/O behind adapters and add tests so catalog envelope changes fail in CI instead of only in the browser.Risk
GET /api/v1/configs; instance default,#!url=deep link, andhtml2rss.feedDirectory.instanceUrllocalStorage behavior are documented inCONTEXT.md.feed-directory.js,catalogClient.js,instanceUrl.js).Review map
src/components/feed-directory/adapters/catalog-api.test.tsanddomain/filters.test.ts— expected wire shapes, filter/language edge casessrc/components/feed-directory/adapters/catalog-api.ts— sole catalog wire parser; version gate andFeedDirectoryEntrymappingsrc/components/feed-directory/app/FeedDirectoryApp.tsandapp/directory-state.ts— load/error flows and state transitions vs URL paramssrc/components/feed-directory/adapters/browser-*.ts— instance persistence, filter sync, OPML downloadsrc/components/feed-directory/ui/render.tsandfeed-directory.css— row layout and Starlight-aligned stylingCONTEXT.mdandAGENTS.md— glossary and contributor contractsValidation
make check(lint + Vitest, exit 0)make build(exit 0 on prior PR pass; re-run before merge if Astro content changed since)/feed-directory/against an instance with catalog enabled