Repository navigation
Update anna-s-archive extension - #22739
Conversation
commented
Nov 7, 2025
|
Thank you for the update! 🎉 You can expect an initial review within five business days. |
left a comment
There was a problem hiding this comment.
Greptile Overview
Greptile Summary
This PR enhances the Anna's Archive extension to address domain takedown issues reported in #22627. The main feature addition is a comprehensive mirror testing system that allows users to test multiple Anna's Archive mirrors and configure custom ones when the default mirrors become unavailable.
The implementation introduces several key components: a TestMirrors screen that displays and tests available mirrors, a useMirrorDomain hook for dynamic mirror selection, and enhanced error handling that guides users to the mirror testing interface when fetch failures occur. The refactoring also improves code organization by consolidating API functions, updating constant naming conventions to SCREAMING_SNAKE_CASE, and removing unnecessary abstractions like the custom EmptyView component.
The changes maintain backward compatibility while providing users with fallback options during service disruptions, making the extension more resilient to the frequent domain changes that affect Anna's Archive services.
Important Files Changed
| Filename | Score | Overview |
|---|---|---|
| extensions/anna-s-archive/src/hooks/use-mirror-test.ts | 3/5 | New hook that tests mirror availability using OPTIONS requests, but has error handling concerns |
| extensions/anna-s-archive/src/components/EmptyView.tsx | 4/5 | Component completely removed as part of code deduplication effort |
| extensions/anna-s-archive/src/search-archives.tsx | 4/5 | Main search refactored to use dynamic mirror selection with improved error handling |
| extensions/anna-s-archive/src/hooks/use-archive.ts | 4/5 | Enhanced error handling with mirror testing integration and detailed HTTP status codes |
| extensions/anna-s-archive/src/components/ArchiveListItem.tsx | 4/5 | Refactored to use dynamic mirror resolution and added TestMirrorsAction |
| extensions/anna-s-archive/src/components/ArchiveListItemDetail.tsx | 4/5 | Minor refactoring for TypeScript consistency and export patterns |
| extensions/anna-s-archive/src/hooks/use-mirror-domain.ts | 4/5 | New hook for centralized mirror domain selection with custom mirror support |
| extensions/anna-s-archive/src/screens/TestMirrors.tsx | 5/5 | New screen component for testing and selecting mirrors with clean implementation |
| extensions/anna-s-archive/src/components/TestMirrorsAction.tsx | 5/5 | Simple action component for navigating to mirror testing screen |
| extensions/anna-s-archive/src/api/index.ts | 5/5 | File reorganized with updated constant references, core functionality unchanged |
| extensions/anna-s-archive/src/constants/index.ts | 5/5 | Constants refactored to SCREAMING_SNAKE_CASE with new mirror-related additions |
| extensions/anna-s-archive/.prettierrc | 5/5 | Updated import order configuration for better code organization |
| extensions/anna-s-archive/eslint.config.js | 5/5 | Added consistent-type-imports rule for better TypeScript practices |
| extensions/anna-s-archive/package.json | 5/5 | Added custom mirror preference and updated dependencies |
| extensions/anna-s-archive/CHANGELOG.md | 5/5 | Properly formatted changelog entry with required template placeholder |
Confidence score: 4/5
- This PR addresses a legitimate user-reported issue with a well-architected solution that provides fallback options for domain availability problems
- Score reduced due to potential error handling concerns in the mirror testing hook, removal of EmptyView component without verification of usage, and complex refactoring across multiple files that increases risk of integration issues
- Pay close attention to the use-mirror-test.ts hook's error handling logic and verify that all references to the removed EmptyView component have been properly updated
15 files reviewed, 3 comments
commented
Nov 7, 2025
|
Published to the Raycast Store: |
commented
Nov 7, 2025
|
🎉 🎉 🎉 We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag. |
Description
I got the idea by this issue: #22627 where the user got an error while trying to use Anna's Archive. Added an extra screen to check all the mirrors, as well as give the user the option to use a custom mirror. While writing the new screen, also took it upon me to rewrite some parts, deduplicate code, make the codebase a little bit more neat.
Changelog
Checklist
npm run buildand tested this distribution build in Raycastassetsfolder are used by the extension itselfREADMEare located outside the metadata folder if they were not generated with our metadata tool