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>
640 lines
13 KiB
CSS
640 lines
13 KiB
CSS
/* ── Chat View ─────────────────────────────────────────────────────────────── */
|
|
|
|
.chat-view {
|
|
display: flex;
|
|
height: 100%;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* Sidebar */
|
|
.chat-sidebar {
|
|
width: 280px;
|
|
min-width: 280px;
|
|
border-right: 1px solid var(--border);
|
|
display: flex;
|
|
flex-direction: column;
|
|
background: var(--bg-secondary);
|
|
}
|
|
|
|
.chat-sidebar--hidden {
|
|
display: none;
|
|
}
|
|
|
|
.chat-sidebar-header {
|
|
padding: 12px;
|
|
display: flex;
|
|
gap: 8px;
|
|
align-items: center;
|
|
}
|
|
|
|
.chat-sidebar-search-wrapper {
|
|
position: relative;
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.chat-sidebar-search-icon {
|
|
position: absolute;
|
|
left: 12px;
|
|
color: var(--text-tertiary);
|
|
pointer-events: none;
|
|
}
|
|
|
|
.chat-sidebar-search {
|
|
width: 100%;
|
|
padding: 8px 12px 8px 32px;
|
|
border: 1px solid var(--border);
|
|
border-radius: 8px;
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
font-size: 13px;
|
|
}
|
|
|
|
.chat-session-list {
|
|
flex: 1;
|
|
min-height: 0;
|
|
overflow-y: auto;
|
|
padding: 4px 8px;
|
|
}
|
|
|
|
.chat-session-item {
|
|
padding: 10px 12px;
|
|
border-radius: 8px;
|
|
cursor: pointer;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 2px;
|
|
transition: background 0.15s;
|
|
position: relative;
|
|
}
|
|
|
|
.chat-session-item:hover {
|
|
background: var(--hover);
|
|
}
|
|
|
|
.chat-session-item--active {
|
|
background: var(--accent-bg, var(--hover));
|
|
}
|
|
|
|
.chat-session-title {
|
|
font-weight: 500;
|
|
font-size: 14px;
|
|
color: var(--text);
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.chat-session-preview {
|
|
font-size: 12px;
|
|
color: var(--text-secondary);
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.chat-session-meta {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
font-size: 11px;
|
|
color: var(--text-tertiary);
|
|
}
|
|
|
|
/* === Chat Session Delete Button === */
|
|
.chat-session-delete-btn {
|
|
position: absolute;
|
|
top: 8px;
|
|
right: 8px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 24px;
|
|
height: 24px;
|
|
padding: 0;
|
|
background: transparent;
|
|
border: none;
|
|
border-radius: var(--radius-sm);
|
|
color: var(--text-muted);
|
|
cursor: pointer;
|
|
opacity: 0;
|
|
transition: opacity var(--transition-fast), color var(--transition-fast);
|
|
}
|
|
|
|
.chat-session-item:hover .chat-session-delete-btn {
|
|
opacity: 1;
|
|
}
|
|
|
|
.chat-session-delete-btn:hover {
|
|
color: var(--color-error);
|
|
opacity: 1;
|
|
}
|
|
|
|
.chat-session-delete-btn:focus {
|
|
opacity: 1;
|
|
outline: 2px solid var(--focus-ring-strong);
|
|
outline-offset: 1px;
|
|
}
|
|
|
|
/* Context menu for session items */
|
|
.chat-session-context-menu {
|
|
position: fixed;
|
|
background: var(--bg-elevated, var(--bg));
|
|
border: 1px solid var(--border);
|
|
border-radius: 8px;
|
|
box-shadow: 0 4px 12px var(--shadow);
|
|
padding: 4px;
|
|
z-index: 100;
|
|
}
|
|
|
|
.chat-session-context-menu button {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
width: 100%;
|
|
padding: 8px 12px;
|
|
border: none;
|
|
background: none;
|
|
color: var(--text);
|
|
cursor: pointer;
|
|
border-radius: 4px;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.chat-session-context-menu button:hover {
|
|
background: var(--hover);
|
|
}
|
|
|
|
/* Main chat thread */
|
|
.chat-thread {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-width: 0;
|
|
min-height: 0;
|
|
}
|
|
|
|
.chat-thread-header {
|
|
padding: 12px 16px;
|
|
border-bottom: 1px solid var(--border);
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.chat-thread-header-title {
|
|
font-weight: 600;
|
|
font-size: 15px;
|
|
}
|
|
|
|
/* Messages */
|
|
.chat-messages {
|
|
flex: 1;
|
|
min-height: 0;
|
|
overflow-y: auto;
|
|
padding: 16px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 12px;
|
|
}
|
|
|
|
.chat-message {
|
|
max-width: 75%;
|
|
padding: 10px 14px;
|
|
border-radius: 12px;
|
|
font-size: 14px;
|
|
line-height: 1.5;
|
|
word-break: break-word;
|
|
}
|
|
|
|
.chat-message--user {
|
|
align-self: flex-end;
|
|
background: var(--accent);
|
|
color: var(--accent-text, #fff);
|
|
border-bottom-right-radius: 4px;
|
|
}
|
|
|
|
.chat-message--assistant {
|
|
align-self: flex-start;
|
|
background: var(--bg-elevated, var(--bg-secondary));
|
|
color: var(--text);
|
|
border-bottom-left-radius: 4px;
|
|
}
|
|
|
|
.chat-message-avatar {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
margin-bottom: 4px;
|
|
font-size: 12px;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.chat-model-tag {
|
|
font-size: 11px;
|
|
padding: 1px 6px;
|
|
border-radius: 4px;
|
|
background: var(--surface-bg, rgba(255, 255, 255, 0.08));
|
|
color: var(--text-secondary);
|
|
margin-left: 6px;
|
|
white-space: nowrap;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.chat-message-content {
|
|
white-space: pre-wrap;
|
|
}
|
|
|
|
.chat-message-time {
|
|
font-size: 11px;
|
|
color: var(--text-tertiary);
|
|
margin-top: 4px;
|
|
}
|
|
|
|
.chat-message-thinking {
|
|
margin-top: 6px;
|
|
}
|
|
|
|
.chat-message-thinking summary {
|
|
font-size: 12px;
|
|
color: var(--text-secondary);
|
|
cursor: pointer;
|
|
}
|
|
|
|
.chat-message-thinking-content {
|
|
font-size: 13px;
|
|
color: var(--text-secondary);
|
|
padding: 8px;
|
|
background: var(--bg);
|
|
border-radius: 6px;
|
|
margin-top: 4px;
|
|
white-space: pre-wrap;
|
|
font-family: var(--font-mono, monospace);
|
|
overflow-x: auto;
|
|
}
|
|
|
|
/* === Chat Tool Calls === */
|
|
.chat-tool-calls {
|
|
margin-top: var(--space-sm);
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-xs);
|
|
}
|
|
|
|
.chat-tool-calls-header {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: var(--space-xs);
|
|
color: var(--text-muted);
|
|
font-size: var(--space-md);
|
|
}
|
|
|
|
.chat-tool-call {
|
|
border: var(--btn-border-width, 1px) solid color-mix(in srgb, var(--border) 85%, transparent);
|
|
border-radius: var(--radius-sm);
|
|
background: color-mix(in srgb, var(--surface) 35%, transparent);
|
|
}
|
|
|
|
.chat-tool-call summary {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-xs);
|
|
list-style: none;
|
|
cursor: pointer;
|
|
padding: var(--space-xs) var(--space-sm);
|
|
color: var(--text-muted);
|
|
border-radius: var(--radius-sm);
|
|
font-size: var(--space-md);
|
|
min-width: 0;
|
|
}
|
|
|
|
.chat-tool-call summary::marker {
|
|
content: "";
|
|
}
|
|
|
|
.chat-tool-call summary::-webkit-details-marker {
|
|
display: none;
|
|
}
|
|
|
|
.chat-tool-call summary:focus-visible {
|
|
outline: none;
|
|
box-shadow: var(--focus-ring-strong);
|
|
}
|
|
|
|
.chat-tool-call-status-dot {
|
|
width: calc((var(--space-xs) + var(--space-sm)) / 2);
|
|
height: calc((var(--space-xs) + var(--space-sm)) / 2);
|
|
border-radius: 50%;
|
|
background: var(--color-success);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.chat-tool-call-name {
|
|
font-family: var(--font-mono, monospace);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.chat-tool-call-preview {
|
|
color: var(--text-muted);
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
flex: 1;
|
|
min-width: 0;
|
|
font-size: 0.6875rem;
|
|
}
|
|
|
|
.chat-tool-call-status-text {
|
|
margin-left: auto;
|
|
font-size: 0.6875rem;
|
|
text-transform: lowercase;
|
|
}
|
|
|
|
.chat-tool-call-content {
|
|
margin: var(--space-xs) var(--space-sm) var(--space-sm);
|
|
padding: var(--space-sm);
|
|
border-radius: var(--radius-sm);
|
|
background: var(--bg);
|
|
font-family: var(--font-mono, monospace);
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-xs);
|
|
}
|
|
|
|
.chat-tool-call-row {
|
|
display: grid;
|
|
grid-template-columns: auto 1fr;
|
|
gap: var(--space-xs);
|
|
align-items: start;
|
|
}
|
|
|
|
.chat-tool-call-label {
|
|
color: var(--text-muted);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.04em;
|
|
font-size: 0.6875rem;
|
|
}
|
|
|
|
.chat-tool-call-value {
|
|
color: var(--text);
|
|
word-break: break-word;
|
|
white-space: pre-wrap;
|
|
}
|
|
|
|
.chat-tool-call--running .chat-tool-call-status-dot {
|
|
background: var(--color-info);
|
|
animation: tool-call-pulse var(--transition-slow) infinite;
|
|
}
|
|
|
|
.chat-tool-call--error summary {
|
|
color: var(--color-error);
|
|
}
|
|
|
|
.chat-tool-call--error .chat-tool-call-status-dot {
|
|
background: var(--color-error);
|
|
}
|
|
|
|
.chat-tool-call-row--error {
|
|
background: color-mix(in srgb, var(--color-error) 10%, transparent);
|
|
border-radius: var(--radius-sm);
|
|
padding: var(--space-xs);
|
|
}
|
|
|
|
.chat-tool-calls--compact .chat-tool-calls-header,
|
|
.chat-tool-calls--compact .chat-tool-call summary,
|
|
.chat-tool-calls--compact .chat-tool-call-content,
|
|
.chat-tool-calls--compact .chat-tool-call-preview,
|
|
.chat-tool-calls--compact .chat-tool-call-value {
|
|
font-size: 0.6875rem;
|
|
}
|
|
|
|
@keyframes tool-call-pulse {
|
|
0%,
|
|
100% {
|
|
opacity: 1;
|
|
}
|
|
50% {
|
|
opacity: 0.4;
|
|
}
|
|
}
|
|
|
|
/* Streaming indicator */
|
|
.chat-message--streaming {
|
|
align-self: flex-start;
|
|
background: var(--bg-elevated, var(--bg-secondary));
|
|
color: var(--text);
|
|
border-bottom-left-radius: 4px;
|
|
opacity: 0.9;
|
|
}
|
|
|
|
.chat-typing-indicator {
|
|
display: inline-flex;
|
|
gap: 4px;
|
|
padding: 4px 0;
|
|
}
|
|
|
|
.chat-typing-indicator span {
|
|
width: 6px;
|
|
height: 6px;
|
|
border-radius: 50%;
|
|
background: var(--text-secondary);
|
|
animation: chat-typing-bounce 1.4s infinite ease-in-out;
|
|
}
|
|
|
|
.chat-typing-indicator span:nth-child(1) { animation-delay: 0s; }
|
|
.chat-typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
|
|
.chat-typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
|
|
|
|
@keyframes chat-typing-bounce {
|
|
0%, 80%, 100% { opacity: 0.3; }
|
|
40% { opacity: 1; }
|
|
}
|
|
|
|
/* Chat waiting state */
|
|
.chat-message-content--waiting {
|
|
color: var(--text-muted);
|
|
font-style: italic;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.quick-chat-panel-waiting {
|
|
color: var(--text-muted) !important;
|
|
font-style: italic;
|
|
}
|
|
|
|
/* Input area */
|
|
.chat-input-area {
|
|
position: relative;
|
|
padding: 12px 16px;
|
|
border-top: 1px solid var(--border);
|
|
display: flex;
|
|
align-items: flex-end;
|
|
gap: 8px;
|
|
}
|
|
|
|
/* === Chat Skill Menu === */
|
|
.chat-skill-menu {
|
|
position: absolute;
|
|
left: var(--space-lg);
|
|
bottom: calc(100% + var(--space-xs));
|
|
min-width: calc((var(--space-xl) * 10) + var(--space-2xl) + (var(--space-xs) * 2));
|
|
max-width: calc(100% - (var(--space-lg) * 2));
|
|
max-height: calc(var(--space-xl) * 10);
|
|
overflow-y: auto;
|
|
background: var(--surface);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-md);
|
|
box-shadow: var(--shadow-lg);
|
|
z-index: 50;
|
|
}
|
|
|
|
.chat-skill-menu-item {
|
|
width: 100%;
|
|
border: none;
|
|
background: transparent;
|
|
color: inherit;
|
|
text-align: left;
|
|
padding: var(--space-sm) var(--space-md);
|
|
cursor: pointer;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-xs);
|
|
transition: background var(--transition-fast);
|
|
}
|
|
|
|
.chat-skill-menu-item:hover,
|
|
.chat-skill-menu-item--highlighted {
|
|
background: var(--card-hover);
|
|
}
|
|
|
|
.chat-skill-menu-item:focus-visible {
|
|
outline: none;
|
|
box-shadow: var(--focus-ring-strong);
|
|
background: var(--card-hover);
|
|
}
|
|
|
|
.chat-skill-menu-item-name {
|
|
font-size: 0.8125rem;
|
|
color: var(--text);
|
|
font-family: var(--font-mono);
|
|
}
|
|
|
|
.chat-skill-menu-item-description {
|
|
font-size: 0.75rem;
|
|
color: var(--text-muted);
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
max-width: calc((var(--space-xl) * 10) + var(--space-lg) + var(--space-xs));
|
|
}
|
|
|
|
.chat-skill-menu-empty {
|
|
padding: var(--space-sm) var(--space-md);
|
|
color: var(--text-muted);
|
|
font-size: 0.8125rem;
|
|
}
|
|
|
|
.chat-input-textarea {
|
|
flex: 1;
|
|
resize: none;
|
|
border: 1px solid var(--border);
|
|
border-radius: 12px;
|
|
padding: 10px 14px;
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
font-size: 14px;
|
|
font-family: inherit;
|
|
line-height: 1.4;
|
|
max-height: 120px;
|
|
min-height: 40px;
|
|
}
|
|
|
|
.chat-input-textarea:focus {
|
|
outline: none;
|
|
border-color: var(--accent);
|
|
}
|
|
|
|
.chat-input-send {
|
|
width: 36px;
|
|
height: 36px;
|
|
border-radius: 50%;
|
|
border: none;
|
|
background: var(--accent);
|
|
color: var(--accent-text, #fff);
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.chat-input-send:disabled {
|
|
opacity: 0.4;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.chat-input-stop {
|
|
width: calc(var(--space-xl) * 2);
|
|
height: calc(var(--space-xl) * 2);
|
|
border-radius: var(--radius-md);
|
|
border: none;
|
|
background: color-mix(in srgb, var(--color-error) 15%, transparent);
|
|
color: var(--color-error);
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
flex-shrink: 0;
|
|
transition: background var(--transition-fast), transform var(--transition-fast), color var(--transition-fast);
|
|
}
|
|
|
|
.chat-input-stop:hover {
|
|
background: color-mix(in srgb, var(--color-error) 25%, transparent);
|
|
}
|
|
|
|
.chat-input-stop:focus-visible {
|
|
outline: none;
|
|
box-shadow: var(--focus-ring-strong);
|
|
}
|
|
|
|
.chat-input-stop:active {
|
|
transform: scale(0.97);
|
|
}
|
|
|
|
/* === Chat Pending Message === */
|
|
.chat-pending-message {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-sm);
|
|
margin-top: var(--space-xs);
|
|
padding: var(--space-xs) var(--space-sm);
|
|
border-radius: var(--radius-sm);
|
|
background: color-mix(in srgb, var(--todo) 10%, transparent);
|
|
color: var(--text-muted);
|
|
font-size: 12px;
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.chat-pending-message span {
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.chat-pending-message-dismiss {
|
|
background: none;
|
|
border: none;
|
|
color: var(--text-dim);
|
|
cursor: pointer;
|
|
padding: var(--space-xs);
|
|
line-height: 1;
|
|
flex-shrink: 0;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.chat-pending-message-dismiss:hover {
|
|
color: var(--text-muted);
|
|
}
|
|
|