-
Notifications
You must be signed in to change notification settings - Fork 78
feat(FR-1093): migrate filebrowser caller function to react #3812
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat(FR-1093): migrate filebrowser caller function to react #3812
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
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. |
32d09f8 to
5cf3876
Compare
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
|---|---|---|---|
| 🔴 | Statements | 4.56% (-0.03% 🔻) |
492/10784 |
| 🔴 | Branches | 4.03% (-0.02% 🔻) |
306/7588 |
| 🔴 | Functions | 2.66% (-0.01% 🔻) |
91/3419 |
| 🔴 | Lines | 4.52% (-0.02% 🔻) |
477/10545 |
Show new covered files 🐣
St.❔ |
File | Statements | Branches | Functions | Lines |
|---|---|---|---|---|---|
| 🔴 | ... / FileBrowserButton.tsx |
0% | 0% | 0% | 0% |
Test suite run success
159 tests passing in 15 suites.
Report generated by 🧪jest coverage report action from 135cae8
c0f23ea to
173aaf8
Compare
There was a problem hiding this 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 introduces a new defaultFileBrowserImage configuration, refactors file browser session creation into a React FileBrowserButton component, and updates the GraphQL schema and client methods to handle an architecture field in session resources.
- Add
defaultFileBrowserImageconfig and propagate it through login component - Remove legacy architecture parameter from client calls and embed it in resource objects
- Introduce
FileBrowserButtonReact component with copyable image name and replace old button in folder explorer - Extend GraphQL schema with service configuration types and correct several field definitions
Reviewed Changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/lib/backend.ai-client-esm.ts | Moved architecture into SessionResources defaults and removed extra parameter in createIfNotExists calls |
| src/components/backend-ai-login.ts | Added defaultFileBrowserImage property and config wiring |
| src/components/backend-ai-import-view.ts | Removed explicit architecture argument from import calls |
| src/components/backend-ai-folder-explorer.ts | Dropped unused undefined architecture argument in SFTP calls |
| react/src/pages/SessionLauncherPage.tsx | Updated SessionResources interface, removed standalone architecture prop from session creation |
| react/src/hooks/useBackendAIAppLauncher.tsx | Corrected arguments type to match showLauncher API |
| react/src/hooks/index.tsx | Added defaultFileBrowserImage to backend config type |
| react/src/components/SessionDetailContent.tsx | Added a copyable text field for the image name |
| react/src/components/FolderExplorerHeader.tsx | Swapped manual filebrowser button for the new FileBrowserButton |
| react/src/components/FileBrowserButton.tsx | New component to handle filebrowser sessions in React |
| data/schema.graphql & merged_schema.graphql | Extended schema for services, metrics, and resource-clearing mutations |
| config.toml.sample | Documented the new defaultFileBrowserImage setting |
Comments suppressed due to low confidence (3)
react/src/components/FileBrowserButton.tsx:154
- When
defaultFileBrowserImageis set without an@architecturesuffix, thearchitecturevariable will be undefined. Consider falling back toinstalledFilebrowserImage.architecturewhen no suffix is present to ensure correct session creation.
architecture,
react/src/components/FileBrowserButton.tsx:1
- The new
FileBrowserButtoncomponent contains nontrivial session setup logic but lacks associated tests. Please add unit or integration tests covering default image selection, architecture parsing, and fallback behaviors.
import {
config.toml.sample:35
- Clarify the expected format of
defaultFileBrowserImage(e.g.,name:tag@architecture) so users know how to specify an explicit architecture.
defaultFileBrowserImage = "" # Default file browser image. If not specified, a random installed file browser image will be used.
173aaf8 to
ce36a93
Compare
ce36a93 to
135cae8
Compare
ffbcd43 to
391ed44
Compare
391ed44 to
0419d55
Compare

Resolves #3791 (FR-1093)
Migrate filebrowser caller to react component
This PR adds a new configuration option
defaultFileBrowserImageto specify a default file browser image, and refactors the file browser functionality to improve user experience.Key changes:
defaultFileBrowserImageconfiguration option inconfig.toml.sample: Now you can specify architecture of filebrowser imageFileBrowserButtoncomponent that handles file browser session creationinstalledfield to ImageNode to check if an image is installed on any agentHow to test
installedcompare v4, v5
defaultFileBrowserImageto config.toml.Checklist: