Files
fusion/plugins/fusion-plugin-compound-engineering/src/dashboard/CompoundEngineeringView.css
gsxdsm 4c587d6a80 FN-6285: replace CE cancel buttons with trash icons
Update Compound Engineering cancellation controls to use compact icon-only affordances while preserving accessible labels.

- Render session-list and flow cancel actions as red trash-can icon buttons.
- Add hover, focus, disabled, and inline layout styling for the compact cancel controls.
- Update README wording and tests to assert icon-only accessible cancel buttons.

Files changed:
 .../fusion-plugin-compound-engineering/README.md   |  2 +-
 .../src/dashboard/CeFlow.tsx                       |  7 +++-
 .../src/dashboard/CompoundEngineeringView.css      | 46 ++++++++++++++++++++--
 .../src/dashboard/CompoundEngineeringView.tsx      |  6 ++-
 .../src/dashboard/__tests__/CeFlow.test.tsx        |  8 +++-
 .../__tests__/CompoundEngineeringView.test.tsx     |  9 ++++-
 6 files changed, 68 insertions(+), 10 deletions(-)

Fusion-Task-Id: FN-6285

Fusion-Task-Lineage: 307d96e0-a234-4a3b-a13f-98342374eb38
2026-06-12 07:52:04 -07:00

638 lines
12 KiB
CSS

.ce-view {
display: flex;
color: var(--text);
flex: 1 1 auto;
flex-direction: column;
gap: 1rem;
min-width: 0;
min-height: 0;
width: 100%;
height: 100%;
padding: 1rem 1.25rem;
box-sizing: border-box;
overflow: auto;
}
.ce-view-header {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 1rem;
}
.ce-view-header h2 {
margin: 0;
}
.ce-view-summary {
font-size: 0.8rem;
color: var(--text-muted);
}
.ce-loading,
.ce-view-error {
padding: 0.75rem 1rem;
font-size: 0.85rem;
}
.ce-view-error {
color: var(--color-error);
}
.ce-empty {
max-width: 36rem;
padding: 1.5rem;
display: flex;
flex-direction: column;
gap: 0.75rem;
align-items: flex-start;
}
.ce-empty h3 {
margin: 0;
}
.ce-empty-hint {
color: var(--text-muted);
font-size: 0.85rem;
}
.ce-groups {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
gap: 1rem;
}
.ce-group {
border: 1px solid var(--border);
border-radius: 8px;
padding: 0.75rem 1rem;
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.ce-group[data-empty="true"] {
color: var(--text-muted);
}
.ce-group-header {
display: flex;
align-items: center;
justify-content: space-between;
}
.ce-group-header h3 {
margin: 0;
font-size: 0.95rem;
}
.ce-group-count {
font-size: 0.75rem;
color: var(--text-dim);
}
.ce-group-empty {
margin: 0;
font-size: 0.8rem;
color: var(--text-dim);
}
.ce-artifact-list {
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
gap: 0.35rem;
}
.ce-artifact {
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.5rem;
font-size: 0.85rem;
}
.ce-artifact.is-selected {
font-weight: 600;
}
.ce-artifact-btn {
background: none;
border: none;
text-align: left;
cursor: pointer;
display: flex;
flex-direction: column;
color: inherit;
padding: 0.25rem 0;
flex: 1;
}
.ce-artifact-path {
font-size: 0.7rem;
color: var(--text-dim);
}
.ce-artifact-open {
appearance: none;
background: none;
border: none;
color: var(--color-info);
cursor: pointer;
font: inherit;
padding: 0;
text-decoration: underline;
}
.ce-artifact-open:hover,
.ce-artifact-open:focus-visible {
color: var(--color-info);
}
.ce-artifact-error .ce-artifact-error-msg {
color: var(--color-error);
font-size: 0.78rem;
}
.ce-artifact-error {
flex-direction: column;
align-items: flex-start;
gap: 0.15rem;
}
.ce-view[data-mobile="true"] {
width: 100%;
padding: var(--space-sm);
}
.ce-view[data-mobile="true"] .ce-groups {
grid-template-columns: 1fr;
}
@media (max-width: 768px) {
.ce-view {
width: 100%;
padding: var(--space-sm);
}
.ce-session-row {
align-items: center;
flex-direction: row;
}
.ce-session-open {
flex-wrap: wrap;
}
.ce-session-cancel,
.ce-session-discard,
.ce-flow-cancel,
.ce-flow-close {
margin-left: 0;
}
}
/* --- Stage launcher (U6) --- */
.ce-launcher {
margin: 0.75rem 0;
}
.ce-launcher-list {
list-style: none;
margin: 0;
padding: 0;
display: grid;
grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
gap: 0.5rem;
}
.ce-launcher-tile {
width: 100%;
display: flex;
align-items: center;
gap: 0.5rem;
}
.ce-launcher-icon {
flex: none;
}
.ce-view-start {
margin-left: auto;
}
/* --- CeFlow interactive renderer (U6) --- */
.ce-flow {
margin: 0.75rem 0;
display: flex;
flex: 1 1 auto;
flex-direction: column;
gap: 0.6rem;
min-height: 0;
overflow-y: auto;
}
.ce-flow-header {
display: flex;
align-items: center;
gap: 0.5rem;
}
.ce-flow-header h3 {
margin: 0;
text-transform: capitalize;
}
.ce-flow-status {
font-size: 0.72rem;
color: var(--text-muted);
text-transform: capitalize;
}
.ce-flow-cancel,
.ce-flow-close {
margin-left: auto;
}
.ce-flow-cancel + .ce-flow-close {
margin-left: 0;
}
.ce-flow-transcript {
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex: 1 1 auto;
flex-direction: column;
gap: 0.35rem;
min-height: 0;
overflow-y: auto;
}
.ce-flow-turn {
display: flex;
flex-direction: column;
}
.ce-flow-turn-role {
font-size: 0.65rem;
text-transform: uppercase;
color: var(--text-dim);
}
.ce-flow-turn-agent .ce-flow-turn-text {
white-space: pre-wrap;
}
.ce-flow-thinking {
font-style: italic;
color: var(--text-muted);
}
.ce-flow-question {
display: flex;
flex-direction: column;
gap: 0.4rem;
}
.ce-flow-question-text {
font-weight: 600;
margin: 0;
}
.ce-flow-question-desc {
font-size: 0.8rem;
color: var(--text-muted);
margin: 0;
}
.ce-flow-text {
display: flex;
flex-direction: column;
gap: 0.4rem;
}
.ce-flow-text textarea,
.ce-flow-guidance-row textarea {
background: var(--surface);
color: var(--text);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
font-family: var(--font-primary);
outline: none;
transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.ce-flow-text textarea {
width: 100%;
resize: vertical;
}
.ce-flow-text textarea:focus,
.ce-flow-guidance-row textarea:focus {
border-color: var(--todo);
box-shadow: var(--focus-ring);
}
.ce-flow-text textarea::placeholder,
.ce-flow-guidance-row textarea::placeholder {
color: var(--text-dim);
}
.ce-flow-confirm {
display: flex;
gap: 0.5rem;
}
.ce-flow-options {
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
gap: 0.35rem;
}
.ce-flow-options ul {
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
gap: 0.3rem;
}
.ce-flow-option {
width: 100%;
text-align: left;
display: flex;
flex-direction: column;
}
.ce-flow-option-desc {
font-size: 0.72rem;
color: var(--text-muted);
}
.ce-flow-checkbox {
display: flex;
align-items: center;
gap: 0.4rem;
cursor: pointer;
}
.ce-flow-error {
color: var(--color-error);
font-size: 0.82rem;
}
/* Degraded chat fallback (R8/AE1) — must read as visibly distinct. */
.ce-flow-degraded {
border: 1px dashed var(--color-warning);
border-radius: 6px;
padding: 0.6rem;
background: color-mix(in srgb, var(--color-warning) 8%, transparent);
}
.ce-flow-degraded-banner {
margin: 0 0 0.4rem;
font-size: 0.78rem;
font-weight: 600;
color: var(--color-warning);
}
.ce-flow-degraded-options {
font-size: 0.78rem;
color: var(--text-muted);
margin: 0 0 0.4rem;
padding-left: 1.1rem;
}
/* Sessions panel — manage/switch across multiple concurrent CE sessions. */
.ce-sessions {
margin-bottom: 0.8rem;
}
.ce-sessions-list {
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
gap: 0.3rem;
}
.ce-session-row {
display: flex;
align-items: center;
gap: 0.5rem;
}
.ce-session-row.is-active .ce-session-open {
border-color: var(--todo);
background: color-mix(in srgb, var(--todo) 8%, transparent);
}
.ce-session-open {
flex: 1 1 auto;
min-width: 0;
display: flex;
align-items: baseline;
gap: 0.6rem;
text-align: left;
padding: 0.4rem 0.6rem;
border: 1px solid var(--border);
border-radius: 6px;
background: transparent;
cursor: pointer;
}
.ce-session-open:disabled {
cursor: default;
opacity: 0.6;
}
.ce-session-stage {
font-weight: 600;
}
.ce-session-status {
font-size: 0.74rem;
text-transform: capitalize;
color: var(--text-muted);
}
.ce-session-status-awaiting_input {
color: var(--color-warning);
font-weight: 600;
}
.ce-session-status-error,
.ce-session-status-interrupted {
color: var(--color-error);
}
.ce-session-status-completed {
color: var(--color-success);
}
.ce-session-updated {
margin-left: auto;
font-size: 0.72rem;
color: var(--text-dim);
}
.ce-session-cancel,
.ce-session-discard {
flex: none;
}
.ce-session-cancel,
.ce-flow-cancel {
appearance: none;
display: inline-flex;
align-items: center;
justify-content: center;
width: calc(var(--space-xl) + var(--space-sm));
height: calc(var(--space-xl) + var(--space-sm));
padding: var(--space-xs);
border: 0;
border-radius: var(--radius-sm);
background: transparent;
color: var(--color-error);
cursor: pointer;
transition:
background var(--transition-fast),
color var(--transition-fast),
box-shadow var(--transition-fast),
opacity var(--transition-fast);
}
.ce-session-cancel:hover:not(:disabled),
.ce-flow-cancel:hover:not(:disabled) {
background: color-mix(in srgb, var(--color-error) 10%, transparent);
color: var(--color-error);
}
.ce-session-cancel:focus-visible,
.ce-flow-cancel:focus-visible {
box-shadow: var(--focus-ring);
outline: none;
}
.ce-session-cancel:disabled,
.ce-flow-cancel:disabled {
cursor: default;
opacity: 0.6;
}
/* ── Q&A transcript bubbles ────────────────────────────────────────────── */
.ce-flow-transcript {
list-style: none;
margin: 0 0 0.8rem;
padding: 0;
display: flex;
flex: 1 1 auto;
flex-direction: column;
gap: 0.45rem;
min-height: 0;
overflow-y: auto;
}
.ce-flow-turn {
display: flex;
flex-direction: column;
gap: 0.15rem;
max-width: 85%;
padding: 0.45rem 0.65rem;
border-radius: 10px;
background: color-mix(in srgb, var(--border) 30%, transparent);
}
.ce-flow-turn-user {
align-self: flex-end;
background: color-mix(in srgb, var(--todo) 12%, transparent);
}
.ce-flow-turn-role {
font-size: 0.68rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.04em;
color: var(--text-dim);
}
.ce-flow-turn-text {
white-space: pre-wrap;
word-break: break-word;
font-size: 0.86rem;
}
.ce-flow-turn-answer.is-steering {
border-left: 3px solid var(--color-warning);
}
.ce-flow-turn-comment {
font-size: 0.78rem;
font-style: italic;
color: var(--text-muted);
border-top: 1px dashed color-mix(in srgb, var(--border) 60%, transparent);
padding-top: 0.25rem;
}
.ce-flow-turn-done {
align-self: center;
background: color-mix(in srgb, var(--color-success) 10%, transparent);
font-size: 0.8rem;
}
.ce-flow-artifact-path {
color: var(--text-dim);
}
.ce-flow-turn-activity {
background: transparent;
padding: 0;
max-width: 100%;
}
/* ── Agent working trace (persisted + live) ─────────────────────────────── */
.ce-flow-activity-details summary {
cursor: pointer;
font-size: 0.78rem;
color: var(--text-muted);
}
.ce-flow-activity {
display: flex;
flex-direction: column;
gap: 0.25rem;
margin: 0.3rem 0 0;
padding: 0.5rem 0.6rem;
border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
border-radius: 8px;
background: color-mix(in srgb, var(--border) 12%, transparent);
max-height: 16rem;
overflow-y: auto;
}
.ce-activity-block {
margin: 0;
font-size: 0.76rem;
white-space: pre-wrap;
word-break: break-word;
font-family: var(--font-mono, ui-monospace, monospace);
}
.ce-activity-thinking {
color: var(--text-dim);
font-style: italic;
}
.ce-activity-tool {
font-size: 0.76rem;
font-family: var(--font-mono, ui-monospace, monospace);
}
.ce-activity-tool.is-running .ce-activity-tool-marker {
color: var(--todo);
}
.ce-activity-tool.is-done .ce-activity-tool-marker {
color: var(--color-success);
}
.ce-activity-tool.is-error .ce-activity-tool-marker {
color: var(--color-error);
}
/* ── Live working pane ──────────────────────────────────────────────────── */
.ce-flow-working {
margin: 0.4rem 0;
}
.ce-flow-working-label {
display: flex;
align-items: center;
gap: 0.45rem;
margin: 0 0 0.3rem;
font-size: 0.82rem;
color: var(--text-muted);
}
.ce-flow-pulse {
width: 8px;
height: 8px;
border-radius: 50%;
background: var(--todo);
animation: ce-pulse 1.2s ease-in-out infinite;
}
@keyframes ce-pulse {
0%, 100% { opacity: 0.25; transform: scale(0.8); }
50% { opacity: 1; transform: scale(1); }
}
/* ── Steering / guidance channel ────────────────────────────────────────── */
.ce-flow-guidance {
margin-top: 0.5rem;
padding-top: 0.5rem;
border-top: 1px dashed color-mix(in srgb, var(--border) 70%, transparent);
}
.ce-flow-guidance-label {
display: block;
font-size: 0.74rem;
color: var(--text-dim);
margin-bottom: 0.3rem;
}
.ce-flow-guidance-row {
display: flex;
gap: 0.4rem;
align-items: flex-end;
}
.ce-flow-guidance-row textarea {
flex: 1;
resize: vertical;
}