Skip to content

Commit 2082021

Browse files
authored
refactor(frontend): remove the unreachable agent panel shadow (#8829)
### What changes were proposed in this PR? Removes a class binding in `AgentPanelComponent` that can never apply. **+1/−11 lines.** There is no behaviour change. `<ul id="return-button">` has `[ngClass]="{'shadow': !width}"` and `*ngIf="width"` on the **same element**. `*ngIf` creates the element only while `width` is truthy, and `!width` is then always `false`. So `shadow` is never set on a rendered element. `width` is a `number` that is only ever 0, the 400px minimum, a resize width, or a range-checked stored width, so there is no value that is both truthy and falsy. The PR removes: - the binding; - the `.shadow` rule, which nothing else in this component's template uses (the styles are encapsulated); - `NgClass` from the imports, because this was the template's only `ngClass`. The `*ngIf` and every live style on the element stay. ### History | | | | --- | --- | | **Introduced by** | #4020 (2025-11-25), "feat: introduce the LLM-based workflow copilot": the binding, the `*ngIf` and the `.shadow` rule together. #4873 (2026-05-03) later added the `NgClass` import when the component became standalone | | **Usage removed by** | **never used**. The binding has been unreachable since the line was written. #4495 only moved the files | It has never applied, in the ten months since it was added. ### Any related issues, documentation, discussions? Closes #8828 ### How was this PR tested? No new tests; no spec referenced the class. From `frontend/`: - `npx ng test --watch=false --include='**/agent-panel.component.spec.ts' --include='**/workspace.component.spec.ts'`: 2 files, 86 tests, all pass. These are the only specs that render the panel. - `yarn format:ci`: clean. - `npx ng build`: success. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 5.5) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
1 parent b05b620 commit 2082021

3 files changed

Lines changed: 1 addition & 11 deletions

File tree

‎frontend/src/app/workspace/component/agent/agent-panel/agent-panel.component.html‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
<ul
5454
id="return-button"
5555
nz-menu
56-
[ngClass]="{'shadow': !width}"
5756
*ngIf="width">
5857
<li
5958
nz-menu-item

‎frontend/src/app/workspace/component/agent/agent-panel/agent-panel.component.scss‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,6 @@
7070
overflow-y: auto;
7171
}
7272

73-
.shadow {
74-
border-radius: 5px;
75-
box-shadow:
76-
0 3px 1px -2px #0003,
77-
0 2px 2px #00000024,
78-
0 1px 5px #0000001f;
79-
}
80-
8173
.ant-menu-item {
8274
margin: 0 !important;
8375
height: 32px;

‎frontend/src/app/workspace/component/agent/agent-panel/agent-panel.component.ts‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import { AgentService, AgentInfo } from "../../../service/agent/agent.service";
2424
import { WorkflowActionService } from "../../../service/workflow-graph/model/workflow-action.service";
2525
import { NotificationService } from "../../../../common/service/notification/notification.service";
2626
import { calculateTotalTranslate3d } from "../../../../common/util/panel-dock";
27-
import { NgIf, NgClass, NgFor } from "@angular/common";
27+
import { NgIf, NgFor } from "@angular/common";
2828
import { NzSpaceCompactItemDirective } from "ng-zorro-antd/space";
2929
import { NzButtonComponent } from "ng-zorro-antd/button";
3030
import { NzWaveDirective } from "ng-zorro-antd/core/wave";
@@ -53,7 +53,6 @@ import { AgentChatComponent } from "./agent-chat/agent-chat.component";
5353
CdkDrag,
5454
NzResizableDirective,
5555
NzMenuDirective,
56-
NgClass,
5756
NzMenuItemComponent,
5857
CdkDragHandle,
5958
NzTabsComponent,

0 commit comments

Comments
 (0)