Improvements v0.0.7 #8
Loading…
Reference in a new issue
No description provided.
Delete branch "improvements-v0.0.7"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Improvements v0.0.7: repair the broken source catalog, reactivate the Anthropic news source via a new adapter, fix the User-Agent string, make
/sourcesshow a two-band visual flag for failing cards, and stop the source filter chips from silently hiding the page body.Ingestion
anthropicadapter parses the Next App Router hydration embedded inhttps://www.anthropic.com/newsand yieldsEntryCandidaterecords.anthropic-blogis reactivated (wasunsupported).User-Agentstring built fromapp.__version__and the public base URL, replacing the staletilens.exampleplaceholder in the core HTTP client and the GitHub / Hacker News adapters.youtube-dockerresolving@dockerinstead of@dockertv.Catalog
pyfound-blog,discuss-python-ideas,discuss-python-peps(all Python).discuss-python,planet-python,rust-users-forum,rust-internals,google-ai-blog,javarevisited,tanstack-blog,grafana-blog.discuss-pythonreclassified fromnewstocommunitysince/latest.rsspolls every Discourse category.cisa-advisoriesreactivated through the publiccisagov/CSAFGitHub mirror.docker-blog,last-week-in-aws,hf-papers,substack-technology(no public RSS or API; arXiv already covers the AI material).VALID_ADAPTERSandADAPTER_REQUIRES_ENDPOINTupdated to admit the newanthropicadapter.Sources page UI
aria-label="failing"on failing cards plusdata-fail-statefor testability.activewhen no chip matches./?topic=...,/topics/<slug>,/topicsindex).The /sources filter chips used to silently hide every group when an operator clicked an empty filter (Duplicate/Blocked/Retired), and nothing distinguished a fresh failure from a long-running outage. Backend: - classify_failures() picks fail_state as "degraded" for 1-2 failures with a known last success and "failing" for 3+ failures or any failure streak without a recorded success - build_source_directory now stamps fail_state on each record, returns one group per DIRECTORY_FILTERS entry with empty: bool, and validates the requested filter against DIRECTORY_FILTER_KEYS (was passing on unknown status strings) - source_view() exposes fail_state on the detail page Frontend: - Source card renders tl-source-card--{degraded,failing} and the matching data-fail-state attribute plus an aria-label on failing - A small tl-source-card__alert pip and "Failing" label appear on failing cards - Every filter tab now matches a group; empty groups render "No sources in this state yet." so /sources?filter=blocked etc. no longer drop the page body - activate() falls back to "active" when no tab has aria-pressed CSS (two-band visual flag): - Degraded: amber left border + amber consec-fails number - Failing: red left border + soft red wash + bold red consec-fails number + the alert pip - Empty-state copy uses muted dashed border Tests: - test_classify_failures_thresholds covers all six success/failure combinations - test_build_source_directory_exposes_fail_state asserts every active record carries fail_state and every DIRECTORY_FILTERS key is represented in tabs and groups - test_sources_page_marks_failing_and_degraded_cards asserts the rendered HTML contains the new CSS hooks and the empty-state block for filters with zero sources