Skip to content

Conversation

@snomiao
Copy link
Member

@snomiao snomiao commented Jul 11, 2025

WIP

-- below outdated --

Summary

This PR implements a comprehensive ComfyNode management interface for administrators with policy controls and enhanced node claiming functionality.

Key Changes

Admin Interface:

  • Added pages/admin/comfy-nodes.tsx - Complete admin interface for ComfyNode management (622 lines)
  • Enhanced admin navigation with ComfyNode management option
  • Comprehensive node listing with filtering, sorting, and bulk operations

Node Claiming System:

  • Added pages/nodes/[nodeId]/claim.tsx - Individual node claiming interface
  • Added pages/publishers/[publisherId]/claim-my-node.tsx - Publisher-specific bulk claiming (854 lines)
  • Enhanced claim modal with admin controls (AdminNodeClaimModal.tsx)

GitHub Integration:

  • Added app/api/auth/github/callback/route.ts - GitHub OAuth callback handler
  • Added app/api/auth/github/route.ts - GitHub OAuth initiation
  • GitHub user authentication for node ownership verification

API Enhancements:

  • Updated src/api/generated.ts with new endpoints and interfaces:
    • ClaimMyNodeRequest interface for GitHub token verification
    • ComfyNodePolicy and ComfyNodeUpdateRequest interfaces
    • updateComfyNode and claimMyNode functions
    • listAllComfyNodes endpoint for admin access

UI Components:

  • Added reusable span components: GithubUserSpan, NodeSpan, PublisherSpan
  • Enhanced NodeDetails.tsx with claiming functionality
  • Added CreatePublisherModal.tsx for streamlined publisher creation

Storybook Integration:

  • Added comprehensive Storybook stories for ComfyNode admin components:
    • ComfyNodeEditModal.stories.tsx - Modal component with multiple node types
    • ComfyNodePolicyBadge.stories.tsx - Policy badge variants (Active, Banned, Local Only)
    • ComfyNodeTable.stories.tsx - Admin table with various data states
    • ComfyNodesManage.stories.tsx - Full page admin interface story
  • Enhanced component reusability by exporting ComfyNodeEditModal

Documentation:

  • Added comprehensive API architecture documentation
  • Added authentication system documentation
  • Added caching strategy documentation
  • Added GitHub app integration documentation
  • Added React Query integration documentation

Internationalization:

  • Added 96 new translation keys across all 7 supported languages
  • Enhanced i18n scanning script for better key extraction

Technical Details

  • Files Changed: 45 files modified/added (includes Storybook stories)
  • Lines Added: ~5,505 lines
  • Lines Removed: ~240 lines
  • Dependencies: Updated orval configuration and bun lockfile

Environment Configuration

  • Enhanced .env configuration for GitHub OAuth
  • Updated .gitignore for better security
  • TypeScript configuration improvements

Component Testing

The Storybook stories provide comprehensive testing scenarios:

  • Different ComfyNode policy states (Active, Banned, Local Only)
  • Various node configurations (deprecated, experimental, minimal)
  • Loading states and empty data scenarios
  • Interactive modal behavior with form validation

🤖 Generated with Claude Code

Co-Authored-By: Claude [email protected]

Copilot AI review requested due to automatic review settings July 11, 2025 14:28
@vercel
Copy link

vercel bot commented Jul 11, 2025

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

Project Deployment Preview Comments Updated (UTC)
registry-web Error Error Oct 26, 2025 8:27am

Copy link
Contributor

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 PR adds a comprehensive ComfyNode management interface to the admin dashboard, providing functionality to search, view, and edit ComfyNode properties including policy controls and feature flags. The implementation includes complete internationalization support across all supported languages and API updates to support the new ComfyNode management features.

  • Adds dedicated ComfyNode management page with search and editing capabilities
  • Implements comprehensive policy management system (Active/Banned/Local Only)
  • Adds support for deprecated and experimental flags with visual badges
  • Updates translation files for all supported languages (EN, ES, FR, JA, KO, ZH)

Reviewed Changes

