Skip to content

Conversation

@agatha197
Copy link
Contributor

@agatha197 agatha197 commented Oct 30, 2025

Resolves #4496 (FR-1636)

Add HuggingFace Registry Settings Modal

This PR adds a new modal component for managing HuggingFace registry settings, allowing users to view, update, and reset their HuggingFace token. The component includes:

  • A new BAIHuggingFaceRegistrySettingModal component with token management functionality
  • Settings button in the Reservoir page to access the modal
  • Proper token masking for security
  • Confirmation dialog when resetting a token
  • Internationalization support across all languages

The PR also makes minor UI improvements to the artifact table by setting its size to "small" and renaming the HuggingFace import button to "Import Model" for clarity.

Checklist:

  • Documentation
  • Minium required manager version
  • Specific setting for review (eg., KB link, endpoint or how to setup)
  • Minimum requirements to check during review
  • Test case(s) to demonstrate the difference of before/after

image.png

image.png

image.png

image.png

Copilot AI review requested due to automatic review settings October 30, 2025 10:36
@github-actions github-actions bot added area:ux UI / UX issue. area:i18n Localization size:L 100~500 LoC labels Oct 30, 2025
Copy link
Contributor Author

agatha197 commented Oct 30, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • flow:merge-queue - adds this PR to the back of the merge queue
  • flow:hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions
Copy link

github-actions bot commented Oct 30, 2025

Coverage report for ./packages/backend.ai-ui

St.
Category Percentage Covered / Total
🔴 Statements 51.38% 130/253
🔴 Branches 30.3% 80/264
🔴 Functions 34.48% 20/58
🔴 Lines 53.85% 119/221

Test suite run success

55 tests passing in 3 suites.

Report generated by 🧪jest coverage report action from 39aa767

@github-actions
Copy link

github-actions bot commented Oct 30, 2025

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements
4.65% (-0% 🔻)
531/11429
🔴 Branches 3.77% 302/8008
🔴 Functions
2.89% (-0% 🔻)
102/3533
🔴 Lines
4.59% (-0% 🔻)
513/11172

Test suite run success

121 tests passing in 14 suites.

Report generated by 🧪jest coverage report action from 39aa767

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 Hugging Face registry settings functionality to the Backend.AI WebUI application. The changes enable users to manage their Hugging Face authentication tokens through a dedicated settings modal.

  • Introduces a new BAIHuggingFaceRegistrySettingModal component for token management
  • Updates internationalization files across all supported languages
  • Integrates the settings modal into the ReservoirPage with a settings button

Reviewed Changes

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

Show a summary per file
File Description
src/components/backend-ai-webui.ts Adds 'reservoir' to the list of admin-only pages
react/src/pages/ReservoirPage.tsx Integrates the Hugging Face settings modal with a new settings button and GraphQL query
packages/backend.ai-ui/src/components/fragments/BAIHuggingFaceRegistrySettingModal.tsx New modal component for managing Hugging Face registry tokens
packages/backend.ai-ui/src/components/fragments/index.ts Exports the new BAIHuggingFaceRegistrySettingModal component
packages/backend.ai-ui/src/components/fragments/BAIArtifactTable.tsx Changes table size to "small" and fixes self-closing tag
resources/i18n/*.json Adds "Settings" translation across all language files and removes outdated "FromHuggingFace" key, adds "ImportModel"
packages/backend.ai-ui/src/locale/*.json Adds translations for the new Hugging Face settings modal and button labels
.cspell.json Adds "huggingface" to the spell check dictionary

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

@agatha197 agatha197 force-pushed the feat_FR-1636_/reservoir-token-modal branch from fa21d0c to 88b1f73 Compare October 30, 2025 10:49
@github-actions github-actions bot added size:XL 500~ LoC and removed size:L 100~500 LoC labels Oct 30, 2025
@agatha197 agatha197 force-pushed the feat_FR-1636_/reservoir-token-modal branch from 9a013ed to e1c7b8e Compare October 31, 2025 07:51
@github-actions github-actions bot added size:L 100~500 LoC and removed size:XL 500~ LoC labels Oct 31, 2025
@agatha197 agatha197 requested a review from nowgnuesLee October 31, 2025 07:54
Copy link
Contributor

@nowgnuesLee nowgnuesLee left a comment

Choose a reason for hiding this comment

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

please resolve merge conflicts

@agatha197 agatha197 force-pushed the feat_FR-1636_/reservoir-token-modal branch from e1c7b8e to 39aa767 Compare November 4, 2025 01:37
@agatha197 agatha197 requested a review from nowgnuesLee November 4, 2025 01:45
Copy link
Contributor

@nowgnuesLee nowgnuesLee left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:i18n Localization area:ux UI / UX issue. size:L 100~500 LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a control to the reservoir page for entering a HuggingFace token.

3 participants