feat(webui): inspect file context in a live graph sidebar (#6562)

* feat(webui): inspect file context in a live graph sidebar

* refactor(webui): place preview controls in the shared sidebar header

* fix(webui): synchronize npm lockfile for graph dependencies

* fix(webui): preserve compacted context and refine graph inspection

* fix(context): harden provenance, request usage, and drawer lifecycle

* fix(webui): align source skeleton and browser fixtures

* perf(context): reuse source analysis and capture request graphs once

* perf(webui): compact graph history and render graph motion on canvas

* fix(webui): remove redundant context sidebar header

* style(webui): clarify context replay icon

* perf(webui): pace context replay on an adaptive timeline

* feat(webui): briefly reveal labels for new context nodes

* fix(webui): reveal new labels only for loaded context files

* fix(webui): restart graph animation clock after idle

* fix(webui): reveal labels when replay reverses node exit

* refactor(context): project file-use facts without retention tracking

* refactor(context): observe file reads outside agent execution

* fix(webui): animate context sidebar closing

* refactor(context): remove unused graph and usage panel code

* refactor(context): isolate prompt observation from execution metadata

* fix(webui): clarify cache rate and show context token usage

* fix(webui): abbreviate context token counts in thousands

* fix(webui): omit token unit from context usage details

* fix(webui): restore large source preview highlighting and panel elevation

* fix(webui): distinguish modifier scrolling from keyboard focus

* fix(webui): align preview tab and panel corner radii

* fix(webui): attach file tabs to the header divider

* fix(webui): use one action to toggle file preview mode

* fix(webui): use hover hint for context replay

* fix(webui): share composer layout between graph and file sidebars

* fix(webui): align sidebar bottom with composer surface

* fix(webui): restore mobile graph drawing and touch file details

* test(webui): align legacy cache assertions with current label

* perf(context): retain source analysis and bound graph animation work

* style(webui): add light elevation to user messages

* test(webui): await lazy graph scene before replay assertions

* fix(webui): align preview skeleton and browser contracts
This commit is contained in:
chengyongru authored and GitHub committed 2026-11-05 17:09:20 +08:00
1 parent 2b44088413
commit 519ed81132
132 files changed
+4673 -1159

No files matched your search

+61 -7
View File
@@ -855,9 +855,32 @@
.thread-preview-layout {
container: thread-preview-layout / inline-size;
}
.context-expanded-overlay[data-state="open"] {
animation: context-backdrop-in 250ms ease-out;
}
.context-expanded-overlay[data-state="closed"] {
animation: context-backdrop-in 250ms ease-out reverse;
}
@keyframes context-backdrop-in {
from { opacity: 0; backdrop-filter: blur(0); }
to { opacity: 1; backdrop-filter: blur(12px); }
}
@media (prefers-reduced-motion: reduce) {
.context-expanded-overlay { animation: none !important; }
}
/* Sidebars share the full pane height with a local conversation composer. */
.workbench-composer-footer:not(:has([data-active-composer])) {
display: none;
}
/* A split needs 420px for the conversation plus 360px for the preview.
Narrow workbench panes use the same contained overlay as a phone. */
@container thread-preview-layout (min-width: 780px) {
/* A replacement owns the slot while the outgoing surface fades over it. */
.thread-preview-layout:has(> .file-preview-pane:not([data-closing])) > .file-preview-pane[data-closing] {
position: absolute;
width: var(--file-preview-width);
z-index: 30;
}
.file-preview-pane {
position: relative;
z-index: auto;
@@ -866,7 +889,8 @@
flex-shrink: 0;
}
.file-preview-content {
width: var(--file-preview-width);
width: calc(var(--file-preview-width) - 1rem);
bottom: var(--sidebar-bottom-inset, calc(1.125rem + env(safe-area-inset-bottom)));
padding-bottom: 0;
}
.file-preview-resize {
@@ -879,6 +903,27 @@
visibility: hidden;
}
}
@media (max-width: 639px) {
.context-drawer-backdrop {
animation: context-drawer-backdrop-in 150ms cubic-bezier(0.2, 0, 0, 1);
transition: background-color 150ms cubic-bezier(0.2, 0, 0, 1), backdrop-filter 150ms cubic-bezier(0.2, 0, 0, 1);
}
.context-drawer-backdrop:has(.context-drawer-panel[data-state="closed"]) {
animation: none;
background-color: transparent;
backdrop-filter: blur(0px);
}
}
@keyframes context-drawer-backdrop-in {
from { background-color: transparent; backdrop-filter: blur(0px); }
to { background-color: rgb(0 0 0 / 0.25); backdrop-filter: blur(8px); }
}
@media (prefers-reduced-motion: reduce) {
.context-drawer-backdrop { animation: none; transition: none; }
}
.thread-preview-layout:has(.context-drawer-panel) > .thread-conversation {
visibility: visible;
}
.thread-preview-layout[data-preview-open] > .thread-conversation {
--thread-header-position: relative;
}
@@ -947,9 +992,8 @@
display: inline;
}
/* Markdown tables wrap cell text to fit the conversation column. The
renderer's overflow-x:auto wrapper remains a fallback for content that
cannot shrink. */
/* Markdown table cells retain whole-word minimum widths. The renderer's
overflow-x:auto wrapper contains tables wider than the preview or chat. */
.thread-viewport-scrollbar {
overflow-x: hidden;
@@ -1184,16 +1228,25 @@
}
}
.thread-composer-surface {
.thread-composer-surface,
.context-inspector-surface,
.user-message-surface,
.side-panel-surface {
--composer-shadow-color: 240 10% 16%;
--tw-shadow: inset 0 0 0 1px hsl(var(--border) / 0.75), 0 4px 18px -8px hsl(var(--composer-shadow-color) / 0.12);
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}
.thread-composer-surface {
transition: var(--theme-paint-transition, background-color 160ms ease-out, box-shadow 160ms ease-out), opacity 160ms ease-out;
container-name: thread-composer;
container-type: inline-size;
}
.dark .thread-composer-surface {
.dark .thread-composer-surface,
.dark .context-inspector-surface,
.dark .user-message-surface,
.dark .side-panel-surface {
--composer-shadow-color: 240 12% 3%;
}
@@ -1202,8 +1255,9 @@
}
@media (forced-colors: active) {
.thread-composer-surface { outline: 1px solid CanvasText; }
.thread-composer-surface, .context-inspector-surface, .user-message-surface, .side-panel-surface { outline: 1px solid CanvasText; }
.thread-composer-surface:focus-within { outline: 2px solid Highlight; }
[data-keyboard-focus] { outline: 2px solid Highlight; outline-offset: -2px; }
}
.thread-composer-footer-actions {