Files
fusion/packages/dashboard/app/components/ActivityFeed.css
gsxdsm c3d1716fdd refactor(dashboard): split monolithic styles.css into per-component files
Split app/styles.css from ~40k lines down to ~4.5k. Created 56 co-located
component CSS files in app/components/, each imported by its owning .tsx.
The remainder of styles.css holds genuinely global rules (design tokens,
.btn/.card/.modal/.form-input primitives, cross-component @media overrides).

- Lazy-load 13 heavy views (AgentsView, RoadmapsView, NodesView, etc.) via
  React.lazy + Suspense; prefetch all chunks on idle so first navigation is
  instant. Initial JS bundle: 1.58 MB → 1.16 MB (-26%). Initial CSS bundle:
  635 kB → 471 kB (-26%); the rest splits into 13 per-view chunks.

- Add app/test/cssFixture.ts exposing loadAllAppCss() + loadAllAppCssBaseOnly()
  so CSS regression tests load the full per-component bundle (mirroring Vite
  source order). Migrate 30+ tests off direct readFileSync('../styles.css').

- Enable test.css: { include: [/.+/] } in vitest.config.ts so component CSS
  imports actually inject styles in jsdom (fixes getComputedStyle assertions).

- Add ESLint rule (no-restricted-syntax) banning direct styles.css reads in
  dashboard test files; points at loadAllAppCss() instead.

- Restore lost utility classes (.text-muted, .text-secondary, .text-dim,
  .form-input) and rescue dropped chat tool-call rules into QuickChatFAB.css.

- Mobile fixes along the way: scroll containment for view containers
  (min-height:0 + -webkit-overflow-scrolling), QuickChatFAB full-screen on
  mobile (with safe-area-inset for iOS home bar), AgentsView single-row
  header layout, ActivityLogModal close button on right, model-combobox
  z-index above the mobile quick-chat panel.

- Bug fix: SkillsView toggle was display:none which hid the input from the
  accessibility tree; replaced with the visually-hidden pattern so screen
  readers + getByRole still find the checkbox.

- Bug fix: standalone Delete button in TaskDetailModal for triage-column
  tasks (Actions dropdown is hidden in triage state, so previously no way
  to delete a freshly-created task without status change first).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 19:39:20 -07:00

244 lines
4.4 KiB
CSS

/* === ActivityFeed Component === */
.activity-feed {
display: flex;
flex-direction: column;
gap: var(--space-lg);
max-height: 600px;
overflow-y: auto;
padding: var(--space-md);
}
.activity-feed-group {
display: flex;
flex-direction: column;
gap: var(--space-sm);
}
.activity-feed-group-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: var(--space-sm) 0;
border-bottom: 1px solid var(--border);
margin-bottom: var(--space-sm);
position: sticky;
top: 0;
background: var(--surface);
z-index: 1;
}
.activity-feed-group-date {
font-size: 13px;
font-weight: 600;
color: var(--text);
text-transform: uppercase;
letter-spacing: 0.5px;
}
.activity-feed-group-count {
font-size: calc(var(--space-sm) + var(--space-xs) * 0.75);
color: var(--text-muted);
background: var(--card);
padding: 2px 8px;
border-radius: var(--radius-sm);
}
.activity-feed-list {
display: flex;
flex-direction: column;
gap: var(--space-sm);
}
.activity-feed-item {
display: flex;
gap: var(--space-md);
padding: var(--space-md);
background: var(--card);
border: 1px solid var(--border);
border-radius: var(--radius-md);
transition: background-color var(--transition-fast);
}
.activity-feed-item:hover {
background: var(--card-hover);
}
.activity-feed-icon {
display: flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
background: var(--surface);
border-radius: var(--radius-md);
flex-shrink: 0;
}
.activity-feed-content {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
gap: var(--space-xs);
}
.activity-feed-header {
display: flex;
align-items: center;
gap: var(--space-sm);
flex-wrap: wrap;
}
.activity-feed-type {
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
color: var(--text-muted);
}
.activity-feed-project-badge {
display: inline-flex;
align-items: center;
gap: var(--space-xs);
font-size: 11px;
color: var(--todo);
background: color-mix(in srgb, var(--todo) 10%, transparent);
padding: 2px 8px;
border-radius: var(--radius-sm);
}
.activity-feed-details {
display: flex;
flex-direction: column;
gap: 2px;
}
.activity-feed-task-id {
font-family: var(--font-mono);
font-size: 12px;
color: var(--text-muted);
}
.activity-feed-task-title {
font-size: 14px;
font-weight: 500;
color: var(--text);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.activity-feed-description {
font-size: 13px;
color: var(--text-muted);
line-height: 1.4;
}
.activity-feed-meta {
display: flex;
align-items: center;
gap: var(--space-sm);
margin-top: 2px;
}
.activity-feed-time {
font-size: 11px;
color: var(--text-dim);
}
/* Activity Feed States */
.activity-feed-loading {
display: flex;
align-items: center;
justify-content: center;
min-height: 200px;
}
.activity-feed-skeleton {
display: flex;
flex-direction: column;
gap: var(--space-md);
width: 100%;
}
.activity-feed-skeleton-item {
display: flex;
gap: var(--space-md);
padding: var(--space-md);
}
.activity-feed-skeleton-icon {
width: 32px;
height: 32px;
background: var(--border);
border-radius: var(--radius-md);
flex-shrink: 0;
animation: pulse 1.5s ease-in-out infinite;
}
.activity-feed-skeleton-content {
flex: 1;
display: flex;
flex-direction: column;
gap: var(--space-sm);
}
.activity-feed-skeleton-line {
height: 12px;
background: var(--border);
border-radius: var(--radius-sm);
animation: pulse 1.5s ease-in-out infinite;
}
.activity-feed-skeleton-line.short {
width: 60%;
}
.activity-feed-error {
display: flex;
align-items: center;
justify-content: center;
min-height: 200px;
padding: var(--space-xl);
}
.activity-feed-error-message {
display: flex;
flex-direction: column;
align-items: center;
gap: var(--space-md);
color: var(--color-error);
text-align: center;
}
.activity-feed-empty {
display: flex;
align-items: center;
justify-content: center;
min-height: 300px;
padding: var(--space-xl);
}
.activity-feed-empty-state {
display: flex;
flex-direction: column;
align-items: center;
gap: var(--space-md);
color: var(--text-muted);
text-align: center;
}
.activity-feed-empty-state p {
font-size: 15px;
font-weight: 500;
color: var(--text);
margin: 0;
}
.activity-feed-empty-hint {
font-size: 13px;
color: var(--text-dim);
max-width: 300px;
}