Skip to content

Conversation

@talissoncosta
Copy link

@talissoncosta talissoncosta commented Dec 19, 2025

Summary

Migrate the Flagsmith plugin to use Backstage's new frontend system as the default export, replacing the legacy createPlugin API.

Closes #6421

Changes

  • Remove legacy frontend system files (plugin.ts, routes.ts)
  • Use createFrontendPlugin from @backstage/frontend-plugin-api as the default export
  • Implement EntityContentBlueprint for the flags tab
  • Implement EntityCardBlueprint for overview and usage cards
  • Remove separate /alpha export path (new system is now the default)

Breaking Changes

  • Plugin now requires Backstage apps using the new frontend system
  • Legacy flagsmithPlugin named export removed
  • Direct component exports removed from package root

Test plan

  • yarn build passes
  • yarn start runs dev server successfully
  • Test in a Backstage app with new frontend system

🤖 Generated with Claude Code

Implements #6421 - adds `/alpha` export path that uses Backstage's new
declarative frontend system while maintaining backward compatibility with
the existing legacy export.

Changes:
- Add `@backstage/frontend-plugin-api` dependency
- Create `src/alpha.ts` with new frontend system plugin using:
  - EntityContentBlueprint for FlagsTab
  - EntityCardBlueprint for FlagsmithOverviewCard and FlagsmithUsageCard
- Add exports and typesVersions configuration to package.json

Usage:
- Legacy: `import { flagsmithPlugin } from '@internal/plugin-flagsmith'`
- Alpha: `import flagsmithPlugin from '@internal/plugin-flagsmith/alpha'`

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
talissoncosta and others added 5 commits December 22, 2025 21:56
Remove plugin.ts, routes.ts, and plugin.test.ts that were part of
the legacy Backstage frontend system using createPlugin API.

BREAKING CHANGE: Legacy plugin export removed.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Consolidate alpha.ts into index.ts as the main plugin export.
The plugin now uses createFrontendPlugin with EntityContentBlueprint
and EntityCardBlueprint from the new Backstage frontend system.

Exports:
- default: flagsmithPlugin (new frontend system)
- flagsmithPlugin: named export for compatibility
- FlagsTab, FlagsmithOverviewCard, FlagsmithUsageCard: components

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove the separate /alpha export since the new frontend system
is now the default export at the package root.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove registerPlugin call since the new frontend system plugin
is not compatible with the legacy dev-utils registerPlugin API.
Components are rendered directly via addPage instead.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Keep only the default plugin export. The new frontend system
handles component registration via blueprints automatically.

Dev server now imports components directly from their files.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@talissoncosta talissoncosta changed the title Add /alpha export with Backstage new frontend system Migrate to Backstage new frontend system Dec 23, 2025
@talissoncosta talissoncosta linked an issue Dec 23, 2025 that may be closed by this pull request
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.

Migrate to Backstage new frontend system

2 participants