Skip to content

Conversation

@talissoncosta
Copy link
Contributor

@talissoncosta talissoncosta commented Jan 27, 2026

Summary

  • Add Claude commands for common development workflows
  • Update README with unit testing documentation
  • Include example test demonstrating the pattern
  • Builds on top of docs: add frontend developer documentation #6486 (frontend developer documentation)

Changes

New Claude commands

  • frontend/.claude/commands/unit-test.md - Analyse files and generate unit tests following project patterns
  • frontend/.claude/commands/pr-review.md - Review GitHub PRs with structured feedback
  • frontend/.claude/commands/find-usages.md - Find all usages of a component/function for impact analysis

Documentation

  • frontend/README.md - Added unit testing section (how to run unit tests, filter by file)

Example

  • frontend/common/utils/__tests__/isFreeEmailDomain.test.ts - Example test generated using the /unit-test command

How /unit-test works

The command instructs Claude to:

  1. Check if tests already exist for the file
  2. Analyse the source file for exported functions
  3. Generate tests following the pattern in format.test.ts (Jest + it.each)
  4. Include edge cases (null, undefined, empty values)
  5. Run the tests to verify

Test plan

  • Generated test for isFreeEmailDomain.ts - 12 tests pass
  • README unit test commands work correctly

🤖 Generated with Claude Code

@talissoncosta talissoncosta requested a review from a team as a code owner January 27, 2026 19:54
@talissoncosta talissoncosta requested review from Zaimwa9 and removed request for a team January 27, 2026 19:54
@vercel
Copy link

vercel bot commented Jan 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
flagsmith-frontend-preview Ready Ready Preview, Comment Jan 27, 2026 8:04pm
flagsmith-frontend-staging Ready Ready Preview, Comment Jan 27, 2026 8:04pm
1 Skipped Deployment
Project Deployment Review Updated (UTC)
docs Ignored Ignored Preview Jan 27, 2026 8:04pm

Request Review

@github-actions github-actions bot added the front-end Issue related to the React Front End Dashboard label Jan 27, 2026
@talissoncosta talissoncosta changed the base branch from main to chore/claude-context-backend January 27, 2026 19:54
@talissoncosta talissoncosta requested review from a team as code owners January 27, 2026 19:54
@talissoncosta talissoncosta requested review from khvn26 and removed request for a team January 27, 2026 19:54
@github-actions github-actions bot added the feature New feature or request label Jan 27, 2026
@talissoncosta talissoncosta changed the base branch from chore/claude-context-backend to docs/backend-frontend-agents-context January 27, 2026 19:55
@github-actions
Copy link
Contributor

github-actions bot commented Jan 27, 2026

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith-api-test:pr-6604 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-e2e:pr-6604 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-api:pr-6604 Finished ✅ Results
ghcr.io/flagsmith/flagsmith:pr-6604 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-private-cloud:pr-6604 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-frontend:pr-6604 Finished ✅ Results

- Add Claude command to analyse files and generate unit tests
- Include example test for isFreeEmailDomain utility
- Follow existing test patterns (Jest, it.each, edge cases)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@talissoncosta talissoncosta force-pushed the feat/unit-test-command branch from b85ca17 to d4721f0 Compare January 27, 2026 19:59
@github-actions github-actions bot added feature New feature or request and removed feature New feature or request labels Jan 27, 2026
- Add /pr-review command for reviewing GitHub PRs
- Add /find-usages command for impact analysis before refactoring
- Add unit testing section to README.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link
Contributor

@Zaimwa9 Zaimwa9 left a comment

Choose a reason for hiding this comment

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

Yeah looks good, I really liked the find-usages

@@ -0,0 +1,62 @@
---
Copy link
Contributor

Choose a reason for hiding this comment

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

really nice one

@talissoncosta talissoncosta merged commit 5b6012e into docs/backend-frontend-agents-context Jan 28, 2026
23 checks passed
@talissoncosta talissoncosta deleted the feat/unit-test-command branch January 28, 2026 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request front-end Issue related to the React Front End Dashboard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants