Skip to content

Conversation

@snomiao
Copy link
Member

@snomiao snomiao commented Oct 11, 2025

use API to change publisher_id doesnt work yet, fix it in comfy-api

UPSTREAM IS MERGED: https://github.com/Comfy-Org/comfy-api/pull/678
PENDING NEXT DEPLOY

Summary

Adds admin functionality to set nodes as unclaimed in the registry-web admin panel. This allows administrators to remove the publisher association from a node, enabling scenarios where node authors need to transfer ownership or reclaim nodes under different publishers.

Changes

  • Admin Node Management Page (pages/admin/nodes.tsx):
    • Added "Unclaim" button with warning color in the actions column
    • Implemented confirmation modal showing node and publisher details
    • Added handleUnclaim function using useAdminUpdateNode API
    • Button only displays for nodes that have a publisher

Implementation Details

  • Uses the existing adminUpdateNode API endpoint which allows admins to update nodes without requiring publisher-specific permissions
  • Sets the publisher.id field to UNCLAIMED_ADMIN_PUBLISHER_ID to unclaim the node
  • Includes confirmation modal with warning about the action being irreversible
  • Displays loading state while the mutation is pending
  • Shows success/error toasts and invalidates queries to refresh the list

Test Plan

  • Build passes (bun run build)
  • ESLint passes with no new errors
  • Manual testing: Navigate to /admin/nodes as an admin
  • Manual testing: Click "Unclaim" button on a claimed node
  • Manual testing: Verify confirmation modal displays correct information
  • Manual testing: Confirm node becomes unclaimed after clicking "Unclaim Node"
  • Manual testing: Verify node can be re-claimed by the original author

Related

Resolves task: https://www.notion.so/comfy-org/Add-admin-functionality-to-set-nodes-as-unclaimed-in-registry-web-2886d73d365081919d92ccb023018ada

🤖 Generated with Claude Code

@vercel
Copy link

vercel bot commented Oct 11, 2025

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

Project Deployment Preview Comments Updated (UTC)
registry-web Ready Ready Preview Comment Nov 4, 2025 7:38pm

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 admin functionality to unclaim nodes in the registry-web admin panel, allowing administrators to remove publisher associations from nodes. This enables scenarios where node ownership needs to be transferred or reclaimed under different publishers.

Key Changes:

  • Added "Unclaim" button to admin nodes page with confirmation workflow
  • Implemented unclaim functionality using UNCLAIMED_ADMIN_PUBLISHER_ID constant
  • Added internationalized strings for unclaim feature across 9 languages

Reviewed Changes

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

Show a summary per file
File Description
pages/admin/nodes.tsx Added unclaim button, confirmation modal, and handler using adminUpdateNode API
locales/en/common.json Added English strings for unclaim feature
locales/zh/common.json Added Chinese translations for unclaim feature
locales/tr/common.json Added Turkish translations for unclaim feature
locales/ru/common.json Added Russian translations for unclaim feature
locales/ko/common.json Added Korean translations for unclaim feature
locales/ja/common.json Added Japanese translations for unclaim feature
locales/fr/common.json Added French translations for unclaim feature
locales/es/common.json Added Spanish translations for unclaim feature
locales/ar/common.json Added Arabic translations for unclaim feature

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

@snomiao
Copy link
Member Author

snomiao commented Oct 25, 2025

also update this page /admin/claim-nodes to allow admins claim a node for specified publisher

snomiao and others added 8 commits October 25, 2025 12:18
This change adds a new "Unclaim" button to the admin node management
page that allows administrators to remove the publisher association from
a node. This enables scenarios where node authors need to transfer
ownership or reclaim nodes under different publishers.

Key changes:
- Added useAdminUpdateNode hook to leverage admin privileges
- Added "Unclaim" button with warning color in the actions column
- Implemented confirmation modal with node and publisher details
- Added handleUnclaim function that sets publisher to undefined
- Only shows button for nodes that have a publisher

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

Co-Authored-By: Claude <[email protected]>
Added comprehensive email/password authentication functionality to the /auth/login page alongside existing social login options.

Changes:
- Enhanced AuthUI component with email/password form toggle
- Implemented Firebase email/password authentication with error handling
- Added form validation and user feedback
- Integrated with existing authentication flow and redirect logic
- Added i18n support for all new UI text and error messages
- Responsive design that works with existing UI theme

The login page now offers users choice between:
- Google OAuth (existing)
- GitHub OAuth (existing)
- Email/Password (new)

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

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

@snomiao snomiao left a comment

Choose a reason for hiding this comment

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

Thanks for the review! Addressing the comments:

  1. publisher field: The use of UNCLAIMED_ADMIN_PUBLISHER_ID is intentional and correct. The backend has a specific admin publisher ID (admin-11338bd3-f081-43cf-b3f9-295c829826f7) for unclaimed nodes, as defined in the backend code (https://github.com/Comfy-Org/comfy-api/blob/main/db/publisher.go#L13). Setting publisher to undefined would not work with the backend API contract.

  2. Spanish translation for 'Current Publisher': Fixed in commit 8a402c9 - now translates to 'Editor Actual'

  3. French translation for 'Unable to verify repository permissions': Fixed in commit 26f4f93 - now correctly translates to 'Impossible de vérifier les autorisations du dépôt. Veuillez réessayer.'

  4. Spanish translation for 'Unable to verify repository permissions': Fixed in commit ccbdbd5 - now correctly translates to 'No se pueden verificar los permisos del repositorio. Por favor, inténtelo de nuevo.'

All translation issues have been resolved!

snomiao and others added 2 commits October 26, 2025 07:54
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
- Resolved conflicts in AuthUI.tsx keeping email/password login functionality
- Resolved conflicts in CreatePublisherModal.tsx using extracted CreatePublisherFormContent component
- Resolved conflicts in pages/admin/nodes.tsx keeping unclaim node functionality
- Resolved conflicts in pages/publishers/create.tsx using extracted component
- Resolved conflicts in utils/comfyTheme.tsx using consistent dark theme colors
- Resolved conflicts in all locale JSON files merging translation keys from both branches
- Updated biome.json configuration from main branch
- Applied code formatting with bun fmt

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

Co-Authored-By: Claude <[email protected]>
Copilot AI review requested due to automatic review settings November 4, 2025 19:36
@snomiao snomiao enabled auto-merge (squash) November 4, 2025 19:36
@snomiao snomiao merged commit 84a59ab into main Nov 4, 2025
12 checks passed
@snomiao snomiao deleted the sno-admin-unclaimed-set branch November 4, 2025 19:38
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 12 out of 12 changed files in this pull request and generated 9 comments.


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

Comment on lines 33 to 35
"Author": "作者",
"Back to Node Details": "返回节点详情",
"Back to node details": "返回到节点详情",
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

Duplicate translation keys detected. Lines 29-31 are duplicated on lines 33-35, which will cause the later entries to override the earlier ones in the JSON object.

Suggested change
"Author": "作者",
"Back to Node Details": "返回节点详情",
"Back to node details": "返回到节点详情",

Copilot uses AI. Check for mistakes.
"Unable to verify repository permissions. Please try again.": "无法验证仓库权限。请再试一次。",
"Unclaim Node": "取消认领节点",
"Unclaim node": "取消认领节点",
"Unable to verify repository permissions. Please try again.": "无法验证仓库权限。请再试一次。",
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

Duplicate translation key 'Unable to verify repository permissions. Please try again.' appears twice, which will cause the second entry to override the first.

Suggested change
"Unable to verify repository permissions. Please try again.": "无法验证仓库权限。请再试一次。",

Copilot uses AI. Check for mistakes.
Comment on lines 33 to 35
"Author": "Yazar",
"Back to Node Details": "Düğüm Detaylarına Geri Dön",
"Back to node details": "Düğüm detaylarına geri dön",
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

Duplicate translation keys detected. Lines 29-31 are duplicated on lines 33-35, which will cause the later entries to override the earlier ones in the JSON object.

Suggested change
"Author": "Yazar",
"Back to Node Details": "Düğüm Detaylarına Geri Dön",
"Back to node details": "Düğüm detaylarına geri dön",

Copilot uses AI. Check for mistakes.
"Unable to verify repository permissions. Please try again.": "Depo izinleri doğrulanamadı. Lütfen tekrar deneyin.",
"Unclaim Node": "Sahiplenmeyi Kaldır Düğümünü",
"Unclaim node": "Sahiplenmeyi kaldır",
"Unable to verify repository permissions. Please try again.": "Depo izinleri doğrulanamadı. Lütfen tekrar deneyin.",
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

Duplicate translation key 'Unable to verify repository permissions. Please try again.' appears twice, which will cause the second entry to override the first.

Suggested change
"Unable to verify repository permissions. Please try again.": "Depo izinleri doğrulanamadı. Lütfen tekrar deneyin.",

Copilot uses AI. Check for mistakes.
Comment on lines 33 to 35
"Author": "Автор",
"Back to Node Details": "Вернуться к деталям узла",
"Back to node details": "Вернуться к деталям узла",
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

Duplicate translation keys detected. Lines 29-31 are duplicated on lines 33-35, which will cause the later entries to override the earlier ones in the JSON object.

Suggested change
"Author": "Автор",
"Back to Node Details": "Вернуться к деталям узла",
"Back to node details": "Вернуться к деталям узла",

Copilot uses AI. Check for mistakes.
"Unable to verify repository permissions. Please try again.": "Невозможно проверить разрешения на репозиторий. Пожалуйста, попробуйте снова.",
"Unclaim Node": "Отменить заявку на узел",
"Unclaim node": "Отменить заявку на узел",
"Unable to verify repository permissions. Please try again.": "Невозможно проверить разрешения на репозиторий. Пожалуйста, попробуйте снова.",
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

Duplicate translation key 'Unable to verify repository permissions. Please try again.' appears twice, which will cause the second entry to override the first.

Suggested change
"Unable to verify repository permissions. Please try again.": "Невозможно проверить разрешения на репозиторий. Пожалуйста, попробуйте снова.",

Copilot uses AI. Check for mistakes.
Comment on lines 33 to 35
"Author": "作者",
"Back to Node Details": "ノード詳細に戻る",
"Back to node details": "ノードの詳細に戻る",
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

Duplicate translation keys detected. Lines 29-31 are duplicated on lines 33-35, which will cause the later entries to override the earlier ones in the JSON object.

Suggested change
"Author": "作者",
"Back to Node Details": "ノード詳細に戻る",
"Back to node details": "ノードの詳細に戻る",

Copilot uses AI. Check for mistakes.
"Unable to verify repository permissions. Please try again.": "リポジトリ権限を確認できません。もう一度お試しください。",
"Unclaim Node": "ノードの請求を取り消す",
"Unclaim node": "ノードの請求を取り消す",
"Unable to verify repository permissions. Please try again.": "リポジトリ権限を確認できません。もう一度お試しください。",
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

Duplicate translation key 'Unable to verify repository permissions. Please try again.' appears twice, which will cause the second entry to override the first.

Suggested change
"Unable to verify repository permissions. Please try again.": "リポジトリ権限を確認できません。もう一度お試しください。",

Copilot uses AI. Check for mistakes.
"This node is already claimed and cannot be claimed again.": "Este nodo ya ha sido reclamado y no se puede reclamar nuevamente.",
"This node is already claimed by a publisher.": "Este nodo ya ha sido reclamado por un editor.",
"This node is already owned by a publisher and cannot be claimed.": "Este nodo ya ha sido reclamado por un editor y no puede ser reclamado nuevamente.",
"This should only take a moment.": "这应该只需要一会儿。",
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

Spanish translation file contains Chinese text. This should be translated to Spanish: 'Esto solo debería tomar un momento.'

Suggested change
"This should only take a moment.": "这应该只需要一会儿。",
"This should only take a moment.": "Esto solo debería tomar un momento.",

Copilot uses AI. Check for mistakes.
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