Copilot reviewed 11 out of 13 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/api/generated.ts Generated API client with new ComfyNode interfaces, policies, and update endpoints
pages/admin/comfy-nodes.tsx New admin page implementing ComfyNode management interface with search and edit modal
pages/admin/index.tsx Adds navigation link to ComfyNode management from admin dashboard
public/locales/*/common.json Translation updates for ComfyNode management UI across all languages
package.json Updates orval dependency version
orval.config.ts Improves configuration for API generation

@github-actions
Copy link

🎨 Chromatic Visual Testing Results

Resource URL
🔍 Build Results Chromatic Build
📚 Storybook View Storybook

Check the visual changes and approve or request changes as needed.

@github-actions
Copy link

🎨 Chromatic Visual Testing Results

Resource URL
🔍 Build Results Chromatic Build
📚 Storybook View Storybook

Check the visual changes and approve or request changes as needed.

@snomiao
Copy link
Member Author

snomiao commented Aug 10, 2025

@snomiao
Copy link
Member Author

snomiao commented Aug 21, 2025

Working on fixing the Spanish translation issue for 'Local Only':

Todo List:

  • Reply to PR comment with todo list
  • Find and fix the Spanish translation for 'Local Only'
  • Test the changes by checking the Spanish locale file
  • Commit the changes with descriptive message
  • Push changes to branch
  • Update tracking comment with task summary

COMPLETED!

Summary of Changes:

  • Fixed primary issue: 'Local Only' translation from '仅限本地' (Chinese) → 'Solo Local' (Spanish)
  • Found and fixed 4 additional Chinese text strings in Spanish locale file:
    • 'Failed to update node' error message
    • 'Node ID is required for claiming' message
    • 'This should only take a moment' message
    • 'Unable to verify repository permissions' message
  • Fixed JSON syntax errors (missing commas)
  • Verified JSON validity

Files Changed:

  • locales/es/common.json - 5 translations corrected

Commit: 1813845 - Spanish translation fixes pushed to branch ✅

@snomiao
Copy link
Member Author

snomiao commented Aug 21, 2025

Starting rebase to origin/main as requested.

Rebase Progress

  • Fetch latest changes from origin/main
  • Rebase current branch onto origin/main
  • Resolve merge conflicts in locale files (es, fr, ja, ko, ru, zh)
  • Resolve additional merge conflicts in orval.config.ts
  • Run tests to ensure everything works after rebase
  • Force push the rebased branch
  • Update this comment with completion summary

Currently resolving additional merge conflicts in configuration files...

snomiao and others added 12 commits September 30, 2025 07:43
…local and .env for better environment management

feat(generated.ts): add ClaimMyNodeRequest interface to handle GitHub token for node ownership verification
feat(generated.ts): introduce ComfyNodePolicy and ComfyNodeUpdateRequest interfaces for enhanced node management
feat(generated.ts): add MoonvalleyTextToVideoInferenceParams interface for detailed video generation parameters
feat(generated.ts): implement updateComfyNode and useUpdateComfyNode functions for admin node updates
feat(generated.ts): create claimMyNode and useClaimMyNode functions for claiming unclaimed nodes by publishers
- Add comprehensive ComfyNode management page at /admin/comfy-nodes
- Implement search functionality by node ID, version, and comfy node name
- Add modal interface for editing ComfyNode properties (category, description, function, input/return types)
- Support policy management (Active/Banned/Local Only) with visual badges
- Include deprecated and experimental flags with appropriate badges
- Add admin dashboard link to ComfyNode management
- Update translations for all supported languages (EN, ES, FR, JA, KO, ZH)
- Integrate with existing API endpoints for listAllComfyNodes and updateComfyNode

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

Co-Authored-By: Claude <[email protected]>
- Add ComfyNodeEditModal.stories.tsx for modal component testing
- Add ComfyNodePolicyBadge.stories.tsx for policy badge variants
- Add ComfyNodeTable.stories.tsx for admin table component
- Add ComfyNodesManage.stories.tsx for full page story
- Export ComfyNodeEditModal component for reusability

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

Co-Authored-By: Claude <[email protected]>
- Fix 'Local Only' translation from '仅限本地' to 'Solo Local'
- Replace 4 other Chinese text strings with proper Spanish translations:
  * 'Failed to update node' error message
  * 'Node ID is required for claiming' message
  * 'This should only take a moment' message
  * 'Unable to verify repository permissions' message

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

Co-Authored-By: Claude <[email protected]>
@snomiao snomiao requested a review from Copilot October 2, 2025 14:35
Copy link
Contributor

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

Copilot reviewed 15 out of 18 changed files in this pull request and generated 4 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

snomiao and others added 2 commits October 3, 2025 23:05
- Keep all localization additions from feature branch
- Resolve conflicts in all locale files (en, es, fr, ja, ko, ru, zh)
- Update bun.lock with latest dependencies

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

Co-Authored-By: Claude <[email protected]>
- Resolve localization conflicts across all locale files
- Keep all localization feature additions
- Accept local version of bun.lock to avoid dependency conflicts

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

Co-Authored-By: Claude <[email protected]>
- Add full width container for better responsiveness
- Apply dark theme classes to table component
- Style table headers with dark background and light text
- Enhance visual consistency in admin panel

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

Co-Authored-By: Claude <[email protected]>
- Resolved locale file conflicts by keeping our translations
- Updated generated.ts from main (will regenerate with API changes)
- Updated bun.lock from main
- Changed require('dotenv') to import dotenv statement
- Fixes orval generation error in ES module context
- Regenerated API client with ComfyNode management endpoints
snomiao and others added 2 commits October 26, 2025 07:13
- Fix "Bulk Update Supported Versions" translation from Chinese to Spanish

Addresses Copilot review comment about Chinese characters in Spanish locale file.

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

Co-Authored-By: Claude <[email protected]>
@snomiao
Copy link
Member Author

snomiao commented Oct 26, 2025

Review Comments Addressed

✅ Fixed Issues

Commit: 79d7861

  1. Spanish Translation Fix - Fixed Chinese text in Spanish locale file (locales/es/common.json):
    • Line 38: "Bulk Update Supported Versions" - Changed from Chinese "批量更新支持的版本" to Spanish "Actualización masiva de versiones compatibles"
    • Previously fixed line 215: "Local Only" was already corrected to "Solo Local"

📝 Review Comments Analysis

The remaining Copilot review comments don't require fixes:

  1. Translation keys - The comments about missing translation keys for "Enter search criteria to find ComfyNodes" and "No ComfyNodes found for the specified criteria" are incorrect. These translations already exist in all locale files (verified in locales/en/common.json lines 140 and 229).

  2. Badge color consistency - The comment about using 'gray' instead of 'default' for policy badges is a minor style preference. The current implementation uses 'gray' in the helper function's default case (line 427 in pages/admin/comfy-nodes.tsx), which is already correct.

  3. Non-null assertions - The suggestions about policy non-null assertions are valid defensive programming suggestions but don't cause actual bugs since the API contract ensures policy is always defined for ComfyNodes.

🔍 Build Status

  • ✅ Local build: PASSED (verified with bun run build)
  • ✅ Unit tests: PASSED
  • ✅ Integration tests: PASSED
  • ✅ Storybook/Chromatic: PASSED
  • ⚠️ Vercel deployment: FAILING (appears to be a Vercel-specific deployment issue, not a code issue - the build completes successfully locally)

The Vercel failure appears to be unrelated to the code changes, as the build succeeds locally and all code-related checks pass.

snomiao and others added 2 commits October 26, 2025 08:03
- Checked out biome.json from origin/main
- Applied formatting fixes to 166 files

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

Co-Authored-By: Claude <[email protected]>
- Checked out biome.json from origin/main
- Ran bun fmt for code formatting
- Pulled latest changes from origin/main
- Resolved merge conflicts in:
  - orval.config.ts: Use main branch version for target URL
  - pages/admin/index.tsx: Use main branch layout with AdminTreeNavigation
  - pages/admin/node-version-compatibility.tsx: Use main branch API signature
  - All locale files: Use main branch versions

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

Co-Authored-By: Claude <[email protected]>
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