Skip to content

Conversation

@agatha197
Copy link
Contributor

resolves #NNN (FR-MMM)

Checklist: (if applicable)

  • 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

@github-actions github-actions bot added the size:XL 500~ LoC label Nov 18, 2025
Copy link
Contributor Author

agatha197 commented Nov 18, 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
Contributor

github-actions bot commented Nov 18, 2025

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements
4.39% (-0.02% 🔻)
522/11892
🔴 Branches
3.51% (-0.09% 🔻)
297/8460
🔴 Functions
2.56% (-0.01% 🔻)
93/3638
🔴 Lines
4.37% (-0.02% 🔻)
508/11631
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🔴
... / AgentSettingModalLegacy.tsx
0% 0% 0% 0%
🔴
... / AgentNodes.tsx
0% 0% 0% 0%
🔴
... / AgentNodesListPage.tsx
0% 0% 0% 0%

Test suite run success

118 tests passing in 13 suites.

Report generated by 🧪jest coverage report action from f0dbf10

@yomybaby yomybaby changed the base branch from feat/FR-1683-migrate-url-state-to-nuqs to graphite-base/4665 November 18, 2025 09:21
@agatha197 agatha197 changed the base branch from graphite-base/4665 to feat/FR-1683-migrate-url-state-to-nuqs November 18, 2025 13:13
@graphite-app graphite-app bot changed the base branch from feat/FR-1683-migrate-url-state-to-nuqs to graphite-base/4665 November 19, 2025 01:56
@graphite-app graphite-app bot force-pushed the graphite-base/4665 branch from 097a609 to e9ef843 Compare November 19, 2025 01:58
@graphite-app graphite-app bot changed the base branch from graphite-base/4665 to main November 19, 2025 01:59
@github-actions github-actions bot added area:ux UI / UX issue. area:i18n Localization labels Nov 19, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 19, 2025

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

St.
Category Percentage Covered / Total
🔴 Statements
52.52% (-2.27% 🔻)
167/318
🔴 Branches
31.53% (-1.22% 🔻)
93/295
🔴 Functions
41.89% (-0.57% 🔻)
31/74
🔴 Lines
54.51% (-2.31% 🔻)
151/277
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟡 helper/index.ts
58.71% (-5.58% 🔻)
41.92% (-2.96% 🔻)
57.14% (-2.12% 🔻)
62.2% (-6.22% 🔻)

Test suite run success

62 tests passing in 4 suites.

Report generated by 🧪jest coverage report action from f0dbf10

@agatha197 agatha197 force-pushed the feat/FR-1694 branch 2 times, most recently from 9133122 to a9b6b9d Compare November 19, 2025 10:04
@agatha197 agatha197 marked this pull request as ready for review November 20, 2025 01:50
Copilot AI review requested due to automatic review settings November 20, 2025 01:50
@agatha197 agatha197 marked this pull request as draft November 20, 2025 01:51
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 creates a new agent nodes list page using the agent_nodes GraphQL query to replace the legacy AgentList component. The implementation introduces a modern agent management interface with improved filtering, sorting, and column customization capabilities.

Key Changes:

  • New AgentNodesListPage component with GraphQL query integration using Relay
  • New AgentNodes table component with comprehensive agent data display
  • Addition of parseObjectMap helper function for safe JSON parsing
  • New internationalization keys for agent-related UI text

Reviewed Changes

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

Show a summary per file
File Description
react/src/pages/AgentNodesListPage.tsx New page component implementing agent nodes list with filtering, sorting, and pagination using GraphQL agent_nodes query
react/src/components/AgentNodes.tsx New comprehensive table component displaying agent details including status, allocation, utilization, and metadata
react/src/pages/ResourcesPage.tsx Updated to use new AgentNodesListPage instead of legacy AgentList component
resources/i18n/en.json Added new translation keys for agent-related UI elements (AgentVersion, AntiMining, Guard, Containers, etc.)
resources/i18n/ko.json Partially updated Korean translations with some keys left empty
packages/backend.ai-ui/src/helper/index.ts Added parseObjectMap utility function for safely parsing unknown inputs into object records

{
key: 'gpu_alloc_map',
dataIndex: 'gpu_alloc_map',
title: 'GPU Allocation Map',
Copy link

Copilot AI Nov 20, 2025

Choose a reason for hiding this comment

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

Hard-coded text "GPU Allocation Map" should use i18n function. According to internationalization guidelines, all user-facing text must use i18n functions. Use t('agent.GPUAllocationMap') instead and add the translation key to the i18n files.

Copilot generated this review using guidance from repository custom instructions.
gap="xxs"
>
<BAIText>
{statKey === 'net_rx' ? 'Net Rx' : 'Net Tx'}
Copy link

Copilot AI Nov 20, 2025

Choose a reason for hiding this comment

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

Hard-coded text "Net Rx" and "Net Tx" should use i18n functions. According to internationalization guidelines, all user-facing text must use i18n functions. Consider using t('agent.NetRx') and t('agent.NetTx') instead and add the translation keys to the i18n files.

Copilot generated this review using guidance from repository custom instructions.
Comment on lines +11 to +44
"AgentVersion": "Agent Version",
"Allocation": "Allocation",
"AntiMining": "Anti Mining",
"Architecture": "Architecture",
"AutoRefreshEvery5s": "Auto refresh every 5s",
"AutoTerminateAbusingKernel": "Auto Terminate Abusing Kernel",
"BackendType": "Backend Type",
"Capabilities": "Capabilities",
"ComputePlugins": "Compute Plugins",
"Connected": "Connected",
"Containers": "Containers",
"DetailedInformation": "Detailed Information",
"DiskPerc": "Disk %",
"Endpoint": "Endpoint",
"Guard": "Guard",
"HardwareMetadata": "Hardware Metadata",
"LostAt": "Lost At",
"Maintaining": "Maintaining",
"NoAgentToDisplay": "No Agents to display",
"NoAvailableLiveStat": "No available live stat",
"NoChanges": "No changes.",
"NoNetworkSignal": "No network signals.",
"Permissions": "Permissions",
"Region": "Region",
"Resources": "Resources",
"Running": "Running",
"Schedulable": "Schedulable",
"Specs": "Specs",
"Starts": "Starts",
"Status": "Status",
"StatusChanged": "Status Changed",
"Terminated": "Terminated",
"Utilization": "Utilization"
"Utilization": "Utilization",
"Version": "Version"
Copy link

Copilot AI Nov 20, 2025

Choose a reason for hiding this comment

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

Multiple new translation keys added in the English file (AgentVersion, AntiMining, AutoTerminateAbusingKernel, ComputePlugins, Guard, HardwareMetadata, LostAt, Permissions, Specs, StatusChanged, Version) are missing from other language files (ko.json, ja.json, zh-CN.json, zh-TW.json, etc.). According to i18n guidelines, all translation keys must be provided for all supported languages. Please add corresponding translations to all language files.

Copilot generated this review using guidance from repository custom instructions.
{agent_nodes ? (
<AgentNodes
agentsFrgmt={
_.map(agent_nodes.edges, (e) => e?.node).filter(Boolean) as any
Copy link

Copilot AI Nov 20, 2025

Choose a reason for hiding this comment

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

Using as any type assertion bypasses TypeScript's type safety. Consider defining a proper type or using a type guard to safely convert the filtered nodes to the expected type. This could hide potential runtime errors.

Copilot uses AI. Check for mistakes.
<BAIPropertyFilter
// TODO: support date filter (status_changed, first_contact, lost_at)
filterProperties={[
{ key: 'id', propertyLabel: 'ID', type: 'string' },
Copy link

Copilot AI Nov 20, 2025

Choose a reason for hiding this comment

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

Hard-coded text "ID" should use i18n function. According to internationalization guidelines, all user-facing text must use i18n functions. Use t('general.ID') or similar translation key instead.

Copilot generated this review using guidance from repository custom instructions.
"AgentSetting": "에이전트 설정",
"AgentSettingUpdated": "에이전트 설정이 변경되었습니다.",
"Allocation": "할당 정보",
"AntiMining": "",
Copy link

Copilot AI Nov 20, 2025

Choose a reason for hiding this comment

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

Missing translation for "AntiMining". The value is an empty string ("") while other languages like English have "Anti Mining". According to i18n guidelines, all user-facing text must have translations.

Copilot generated this review using guidance from repository custom instructions.
"DetailedInformation": "상세 정보",
"DiskPerc": "디스크 %",
"Endpoint": "엔드포인트",
"Guard": "",
Copy link

Copilot AI Nov 20, 2025

Choose a reason for hiding this comment

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

Missing translation for "Guard". The value is an empty string ("") while other languages like English have "Guard". According to i18n guidelines, all user-facing text must have translations.

Copilot generated this review using guidance from repository custom instructions.
onChangeOrder,
...tableProps
}) => {
'use memo';
Copy link

Copilot AI Nov 20, 2025

Choose a reason for hiding this comment

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

Unknown directive: 'use memo'.

Copilot uses AI. Check for mistakes.
*/
export function parseObjectMap<T = any>(raw: unknown): Record<string, T> {
if (!raw) return {};
if (typeof raw === 'object' && raw !== null && !Array.isArray(raw)) {
Copy link

Copilot AI Nov 20, 2025

Choose a reason for hiding this comment

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

Variable 'raw' is of type date, object or regular expression, but it is compared to an expression of type null.

Suggested change
if (typeof raw === 'object' && raw !== null && !Array.isArray(raw)) {
if (
typeof raw === 'object' &&
raw !== null &&
!Array.isArray(raw) &&
(Object.getPrototypeOf(raw) === Object.prototype || Object.getPrototypeOf(raw) === null)
) {

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

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants