feat(issue-manager): Add queue history modal for viewing and switching queues

- Add GET /api/queue/history endpoint to fetch all queues from index
- Add GET /api/queue/:id endpoint to fetch specific queue details
- Add POST /api/queue/switch endpoint to switch active queue
- Add History button in queue toolbar
- Add queue history modal with list view and detail view
- Add switch functionality to change active queue
- Add CSS styles for queue history components

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
catlog22
2025-12-27 22:56:32 +08:00
parent d705a3e7d9
commit 7620ff703d
3 changed files with 571 additions and 0 deletions

View File

@@ -2542,3 +2542,260 @@
min-width: 80px;
}
}
/* ==========================================
QUEUE HISTORY MODAL
========================================== */
.queue-history-list {
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.queue-history-item {
padding: 1rem;
background: hsl(var(--muted) / 0.3);
border: 1px solid hsl(var(--border));
border-radius: 0.5rem;
cursor: pointer;
transition: all 0.15s ease;
}
.queue-history-item:hover {
background: hsl(var(--muted) / 0.5);
border-color: hsl(var(--primary) / 0.3);
}
.queue-history-item.active {
border-color: hsl(var(--primary));
background: hsl(var(--primary) / 0.1);
}
.queue-history-header {
display: flex;
align-items: center;
gap: 0.75rem;
margin-bottom: 0.5rem;
}
.queue-history-id {
font-size: 0.875rem;
font-weight: 600;
color: hsl(var(--foreground));
}
.queue-active-badge {
padding: 0.125rem 0.5rem;
font-size: 0.625rem;
font-weight: 600;
text-transform: uppercase;
background: hsl(var(--primary));
color: hsl(var(--primary-foreground));
border-radius: 9999px;
}
.queue-history-status {
padding: 0.125rem 0.5rem;
font-size: 0.75rem;
border-radius: 0.25rem;
background: hsl(var(--muted));
color: hsl(var(--muted-foreground));
}
.queue-history-status.active {
background: hsl(142 76% 36% / 0.2);
color: hsl(142 76% 36%);
}
.queue-history-status.completed {
background: hsl(142 76% 36% / 0.2);
color: hsl(142 76% 36%);
}
.queue-history-status.archived {
background: hsl(var(--muted));
color: hsl(var(--muted-foreground));
}
.queue-history-meta {
display: flex;
flex-wrap: wrap;
gap: 1rem;
margin-bottom: 0.75rem;
}
.queue-history-actions {
display: flex;
gap: 0.5rem;
justify-content: flex-end;
}
/* Queue Detail View */
.queue-detail-view {
padding: 0.5rem 0;
}
.queue-detail-header {
display: flex;
align-items: center;
padding-bottom: 1rem;
border-bottom: 1px solid hsl(var(--border));
}
.queue-detail-stats {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 0.75rem;
}
.queue-detail-stats .stat-item {
text-align: center;
padding: 0.75rem;
background: hsl(var(--muted) / 0.3);
border-radius: 0.5rem;
}
.queue-detail-stats .stat-value {
display: block;
font-size: 1.5rem;
font-weight: 700;
color: hsl(var(--foreground));
}
.queue-detail-stats .stat-label {
font-size: 0.75rem;
color: hsl(var(--muted-foreground));
}
.queue-detail-stats .stat-item.completed .stat-value {
color: hsl(142 76% 36%);
}
.queue-detail-stats .stat-item.pending .stat-value {
color: hsl(48 96% 53%);
}
.queue-detail-stats .stat-item.failed .stat-value {
color: hsl(0 84% 60%);
}
.queue-detail-groups {
display: flex;
flex-direction: column;
gap: 1rem;
}
.queue-group-section {
background: hsl(var(--muted) / 0.2);
border: 1px solid hsl(var(--border));
border-radius: 0.5rem;
overflow: hidden;
}
.queue-group-header {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.75rem 1rem;
background: hsl(var(--muted) / 0.3);
border-bottom: 1px solid hsl(var(--border));
font-weight: 500;
}
.queue-group-items {
padding: 0.5rem;
}
.queue-detail-item {
display: flex;
align-items: center;
gap: 1rem;
padding: 0.5rem 0.75rem;
border-radius: 0.25rem;
}
.queue-detail-item:hover {
background: hsl(var(--muted) / 0.3);
}
.queue-detail-item .item-id {
min-width: 120px;
color: hsl(var(--muted-foreground));
}
.queue-detail-item .item-issue {
min-width: 80px;
color: hsl(var(--primary));
}
.queue-detail-item .item-status {
margin-left: auto;
padding: 0.125rem 0.5rem;
font-size: 0.75rem;
border-radius: 0.25rem;
background: hsl(var(--muted));
color: hsl(var(--muted-foreground));
}
.queue-detail-item .item-status.completed {
background: hsl(142 76% 36% / 0.2);
color: hsl(142 76% 36%);
}
.queue-detail-item .item-status.pending {
background: hsl(48 96% 53% / 0.2);
color: hsl(48 96% 53%);
}
.queue-detail-item .item-status.executing {
background: hsl(217 91% 60% / 0.2);
color: hsl(217 91% 60%);
}
.queue-detail-item .item-status.failed {
background: hsl(0 84% 60% / 0.2);
color: hsl(0 84% 60%);
}
/* Small Buttons */
.btn-sm {
display: inline-flex;
align-items: center;
gap: 0.25rem;
padding: 0.25rem 0.5rem;
font-size: 0.75rem;
border-radius: 0.25rem;
border: none;
cursor: pointer;
transition: all 0.15s ease;
}
.btn-sm.btn-primary {
background: hsl(var(--primary));
color: hsl(var(--primary-foreground));
}
.btn-sm.btn-primary:hover {
opacity: 0.9;
}
.btn-sm.btn-secondary {
background: hsl(var(--muted));
color: hsl(var(--foreground));
}
.btn-sm.btn-secondary:hover {
background: hsl(var(--muted) / 0.8);
}
@media (max-width: 640px) {
.queue-detail-stats {
grid-template-columns: repeat(2, 1fr);
}
.queue-history-meta {
flex-direction: column;
gap: 0.25rem;
}
}