Skip to content

feat(gui): warehouse dashboard tab and per-execution warehouse picker - #7536

Draft
mengw15 wants to merge 7 commits into
apache:mainfrom
mengw15:feat/6933-warehouse-frontend
Draft

feat(gui): warehouse dashboard tab and per-execution warehouse picker#7536
mengw15 wants to merge 7 commits into
apache:mainfrom
mengw15:feat/6933-warehouse-frontend

Conversation

@mengw15

@mengw15 mengw15 commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Adds the user-facing UI for per-user warehouses (#6870), shown only when the backend reports the feature enabled (GET /warehouse/status):

  • Warehouses dashboard tab (/user/warehouse): list, create, and delete the caller's warehouses, via a new WarehouseService. Deleting warns that the warehouse's data is purged.
  • On-canvas picker in the computing-unit selection control: chooses which warehouse the next run writes to; the pick rides WorkflowExecuteRequest.warehouseId. Mirroring the CU selector, it preselects the latest execution's warehouse (whId, now on WorkflowExecutionsEntry) and falls back to the user's first warehouse, so a run needs no explicit pick.
  • Gating: the sidebar tab and the picker stay hidden while the flag is off; the UI is unchanged in that state.

Any related issues, documentation, discussions?

Closes #6933. Backend counterpart: #7473.

How was this PR tested?

New Vitest specs for WarehouseService (HTTP + pick state) and the warehouse tab (disabled/empty/list, create, delete); new cases in the CU-selection, execute-workflow, and dashboard specs covering preselection, the warehouseId payload, and tab gating. All touched spec files pass locally (117 tests).

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

Generated-by: Claude Code (claude-fable-5)

@github-actions github-actions Bot added feature frontend Changes related to the frontend GUI labels Aug 11, 2026
@github-actions

github-actions Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • Contributors with relevant context: @Neilk1021, @aglinxinyuan, @kunwp1
    You can notify them by mentioning @Neilk1021, @aglinxinyuan, @kunwp1 in a comment.

@mengw15
mengw15 requested a balanced review from Copilot August 11, 2026 05:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds feature-gated warehouse management and per-execution warehouse selection to the frontend.

Changes:

  • Adds warehouse API types, service, dashboard page, and routing.
  • Adds warehouse selection and execution payload integration.
  • Adds feature gating and Vitest coverage.

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
execute-workflow.service.ts Sends the selected warehouse ID.
execute-workflow.service.spec.ts Tests execution payload handling.
computing-unit-selection.component.ts Implements warehouse selection.
computing-unit-selection.component.spec.ts Tests picker behavior.
computing-unit-selection.component.scss Styles the picker.
computing-unit-selection.component.html Renders the picker.
workflow-executions-entry.ts Adds execution warehouse metadata.
workflow-execution-history.component.spec.ts Updates execution fixtures.
user-warehouse.component.ts Implements warehouse management.
user-warehouse.component.spec.ts Tests management flows.
user-warehouse.component.scss Styles the warehouse page.
user-warehouse.component.html Renders warehouse management UI.
dashboard.component.ts Loads warehouse feature status.
dashboard.component.spec.ts Tests tab gating.
dashboard.component.html Adds the Warehouses tab.
warehouse.ts Defines warehouse API types.
warehouse.service.ts Implements warehouse API and selection state.
warehouse.service.spec.ts Tests API calls and selection state.
app-routing.module.ts Registers the warehouse route.
app-routing.constant.ts Defines the warehouse route constant.
Suppressed comments (4)

frontend/src/app/workspace/component/power-button/computing-unit-selection.component.ts:323

  • On a reused workspace component, this error path retains the previous workflow's lastExecutionWhid. If workflow A used warehouse 2 and workflow B has no executions, B therefore selects warehouse 2 instead of the documented first-warehouse fallback. Clear the cached execution warehouse before applying the fallback.
                  // No execution history: still preselect a warehouse (the first one).
                  this.applyWarehousePreselect();

frontend/src/app/workspace/component/power-button/computing-unit-selection.component.ts:347

  • Returning here leaves the root-scoped service's prior warehouse ID intact. After the feature is disabled or the current user has no warehouses, the picker is hidden but ExecuteWorkflowService still sends that stale explicit ID; the backend then rejects the run instead of using shared storage. Clear the service selection in this branch.
  private applyWarehousePreselect(): void {
    if (!this.warehouseEnabled || this.warehouses.length === 0) {
      return;

frontend/src/app/workspace/component/power-button/computing-unit-selection.component.ts:315

  • Every workflow change leaves its retrieveLatestWorkflowExecution request active. If workflow A's response arrives after switching to B, this callback applies A's warehouse while this.workflowId already points to B, so B's next run can write to the wrong warehouse. Cancel older requests with switchMap, or capture the requested workflow ID and ignore responses that no longer match.
                  this.lastExecutionWhid = latestWorkflowExecution.whId ?? undefined;
                  this.applyWarehousePreselect();

frontend/src/app/workspace/component/power-button/computing-unit-selection.component.ts:350

  • This preselection can overwrite an explicit user choice. Once the status response renders the picker, a user can select a warehouse before the concurrent latest-execution request finishes; its later callback calls this method and silently changes the selection. Track whether the user has selected a value for the current workflow and do not preselect after that point.
    const lastUsed = this.warehouses.find(warehouse => warehouse.whid === this.lastExecutionWhid);
    this.warehouseService.selectWarehouse((lastUsed ?? this.warehouses[0]).whid);

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread frontend/src/app/dashboard/type/workflow-executions-entry.ts Outdated
@codecov-commenter

codecov-commenter commented Aug 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.78947% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.54%. Comparing base (12169c2) to head (c6d5fdf).
⚠️ Report is 43 commits behind head on main.

Files with missing lines Patch % Lines
...create-modal/warehouse-create-modal.component.html 77.77% 4 Missing ⚠️
.../user/user-warehouse/user-warehouse.component.html 89.28% 3 Missing ⚠️
...wer-button/computing-unit-selection.component.html 92.68% 3 Missing ⚠️
...src/app/workspace/component/menu/menu.component.ts 83.33% 1 Missing ⚠️
...power-button/computing-unit-selection.component.ts 97.77% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #7536      +/-   ##
============================================
+ Coverage     89.65%   90.54%   +0.88%     
- Complexity     4397     4401       +4     
============================================
  Files          1177     1185       +8     
  Lines         46996    47390     +394     
  Branches       5268     5300      +32     
============================================
+ Hits          42136    42910     +774     
+ Misses         3094     2807     -287     
+ Partials       1766     1673      -93     
Flag Coverage Δ *Carryforward flag
access-control-service 70.00% <ø> (ø) Carriedforward from 94c35f4
agent-service 98.62% <ø> (-0.01%) ⬇️ Carriedforward from 94c35f4
amber 86.38% <ø> (+0.02%) ⬆️ Carriedforward from 94c35f4
computing-unit-managing-service 72.46% <ø> (ø) Carriedforward from 94c35f4
config-service 77.31% <ø> (ø) Carriedforward from 94c35f4
file-service 68.90% <ø> (ø) Carriedforward from 94c35f4
frontend 92.63% <95.78%> (+1.96%) ⬆️
notebook-migration-service 78.89% <ø> (ø) Carriedforward from 94c35f4
pyamber 97.57% <ø> (ø) Carriedforward from 94c35f4
workflow-compiling-service 57.89% <ø> (ø) Carriedforward from 94c35f4

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

☔ View full report in Codecov by Harness.
📢 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.

mengw15 and others added 4 commits August 13, 2026 20:08
Per-user warehouses enabled now means every execution writes to one:
the Run button leads to the create-warehouse modal when none is selected,
mirroring the computing-unit Connect flow, and the picker stays visible
with zero warehouses so the create path is reachable. The picker carries
the caller's avatar like the CU picker, warehouse names open a read-only
details modal, and the warehouse icon is hdd everywhere (database was
already taken by Datasets).
The warehouse name opens a read-only details dialog (name, flavor,
created); tooltips show the full display name, and the internal catalog
name no longer appears anywhere in the UI. The Run button offers
"Create Warehouse" when the feature is on and none is selected,
mirroring the Connect state. Deleting keeps the confirm dialog busy
until the backend finishes waiting out Lakekeeper's asynchronous purge
(apache#7742). The warehouse icon is cloud-server everywhere (hdd was
near-identical to the database icon Datasets uses), and the picker
mirrors the CU picker's trigger and panel widths.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature frontend Changes related to the frontend GUI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BYO-S3] Frontend: warehouse tab + on-canvas per-execution picker

3 participants