Skip to content

Conversation

@yomybaby
Copy link
Member

@yomybaby yomybaby commented Nov 18, 2025

Resolves #4662 (FR-1695)

Problem & Motivation

Users frequently need to check for updated files in their virtual folders, especially after uploading files or when collaborating with others. Currently, BAIFileExplorer lacks an intuitive manual refresh mechanism, forcing users to close and reopen the modal or navigate away and back to see updated content.

User Impact

Before:

  • Users cannot easily verify if their file uploads completed successfully
  • Collaborators cannot see newly shared files without reopening the folder
  • The loading experience feels unresponsive and unclear
  • Users are unsure whether the file list is currently updating or showing stale data

After:

  • Users can manually refresh at any time with a single click
  • Clear visual feedback shows when data was last updated (e.g., "Last Updated: 2 minutes ago")
  • Loading states are optimized: spinner for first load, subtle opacity change for refreshes
  • Users maintain context and control over their file browsing experience

Changes

  1. Refresh Button Integration: Added BAIFetchKeyButton to ExplorerActionControls with loading state feedback
  2. Loading State Optimization:
    • Spinner loading for initial file list load
    • Opacity-based loading for subsequent refreshes
    • Distinguish between isFirstFetching and isFetching states
  3. Component Migration: Moved BAIFetchKeyButton and useIntervalValue hooks to backend.ai-ui package for reusability
  4. i18n Support: Added translations in 20+ languages following comp:ComponentName.Key pattern

Test Plan

  • Verify refresh button appears in file explorer
  • Check that clicking refresh updates the file list
  • Confirm "Last Updated" timestamp displays correctly
  • Test initial loading shows spinner
  • Test refresh shows opacity change (not spinner)
  • Verify functionality works after file upload
  • Test in both light and dark themes

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

yomybaby 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

github-actions bot commented Nov 18, 2025

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

St.
Category Percentage Covered / Total
🔴 Statements
55.12% (+5.49% 🔼)
167/303
🔴 Branches
33.9% (+3.94% 🔼)
99/292
🔴 Functions
43.84% (+10.5% 🔼)
32/73
🔴 Lines
57.2% (+5.25% 🔼)
151/264
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🔴
... / matchMedia.mock.js
50% 100% 0% 50%
🟢
... / useIntervalValue.tsx
97.14% 76% 100% 96.77%

Test suite run success

62 tests passing in 4 suites.

Report generated by 🧪jest coverage report action from 71d1e09

@github-actions
Copy link

github-actions bot commented Nov 18, 2025

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements 4.46% 517/11591
🔴 Branches 3.62% 297/8210
🔴 Functions 2.59% 92/3551
🔴 Lines 4.44% 503/11338

Test suite run success

118 tests passing in 13 suites.

Report generated by 🧪jest coverage report action from 71d1e09

@yomybaby yomybaby requested review from agatha197, Copilot and ironAiken2 and removed request for Copilot November 18, 2025 08:42
@yomybaby yomybaby force-pushed the feat/FR-1695-improve-file-explorer-ux-with-refresh-button branch from 141bcc3 to f030f7c Compare November 18, 2025 08:45
@yomybaby yomybaby force-pushed the feat/FR-1685-optimize-folder-explorer-network-requests branch from 8ebf1de to 845dc36 Compare November 18, 2025 08:45
Copilot finished reviewing on behalf of yomybaby November 18, 2025 08:45
Copy link
Contributor

@agatha197 agatha197 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 graphite-app bot changed the base branch from feat/FR-1685-optimize-folder-explorer-network-requests to graphite-base/4664 November 19, 2025 02:28
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

@yomybaby yomybaby force-pushed the feat/FR-1695-improve-file-explorer-ux-with-refresh-button branch from f030f7c to cfd868a Compare November 19, 2025 05:49
@yomybaby yomybaby changed the base branch from graphite-base/4664 to main November 19, 2025 05:50
@graphite-app
Copy link

graphite-app bot commented Nov 19, 2025

Merge activity

…and loading optimization (#4664)

Resolves #4662 ([FR-1695](https://lablup.atlassian.net/browse/FR-1695))

## Problem & Motivation

Users frequently need to check for updated files in their virtual folders, especially after uploading files or when collaborating with others. Currently, BAIFileExplorer lacks an intuitive manual refresh mechanism, forcing users to close and reopen the modal or navigate away and back to see updated content.

## User Impact

### Before:
- Users cannot easily verify if their file uploads completed successfully
- Collaborators cannot see newly shared files without reopening the folder
- The loading experience feels unresponsive and unclear
- Users are unsure whether the file list is currently updating or showing stale data

### After:
- Users can manually refresh at any time with a single click
- Clear visual feedback shows when data was last updated (e.g., "Last Updated: 2 minutes ago")
- Loading states are optimized: spinner for first load, subtle opacity change for refreshes
- Users maintain context and control over their file browsing experience

## Changes

1. **Refresh Button Integration**: Added BAIFetchKeyButton to ExplorerActionControls with loading state feedback
2. **Loading State Optimization**:
   - Spinner loading for initial file list load
   - Opacity-based loading for subsequent refreshes
   - Distinguish between `isFirstFetching` and `isFetching` states
3. **Component Migration**: Moved BAIFetchKeyButton and useIntervalValue hooks to backend.ai-ui package for reusability
4. **i18n Support**: Added translations in 20+ languages following `comp:ComponentName.Key` pattern

## Test Plan

- [ ] Verify refresh button appears in file explorer
- [ ] Check that clicking refresh updates the file list
- [ ] Confirm "Last Updated" timestamp displays correctly
- [ ] Test initial loading shows spinner
- [ ] Test refresh shows opacity change (not spinner)
- [ ] Verify functionality works after file upload
- [ ] Test in both light and dark themes

[FR-1695]: https://lablup.atlassian.net/browse/FR-1695?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
@graphite-app graphite-app bot force-pushed the feat/FR-1695-improve-file-explorer-ux-with-refresh-button branch from cfd868a to 71d1e09 Compare November 19, 2025 05:50
@graphite-app graphite-app bot merged commit 71d1e09 into main Nov 19, 2025
11 checks passed
@graphite-app graphite-app bot deleted the feat/FR-1695-improve-file-explorer-ux-with-refresh-button branch November 19, 2025 05:52
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.

Improve BAIFileExplorer UX with refresh functionality and loading state optimization

4 participants