Skip to content

Conversation

@yomybaby
Copy link
Member

@yomybaby yomybaby commented Nov 11, 2025

Resolves #4598 (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

Copy link
Member Author

yomybaby commented Nov 11, 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.

@yomybaby yomybaby marked this pull request as ready for review November 11, 2025 02:17
@github-actions
Copy link

github-actions bot commented Nov 11, 2025

Coverage report for ./react

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

@yomybaby yomybaby force-pushed the refactor/FR-1656-extract-filebrowser-image-logic branch 3 times, most recently from 0674cef to 126d44b Compare November 11, 2025 03:57
@ironAiken2 ironAiken2 force-pushed the feat/FR-1656-enhance-file-browser-session-notifications branch from 7e13156 to d4928e6 Compare November 11, 2025 05:44
@ironAiken2 ironAiken2 force-pushed the refactor/FR-1656-extract-filebrowser-image-logic branch from 126d44b to 113d240 Compare November 11, 2025 05:44
Copy link
Contributor

@ironAiken2 ironAiken2 left a comment

Choose a reason for hiding this comment

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

LGTM

@graphite-app
Copy link

graphite-app bot commented Nov 11, 2025

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
@graphite-app graphite-app bot force-pushed the feat/FR-1656-enhance-file-browser-session-notifications branch from d4928e6 to a1d6866 Compare November 11, 2025 07:58
@graphite-app graphite-app bot force-pushed the refactor/FR-1656-extract-filebrowser-image-logic branch from 113d240 to 4c0bf66 Compare November 11, 2025 07:59
Base automatically changed from feat/FR-1656-enhance-file-browser-session-notifications to main November 11, 2025 08:00
@graphite-app graphite-app bot merged commit 4c0bf66 into main Nov 11, 2025
8 checks passed
@graphite-app graphite-app bot deleted the refactor/FR-1656-extract-filebrowser-image-logic branch November 11, 2025 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100~500 LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhance File Browser Session Notifications and Workflow Guidance

3 participants