Merge origin/dev into dev

This commit is contained in:
Shantur Rathore
2026-03-03 22:57:43 +00:00
12 changed files with 1534 additions and 262 deletions

View File

@@ -11,37 +11,35 @@
.message-delete-mode-toolbar {
position: absolute;
right: 12px;
bottom: 12px;
display: flex;
left: 50%;
transform: translateX(-50%);
bottom: 1rem;
display: inline-flex;
flex-direction: column;
align-items: center;
gap: 8px;
padding: 6px;
background: color-mix(in oklab, var(--surface-secondary) 92%, var(--status-error-bg));
gap: 6px;
padding: 6px 10px;
/* Match other popups (dropdown-surface / panels) */
background-color: var(--surface-base);
border: 1px solid var(--border-base);
border-radius: 12px;
z-index: 50;
box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
box-shadow: var(--panel-shadow-strong);
width: max-content;
max-width: min(80vw, 560px);
}
/* Avoid covering the scroll-to-top/bottom floating buttons. */
.message-layout[data-scroll-buttons="1"] .message-delete-mode-toolbar {
bottom: 4.25rem;
.message-delete-mode-toolbar-row {
display: flex;
align-items: center;
justify-content: center;
gap: 6px;
}
.message-layout[data-scroll-buttons="2"] .message-delete-mode-toolbar {
bottom: 7.5rem;
}
/* When timeline is visible, pin the toolbar to the stream edge. */
.message-layout--with-timeline .message-delete-mode-toolbar {
right: calc(64px + 12px);
}
@media (max-width: 720px) {
.message-layout--with-timeline .message-delete-mode-toolbar {
right: calc(40px + 12px);
}
.message-delete-mode-token-group {
display: inline-flex;
align-items: center;
gap: 3px;
}
.message-delete-mode-count {
@@ -52,11 +50,38 @@
justify-content: center;
padding: 0 8px;
border-radius: 999px;
font-size: 12px;
font-size: 11px;
font-weight: 700;
color: var(--text-primary);
background: var(--surface-secondary);
border: 1px solid var(--border-base);
font-variant-numeric: tabular-nums;
color: var(--accent-primary);
background: color-mix(in oklab, var(--surface-base) 85%, var(--accent-primary));
border: 1px solid color-mix(in oklab, var(--accent-primary) 50%, transparent);
}
.message-delete-mode-count--before {
color: var(--text-muted);
background: color-mix(in oklab, var(--surface-base) 90%, var(--text-muted));
border-color: color-mix(in oklab, var(--text-muted) 30%, transparent);
}
.message-delete-mode-count--selection {
color: var(--status-error);
background: color-mix(in oklab, var(--surface-base) 85%, var(--status-error));
border-color: color-mix(in oklab, var(--status-error) 40%, transparent);
}
.message-delete-mode-count--after {
color: var(--status-success);
background: color-mix(in oklab, var(--surface-base) 85%, var(--status-success));
border-color: color-mix(in oklab, var(--status-success) 40%, transparent);
}
.message-delete-mode-arrow {
font-size: 14px;
font-weight: 700;
color: var(--text-muted);
line-height: 1;
user-select: none;
}
.message-delete-mode-button {
@@ -66,19 +91,142 @@
align-items: center;
justify-content: center;
background: transparent;
border: 1px solid var(--border-base);
border: 1px solid color-mix(in oklab, var(--accent-primary) 30%, transparent);
border-radius: 10px;
color: var(--text-muted);
transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
color: var(--text-secondary);
cursor: pointer;
transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.message-delete-mode-button:hover {
background-color: var(--surface-hover);
background-color: color-mix(in oklab, var(--accent-primary) 15%, transparent);
border-color: var(--accent-primary);
color: var(--accent-primary);
}
.message-delete-mode-button--delete {
color: var(--status-error);
border-color: color-mix(in oklab, var(--status-error) 30%, transparent);
}
.message-delete-mode-button--delete:hover {
background-color: var(--status-error-bg);
border-color: var(--status-error);
color: var(--status-error);
}
.message-delete-mode-button--cancel:hover {
background-color: color-mix(in oklab, var(--text-muted) 12%, transparent);
border-color: var(--text-muted);
color: var(--text-primary);
}
.message-delete-mode-button--menu {
color: var(--text-muted);
}
.message-delete-mode-button--menu:hover {
color: var(--text-primary);
}
.message-delete-mode-menu-container {
position: relative;
}
.message-delete-mode-menu {
right: 0;
bottom: calc(100% + 6px);
min-width: 150px;
width: max-content;
max-width: min(70vw, 220px);
padding: 2px 0;
}
.message-delete-mode-menu-divider {
height: 1px;
margin: 3px 0;
background-color: var(--border-base);
}
.message-delete-mode-menu-row {
display: flex;
flex-direction: column;
gap: 3px;
padding: 2px 8px 6px;
}
.message-delete-mode-menu-label {
font-size: 12px;
color: var(--text-muted);
text-align: center;
}
.message-delete-mode-menu-toggle {
display: inline-flex;
border-radius: 999px;
border: 1px solid var(--border-base);
background-color: var(--surface-secondary);
overflow: hidden;
width: 100%;
}
.message-delete-mode-menu-toggle-button {
padding: 2px 8px;
font-size: 12px;
color: var(--text-muted);
background: transparent;
border: none;
cursor: pointer;
transition: color 0.15s ease, background-color 0.15s ease;
}
.message-delete-mode-menu-toggle-button[data-mode="all"] {
flex: 0 0 auto;
min-width: 56px;
}
.message-delete-mode-menu-toggle-button[data-mode="tools"] {
flex: 1 1 auto;
}
.message-delete-mode-menu-toggle-button[data-active="true"] {
color: var(--text-primary);
background-color: color-mix(in oklab, var(--accent-primary) 18%, transparent);
}
.message-delete-mode-menu .dropdown-item {
width: calc(100% - 8px);
display: flex;
align-items: center;
justify-content: center;
margin: 0 4px;
padding: 3px 8px;
font-size: 12px;
border-radius: 6px;
}
.message-delete-mode-button:focus-visible {
outline: none;
box-shadow: 0 0 0 2px color-mix(in oklab, var(--accent-primary) 45%, transparent);
}
.message-delete-mode-hint-row {
display: flex;
align-items: center;
justify-content: center;
gap: 6px;
padding-top: 2px;
font-size: 10px;
color: var(--text-muted);
user-select: none;
flex-wrap: wrap;
}
.message-delete-mode-hint-text {
white-space: normal;
}
.message-delete-mode-hint-sep {
color: var(--text-muted);
user-select: none;
}

View File

@@ -6,6 +6,9 @@
min-height: 0;
flex: 1 1 auto;
position: relative;
/* Isolate stacking context so sidebar z-indices don't compete with
Portals (Command Palette, modals) that live at the body level. */
isolation: isolate;
}
.message-layout--with-timeline {
@@ -51,6 +54,8 @@
min-height: 0;
display: flex;
flex-direction: column;
position: relative;
z-index: 100;
}
@@ -67,11 +72,16 @@
gap: 0.35rem;
padding: 0.25rem;
overflow-y: auto;
overflow-x: visible;
border-radius: 8px;
background-color: var(--surface-base);
box-shadow: var(--panel-shadow);
}
.message-timeline--selection-active {
padding-bottom: 4rem;
}
.message-timeline::-webkit-scrollbar {
width: 5px;
}
@@ -97,6 +107,11 @@
text-transform: uppercase;
color: var(--text-primary);
transition: transform 0.15s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
overflow: hidden;
user-select: none;
-webkit-user-select: none;
touch-action: manipulation;
-webkit-touch-callout: none;
}
.message-timeline-segment[data-delete-hover="true"]::before {
@@ -259,3 +274,146 @@
.message-preview .message-item-base {
font-size: 0.85rem;
}
/* --- Selection & Histogram Ribs --- */
.message-timeline-segment-selected {
border-color: var(--accent-primary) !important;
background-color: color-mix(in oklab, var(--accent-primary) 25%, var(--surface-base)) !important;
box-shadow: 0 0 0 2px color-mix(in oklab, var(--accent-primary) 50%, transparent) inset !important;
color: var(--accent-primary) !important;
}
.message-timeline-segment-selected:hover,
.message-timeline-segment-selected:focus-visible {
background-color: color-mix(in oklab, var(--accent-primary) 35%, var(--surface-base)) !important;
color: var(--accent-primary) !important;
transform: none;
}
/* --- Group indicators: tools belong to the same message as their assistant --- */
/* Tool segments that are part of a group get a left accent border. */
.message-timeline-group-child {
border-left: 3px solid color-mix(in oklab, var(--accent-primary) 35%, transparent);
}
/* The assistant "parent" at the bottom of a tool group gets the same border. */
.message-timeline-group-parent {
border-left: 3px solid color-mix(in oklab, var(--accent-primary) 35%, transparent);
}
/* Extra spacing before the first tool in a group to separate from the
preceding user/assistant badge. */
.message-timeline-group-start {
margin-top: 0.35rem;
}
/* Subtle extra spacing after the group parent (assistant) to separate
from the next user badge below. Uses adjacent sibling targeting. */
.message-timeline-group-parent + .message-timeline-user,
.message-timeline-group-parent + .message-timeline-compaction {
margin-top: 0.35rem;
}
.message-timeline-container {
position: relative;
flex: 1 1 auto;
display: flex;
flex-direction: column;
min-height: 0;
}
.message-timeline-xray-overlay {
position: absolute;
inset: 0;
/* Extend the overlay box into the stream so ribs are not relying on
overflow-visible behavior (which is brittle around scroll containers). */
--xray-overhang: calc(var(--max-rib-width, 50vw) + 84px);
left: calc(-1 * var(--xray-overhang));
width: calc(100% + var(--xray-overhang));
overflow: hidden;
padding: 0.25rem;
pointer-events: none;
/* Above the scroll container background; still non-interactive. */
z-index: 2;
--xray-scroll-y: 0px;
}
.message-timeline-xray-overlay-inner {
position: absolute;
inset: 0;
transform: translateY(var(--xray-scroll-y));
will-change: transform;
}
.message-timeline-xray-rib {
position: absolute;
display: flex;
flex-direction: column;
align-items: flex-end;
gap: 1px;
transform: translate(-100%, -50%);
}
.message-timeline-xray-token-label {
position: absolute;
right: 100%;
top: 50%;
transform: translateY(-50%);
margin-right: 4px;
height: 1.5rem;
display: flex;
align-items: center;
font-size: 12px;
font-weight: 600;
font-variant-numeric: tabular-nums;
line-height: 1;
color: var(--text-primary);
background: var(--surface-base);
padding: 1px 5px;
border: 1px solid var(--border-base);
border-radius: 999px;
white-space: nowrap;
pointer-events: none;
user-select: none;
}
.message-timeline-relative-bar {
height: 5px;
width: calc(var(--segment-weight) * var(--max-rib-width, 50vw));
background-color: color-mix(
in srgb,
var(--status-success) calc(100% - var(--segment-weight) * 100%),
var(--status-error) calc(var(--segment-weight) * 100%)
);
border-radius: 3px 0 0 3px;
transition: width 0.3s ease, background-color 0.3s ease;
box-shadow: -2px 0 4px rgba(0, 0, 0, 0.25);
}
.message-timeline-absolute-bar {
height: 3px;
width: calc(var(--segment-weight) * var(--max-rib-width, 50vw));
background-color: var(--text-muted);
border-radius: 2px 0 0 2px;
transition: width 0.3s ease;
opacity: 0.5;
position: relative;
}
.message-timeline-absolute-bar-overflow {
opacity: 0.8;
}
.message-timeline-absolute-bar-overflow::before {
content: "";
position: absolute;
left: -1px;
top: -3px;
bottom: -3px;
width: 3px;
border-radius: 2px;
background: var(--status-error);
box-shadow: 0 0 6px 2px var(--status-error);
}