Skip to content

Update anna-s-archive extension - #22739

Merged
raycastbot merged 4 commits into
raycast:mainfrom
j3lte:ext/anna-s-archive
Nov 7, 2025
Merged

raycastbot merged 4 commits into
raycast:mainfrom
j3lte:ext/anna-s-archive

Conversation

@j3lte

@j3lte j3lte commented Nov 7, 2025 •

Copy link
Copy Markdown
Contributor

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

  • Update dependencies
  • Add screen to test mirrors
  • Add option to use a custom mirror
  • A little more verbose error handling
  • Refactored duplicate code

Checklist

@raycastbot raycastbot added extension fix / improvement Label for PRs with extension's fix improvements extension: anna-s-archive Issues related to the anna-s-archive extension platform: macOS platform: Windows OP is author The OP of the PR is the author of the extension labels Nov 7, 2025
@raycastbot

ghost commented Nov 7, 2025

Copy link
Copy Markdown
Collaborator

Thank you for the update! 🎉

You can expect an initial review within five business days.

ghost left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Edit Code Review Agent Settings | Greptile

@pernielsentikaer pernielsentikaer self-assigned this Nov 7, 2025

ghost left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, approved 🔥

@raycastbot
raycastbot merged commit df3ad39 into raycast:main Nov 7, 2025
@github-actions

ghost commented Nov 7, 2025

Copy link
Copy Markdown
Contributor

@raycastbot

ghost commented Nov 7, 2025

Copy link
Copy Markdown
Collaborator

🎉 🎉 🎉

We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag.

@j3lte
j3lte deleted the ext/anna-s-archive branch December 11, 2025 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extension: anna-s-archive Issues related to the anna-s-archive extension extension fix / improvement Label for PRs with extension's fix improvements OP is author The OP of the PR is the author of the extension platform: macOS platform: Windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants