Skip to content

Add bangumi extension - #28641

Merged
raycastbot merged 29 commits into
raycast:mainfrom
maxchang3:ext/bangumi
Jul 2, 2026
Merged

raycastbot merged 29 commits into
raycast:mainfrom
maxchang3:ext/bangumi

Conversation

@maxchang3

@maxchang3 maxchang3 commented Jun 8, 2026 •

Copy link
Copy Markdown
Contributor

Description

Bangumi(https://bgm.tv/) is a Chinese ACGN sharing and community platform. This extension is built as a Raycast client, allowing you to browse and manage your anime, books, and games collections, as well as track your progress, directly within Raycast.

Features

  • Collections Management: List and browse all your Bangumi collections.
  • Current Status Tracking: Manage items with statuses such as Watching, Playing, and Reading.
  • Daily Calendar: View the daily airing schedule of anime.
  • Search Subjects: Search for anime, books, and games on Bangumi.
  • Search Characters: Discover and search character profiles.
  • AI Tools Integration: Fully integrated with Raycast AI to manage progress and search content directly in chat.
  • AI Translation: Translate subject and character summaries using Raycast AI.

Screencast

Details
Login with OAuth Daily Calendar (Daily anime airing schedule)
User collection overview Subject details
Manage subject progress (each grid is interactive, reflecting episode status in Bangumi’s style) (Bangumi Original)
Search subjects in Chinese AI assistant query with @bangumi — “What new anime episodes are there today?”
Responded using the get-calendar tool

Note: Screenshots reflect the original Bangumi data, which is primarily in Chinese.

Checklist

@raycastbot

Copy link
Copy Markdown
Collaborator

Congratulations on your new Raycast extension! 🚀

We're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 15 business days.

Once the PR is approved and merged, the extension will be available on our Store.

@greptile-apps

greptile-apps Bot commented Jun 8, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR introduces a new Bangumi extension for Raycast, a full-featured client for the Chinese ACGN platform bgm.tv. It supports OAuth login, collection management, episode progress tracking, daily anime calendar, subject/character search, and AI tool integrations.

  • Adds view commands for daily calendar, collection browsing, subject search, and character search, each with OAuth-protected access via @raycast/utils.
  • Provides eight AI tools (get-calendar, get-collections, search-subjects, etc.) backed by a typed openapi-fetch client generated from the Bangumi OpenAPI spec.
  • Implements interactive episode progress grid with optimistic updates and paginated fetching at 100 episodes per request.

Confidence Score: 4/5

Safe to merge after fixing the three missing getImageUrl calls and the CHANGELOG date placeholder.

Three list/grid views (collection list, subject search, character search) pass raw API image URLs directly to Raycast icon props without the HTTP→HTTPS upgrade that the rest of the codebase applies via getImageUrl. The Bangumi CDN serves HTTP URLs, so these thumbnails will render as broken images in all three screens. The CHANGELOG date is also hardcoded instead of using the required template variable. Both issues are straightforward to fix.

extensions/bangumi/src/components/lists/CollectionSubjectList.tsx, extensions/bangumi/src/search-subjects.tsx, extensions/bangumi/src/search-characters.tsx (missing getImageUrl), and extensions/bangumi/CHANGELOG.md (hardcoded date).

Important Files Changed

Filename Overview
extensions/bangumi/CHANGELOG.md Uses a hardcoded date (2026-07-02) instead of the required {PR_MERGE_DATE} template placeholder.
extensions/bangumi/src/components/lists/CollectionSubjectList.tsx Subject thumbnail passed directly as icon without getImageUrl(), unlike parallel views that do apply the HTTP→HTTPS conversion; may produce broken images.
extensions/bangumi/src/search-subjects.tsx Subject image URL used directly without getImageUrl(); same HTTP→HTTPS gap as CollectionSubjectList.
extensions/bangumi/src/search-characters.tsx Character grid image passed directly without getImageUrl(); same HTTP→HTTPS gap as the subject list views.
extensions/bangumi/src/api/bangumi.ts Well-structured typed API client using openapi-fetch; proper error handling with BangumiApiError, signal forwarding, and 404-aware collection fetch.
extensions/bangumi/src/components/lists/ProgressGrid.tsx Paginated episode grid with optimistic updates and correct limit=100; displayEpStatus count may lag for series >100 episodes until all pages load, but this is an acceptable UX tradeoff.
extensions/bangumi/src/api/oauth.ts Standard PKCE OAuth setup via OAuthService with Raycast's OAuth proxy URLs; no issues.
extensions/bangumi/src/tools/get-calendar.ts Sunday ID correctly handled with `
extensions/bangumi/package.json Correct schema reference, valid categories, proper platforms declaration, and all dependencies are used in source files.

Reviews (23): Last reviewed commit: "Update CHANGELOG.md and optimise images" | Re-trigger Greptile

Comment thread extensions/bangumi/CHANGELOG.md Resolved
@maxchang3

maxchang3 commented Jun 9, 2026 •

Copy link
Copy Markdown
Contributor Author

@greptile What overall rules do you have?

@greptile-apps

greptile-apps Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Here are the custom rules I follow when reviewing PRs in this repository:

  1. No number type in preferences — There is no number type available in Raycast preferences.

  2. Use getFavicon from @raycast/utils — Instead of manually constructing favicon URLs (e.g., Google S2 favicons), use the getFavicon utility. Note: before suggesting replacement, verify the custom implementation doesn't add valuable features like validation, parallel racing, or force refresh.

  3. No manual Preferences interface definitions — Don't define Preferences or Argument interfaces manually; they're auto-generated in raycast-env.d.ts.

  4. Require metadata/ folder for view-type commands — Extensions with view-type commands must include a metadata/ folder with Raycast-styled screenshots.

  5. No custom localization logic — Raycast only supports US English; use preferences API for locale-dependent functionality instead.

  6. Preferences are encrypted regardless of type.

  7. Maintain a CHANGELOG.md — Every PR must create or update CHANGELOG.md with relevant changes.

  8. Use Raycast's built-in trash() — Don't implement custom trash functionality with system commands.

  9. Don't import fetch in Node 21+ — It's a built-in global.

  10. No PR review before undrafting — PRs must be undrafted before they can be reviewed by the team.

  11. {PR_MERGE_DATE} is a template variable — Leave it as-is in Initial Release changelog entries; don't replace with actual dates.

  12. ESLint v9+: use defineConfig from eslint/config — This is the recommended flat config pattern.

  13. No validating phrases — Don't use "You're absolutely right", "That's a good point", etc. in responses.

  14. LLMs — (style guide tag, minimal detail provided).

  15. undraft before review — PRs must be undrafted before team review.

@maxchang3

Copy link
Copy Markdown
Contributor Author

@greptile Reply with the following format:

What: Don't manually define Preferences for ...
Why: ...

@greptile-apps

greptile-apps Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

What: Don't manually define Preferences for getPreferenceValues() or command Argument interfaces; they're auto-generated in raycast-env.d.ts when the extension runs.

Why: Manual definitions can become out of sync with your actual package.json configuration, causing type mismatches and runtime errors. The auto-generated types are always accurate and require no maintenance.

Good:

import { getPreferenceValues } from "@raycast/api";

const preferences = getPreferenceValues<Preferences>();

Bad:

interface Preferences {
  apiKey: string;
  theme: "light" | "dark";
}

const preferences = getPreferenceValues<Preferences>();

maxchang3 and others added 2 commits June 10, 2026 16:43
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
@greptile-apps

greptile-apps Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Want your agent to iterate on Greptile's feedback? Try greploops.

…ck to existing data during optimistic updates
maxchang3 added 10 commits June 10, 2026 23:32
- Reorganize components into `lists/` and `details/` subdirectories
- Rename MyCollection to CollectionSubjectList
- Rename ProgressViewer to ProgressGrid
- Move getCollectionTag to src/shared/utils.ts
- Restore translatedText to useAITranslate hook return values
- Create barrel exports (index.ts) for components/lists, components/details, and api
- Refactor project-wide imports to use path aliases (@/api, @/components/lists, etc.)
@maxchang3

Copy link
Copy Markdown
Contributor Author

@greptileai

You mentioned: Minor inconsistency: data.map() is called without a null guard in search-subjects.ts and get-collections.ts, while the equivalent call in get-subject-episodes.ts uses data?.map(). This is because the returned data might be undefined in get-subject-episodes.ts, which is not the case for search-subjects.ts and get-collections.ts; they must return [].

@greptile-apps

greptile-apps Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

That makes sense — the optional chaining in get-subject-episodes.ts reflects a real difference in the API contract (can return undefined), while the other two endpoints are guaranteed to return []. The inconsistency is intentional and appropriate. My comment was incorrect here.

maxchang3 and others added 2 commits June 14, 2026 16:35
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@socket-security

socket-security Bot commented Jun 14, 2026 •

Copy link
Copy Markdown

Dependency limit exceeded — report not shown.

This pull request scan exceeded the 10,000-dependency limit applied to this scan, so the results are incomplete and may be inaccurate. To avoid reporting false positives, Socket has not posted a report.

Upgrade your plan to raise the dependency limit and get complete reports, or view the partial scan in the dashboard.

Socket is always free for open source. If this is a non-commercial open source project, contact us to request a free Team account.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@0xdhrv 0xdhrv self-assigned this Jul 2, 2026
- Remove unused .gitignore entries and obsolete documentation files
- Update package.json scripts, dependencies, and add esbuild override
- Add translation and display helpers (translateBangumiLabel, translateInfoboxKey, getSubjectDisplay, getRelationColor) in utils
- Refactor components to use new utils for titles, subtitles, infobox keys, and relation colors
- Simplify AI translation hook to default to English and drop preference handling
- Clean up generated OpenAPI types by deduplicating shared schemas and using shared response types

@0xdhrv 0xdhrv left a comment

Copy link
Copy Markdown
Member

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 8ac74f6 into raycast:main Jul 2, 2026
3 checks passed
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

@raycastbot

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.

almatkai pushed a commit to almatkai/raymes-extensions that referenced this pull request Jul 13, 2026
* Add bangumi extension

* Update extensions/bangumi/src/tools/get-calendar.ts

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* chore: update changelog

* fix(ProgressViewer): add null checks for currentCollection and fallback to existing data during optimistic updates

* sync changes

* refactor: centralize episode collection and type naming configurations in constants

* chore: update extension categories

* feat: add translation state to AITranslateAction to prevent redundant requests

* refactor: use EpisodeCollectionTypeName mapping for status string formatting in update-episodes tool

* feat: add day filter dropdown to daily calendar grid

* fix(search): prevent parallel double-fetch from throwing out-of-bounds error on last page

* chore: update changelog

* docs: update image

* docs: update description

* refactor(EpisodeDetail): update original title display to use superscript instead of blockquote

* docs: fix

* refactor(ai-translation): remove unnecessary target language fallback

* chore: update deps

* refactor: improve BangumiApiError message formatting

* refactor: extract AI translation logic and centralize type definitions for better modularity

* refactor: reorganize components and extract barrel exports

- Reorganize components into `lists/` and `details/` subdirectories
- Rename MyCollection to CollectionSubjectList
- Rename ProgressViewer to ProgressGrid
- Move getCollectionTag to src/shared/utils.ts
- Restore translatedText to useAITranslate hook return values
- Create barrel exports (index.ts) for components/lists, components/details, and api
- Refactor project-wide imports to use path aliases (@/api, @/components/lists, etc.)

* refactor: decouple character and subject list data fetching to individual components

* docs: update strict schema usage guidelines

* refactor(ai-translation): optimize AITranslate caching strategy

* Sync changes to fork (#3)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Sync changes to fork

* Sync changes to fork (raycast#5)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* refactor(bangumi): consolidate display utilities and clean up repo

- Remove unused .gitignore entries and obsolete documentation files
- Update package.json scripts, dependencies, and add esbuild override
- Add translation and display helpers (translateBangumiLabel, translateInfoboxKey, getSubjectDisplay, getRelationColor) in utils
- Refactor components to use new utils for titles, subtitles, infobox keys, and relation colors
- Simplify AI translation hook to default to English and drop preference handling
- Clean up generated OpenAPI types by deduplicating shared schemas and using shared response types

* Update CHANGELOG.md and optimise images

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Dhruv Suthar <[email protected]>
Co-authored-by: raycastbot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants