Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jul 26, 2025

This PR implements a comprehensive admin node management dashboard at /admin/nodes, following the same structure and patterns as the existing /admin/nodeversions page.

Features

Node Management Table

  • Comprehensive listing: Displays all nodes with pagination support
  • Table columns: Node (Name + @nodeid), Publisher (name + publisherId), Categories, Tags, Node Status, Actions
  • Status filtering: Filter nodes by All, Active, Banned, or Deleted status
  • Search functionality: Search nodes by ID or name
  • Responsive design: Table adapts to different screen sizes

Edit Modal

  • Inline editing: Click edit button to modify node properties
  • Category management: Edit node category field
  • Tag management: Edit tags as comma-separated values
  • Keyboard shortcuts: Save changes with Ctrl+Enter
  • Validation: Proper error handling and user feedback

Technical Implementation

  • API Integration: Uses useListAllNodes for fetching nodes and useUpdateNode for modifications
  • Pattern consistency: Built following the same patterns as existing admin pages
  • State management: Proper React state management with TanStack Query
  • Authentication: Protected with withAdmin HOC for admin-only access
  • Error handling: Comprehensive error handling with toast notifications

Admin Dashboard Integration

Added a new link in the admin dashboard (/admin) to easily navigate to the node management page.

Documentation

Created comprehensive documentation at /docs/admin/nodes.md tracking implementation details and usage.

Screenshots

Main Interface

Admin Nodes Table

Edit Modal

Edit Modal

The implementation provides admins with an efficient way to manage node metadata including categories and tags, with a clean and intuitive interface that follows existing design patterns.

Fixes #189.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@vercel
Copy link

vercel bot commented Jul 26, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
registry-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 26, 2025 2:27am

@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.

Copilot AI changed the title [WIP] Add a node manage dashboard Add admin node management dashboard at /admin/nodes Jul 26, 2025
Copilot AI requested a review from snomiao July 26, 2025 02:09
@snomiao
Copy link
Member

snomiao commented Jul 26, 2025

set className=dark in the components you added

@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

snomiao commented Jul 26, 2025

@copilot

in the admin edit modal, improve the tag input.

Lets users easily add tags by selecting from predefined ones, The default tags are: dev, unsafe, fragile_deps, tricky_deps, and poor_desc, unmaintained, and more may be added in the future.

Also allows adding new types of tags by input

Copy link
Contributor Author

Copilot AI commented Jul 26, 2025

set className=dark in the components you added

Added className="dark" to all components in the admin nodes management page. This includes the table components, modal components, form inputs, and labels to ensure consistent dark theme styling. Changes committed in b00aa93.

Copilot AI review requested due to automatic review settings July 26, 2025 02:32
@snomiao snomiao merged commit 4fb8c56 into main Jul 26, 2025
9 checks passed
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 implements a comprehensive admin node management dashboard at /admin/nodes, providing administrators with the ability to view, filter, and edit nodes within the ComfyUI Registry system.

  • Complete admin interface for node management with table display and filtering capabilities
  • Edit functionality for node categories and tags through a modal interface
  • Search and status filtering to help administrators efficiently manage nodes

Reviewed Changes

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

Show a summary per file
File Description
pages/admin/nodes.tsx New admin node management page with table, filtering, search, and edit functionality
pages/admin/index.tsx Added navigation link to the new node management dashboard
src/stories/components/publisher/PublisherDetail.stories.tsx Reformatted import statements for better readability
locales/*/common.json Added internationalization strings for the new node management features
docs/admin/nodes.md Documentation for the implementation and usage of the admin node dashboard

const [editingNode, setEditingNode] = useState<Node | null>(null)
const [editFormData, setEditFormData] = useState({ tags: '', category: '' })
const queryClient = useQueryClient()
const { data: user } = useGetUser()
Copy link

Copilot AI Jul 26, 2025

Choose a reason for hiding this comment

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

The user variable is declared but never used in the component. Consider removing this unused import and hook call to reduce unnecessary API requests.

Copilot uses AI. Check for mistakes.
Comment on lines +196 to +197
const updatedNode: Node = {
...editingNode,
Copy link

Copilot AI Jul 26, 2025

Choose a reason for hiding this comment

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

The node update operation spreads the entire editingNode object and then overwrites specific fields. This could potentially send unintended data to the API. Consider only sending the fields that should be updated (tags and category) rather than the entire node object.

Suggested change
const updatedNode: Node = {
...editingNode,
const updatedNode = {

Copilot uses AI. Check for mistakes.

toast.success(t('Node updated successfully'))
closeEditModal()
queryClient.invalidateQueries({ queryKey: ['/nodes'] })
Copy link

Copilot AI Jul 26, 2025

Choose a reason for hiding this comment

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

The query invalidation uses a hardcoded query key ['/nodes'] which may not match the actual query key used by useListAllNodes. Consider using a more specific query key that matches the actual query structure to ensure proper cache invalidation.

Suggested change
queryClient.invalidateQueries({ queryKey: ['/nodes'] })
queryClient.invalidateQueries({ queryKey: getAllNodesQuery.queryKey })

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

Copy link
Contributor Author

Copilot AI commented Jul 26, 2025

@copilot

in the admin edit modal, improve the tag input.
...

Improved the tag input in the admin edit modal with predefined tag selection and custom tag input functionality. Changes include:

  • Predefined tags: Quick-select buttons for dev, unsafe, fragile_deps, tricky_deps, poor_desc, unmaintained
  • Custom tag input: Text field with + button to add new tag types
  • Visual tag management: Selected tags shown as removable badges
  • Enhanced UX: Clear separation between predefined and custom tags with intuitive click-to-add/remove interface

Improved Tag Input

Implemented in commit 687f1ba.

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.

[Copilot task] Add a node manage dashboard

2 participants