Skip to content

Conversation

@talissoncosta
Copy link
Contributor

Summary

This PR adds a GitHub Pages deployment for showcasing the Flagsmith Backstage plugin with mock data.

Features

  • Static demo build using Vite for standalone deployment
  • MSW mock handlers intercept API calls and return realistic mock data
  • Demo banner clearly indicates mock data is being used
  • GitHub Actions workflow auto-deploys to Pages on merge to main
  • Tab navigation between Feature Flags, Overview Card, and Usage Card views

Demo URL

After merging: https://flagsmith.github.io/flagsmith-backstage-plugin/

Files Added

  • vite.config.demo.ts - Vite build configuration
  • demo/ directory with App, DemoBanner, main entry point
  • .github/workflows/deploy-demo.yml - Deployment workflow
  • .eslintignore - Exclude demo from linting

Scripts Added

  • yarn build:demo - Build static demo
  • yarn preview:demo - Preview demo locally

Test Plan

  • yarn lint passes
  • yarn build passes
  • yarn build:demo produces static files in dist-demo/
  • After merge, verify demo deploys to GitHub Pages
  • Enable GitHub Pages in repo settings (Source: GitHub Actions)

Screenshots

Demo can be previewed locally with yarn build:demo && yarn preview:demo

🤖 Generated with Claude Code

@talissoncosta talissoncosta changed the base branch from main to feat/6424-add-tests December 23, 2025 15:17
@github-actions
Copy link
Contributor

Demo Preview

Preview URL: https://Flagsmith.github.io/flagsmith-backstage-plugin/pr-4/

This preview will be automatically cleaned up when the PR is closed.

github-actions bot added a commit that referenced this pull request Dec 23, 2025
@talissoncosta talissoncosta marked this pull request as draft December 23, 2025 17:32
github-actions bot added a commit that referenced this pull request Dec 24, 2025
github-actions bot added a commit that referenced this pull request Dec 24, 2025
github-actions bot added a commit that referenced this pull request Dec 24, 2025
github-actions bot added a commit that referenced this pull request Dec 24, 2025
github-actions bot added a commit that referenced this pull request Dec 24, 2025
@talissoncosta talissoncosta force-pushed the feat/github-pages-demo branch from f655eff to dc30dd9 Compare January 13, 2026 21:23
@talissoncosta talissoncosta changed the base branch from feat/6424-add-tests to feat/6422-ui-improvements January 13, 2026 21:24
@talissoncosta talissoncosta changed the base branch from feat/6422-ui-improvements to main January 13, 2026 21:27
github-actions bot added a commit that referenced this pull request Jan 13, 2026
@talissoncosta talissoncosta force-pushed the feat/github-pages-demo branch from 8e5cf23 to 0d70a91 Compare January 13, 2026 21:57
@talissoncosta talissoncosta changed the base branch from main to feat/ui-improvements-2 January 13, 2026 21:57
github-actions bot added a commit that referenced this pull request Jan 13, 2026
@talissoncosta talissoncosta changed the base branch from feat/ui-improvements-2 to main January 27, 2026 11:59
@talissoncosta talissoncosta changed the base branch from main to feat/issue-9-ux-improvements January 27, 2026 12:05
talissoncosta and others added 11 commits January 27, 2026 09:05
Add static demo deployment for showcasing the plugin:
- Vite config for standalone demo build
- Demo app with MSW mock handlers
- Demo banner indicating mock data usage
- GitHub Actions workflow for auto-deploy to Pages
- Build script: yarn build:demo

Demo URL: https://flagsmith.github.io/flagsmith-backstage-plugin/

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

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Add interactive demo configuration:
- Initial setup screen with mock/live mode selection
- Live mode: connect to real Flagsmith with API key
- Mock mode: use MSW for sample data
- Configuration persisted in localStorage
- Reconfigure button in demo banner

Add PR preview deployments:
- Each PR deploys to /pr-{number}/ on GitHub Pages
- Bot comments on PR with preview URL
- Automatic cleanup when PR is closed/merged
- Dynamic base path via VITE_BASE_PATH env variable

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

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Check if gh-pages branch exists before checkout
- Create orphan gh-pages branch if it doesn't exist
- Update cleanup job to handle missing branch gracefully

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

Co-Authored-By: Claude Opus 4.5 <[email protected]>
The FlagsmithClient appends /flagsmith to the base URL from discovery API.
MSW handlers expect patterns like */proxy/flagsmith/..., so the discovery
API must return /api/proxy (not /api) for mock mode to work correctly.

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

Co-Authored-By: Claude Opus 4.5 <[email protected]>
FlagsmithClient appends /flagsmith to all URLs (designed for Backstage
proxy routing). In live mode, we hit the Flagsmith API directly, so
strip /flagsmith from the path to get correct API URLs.

Before: https://api.flagsmith.com/api/v1/flagsmith/projects/123/
After:  https://api.flagsmith.com/api/v1/projects/123/

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

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Replace inline styles with makeStyles in demo App LoadingScreen
for consistency with the rest of the codebase.

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

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Remove required validation for projectId and orgId fields
- Auto-fetch first available org/project when not provided
- Update helper text to clarify optional fields
- Clarify API Key is Master API Key from Organisation Settings

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

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Add console logs for MSW service worker initialization
to help debug mock mode issues.

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

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Add mockServiceWorker.js generated by MSW for intercepting
API requests in mock mode demo.

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

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Add a theme toggle button in the toolbar that allows users to switch
between light and dark modes. Theme state is managed in the App
component and passed to all child components.

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

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Replace hardcoded dark background with color="default" on AppBar
- Add conditional text color for title based on theme mode
- Make Tabs background adapt to light/dark mode

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

Co-Authored-By: Claude Opus 4.5 <[email protected]>
talissoncosta and others added 2 commits January 27, 2026 09:06
- Add key prop to ThemeProvider to force remount on theme change
- Apply background.default to main content area for proper theming
- Use explicit background/text colors on AppBar for consistent styling
- Adjust Tabs background opacity for better visual balance

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

Co-Authored-By: Claude Opus 4.5 <[email protected]>
The artifact was being lost when switching branches because git checkout
replaces the working directory. Move artifact to /tmp before checkout.

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

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@talissoncosta talissoncosta force-pushed the feat/github-pages-demo branch from 0d70a91 to e600bd1 Compare January 27, 2026 12:14
github-actions bot added a commit that referenced this pull request Jan 27, 2026
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