feat: add CLI Stream Viewer component for real-time output monitoring

- Implemented a new CLI Stream Viewer to display real-time output from CLI executions.
- Added state management for CLI executions, including handling of start, output, completion, and errors.
- Introduced UI rendering for stream tabs and content, with auto-scroll functionality.
- Integrated keyboard shortcuts for toggling the viewer and handling user interactions.

feat: create Issue Manager view for managing issues and execution queue

- Developed the Issue Manager view to manage issues, solutions, and execution queue.
- Implemented data loading functions for fetching issues and queue data from the API.
- Added filtering and rendering logic for issues and queue items, including drag-and-drop functionality.
- Created detail panel for viewing and editing issue details, including tasks and solutions.
This commit is contained in:
catlog22
2025-12-27 09:46:12 +08:00
parent cdf4833977
commit 0157e36344
23 changed files with 6843 additions and 1293 deletions

View File

@@ -0,0 +1,979 @@
/* ==========================================
ISSUE MANAGER STYLES
========================================== */
/* Issue Manager Container */
.issue-manager {
width: 100%;
}
.issue-manager.loading {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 300px;
color: hsl(var(--muted-foreground));
}
/* View Toggle (Issues/Queue) */
.issue-view-toggle {
display: inline-flex;
background: hsl(var(--muted));
border-radius: 0.5rem;
padding: 0.25rem;
gap: 0.25rem;
}
.issue-view-toggle button {
padding: 0.5rem 1rem;
border-radius: 0.375rem;
font-size: 0.875rem;
font-weight: 500;
color: hsl(var(--muted-foreground));
background: transparent;
border: none;
cursor: pointer;
transition: all 0.15s ease;
}
.issue-view-toggle button:hover {
color: hsl(var(--foreground));
}
.issue-view-toggle button.active {
background: hsl(var(--background));
color: hsl(var(--foreground));
box-shadow: 0 1px 2px hsl(var(--foreground) / 0.05);
}
/* Issues Grid */
.issues-section {
margin-bottom: 2rem;
width: 100%;
}
.issues-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
gap: 1rem;
width: 100%;
}
.issues-empty-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 160px;
}
/* Issue Card */
.issue-card {
position: relative;
transition: all 0.2s ease;
cursor: pointer;
}
.issue-card:hover {
border-color: hsl(var(--primary));
transform: translateY(-2px);
}
.issue-card-header {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 0.5rem;
}
.issue-card-id {
font-family: var(--font-mono);
font-size: 0.75rem;
color: hsl(var(--muted-foreground));
}
.issue-card-title {
font-weight: 600;
font-size: 0.9375rem;
line-height: 1.4;
margin-top: 0.25rem;
}
.issue-card-meta {
display: flex;
align-items: center;
gap: 0.5rem;
margin-top: 0.75rem;
font-size: 0.75rem;
color: hsl(var(--muted-foreground));
}
.issue-card-stats {
display: flex;
align-items: center;
gap: 1rem;
margin-top: 0.5rem;
}
.issue-card-stat {
display: flex;
align-items: center;
gap: 0.25rem;
font-size: 0.75rem;
color: hsl(var(--muted-foreground));
}
/* Issue Status Badges */
.issue-status {
display: inline-flex;
align-items: center;
padding: 0.125rem 0.5rem;
border-radius: 9999px;
font-size: 0.6875rem;
font-weight: 500;
text-transform: uppercase;
letter-spacing: 0.025em;
}
.issue-status.registered {
background: hsl(var(--muted));
color: hsl(var(--muted-foreground));
}
.issue-status.planned {
background: hsl(217 91% 60% / 0.15);
color: hsl(217 91% 60%);
}
.issue-status.queued {
background: hsl(262 83% 58% / 0.15);
color: hsl(262 83% 58%);
}
.issue-status.executing {
background: hsl(45 93% 47% / 0.15);
color: hsl(45 93% 47%);
}
.issue-status.completed {
background: hsl(var(--success) / 0.15);
color: hsl(var(--success));
}
.issue-status.failed {
background: hsl(var(--destructive) / 0.15);
color: hsl(var(--destructive));
}
/* Priority Badges */
.issue-priority {
display: inline-flex;
align-items: center;
padding: 0.125rem 0.375rem;
border-radius: 0.25rem;
font-size: 0.6875rem;
font-weight: 500;
}
.issue-priority.critical {
background: hsl(0 84% 60% / 0.15);
color: hsl(0 84% 60%);
}
.issue-priority.high {
background: hsl(25 95% 53% / 0.15);
color: hsl(25 95% 53%);
}
.issue-priority.medium {
background: hsl(45 93% 47% / 0.15);
color: hsl(45 93% 47%);
}
.issue-priority.low {
background: hsl(var(--muted));
color: hsl(var(--muted-foreground));
}
/* ==========================================
QUEUE VIEW STYLES
========================================== */
.queue-section {
width: 100%;
}
.queue-timeline {
display: flex;
flex-direction: column;
gap: 1.5rem;
}
.queue-empty-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 200px;
text-align: center;
}
/* Execution Group */
.queue-group {
border: 1px solid hsl(var(--border));
border-radius: 0.75rem;
overflow: hidden;
}
.queue-group-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.75rem 1rem;
background: hsl(var(--muted) / 0.5);
border-bottom: 1px solid hsl(var(--border));
}
.queue-group-title {
display: flex;
align-items: center;
gap: 0.5rem;
font-weight: 600;
font-size: 0.875rem;
}
.queue-group-badge {
display: inline-flex;
align-items: center;
padding: 0.125rem 0.5rem;
border-radius: 9999px;
font-size: 0.6875rem;
font-weight: 500;
}
.queue-group-badge.parallel {
background: hsl(142 71% 45% / 0.15);
color: hsl(142 71% 45%);
}
.queue-group-badge.sequential {
background: hsl(262 83% 58% / 0.15);
color: hsl(262 83% 58%);
}
.queue-group-count {
font-size: 0.75rem;
color: hsl(var(--muted-foreground));
}
.queue-group-items {
padding: 0.75rem;
display: flex;
flex-direction: column;
gap: 0.5rem;
min-height: 60px;
}
/* Parallel group items display horizontally */
.queue-group.parallel .queue-group-items {
flex-direction: row;
flex-wrap: wrap;
}
/* Queue Item */
.queue-item {
display: flex;
align-items: center;
gap: 0.75rem;
padding: 0.75rem 1rem;
background: hsl(var(--background));
border: 1px solid hsl(var(--border));
border-radius: 0.5rem;
transition: all 0.15s ease;
}
.queue-item:hover {
border-color: hsl(var(--primary));
box-shadow: 0 2px 4px hsl(var(--foreground) / 0.05);
}
.queue-item[draggable="true"] {
cursor: grab;
}
.queue-item[draggable="true"]:active {
cursor: grabbing;
}
.queue-item-drag-handle {
display: flex;
align-items: center;
color: hsl(var(--muted-foreground));
cursor: grab;
}
.queue-item-drag-handle:active {
cursor: grabbing;
}
.queue-item-order {
font-family: var(--font-mono);
font-size: 0.75rem;
color: hsl(var(--muted-foreground));
min-width: 2.5rem;
}
.queue-item-content {
flex: 1;
min-width: 0;
}
.queue-item-id {
font-family: var(--font-mono);
font-size: 0.6875rem;
color: hsl(var(--muted-foreground));
}
.queue-item-title {
font-size: 0.875rem;
font-weight: 500;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.queue-item-issue {
font-size: 0.75rem;
color: hsl(var(--muted-foreground));
}
.queue-item-priority {
font-family: var(--font-mono);
font-size: 0.6875rem;
padding: 0.125rem 0.375rem;
background: hsl(var(--muted));
border-radius: 0.25rem;
color: hsl(var(--muted-foreground));
}
/* Queue Item Status */
.queue-item-status {
display: inline-flex;
align-items: center;
gap: 0.25rem;
padding: 0.125rem 0.5rem;
border-radius: 9999px;
font-size: 0.6875rem;
font-weight: 500;
}
.queue-item-status.pending {
background: hsl(var(--muted));
color: hsl(var(--muted-foreground));
}
.queue-item-status.running {
background: hsl(217 91% 60% / 0.15);
color: hsl(217 91% 60%);
}
.queue-item-status.completed {
background: hsl(var(--success) / 0.15);
color: hsl(var(--success));
}
.queue-item-status.failed {
background: hsl(var(--destructive) / 0.15);
color: hsl(var(--destructive));
}
/* Drag and Drop States */
.queue-item.dragging {
opacity: 0.5;
border: 2px dashed hsl(var(--primary));
}
.queue-item.drag-over {
border-color: hsl(var(--primary));
background: hsl(var(--primary) / 0.05);
}
.queue-group-items.drag-over {
background: hsl(var(--primary) / 0.03);
}
/* Arrow connector between sequential items */
.queue-group.sequential .queue-item:not(:last-child)::after {
content: '';
display: block;
width: 0;
height: 0;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-top: 8px solid hsl(var(--muted-foreground) / 0.3);
position: absolute;
bottom: -12px;
left: 50%;
transform: translateX(-50%);
}
.queue-group.sequential .queue-item {
position: relative;
}
/* ==========================================
ISSUE DETAIL PANEL
========================================== */
.issue-detail-overlay {
position: fixed;
inset: 0;
background: hsl(var(--foreground) / 0.4);
z-index: 999;
animation: fadeIn 0.15s ease-out;
}
.issue-detail-panel {
position: fixed;
top: 0;
right: 0;
width: 560px;
max-width: 100%;
height: 100vh;
background: hsl(var(--background));
border-left: 1px solid hsl(var(--border));
z-index: 1000;
display: flex;
flex-direction: column;
animation: slideInPanel 0.2s ease-out;
}
@keyframes slideInPanel {
from {
opacity: 0;
transform: translateX(100%);
}
to {
opacity: 1;
transform: translateX(0);
}
}
.issue-detail-header {
display: flex;
align-items: flex-start;
justify-content: space-between;
padding: 1.25rem 1.5rem;
border-bottom: 1px solid hsl(var(--border));
}
.issue-detail-header-content {
flex: 1;
min-width: 0;
}
.issue-detail-id {
font-family: var(--font-mono);
font-size: 0.75rem;
color: hsl(var(--muted-foreground));
}
.issue-detail-title {
font-size: 1.125rem;
font-weight: 600;
margin-top: 0.25rem;
line-height: 1.4;
}
.issue-detail-title.editable {
cursor: text;
padding: 0.25rem 0.5rem;
margin: 0.25rem -0.5rem 0;
border-radius: 0.375rem;
border: 1px solid transparent;
}
.issue-detail-title.editable:hover {
background: hsl(var(--muted) / 0.5);
}
.issue-detail-title.editable:focus {
outline: none;
border-color: hsl(var(--primary));
background: hsl(var(--background));
}
.issue-detail-close {
display: flex;
align-items: center;
justify-content: center;
width: 2rem;
height: 2rem;
border-radius: 0.375rem;
border: none;
background: transparent;
cursor: pointer;
color: hsl(var(--muted-foreground));
transition: all 0.15s ease;
}
.issue-detail-close:hover {
background: hsl(var(--muted));
color: hsl(var(--foreground));
}
.issue-detail-body {
flex: 1;
overflow-y: auto;
padding: 1.5rem;
}
.issue-detail-section {
margin-bottom: 1.5rem;
}
.issue-detail-section-title {
font-size: 0.75rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.05em;
color: hsl(var(--muted-foreground));
margin-bottom: 0.75rem;
display: flex;
align-items: center;
gap: 0.5rem;
}
.issue-detail-section-title button {
padding: 0.25rem;
border-radius: 0.25rem;
border: none;
background: transparent;
cursor: pointer;
color: hsl(var(--muted-foreground));
transition: all 0.15s ease;
}
.issue-detail-section-title button:hover {
background: hsl(var(--muted));
color: hsl(var(--foreground));
}
/* Context / Description */
.issue-detail-context {
font-size: 0.875rem;
line-height: 1.6;
color: hsl(var(--foreground));
white-space: pre-wrap;
}
.issue-detail-context.editable {
padding: 0.75rem;
background: hsl(var(--muted) / 0.3);
border-radius: 0.5rem;
border: 1px solid transparent;
cursor: text;
min-height: 100px;
}
.issue-detail-context.editable:hover {
border-color: hsl(var(--border));
}
.issue-detail-context.editable:focus {
outline: none;
border-color: hsl(var(--primary));
background: hsl(var(--background));
}
/* Solutions List */
.solution-list {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.solution-item {
display: flex;
align-items: center;
gap: 0.75rem;
padding: 0.75rem 1rem;
background: hsl(var(--muted) / 0.3);
border: 1px solid hsl(var(--border));
border-radius: 0.5rem;
cursor: pointer;
transition: all 0.15s ease;
}
.solution-item:hover {
border-color: hsl(var(--primary));
}
.solution-item.bound {
border-color: hsl(var(--success));
background: hsl(var(--success) / 0.05);
}
.solution-item-icon {
display: flex;
align-items: center;
justify-content: center;
width: 2rem;
height: 2rem;
border-radius: 0.375rem;
background: hsl(var(--muted));
color: hsl(var(--muted-foreground));
}
.solution-item.bound .solution-item-icon {
background: hsl(var(--success) / 0.15);
color: hsl(var(--success));
}
.solution-item-content {
flex: 1;
min-width: 0;
}
.solution-item-name {
font-size: 0.875rem;
font-weight: 500;
}
.solution-item-meta {
font-size: 0.75rem;
color: hsl(var(--muted-foreground));
}
/* Task List */
.task-list {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.task-item {
padding: 0.75rem 1rem;
background: hsl(var(--muted) / 0.3);
border: 1px solid hsl(var(--border));
border-radius: 0.5rem;
transition: all 0.15s ease;
}
.task-item:hover {
border-color: hsl(var(--primary) / 0.5);
}
.task-item-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.5rem;
}
.task-item-id {
font-family: var(--font-mono);
font-size: 0.6875rem;
color: hsl(var(--muted-foreground));
}
.task-item-title {
font-size: 0.875rem;
font-weight: 500;
margin-top: 0.25rem;
}
.task-item-scope {
font-size: 0.75rem;
color: hsl(var(--muted-foreground));
font-family: var(--font-mono);
}
.task-item-actions {
display: flex;
align-items: center;
gap: 0.5rem;
}
/* Task Action Badge (Create, Update, etc) */
.task-action-badge {
display: inline-flex;
align-items: center;
padding: 0.125rem 0.375rem;
border-radius: 0.25rem;
font-size: 0.6875rem;
font-weight: 500;
}
.task-action-badge.create {
background: hsl(142 71% 45% / 0.15);
color: hsl(142 71% 45%);
}
.task-action-badge.update {
background: hsl(217 91% 60% / 0.15);
color: hsl(217 91% 60%);
}
.task-action-badge.implement {
background: hsl(262 83% 58% / 0.15);
color: hsl(262 83% 58%);
}
.task-action-badge.configure {
background: hsl(45 93% 47% / 0.15);
color: hsl(45 93% 47%);
}
.task-action-badge.refactor {
background: hsl(25 95% 53% / 0.15);
color: hsl(25 95% 53%);
}
.task-action-badge.test {
background: hsl(199 89% 48% / 0.15);
color: hsl(199 89% 48%);
}
.task-action-badge.delete {
background: hsl(var(--destructive) / 0.15);
color: hsl(var(--destructive));
}
/* Task Status Dropdown */
.task-status-select {
font-size: 0.6875rem;
padding: 0.25rem 0.5rem;
border-radius: 0.25rem;
border: 1px solid hsl(var(--border));
background: hsl(var(--background));
cursor: pointer;
}
.task-status-select:focus {
outline: none;
border-color: hsl(var(--primary));
}
/* Modification Points */
.modification-points {
margin-top: 0.5rem;
padding-top: 0.5rem;
border-top: 1px solid hsl(var(--border) / 0.5);
}
.modification-point {
display: flex;
align-items: flex-start;
gap: 0.5rem;
font-size: 0.75rem;
padding: 0.25rem 0;
}
.modification-point-file {
font-family: var(--font-mono);
color: hsl(var(--primary));
}
.modification-point-change {
color: hsl(var(--muted-foreground));
}
/* Implementation Steps */
.implementation-steps {
margin-top: 0.5rem;
padding-left: 1rem;
font-size: 0.75rem;
color: hsl(var(--muted-foreground));
}
.implementation-steps li {
margin: 0.25rem 0;
}
/* Acceptance Criteria */
.acceptance-criteria {
margin-top: 0.5rem;
padding-left: 1rem;
font-size: 0.75rem;
}
.acceptance-criteria li {
margin: 0.25rem 0;
color: hsl(var(--success));
}
/* ==========================================
CONFLICTS SECTION
========================================== */
.conflicts-section {
margin-top: 1.5rem;
}
.conflict-item {
display: flex;
align-items: flex-start;
gap: 0.75rem;
padding: 0.75rem 1rem;
background: hsl(45 93% 47% / 0.1);
border: 1px solid hsl(45 93% 47% / 0.3);
border-radius: 0.5rem;
margin-bottom: 0.5rem;
}
.conflict-item.resolved {
background: hsl(var(--success) / 0.05);
border-color: hsl(var(--success) / 0.3);
}
.conflict-icon {
display: flex;
align-items: center;
justify-content: center;
width: 1.5rem;
height: 1.5rem;
border-radius: 9999px;
background: hsl(45 93% 47% / 0.2);
color: hsl(45 93% 47%);
}
.conflict-item.resolved .conflict-icon {
background: hsl(var(--success) / 0.2);
color: hsl(var(--success));
}
.conflict-content {
flex: 1;
min-width: 0;
}
.conflict-file {
font-family: var(--font-mono);
font-size: 0.8125rem;
font-weight: 500;
}
.conflict-tasks {
font-size: 0.75rem;
color: hsl(var(--muted-foreground));
margin-top: 0.25rem;
}
.conflict-resolution {
font-size: 0.75rem;
color: hsl(var(--muted-foreground));
margin-top: 0.25rem;
}
/* ==========================================
FILTER BAR
========================================== */
.issue-filter-bar {
display: flex;
align-items: center;
gap: 0.75rem;
flex-wrap: wrap;
}
.issue-filter-group {
display: flex;
align-items: center;
gap: 0.25rem;
}
.issue-filter-group label {
font-size: 0.75rem;
color: hsl(var(--muted-foreground));
}
.issue-filter-select {
font-size: 0.8125rem;
padding: 0.375rem 0.75rem;
border-radius: 0.375rem;
border: 1px solid hsl(var(--border));
background: hsl(var(--background));
cursor: pointer;
}
.issue-filter-select:focus {
outline: none;
border-color: hsl(var(--primary));
}
/* ==========================================
RESPONSIVE ADJUSTMENTS
========================================== */
@media (max-width: 768px) {
.issues-grid {
grid-template-columns: 1fr;
}
.issue-detail-panel {
width: 100%;
}
.queue-group.parallel .queue-group-items {
flex-direction: column;
}
.issue-filter-bar {
flex-direction: column;
align-items: stretch;
}
}
@media (max-width: 480px) {
.issue-view-toggle {
width: 100%;
}
.issue-view-toggle button {
flex: 1;
text-align: center;
}
.queue-item {
flex-wrap: wrap;
}
.queue-item-content {
width: 100%;
}
}
/* ==========================================
ANIMATIONS
========================================== */
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
@keyframes pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.5; }
}
.animate-pulse {
animation: pulse 2s ease-in-out infinite;
}
/* Line clamp utility */
.line-clamp-2 {
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
/* Badge styles */
.issue-card .badge,
.queue-item .badge {
font-size: 0.75rem;
font-weight: 500;
}