Repository navigation
feat(frontend): advanced settings for computing-unit creation - #6104
Conversation
The computing-unit creation modal listed every knob inline. Shared-memory and JVM-heap size are advanced options most users never touch, so they crowded the common path (name / RAM / CPU). Tuck them behind a collapsed "Advanced Settings" disclosure in the shared ComputingUnitCreateModalComponent, which serves both creation entry points (the dashboard Computing Units page and the workspace power-button): - Progressive disclosure: rotating chevron + smooth height animation; collapsed by default and re-collapsed every time the modal opens (ngOnChanges on `visible`). - Validation stays visible: when collapsed, an amber header hint surfaces the "shared memory exceeds total" warning so it can't be submitted unseen. - Accessibility: native button + aria-expanded, and `inert` on the collapsed panel so its controls stay out of the tab order.
Automated Reviewer SuggestionsBased on the
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6104 +/- ##
============================================
- Coverage 60.67% 60.67% -0.01%
Complexity 3368 3368
============================================
Files 1133 1133
Lines 44141 44172 +31
Branches 4825 4829 +4
============================================
+ Hits 26782 26800 +18
- Misses 15901 15915 +14
+ Partials 1458 1457 -1
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Codecov flagged the template's (click) listener as the one uncovered patch line: the existing tests called toggleAdvancedSettings() directly, so the rendered button was never exercised. Drive the toggle via the DOM instead, asserting aria-expanded and the panel's expanded class through a full expand/collapse round trip.
The slider's breathing-room rationale appeared verbatim at both the $advanced-panel-padding definition and the .jvm-memory-slider block; keep the full explanation only at the slider rule it describes.
|
/request-review @aicam |
|
/request-review @bobbai00 as well. |
There was a problem hiding this comment.
Pull request overview
This PR updates the shared frontend computing-unit creation modal to simplify the default UI by hiding technical options (shared memory size and JVM heap size) behind a collapsed “Advanced Settings” disclosure, while still surfacing a warning when shared memory exceeds total memory.
Changes:
- Added an “Advanced Settings” progressive-disclosure panel to hide shared-memory and JVM-heap controls by default and reset it closed on each open.
- Surfaced a collapsed-state warning on the panel header when shared memory exceeds total memory.
- Added unit/integration-style tests for the disclosure behavior and updated styling for the new panel.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| frontend/src/app/common/component/computing-unit-create-modal/computing-unit-create-modal.component.ts | Adds advanced-settings state, toggle behavior, and re-collapse-on-open logic. |
| frontend/src/app/common/component/computing-unit-create-modal/computing-unit-create-modal.component.html | Moves shared-memory + JVM slider UI into a collapsible Advanced Settings section with header warning. |
| frontend/src/app/common/component/computing-unit-create-modal/computing-unit-create-modal.component.scss | Adds styling/animation for the advanced-settings disclosure panel and nests slider styling. |
| frontend/src/app/common/component/computing-unit-create-modal/computing-unit-create-modal.component.spec.ts | Adds tests for advanced panel toggling, re-collapse behavior, and collapsed warning logic. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <[email protected]> Signed-off-by: Kunwoo (Chris) <[email protected]>
Review follow-ups for the advanced-settings panel: - Reset the shm size and JVM slider to their defaults every time the create modal opens, so a value from a previous open can't be submitted while hidden behind the re-collapsed panel. - Surface the max-JVM advisory on the collapsed header too, with the shm-too-large error outranking it when both apply. - Expand the panel in the two DOM specs that previously asserted on or drove controls inside the collapsed inert body. - Drop the no-op width on the JVM slider left behind after this PR removed the global rule it used to override.
What changes were proposed in this PR?
This PR improves the UI of creating a computing unit (CU) with an "Advanced Settings" section to get a simplified default view.
The shared memory size and JVM memory size are too technical for most users, so the create-CU modal now shows only the common fields (name / RAM / CPU) by default and tucks those two options behind a collapsed "Advanced Settings" panel:
ComputingUnitCreateModalComponent(refactor(frontend): extract shared computing-unit create modal component #6082), so both entry points (the dashboard Computing Units page and the workspace power button) get the same behavior.The feature was originally implemented on the downstream dknet-ai.org deployment (Texera/dknet-ai-public@30318e2d).
Any related issues, documentation, discussions?
Closes #6102
How was this PR tested?
Screen.Recording.2026-07-04.at.1.45.33.PM.mov
Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code