feat: Add patchset history and diff support with cvsps integration

- Add cvsps package to Docker dependencies
- Implement patchset retrieval and diff endpoints in API
- Add _run_cvsps_command() helper for cvsps integration
- Enhance file history parsing with log message extraction
- Improve UI with enhanced styling and patchset functionality
This commit is contained in:
Juan José Gutiérrez de Quevedo Pérez 2025-11-21 17:18:55 +01:00
parent c263092c10
commit d3b40ae93f
9 changed files with 660 additions and 26 deletions

View file

@ -283,59 +283,257 @@ main {
.history-item {
background-color: var(--surface-color);
border: 1px solid var(--border-color);
border-radius: 0.5rem;
padding: 1rem;
margin-bottom: 1rem;
border-radius: 0.375rem;
padding: 0.625rem 0.75rem;
margin-bottom: 0.5rem;
cursor: pointer;
transition: all 0.2s;
display: grid;
grid-template-columns: 80px 1fr 150px 120px;
gap: 0.75rem;
align-items: center;
}
.history-item:hover {
box-shadow: var(--shadow-lg);
box-shadow: var(--shadow);
border-color: var(--primary-color);
background-color: var(--bg-color);
}
.history-item.active {
background-color: var(--primary-color);
color: white;
border-color: var(--primary-color);
}
.history-item.active .history-revision,
.history-item.active .history-date,
.history-item.active .history-author,
.history-item.active .history-state,
.history-item.active .history-log {
color: white;
}
.history-item-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 0.5rem;
display: contents;
}
.history-revision {
font-weight: 600;
color: var(--primary-color);
font-family: 'Monaco', 'Courier New', monospace;
font-size: 0.875rem;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.history-item.active .history-revision {
color: white;
}
.history-date {
color: var(--text-secondary);
font-size: 0.875rem;
font-size: 0.75rem;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
text-align: right;
}
.history-item.active .history-date {
color: rgba(255, 255, 255, 0.8);
}
.history-author {
color: var(--text-secondary);
font-size: 0.875rem;
margin-bottom: 0.5rem;
font-size: 0.75rem;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.history-item.active .history-author {
color: rgba(255, 255, 255, 0.9);
}
.history-state {
display: inline-block;
padding: 0.25rem 0.75rem;
padding: 0.125rem 0.5rem;
border-radius: 0.25rem;
font-size: 0.75rem;
font-size: 0.65rem;
font-weight: 600;
background-color: var(--bg-color);
color: var(--text-secondary);
text-align: center;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-left: 0.5rem;
}
.history-item.active .history-state {
background-color: rgba(255, 255, 255, 0.2);
color: white;
}
.history-lines {
color: var(--text-secondary);
font-size: 0.75rem;
}
.history-item.active .history-lines {
color: rgba(255, 255, 255, 0.9);
}
.history-log-section {
display: flex;
align-items: center;
gap: 0.5rem;
overflow: hidden;
}
.history-log {
color: var(--text-secondary);
font-size: 0.75rem;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-style: italic;
flex: 1;
}
.history-item.active .history-log {
color: rgba(255, 255, 255, 0.9);
}
/* Patchset View */
.patchset-content {
flex: 1;
overflow-y: auto;
padding: 1.5rem;
}
.patchset-item {
background-color: var(--surface-color);
border: 1px solid var(--border-color);
border-radius: 0.375rem;
padding: 0.625rem 0.75rem;
margin-bottom: 0.5rem;
cursor: pointer;
transition: all 0.2s;
display: grid;
grid-template-columns: 100px 1fr 150px 120px;
gap: 0.75rem;
align-items: center;
}
.patchset-item:hover {
box-shadow: var(--shadow);
border-color: var(--primary-color);
background-color: var(--bg-color);
}
.patchset-item.active {
background-color: var(--primary-color);
color: white;
border-color: var(--primary-color);
}
.patchset-item.active .patchset-number,
.patchset-item.active .patchset-date,
.patchset-item.active .patchset-author,
.patchset-item.active .patchset-tag,
.patchset-item.active .patchset-log {
color: white;
}
.patchset-item-header {
display: contents;
}
.patchset-number {
font-weight: 600;
color: var(--primary-color);
font-family: 'Monaco', 'Courier New', monospace;
font-size: 0.875rem;
margin-top: 0.5rem;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.patchset-item.active .patchset-number {
color: white;
}
.patchset-date {
color: var(--text-secondary);
font-size: 0.75rem;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
text-align: right;
}
.patchset-item.active .patchset-date {
color: rgba(255, 255, 255, 0.8);
}
.patchset-author {
color: var(--text-secondary);
font-size: 0.75rem;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.patchset-item.active .patchset-author {
color: rgba(255, 255, 255, 0.9);
}
.patchset-tag {
display: inline-block;
padding: 0.125rem 0.5rem;
border-radius: 0.25rem;
font-size: 0.65rem;
font-weight: 600;
background-color: var(--bg-color);
color: var(--text-secondary);
text-align: center;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-left: 0.5rem;
}
.patchset-item.active .patchset-tag {
background-color: rgba(255, 255, 255, 0.2);
color: white;
}
.patchset-log-section {
display: flex;
align-items: center;
gap: 0.5rem;
overflow: hidden;
}
.patchset-log {
color: var(--text-secondary);
font-size: 0.75rem;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-style: italic;
flex: 1;
}
.patchset-item.active .patchset-log {
color: rgba(255, 255, 255, 0.9);
}
/* Diff View */
.view-header {
padding: 1.5rem;
border-bottom: 1px solid var(--border-color);