diff --git a/web/.screenshots/after-card-icon-only.png b/web/.screenshots/after-card-icon-only.png new file mode 100644 index 000000000..832217b84 Binary files /dev/null and b/web/.screenshots/after-card-icon-only.png differ diff --git a/web/.screenshots/after-dark-card.png b/web/.screenshots/after-dark-card.png new file mode 100644 index 000000000..ab4e6cbd7 Binary files /dev/null and b/web/.screenshots/after-dark-card.png differ diff --git a/web/.screenshots/after-dark-list.png b/web/.screenshots/after-dark-list.png new file mode 100644 index 000000000..3f6c867a9 Binary files /dev/null and b/web/.screenshots/after-dark-list.png differ diff --git a/web/.screenshots/after-hover-card.png b/web/.screenshots/after-hover-card.png new file mode 100644 index 000000000..132637b73 Binary files /dev/null and b/web/.screenshots/after-hover-card.png differ diff --git a/web/.screenshots/after-hover-list.png b/web/.screenshots/after-hover-list.png new file mode 100644 index 000000000..759b4d746 Binary files /dev/null and b/web/.screenshots/after-hover-list.png differ diff --git a/web/.screenshots/after-list-fixed.png b/web/.screenshots/after-list-fixed.png new file mode 100644 index 000000000..dbf465ca3 Binary files /dev/null and b/web/.screenshots/after-list-fixed.png differ diff --git a/web/.screenshots/before-card-text-labels.png b/web/.screenshots/before-card-text-labels.png new file mode 100644 index 000000000..db621d571 Binary files /dev/null and b/web/.screenshots/before-card-text-labels.png differ diff --git a/web/.screenshots/before-list-overflow.png b/web/.screenshots/before-list-overflow.png new file mode 100644 index 000000000..46f6e8ffd Binary files /dev/null and b/web/.screenshots/before-list-overflow.png differ diff --git a/web/src/components/pages/agents.ts b/web/src/components/pages/agents.ts index dba0b1a71..ad7748d25 100644 --- a/web/src/components/pages/agents.ts +++ b/web/src/components/pages/agents.ts @@ -188,6 +188,31 @@ export class ScionPageAgents extends LitElement { justify-content: flex-end; } + /* Color-coded hover effects for action buttons */ + .action-btn-danger::part(base):hover { + background: var(--scion-action-hover-danger-bg, rgba(239, 68, 68, 0.1)); + border-color: var(--scion-danger-400, #f87171); + color: var(--scion-danger-600, #dc2626); + } + + .action-btn-warning::part(base):hover { + background: var(--scion-action-hover-warning-bg, rgba(245, 158, 11, 0.1)); + border-color: var(--scion-warning-400, #fbbf24); + color: var(--scion-warning-600, #d97706); + } + + .action-btn-success::part(base):hover { + background: var(--scion-action-hover-success-bg, rgba(34, 197, 94, 0.1)); + border-color: var(--scion-success-400, #4ade80); + color: var(--scion-success-600, #16a34a); + } + + .action-btn-primary::part(base):hover { + background: var(--scion-action-hover-primary-bg, rgba(59, 130, 246, 0.1)); + border-color: var(--scion-primary-400, #60a5fa); + color: var(--scion-primary-600, #2563eb); + } + .scope-toggle { display: inline-flex; border: 1px solid var(--scion-border, #e2e8f0); @@ -812,9 +837,110 @@ export class ScionPageAgents extends LitElement { `; } - private renderAgentCard(agent: Agent) { + private renderActionButtons(agent: Agent) { const isLoading = this.actionLoading[agent.id] || false; + return html` + ${can(agent._capabilities, 'attach') ? html` + + + + + + ` : nothing} + ${isAgentRunning(agent) + ? can(agent._capabilities, 'stop') ? html` + ${agent.harnessCapabilities?.resume?.support !== 'no' ? html` + + this.handleAgentAction(agent.id, 'suspend')} + aria-label="Suspend" + > + + + + ` : nothing} + + this.handleAgentAction(agent.id, 'stop')} + aria-label="Stop" + > + + + + ` : nothing + : agent.phase === 'suspended' + ? can(agent._capabilities, 'start') ? html` + + this.handleAgentAction(agent.id, 'resume')} + aria-label="Resume" + > + + + + ` : nothing + : can(agent._capabilities, 'start') ? html` + + this.handleAgentAction(agent.id, 'start')} + aria-label="Start" + > + + + + ` : nothing} + ${can(agent._capabilities, 'delete') ? html` + + this.handleAgentAction(agent.id, 'delete', e)} + aria-label="Delete" + > + + + + ` : nothing} + `; + } + + private renderAgentCard(agent: Agent) { return html`
@@ -849,83 +975,7 @@ export class ScionPageAgents extends LitElement { ${agent.taskSummary ? html`
${agent.taskSummary}
` : ''}
- ${can(agent._capabilities, 'attach') ? html` - - - Terminal - - ` : nothing} - ${isAgentRunning(agent) - ? can(agent._capabilities, 'stop') ? html` - ${agent.harnessCapabilities?.resume?.support !== 'no' ? html` - this.handleAgentAction(agent.id, 'suspend')} - > - - Suspend - - ` : nothing} - this.handleAgentAction(agent.id, 'stop')} - > - - Stop - - ` : nothing - : agent.phase === 'suspended' - ? can(agent._capabilities, 'start') ? html` - this.handleAgentAction(agent.id, 'resume')} - > - - Resume - - ` : nothing - : can(agent._capabilities, 'start') ? html` - this.handleAgentAction(agent.id, 'start')} - > - - Start - - ` : nothing} - ${can(agent._capabilities, 'delete') ? html` - this.handleAgentAction(agent.id, 'delete', e)} - > - - - ` : nothing} + ${this.renderActionButtons(agent)}
`; @@ -964,8 +1014,6 @@ export class ScionPageAgents extends LitElement { } private renderAgentRow(agent: Agent) { - const isLoading = this.actionLoading[agent.id] || false; - return html` @@ -989,78 +1037,7 @@ export class ScionPageAgents extends LitElement { - ${can(agent._capabilities, 'attach') ? html` - - - - ` : nothing} - ${isAgentRunning(agent) - ? can(agent._capabilities, 'stop') ? html` - ${agent.harnessCapabilities?.resume?.support !== 'no' ? html` - this.handleAgentAction(agent.id, 'suspend')} - > - - - ` : nothing} - this.handleAgentAction(agent.id, 'stop')} - > - - - ` : nothing - : agent.phase === 'suspended' - ? can(agent._capabilities, 'start') ? html` - this.handleAgentAction(agent.id, 'resume')} - > - - - ` : nothing - : can(agent._capabilities, 'start') ? html` - this.handleAgentAction(agent.id, 'start')} - > - - - ` : nothing} - ${can(agent._capabilities, 'delete') ? html` - this.handleAgentAction(agent.id, 'delete', e)} - > - - - ` : nothing} + ${this.renderActionButtons(agent)} diff --git a/web/src/components/shared/resource-styles.ts b/web/src/components/shared/resource-styles.ts index 15cb77e50..f2e7a2323 100644 --- a/web/src/components/shared/resource-styles.ts +++ b/web/src/components/shared/resource-styles.ts @@ -640,10 +640,12 @@ export const listPageStyles = css` } .resource-table-container .task-cell { - max-width: 250px; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; + max-width: 250px; + white-space: normal; color: var(--scion-text-muted, #64748b); font-size: 0.8125rem; }