fix(web): move chat metrics into top-bar information panel
This commit is contained in:
+54
-10
@@ -494,15 +494,62 @@ button.chat-star.starred { color: var(--color-accent); }
|
||||
.chat-compaction-break { flex-basis: 100%; height: 0; }
|
||||
.chat-compaction-status { color: var(--accent); }
|
||||
|
||||
/* Native usage snapshots sit outside the transcript scroller. Streaming stats
|
||||
patch only this rail, never the focused composer or its selection. */
|
||||
/* Usage is opt-in behind the top-right Info control, never a permanent rail
|
||||
taking height from mobile conversations. Native updates patch only its dl. */
|
||||
.chat-usage-info-button {
|
||||
flex: none;
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
min-width: 44px;
|
||||
padding: 0;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.chat-usage-info-icon {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 19px;
|
||||
height: 19px;
|
||||
border: 1.5px solid currentColor;
|
||||
border-radius: 50%;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
line-height: 1;
|
||||
}
|
||||
.chat-usage-info-overlay { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, 0.18); }
|
||||
.chat-usage-info-panel {
|
||||
--chat-info-y: clamp(12px, var(--chat-info-top, 72px), max(12px, calc(100dvh - 180px)));
|
||||
position: absolute;
|
||||
top: var(--chat-info-y);
|
||||
right: 12px;
|
||||
width: min(360px, calc(100vw - 24px));
|
||||
max-height: calc(100dvh - 12px - var(--chat-info-y));
|
||||
overflow-y: auto;
|
||||
overscroll-behavior: contain;
|
||||
padding: 16px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius-card);
|
||||
background: var(--surface-2);
|
||||
box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
.chat-usage-info-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
|
||||
.chat-usage-info-heading h2 { margin: 0; font-size: 15px; }
|
||||
.chat-usage-info-close { min-height: 44px; }
|
||||
.chat-usage-info-note { margin: 14px 0 0; font-size: 12px; line-height: 1.5; }
|
||||
@media (max-width: 600px) {
|
||||
.chat-bar:has(.chat-load-older):has(.chat-approval-jump) { flex-wrap: wrap; }
|
||||
.chat-bar:has(.chat-load-older):has(.chat-approval-jump) .chat-bar-lead { order: 1; flex-basis: calc(100% - 44px - var(--space-s)); }
|
||||
.chat-bar:has(.chat-load-older):has(.chat-approval-jump) .chat-usage-info-button { order: 2; }
|
||||
.chat-bar:has(.chat-load-older):has(.chat-approval-jump) .chat-load-older { order: 3; }
|
||||
.chat-bar:has(.chat-load-older):has(.chat-approval-jump) .chat-approval-jump { order: 4; }
|
||||
}
|
||||
.chat-usage-metrics {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||
gap: 8px 16px;
|
||||
margin: 0 0 10px;
|
||||
padding: 6px 2px 10px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 14px 16px;
|
||||
margin: 0;
|
||||
}
|
||||
.chat-usage-metric { min-width: 0; }
|
||||
.chat-usage-metric dt { color: var(--muted); font-size: 11px; }
|
||||
@@ -514,9 +561,6 @@ button.chat-star.starred { color: var(--color-accent); }
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.chat-usage-metric[data-available="false"] dd { color: var(--muted); }
|
||||
@media (max-width: 600px) {
|
||||
.chat-usage-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
||||
}
|
||||
|
||||
.chat-jump { position: absolute; right: 14px; bottom: 14px; border-color: var(--accent); color: var(--accent); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user