Conversation
There was a problem hiding this comment.
Pull request overview
This pull request introduces a comprehensive Tasks management page to the application and refactors the API service architecture into modular, maintainable client classes. The changes include enhanced status visualization with color-coded badges and icons across multiple tables, improved null-handling for user data, and better separation of concerns in the API layer.
Key changes:
- Refactored monolithic
NeoApiServiceinto modular API client classes (auth, system, users, shares, files, operations, monitoring, tasks, analytics, helm) extending a sharedBaseApiClient - Added new Tasks page with statistics dashboard and comprehensive task management capabilities including viewing details and cancelling running/pending tasks
- Enhanced UI consistency with new
getStatusBadgeandgetStatusIconhelper functions for both Shares and Tasks tables
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
src/services/neo-api.tsx |
Refactored into a facade pattern delegating to specialized API clients |
src/services/api/base.ts |
New base client with shared request handling and authentication error management |
src/services/api/*.ts |
New modular API clients for auth, system, users, shares, files, operations, monitoring, tasks, analytics, and helm |
src/services/models.tsx |
Updated TasksResponse and TaskStatisticsResponse models with nullable fields and result structure changes |
src/components/pages/tasks.tsx |
New Tasks page with statistics cards and refresh functionality |
src/components/data-tables/tasksT.tsx |
New TasksTable component with status badges, detail dialogs, and task cancellation |
src/components/data-tables/sharesT.tsx |
Refactored to use status badge/icon helpers for consistent visualization |
src/components/data-tables/usersT.tsx |
Added null handling for missing last_login values |
src/hooks/useNeoApi.ts |
Added handleFetchTasks and handleDeleteTask handlers |
src/App.tsx |
Added /tasks route with task data and handlers |
src/components/sidebars/sidebar-content.tsx |
Added Tasks navigation item with IconListCheck icon |
package.json |
Version bump to 3.0.4-2 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…with the status that will host the connector setup for 3.0.5RC4 and onwards
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 43 out of 44 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 42 out of 43 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
src/components/data-tables/monitoringT.tsx:188
- [nitpick] Optional chaining with nullish coalescing might be more concise and consistent with the pattern used elsewhere in this file.
Current:
value={((graphRateLimit?.requests_remaining ?? 0) / ((graphRateLimit?.requests_made ?? 0) + (graphRateLimit?.requests_remaining ?? 1))) * 100}Consider:
value={((graphRateLimit?.requests_remaining ?? 0) / ((graphRateLimit?.requests_made ?? 0) + (graphRateLimit?.requests_remaining ?? 0) || 1)) * 100}This avoids potential division by non-zero when requests_remaining is 0.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 42 out of 43 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 45 out of 46 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This pull request introduces a new Tasks page to the application, providing a comprehensive interface for viewing, managing, and cancelling background tasks. It also refines the display of share and task statuses with visually distinct badges and icons, and improves the user experience in several data tables. The most important changes are grouped below.
Tasks Page and Table Functionality:
TasksTablecomponent (src/components/data-tables/tasksT.tsx) that displays a list of tasks with status badges, duration calculation, detailed dialogs, and the ability to cancel pending or running tasks. This includes UI elements for task details, result, metadata, and error display.Taskscomponent and adding a/tasksroute insrc/App.tsx. The route passes task data and handlers for fetching and deleting tasks. [1] [2]Status Badge and Icon Improvements:
getStatusBadgeandgetStatusIconhelper functions, providing consistent, color-coded badges and icons for different share statuses in both the main table and details dialog. [1] [2] [3] [4] [5]TasksTablefor visual consistency.User Table Enhancement:
last_loginvalue, displaying a dash instead of an invalid date.Other Changes:
3.0.4-1to3.0.4-2inpackage.jsonto reflect the new features and improvements.