Skip to content

Commit 6729480

Browse files
committed
incidents: drop orphaned mcp-incident-* CSS family
Surveyed for dead code today. Two confirmed orphans on the frontend: The mcp-incident-* block (~210 lines covering .mcp-incidents-panel, .mcp-incidents-header, .mcp-incidents-controls, .mcp-incidents-filter, .mcp-incidents-list, .mcp-incidents-empty, .mcp-incident-row, .mcp-incident-sev-{critical,high,medium,low}, .mcp-incident-time, .mcp-incident-camera, .mcp-incident-title, .mcp-incident-status, .mcp-incident-status-badge-{open,acknowledged,resolved,dismissed}, .mcp-incident-evidence-count, plus the mobile media query) was used exclusively by the McpPage's AI Incident Reports panel. That panel got removed when /incidents was promoted to its own page; I'd intended to reuse the classes on IncidentsPage as a way to ship fast, but the security-ops redesign supplanted them with a fully new .incidents-* family (incidents-row, incidents-row-stripe, incidents-sev-tag, incidents-source-chip, etc.). Verified orphan: a grep for any of the mcp-incident* class names across all .jsx files returns zero hits. Only the CSS file itself held them. Deleted. The earlier .incidents-source-badge / .incidents-source-ai / .incidents-source-human classes (from the first IncidentsPage CSS pass) were already overwritten when the redesign block replaced the whole /incidents page section — so no second deletion needed there. CC backend ruff F401 + F841 both report clean — no unused imports or locals to chase down on that side.
1 parent 9285026 commit 6729480

1 file changed

Lines changed: 0 additions & 209 deletions

File tree

frontend/src/index.css

Lines changed: 0 additions & 209 deletions
Original file line numberDiff line numberDiff line change
@@ -7102,215 +7102,6 @@ body {
71027102
}
71037103
}
71047104

7105-
.mcp-incidents-panel {
7106-
background: var(--bg-card);
7107-
border: 1px solid var(--border-color);
7108-
border-radius: 12px;
7109-
overflow: hidden;
7110-
margin-bottom: 1.5rem;
7111-
display: flex;
7112-
flex-direction: column;
7113-
}
7114-
7115-
.mcp-incidents-header {
7116-
/* Reuses .mcp-panel-header but with controls on the right */
7117-
}
7118-
7119-
.mcp-incidents-controls {
7120-
display: flex;
7121-
gap: 0.4rem;
7122-
}
7123-
7124-
.mcp-incidents-filter {
7125-
background: transparent;
7126-
border: 1px solid var(--border-color);
7127-
color: var(--text-muted);
7128-
padding: 0.3rem 0.7rem;
7129-
border-radius: 6px;
7130-
font-size: 0.75rem;
7131-
cursor: pointer;
7132-
font-family: inherit;
7133-
transition: all 0.15s ease;
7134-
}
7135-
7136-
.mcp-incidents-filter:hover {
7137-
color: var(--text-primary);
7138-
border-color: var(--text-muted);
7139-
}
7140-
7141-
.mcp-incidents-filter.active {
7142-
background: rgba(168, 85, 247, 0.12);
7143-
border-color: var(--accent-purple);
7144-
color: var(--accent-purple);
7145-
}
7146-
7147-
.mcp-incidents-list {
7148-
max-height: 360px;
7149-
overflow-y: auto;
7150-
padding: 0.4rem;
7151-
}
7152-
7153-
.mcp-incidents-list::-webkit-scrollbar {
7154-
width: 4px;
7155-
}
7156-
7157-
.mcp-incidents-list::-webkit-scrollbar-thumb {
7158-
background: var(--border-color);
7159-
border-radius: 4px;
7160-
}
7161-
7162-
.mcp-incidents-empty {
7163-
display: flex;
7164-
flex-direction: column;
7165-
align-items: center;
7166-
justify-content: center;
7167-
min-height: 180px;
7168-
gap: 0.4rem;
7169-
color: var(--text-muted);
7170-
text-align: center;
7171-
}
7172-
7173-
.mcp-incidents-empty p {
7174-
margin: 0;
7175-
font-size: 0.9rem;
7176-
}
7177-
7178-
.mcp-incidents-empty span {
7179-
font-size: 0.75rem;
7180-
opacity: 0.7;
7181-
}
7182-
7183-
.mcp-incident-row {
7184-
display: grid;
7185-
grid-template-columns: 12px 130px 140px 1fr auto auto;
7186-
gap: 0.75rem;
7187-
align-items: center;
7188-
width: 100%;
7189-
background: transparent;
7190-
border: 1px solid transparent;
7191-
border-radius: 8px;
7192-
padding: 0.55rem 0.75rem;
7193-
cursor: pointer;
7194-
text-align: left;
7195-
color: var(--text-primary);
7196-
font-family: inherit;
7197-
font-size: 0.82rem;
7198-
transition: background 0.15s ease, border-color 0.15s ease;
7199-
}
7200-
7201-
.mcp-incident-row:hover {
7202-
background: var(--bg-card-hover);
7203-
border-color: var(--border-color);
7204-
}
7205-
7206-
.mcp-incident-row + .mcp-incident-row {
7207-
margin-top: 0.2rem;
7208-
}
7209-
7210-
.mcp-incident-sev-dot {
7211-
width: 10px;
7212-
height: 10px;
7213-
border-radius: 50%;
7214-
}
7215-
7216-
.mcp-incident-sev-critical {
7217-
background: var(--accent-red);
7218-
box-shadow: 0 0 8px var(--accent-red);
7219-
}
7220-
7221-
.mcp-incident-sev-high {
7222-
background: #fb7185; /* rose-400 */
7223-
box-shadow: 0 0 6px rgba(251, 113, 133, 0.5);
7224-
}
7225-
7226-
.mcp-incident-sev-medium {
7227-
background: var(--accent-amber);
7228-
}
7229-
7230-
.mcp-incident-sev-low {
7231-
background: var(--accent-blue);
7232-
}
7233-
7234-
.mcp-incident-time {
7235-
font-family: 'JetBrains Mono', 'Fira Code', monospace;
7236-
font-size: 0.72rem;
7237-
color: var(--text-muted);
7238-
white-space: nowrap;
7239-
}
7240-
7241-
.mcp-incident-camera {
7242-
font-family: 'JetBrains Mono', monospace;
7243-
font-size: 0.72rem;
7244-
color: var(--text-secondary);
7245-
overflow: hidden;
7246-
text-overflow: ellipsis;
7247-
white-space: nowrap;
7248-
}
7249-
7250-
.mcp-incident-title {
7251-
color: var(--text-primary);
7252-
font-weight: 500;
7253-
overflow: hidden;
7254-
text-overflow: ellipsis;
7255-
white-space: nowrap;
7256-
}
7257-
7258-
.mcp-incident-status {
7259-
font-size: 0.68rem;
7260-
text-transform: uppercase;
7261-
letter-spacing: 0.04em;
7262-
padding: 0.18rem 0.5rem;
7263-
border-radius: 10px;
7264-
font-weight: 600;
7265-
white-space: nowrap;
7266-
}
7267-
7268-
.mcp-incident-status-badge-open {
7269-
background: rgba(239, 68, 68, 0.12);
7270-
color: var(--accent-red);
7271-
border: 1px solid rgba(239, 68, 68, 0.3);
7272-
}
7273-
7274-
.mcp-incident-status-badge-acknowledged {
7275-
background: rgba(245, 158, 11, 0.12);
7276-
color: var(--accent-amber);
7277-
border: 1px solid rgba(245, 158, 11, 0.3);
7278-
}
7279-
7280-
.mcp-incident-status-badge-resolved {
7281-
background: rgba(34, 197, 94, 0.12);
7282-
color: var(--accent-green);
7283-
border: 1px solid rgba(34, 197, 94, 0.3);
7284-
}
7285-
7286-
.mcp-incident-status-badge-dismissed {
7287-
background: rgba(255, 255, 255, 0.05);
7288-
color: var(--text-muted);
7289-
border: 1px solid var(--border-color);
7290-
}
7291-
7292-
.mcp-incident-evidence-count {
7293-
font-size: 0.68rem;
7294-
color: var(--text-muted);
7295-
font-family: 'JetBrains Mono', monospace;
7296-
}
7297-
7298-
@media (max-width: 720px) {
7299-
.mcp-incident-row {
7300-
grid-template-columns: 12px 1fr auto;
7301-
grid-template-areas:
7302-
"dot title status"
7303-
"dot camera evidence"
7304-
"dot time time";
7305-
}
7306-
.mcp-incident-sev-dot { grid-area: dot; align-self: start; margin-top: 6px; }
7307-
.mcp-incident-title { grid-area: title; }
7308-
.mcp-incident-status { grid-area: status; justify-self: end; }
7309-
.mcp-incident-camera { grid-area: camera; }
7310-
.mcp-incident-evidence-count { grid-area: evidence; justify-self: end; }
7311-
.mcp-incident-time { grid-area: time; }
7312-
}
7313-
73147105
/* ============================================================== */
73157106
/* /incidents page — security-ops style */
73167107
/* ============================================================== */

0 commit comments

Comments
 (0)