Skip to content

Conversation

@baranwang
Copy link
Owner

@baranwang baranwang commented Dec 6, 2025

Note

Adds a new Bilibili widget, removes Trakt integration (and the trakt-forward app), and releases danmu-universe 0.14.0.

  • Bilibili Widget (new app apps/bilibili):
    • Build setup with rslib and @forward-widget/rslib-plugin; injects process.env.PACKAGE_VERSION.
    • Defines WidgetMetadata with global param cookies.
    • Adds libs:
      • api.ts: Bilibili client using @forward-widget/libs-fetch and cookies.
      • constants.ts: SeasonType enum.
      • schema.ts: seasonIndexItemSchema (zod).
    • TS config and type env added.
  • Danmu Universe:
    • Removes all Trakt experimental config/usage; bumps to 0.14.0 and updates CHANGELOG.md.
  • Cleanup:
    • Deletes apps/trakt-forward project and related config files.
  • Deps/Build:
    • Updates lockfile and adds @forward-widget/rslib-plugin where needed.

Written by Cursor Bugbot for commit d049bdc. This will update automatically on new commits. Configure here.

baranwang and others added 4 commits December 4, 2025 09:42
…apps

- Added new dependencies for the bilibili app in pnpm-lock.yaml, including zod and various forward-widget libraries.
- Enhanced type definitions in forward-widget-env.d.ts for danmu-universe and nsfw apps, ensuring consistency and clarity in global parameters and function signatures.
- Removed redundant code and improved formatting for better readability.
- Deleted the trakt-forward app, including all source files, configuration files, and dependencies.
- Updated pnpm-lock.yaml to reflect the removal of associated packages and dependencies.
- Cleaned up the codebase by removing references to the Trakt integration in the danmu-universe app.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…apps

- Added new dependencies for the bilibili app in pnpm-lock.yaml, including zod and various forward-widget libraries.
- Enhanced type definitions in forward-widget-env.d.ts for danmu-universe and nsfw apps, ensuring consistency and clarity in global parameters and function signatures.
- Removed redundant code and improved formatting for better readability.
Copilot AI review requested due to automatic review settings December 6, 2025 02:10
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request adds a new Bilibili plugin to the Forward Widget ecosystem while removing the trakt-forward application and Trakt integration from the danmu-universe plugin. This indicates a shift in architecture where Forward now provides native Trakt support, making the plugin-level implementation redundant.

Key changes:

  • Adds new bilibili plugin with basic structure (currently incomplete)
  • Removes entire trakt-forward Cloudflare Workers application
  • Removes Trakt sync functionality from danmu-universe plugin and bumps version to 0.14.0

Reviewed changes

Copilot reviewed 30 out of 36 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pnpm-lock.yaml Adds bilibili app dependencies; removes trakt-forward and related packages
apps/bilibili/* New plugin scaffolding with incomplete implementation
apps/trakt-forward/* Complete removal of Cloudflare Workers app
apps/danmu-universe/src/experimental/trakt.ts Removes Trakt sync class
apps/danmu-universe/src/index.ts Removes Trakt configuration params and sync call
apps/danmu-universe/src/scrapers/config.ts Removes Trakt token configuration schema
apps/danmu-universe/package.json Version bump to 0.14.0
apps/nsfw/src/forward-widget-env.d.ts Minor reordering of type definitions
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

this.fetch.setCookie(cookies);
}

getSeasonIndex() {}
Copy link

Copilot AI Dec 6, 2025

Choose a reason for hiding this comment

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

The getSeasonIndex() method is defined but empty. This appears to be incomplete implementation. Either implement the method or remove it if it's not needed yet.

Suggested change
getSeasonIndex() {}

Copilot uses AI. Check for mistakes.
Comment on lines +4 to +17
export const seasonIndexItemSchema = z.object({
title: z.string(),
subTitle: z.string().nullish(),
season_type: z.enum(SeasonType),
cover: z.string(),
first_ep: z
.object({
cover: z.string(),
})
.nullish(),
media_id: z.number(),
season_id: z.number(),
score: z.coerce.number().nullish().catch(null),
});
Copy link

Copilot AI Dec 6, 2025

Choose a reason for hiding this comment

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

The seasonIndexItemSchema is defined but never used in the codebase. Consider removing it if not needed, or implement its usage in the getSeasonIndex() method.

Suggested change
export const seasonIndexItemSchema = z.object({
title: z.string(),
subTitle: z.string().nullish(),
season_type: z.enum(SeasonType),
cover: z.string(),
first_ep: z
.object({
cover: z.string(),
})
.nullish(),
media_id: z.number(),
season_id: z.number(),
score: z.coerce.number().nullish().catch(null),
});

Copilot uses AI. Check for mistakes.
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on January 24

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

export const seasonIndexItemSchema = z.object({
title: z.string(),
subTitle: z.string().nullish(),
season_type: z.enum(SeasonType),
Copy link

Choose a reason for hiding this comment

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

Bug: Wrong Zod method for validating TypeScript enum

The code uses z.enum(SeasonType) to validate a TypeScript numeric enum, but z.enum() expects an array of string literals (e.g., ["a", "b"]), not a TypeScript enum object. Since SeasonType is a numeric enum, it compiles to an object with both forward and reverse mappings. The correct method for validating TypeScript enums in Zod is z.nativeEnum(SeasonType).

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants