Skip to content

feat: gdrive export ui integration#5252

Open
Sentiaus wants to merge 8 commits into
apache:mainfrom
Sentiaus:gdrive/ui
Open

feat: gdrive export ui integration#5252
Sentiaus wants to merge 8 commits into
apache:mainfrom
Sentiaus:gdrive/ui

Conversation

@Sentiaus
Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Wires the Drive export action into the three UI surfaces where download is currently available. The download button in each location has been converted to a dropdown with "Download" and "Export to Drive" (or "Connect to Drive" when not connected) options:

  • Dashboard list items (list-item.component) — for workflows and datasets
  • Dataset detail page (dataset-detail.component) — separate dropdowns for per-version ZIP download and per-file download
  • Workflow editor menu (menu.component) — for the workflow JSON export button

All three surfaces:

  • Call DriveService.getToken() on init to set initial connection state
  • Subscribe to DriveService.onConnected() to update state live and show a "Google Drive connected" toast when the OAuth flow completes in the popup
  • Show a "Exported to Google Drive" success toast on successful export
  • Keep the dropdown button highlighted while the menu is open
  • Fall back to connect() (or connect(true) on invalid_grant) when the user clicks "Connect to Drive" while not connected
Screenshot 2026-05-21 at 4 12 15 PM Screenshot 2026-05-21 at 4 12 44 PM Screenshot 2026-05-21 at 4 10 32 PM Screenshot 2026-05-21 at 4 10 47 PM Screenshot 2026-05-21 at 4 11 02 PM

Any related issues, documentation, discussions?

Closes #4240

How was this PR tested?

Unit tests added for all three components:

  • list-item.component.spec.tsDrive integration describe block: token status sets isDriveConnected, onConnected emission updates state and shows toast, connect() called when not connected, workflow and dataset export paths call exportToDrive and show success toast
  • menu.component.spec.tsDrive integration describe block: same connection state coverage, plus onClickDriveExportWorkflow serializes workflow content and shows success toast
  • dataset-detail.component.spec.ts — new spec file: token status, onConnected toast, onClickDriveExportVersion and onClickDriveExportFile across connected/disconnected/missing-selection/success paths

Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Sonnet 4.6

Sentiaus and others added 4 commits May 26, 2026 23:59
… DB schema

- Add user_oauth_token table to store encrypted OAuth refresh tokens per provider
- Add TokenEncryptionService using jose4j AES-256-GCM for encrypting auth blobs
- Add AuthConfig.encryptionSecretKey reading from auth.encryption.256-bit-secret
- Add GoogleDriveAuthResource with /connect, /callback, and /token endpoints
- Add GoogleAuthResource config endpoint exposing client ID and redirect URI
- Add DriveTokenIssueResponse and GoogleAuthConfigResponse HTTP models
- Wire GoogleDriveAuthResource into TexeraWebApplication and GuestAuthFilter
- Add google.client-id, client-secret, and app-domain to UserSystemConfig
- Update k8s values with new config keys

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…nd error case

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Sentiaus Sentiaus changed the title Gdrive/UI feat: gdrive export ui integration May 27, 2026
@Sentiaus Sentiaus mentioned this pull request May 27, 2026
5 tasks
@github-actions github-actions Bot added engine ddl-change Changes to the TexeraDB DDL frontend Changes related to the frontend GUI dev common labels May 27, 2026
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 48.95%. Comparing base (d8c254c) to head (e67625e).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #5252      +/-   ##
============================================
- Coverage     48.95%   48.95%   -0.01%     
  Complexity     2377     2377              
============================================
  Files          1048     1048              
  Lines         40270    40264       -6     
  Branches       4272     4272              
============================================
- Hits          19714    19710       -4     
+ Misses        19402    19400       -2     
  Partials       1154     1154              
Flag Coverage Δ *Carryforward flag
access-control-service 39.53% <ø> (ø)
agent-service 33.76% <ø> (ø) Carriedforward from a0b97fa
amber 51.56% <ø> (-0.01%) ⬇️ Carriedforward from a0b97fa
computing-unit-managing-service 0.00% <ø> (ø)
config-service 0.00% <ø> (ø)
file-service 37.99% <ø> (ø)
frontend 40.64% <ø> (-0.01%) ⬇️ Carriedforward from a0b97fa
python 90.79% <ø> (ø) Carriedforward from a0b97fa
workflow-compiling-service 56.81% <ø> (ø)

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sentiaus and others added 4 commits May 28, 2026 00:31
…ogleDriveAuthResource

OAuth state is now a UUID stored in a ConcurrentHashMap with a 10-minute TTL,
consumed exactly once on callback. Removes JwtParser/JwtAuth dependency from
the Drive resource and avoids encoding user info in the callback URL.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…rive

- Add DriveService to manage Drive token retrieval, OAuth connection, and file export
- Add GoogleDriveConnectComponent as the OAuth callback landing page
- Add /gdrive-connect route to the app router
- Inject gapi and Google Identity Services scripts into index.html

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…pace menu

- Add Drive export action to list-item component (workflows and datasets)
- Add Drive export buttons to dataset-detail download section
- Add Drive export to workspace menu download button
- Subscribe to DriveService.onConnected to update connection state and show toast
- Add unit tests for all three UI surfaces

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

common ddl-change Changes to the TexeraDB DDL engine frontend Changes related to the frontend GUI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Export to external storage

2 participants