-
Notifications
You must be signed in to change notification settings - Fork 78
refactor(FR-1656): extract filebrowser image logic into custom hook with UX improvements #4612
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
Merged
graphite-app
merged 1 commit into
main
from
refactor/FR-1656-extract-filebrowser-image-logic
Nov 11, 2025
Merged
refactor(FR-1656): extract filebrowser image logic into custom hook with UX improvements #4612
graphite-app
merged 1 commit into
main
from
refactor/FR-1656-extract-filebrowser-image-logic
Nov 11, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 tasks
5 tasks
Member
Author
5 tasks
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
|---|---|---|---|
| 🔴 | Statements | 4.61% (-0.01% 🔻) |
530/11486 |
| 🔴 | Branches | 3.73% (-0% 🔻) |
302/8098 |
| 🔴 | Functions | 2.88% (-0% 🔻) |
102/3544 |
| 🔴 | Lines | 4.56% (-0.01% 🔻) |
512/11231 |
Show new covered files 🐣
St.❔ |
File | Statements | Branches | Functions | Lines |
|---|---|---|---|---|---|
| 🔴 | ... / useDefaultFileBrowserImageWithFallback.ts |
0% | 0% | 0% | 0% |
| 🔴 | ... / FileBrowserButton.tsx |
0% | 0% | 0% | 0% |
Test suite run success
121 tests passing in 14 suites.
Report generated by 🧪jest coverage report action from 4c0bf66
0674cef to
126d44b
Compare
7e13156 to
d4928e6
Compare
126d44b to
113d240
Compare
ironAiken2
approved these changes
Nov 11, 2025
Contributor
ironAiken2
left a comment
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.
LGTM
Merge activity
|
…ith UX improvements (#4612) Resolves #4598 ([FR-1656](https://lablup.atlassian.net/browse/FR-1656)) ### TL;DR Refactored file browser functionality into a reusable component with improved image detection. ### What changed? - Created a new `FileBrowserButton` component that encapsulates file browser functionality - Added a new hook `useDefaultFileBrowserImageWithFallback` to handle image detection logic - Updated `FolderExplorerHeader` to use the new component instead of inline implementation - Improved error handling and user feedback when no file browser images are available ### How to test? 1. Navigate to the folder explorer 2. Verify the file browser button appears and works correctly 3. Test with both configured default file browser images and without configuration 4. Verify proper error handling when no compatible images are available ### Why make this change? This refactoring improves code maintainability by: - Extracting reusable logic into dedicated components and hooks - Centralizing file browser image detection - Providing consistent user experience with better error handling - Making the file browser functionality available for reuse in other parts of the application [FR-1656]: https://lablup.atlassian.net/browse/FR-1656?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
d4928e6 to
a1d6866
Compare
113d240 to
4c0bf66
Compare
Base automatically changed from
feat/FR-1656-enhance-file-browser-session-notifications
to
main
November 11, 2025 08:00
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

Resolves #4598 (FR-1656)
TL;DR
Refactored file browser functionality into a reusable component with improved image detection.
What changed?
FileBrowserButtoncomponent that encapsulates file browser functionalityuseDefaultFileBrowserImageWithFallbackto handle image detection logicFolderExplorerHeaderto use the new component instead of inline implementationHow to test?
Why make this change?
This refactoring improves code maintainability by: