feat(FN-866): add theme-aware status styling for changed files and refactor stuck-task detector
- Add theme-aware CSS classes for changed-file status badges (added, modified, deleted, renamed) - Update ChangedFilesModal, CommitDiffTab, and TaskChangesTab to use theme-aware status classes - Add comprehensive tests for ChangedFilesModal and TaskChangesTab status styling - Refactor stuck-task-detector to extract StuckTaskConfig and simplify detection logic - Clean up 370+ lines of redundant test code in stuck-task-detector tests - Update dashboard README with theme-aware styling notes - Pass throughChangedFiles option in executor for better diff handling
This commit is contained in:
@@ -17,19 +17,6 @@ export interface ParsedFile {
|
||||
patch: string;
|
||||
}
|
||||
|
||||
function getStatusColor(status: ParsedFile["status"]): string {
|
||||
switch (status) {
|
||||
case "added":
|
||||
return "#3fb950";
|
||||
case "deleted":
|
||||
return "#f85149";
|
||||
case "modified":
|
||||
return "#58a6ff";
|
||||
default:
|
||||
return "#8b949e";
|
||||
}
|
||||
}
|
||||
|
||||
function getStatusLabel(status: ParsedFile["status"]): string {
|
||||
switch (status) {
|
||||
case "added":
|
||||
@@ -225,8 +212,7 @@ export function CommitDiffTab({ commitSha, mergeDetails }: CommitDiffTabProps) {
|
||||
{isExpanded ? <ChevronDown size={14} /> : <ChevronRight size={14} />}
|
||||
</span>
|
||||
<span
|
||||
className="changes-file-status"
|
||||
style={{ color: getStatusColor(file.status) }}
|
||||
className={`changes-file-status changes-file-status--${file.status}`}
|
||||
title={file.status}
|
||||
>
|
||||
{getStatusLabel(file.status)}
|
||||
|
||||
Reference in New Issue
Block a user