Skip to content

Comments

Add Lakehouse Minio file picker in wizard and clickable file links in job detail#4

Open
dauglyon wants to merge 11 commits intomainfrom
file-picker-and-job-links
Open

Add Lakehouse Minio file picker in wizard and clickable file links in job detail#4
dauglyon wants to merge 11 commits intomainfrom
file-picker-and-job-links

Conversation

@dauglyon
Copy link
Collaborator

@dauglyon dauglyon commented Feb 6, 2026

image
image

Summary

  • Add "Browse Lakehouse Minio" file picker to the job creation wizard, using JupyterLab's FileDialog rooted at lakehouse_minio/
  • Render S3 file paths as clickable links in job detail (input files and outputs) that open in JupyterLab's file browser
  • Add server-side endpoint (GET /api/task-browser/s3-path-mappings) that reads the running GroupedS3ContentsManager to provide S3-to-JupyterLab path mappings
  • Bidirectional S3 path resolver (s3PathResolver.ts) converts between s3a:// URLs and lakehouse_minio/ paths using server-provided mappings
  • S3 mappings fetched via React Query hook (useS3Mappings) and passed through props — no window namespace mutation
  • Mock data includes S3 URLs in input_files and outputs so file picker and clickable links work in mock mode

Test plan

  • Run CTS_MOCK_MODE=true uv run jupyter lab and open the task browser sidebar
  • Click the completed job — verify "Input Files" section with clickable links and "Outputs" with clickable links
  • Click the running job — verify "Input Files" shows 5 files, all clickable (user + tenant paths)
  • Click the failed job — verify 2 input files: first clickable, second plain text (wrong bucket)
  • Open the job creation wizard — verify "Browse Lakehouse Minio" button appears next to "+ Add input file"
  • Use the browse button to select files — verify selected paths are converted to s3a:// URLs
  • Select a file outside lakehouse_minio/ — verify inline error message shown in wizard
  • uv run jlpm test — 19 s3PathResolver tests pass

Add a "Browse S3" button to the job creation wizard that opens
JupyterLab's built-in FileDialog rooted at lakehouse_minio/, converting
selected paths to s3a:// URLs via a new bidirectional path mapping
utility.

In the job detail view, input files are now displayed in a new section
and both input and output file paths are rendered as clickable links
that open in JupyterLab's file browser when they map to a known
lakehouse_minio/ virtual directory.
Mock jobs now include input_files with S3 URLs and outputs use full
S3 paths, so file picker and clickable file links are exercisable in
mock mode. Also defaults hubUser to 'testuser' when CTS_MOCK_MODE is
enabled, ensuring s3ToJlab path mapping works without JupyterHub.
@dauglyon dauglyon changed the title Add S3 file picker in wizard and clickable file links in job detail Add Lakehouse Minio file picker in wizard and clickable file links in job detail Feb 6, 2026
…ions

Add a Tornado handler at GET /api/task-browser/s3-path-mappings that reads
the authoritative mapping from GroupedS3ContentsManager at runtime, with a
governance API fallback. Replace the hardcoded client-side s3PathMapping
module with a server-driven s3PathResolver that receives the mapping table
from the server at activation. Register berdl-task-browser:navigate-to-path
command for file browser navigation.
- Delete unused fileBrowserNav.ts (registered command never called)
- Remove BaseHandler abstraction in handlers.py (single handler)
- Remove unused hubUser/cdmDefaultBucket page_config entries
- Remove redundant .catch() on fetchS3Mappings (handles errors internally)
- Remove stale comment in s3PathResolver.ts
Refactor Browse Lakehouse Minio from an embedded button inside the
wizard body (which opened a nested dialog) to a top-level dialog
button that closes the wizard, opens the file picker, then reopens
with updated form data. Also apply prettier formatting to mock data.
@dauglyon dauglyon force-pushed the file-picker-and-job-links branch from 5782f97 to 33334b7 Compare February 9, 2026 19:20
Copy link

@Tianhao-Gu Tianhao-Gu left a comment

Choose a reason for hiding this comment

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

Thanks for the screenshots - looks awesome.

- Replace fire-and-forget window.kbase.task_browser.s3Mappings with
  useS3Mappings React Query hook, passing mappings via props
- Remove _fallback_mappings() (dead code: governance API unavailable
  when ContentsManager fails; MSW handles mock mode client-side)
- Show inline error when Browse files can't be resolved to S3 paths
- Extract shared _removeRow helper from duplicate removal methods
- Simplify MockServiceWorkerHandler (remove dead importlib path)
- Rename MAX_DISPLAYED_OUTPUTS to MAX_DISPLAYED_FILES
- Fix non-null assertion lint error in JobWizardDialog
- Add s3PathResolver unit tests (19 tests)
@github-actions
Copy link

Prerelease: pr-4

Wheel will be attached once the build completes. Updated on each push.

- Replace recursive reopen closure in wizard dialog with iterative
  trampoline pattern (runWizardStep + while loop)
- Add key={selectedJobId} to JobDetail so expand state resets on
  job change
- Remove dead browseRow div wrapper and its CSS rule
- Add output_dir to three mock jobs for realistic test data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants