@zyro-sec/session-ui 0.0.0-stage → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +25 -0
- package/bunfig.toml +2 -0
- package/component-tests/basic-tool.fixture.tsx +46 -0
- package/component-tests/basic-tool.spec.ts +63 -0
- package/component-tests/file-media.fixture.tsx +39 -0
- package/component-tests/file-media.spec.ts +13 -0
- package/component-tests/file-tool.spec.ts +62 -0
- package/component-tests/file-viewer.fixture.tsx +109 -0
- package/component-tests/file-viewer.spec.ts +134 -0
- package/component-tests/file.spec.ts +33 -0
- package/component-tests/line-comment-v2.spec.ts +15 -0
- package/component-tests/markdown-code-wrap.spec.ts +94 -0
- package/component-tests/markdown-readiness.spec.ts +95 -0
- package/component-tests/markdown.fixture.tsx +104 -0
- package/component-tests/markdown.spec.ts +1564 -0
- package/component-tests/mermaid-preview.spec.ts +43 -0
- package/component-tests/patch-group.spec.ts +79 -0
- package/component-tests/read-group.spec.ts +72 -0
- package/component-tests/read-image.fixture.tsx +66 -0
- package/component-tests/read-image.spec.ts +154 -0
- package/component-tests/session-compaction.spec.ts +254 -0
- package/component-tests/session-lifecycle.spec.ts +190 -0
- package/component-tests/session-message-projection.spec.ts +639 -0
- package/component-tests/session-notice-projection.spec.ts +20 -0
- package/component-tests/session-review-comments.spec.ts +179 -0
- package/component-tests/session-shell.spec.ts +93 -0
- package/component-tests/session-timeline-mobile.spec.ts +201 -0
- package/component-tests/session-timeline-notices.spec.ts +38 -0
- package/component-tests/session-timeline-reasoning.spec.ts +107 -0
- package/component-tests/session-timeline.spec.ts +157 -0
- package/component-tests/session-tool-projection.spec.ts +323 -0
- package/component-tests/text-lifecycle.fixture.tsx +26 -0
- package/component-tests/text-lifecycle.spec.ts +42 -0
- package/component-tests/timeline-subagent-rows.spec.ts +33 -0
- package/component-tests/tool-disclosure.spec.ts +48 -0
- package/component-tests/tool-group-sticky.spec.ts +37 -0
- package/component-tests/tool-group.spec.ts +290 -0
- package/component-tests/tool-status-title.fixture.tsx +22 -0
- package/component-tests/tool-status-title.spec.ts +30 -0
- package/component-tests/user-message-quotes.spec.ts +111 -0
- package/package.json +91 -4
- package/playwright.components.config.ts +4 -0
- package/playwright.local.config.ts +2 -0
- package/src/actions.ts +54 -0
- package/src/components/apply-patch-file.ts +122 -0
- package/src/components/basic-tool.css +487 -0
- package/src/components/basic-tool.tsx +258 -0
- package/src/components/copy-machine.ts +78 -0
- package/src/components/copy.ts +85 -0
- package/src/components/diagram-preview.tsx +28 -0
- package/src/components/disclosure-machine.ts +188 -0
- package/src/components/disclosure.ts +129 -0
- package/src/components/dock-prompt.stories.tsx +73 -0
- package/src/components/dock-prompt.tsx +29 -0
- package/src/components/file-comment-selection.tsx +146 -0
- package/src/components/file-media-machine.ts +165 -0
- package/src/components/file-media.stories.tsx +112 -0
- package/src/components/file-media.tsx +323 -0
- package/src/components/file-search.tsx +73 -0
- package/src/components/file.css +59 -0
- package/src/components/file.tsx +1300 -0
- package/src/components/image-preview.tsx +35 -0
- package/src/components/line-comment-annotations.tsx +580 -0
- package/src/components/line-comment-machine.ts +262 -0
- package/src/components/line-comment-styles.ts +293 -0
- package/src/components/line-comment.stories.tsx +152 -0
- package/src/components/line-comment.tsx +448 -0
- package/src/components/link-segments.ts +20 -0
- package/src/components/linked-text.tsx +21 -0
- package/src/components/markdown-cache-machine.ts +257 -0
- package/src/components/markdown-cache.tsx +556 -0
- package/src/components/markdown-clipboard.ts +101 -0
- package/src/components/markdown-code-machine.ts +200 -0
- package/src/components/markdown-code-state.ts +22 -0
- package/src/components/markdown-fragment-links.ts +74 -0
- package/src/components/markdown-github.svg +3 -0
- package/src/components/markdown-globe.svg +5 -0
- package/src/components/markdown-image-machine.ts +170 -0
- package/src/components/markdown-image.ts +156 -0
- package/src/components/markdown-inline-code-kind.ts +39 -0
- package/src/components/markdown-mermaid.ts +18 -0
- package/src/components/markdown-phase-machine.ts +102 -0
- package/src/components/markdown-projection.ts +13 -0
- package/src/components/markdown-session-links.ts +183 -0
- package/src/components/markdown-solid.test.tsx +92 -0
- package/src/components/markdown-solid.tsx +113 -0
- package/src/components/markdown-stream.ts +95 -0
- package/src/components/markdown-worker-machine.ts +516 -0
- package/src/components/markdown-worker-protocol.ts +73 -0
- package/src/components/markdown-worker.ts +250 -0
- package/src/components/markdown.css +672 -0
- package/src/components/markdown.stories.tsx +199 -0
- package/src/components/markdown.tsx +1612 -0
- package/src/components/markdown.worker.ts +188 -0
- package/src/components/message-file.ts +102 -0
- package/src/components/message-nav.css +134 -0
- package/src/components/message-nav.tsx +159 -0
- package/src/components/message-part.css +2109 -0
- package/src/components/message-part.tsx +3 -0
- package/src/components/question-prompt-experimental.css +576 -0
- package/src/components/question-prompt.css +527 -0
- package/src/components/quote-highlight.css +59 -0
- package/src/components/review-focus-driver.ts +142 -0
- package/src/components/review-focus-machine.ts +95 -0
- package/src/components/session-compaction.css +270 -0
- package/src/components/session-diff.ts +358 -0
- package/src/components/session-error.tsx +41 -0
- package/src/components/session-retry.tsx +92 -0
- package/src/components/session-review-machine.ts +241 -0
- package/src/components/session-review.css +264 -0
- package/src/components/session-review.stories.tsx +232 -0
- package/src/components/session-review.tsx +733 -0
- package/src/components/session-turn.css +282 -0
- package/src/components/shell-submessage.css +24 -0
- package/src/components/timeline-separator.tsx +69 -0
- package/src/components/tool-count-label.css +57 -0
- package/src/components/tool-count-label.tsx +76 -0
- package/src/components/tool-count-summary.css +102 -0
- package/src/components/tool-count-summary.stories.tsx +99 -0
- package/src/components/tool-count-summary.tsx +44 -0
- package/src/components/tool-error-card.css +178 -0
- package/src/components/tool-error-card.stories.tsx +113 -0
- package/src/components/tool-error-card.tsx +202 -0
- package/src/components/tool-status-title-machine.ts +128 -0
- package/src/components/tool-status-title.css +89 -0
- package/src/components/tool-status-title.tsx +163 -0
- package/src/context/data.tsx +107 -0
- package/src/context/index.ts +1 -0
- package/src/context/markdown.tsx +129 -0
- package/src/context/sources.tsx +34 -0
- package/src/document.ts +8 -0
- package/src/file-presentation.ts +34 -0
- package/src/message/action-machine.ts +72 -0
- package/src/message/agent-label.ts +3 -0
- package/src/message/attachment-card.css +119 -0
- package/src/message/attachment-card.tsx +40 -0
- package/src/message/attachment-media-machine.ts +213 -0
- package/src/message/comment-card.tsx +155 -0
- package/src/message/compaction-entrance-machine.ts +93 -0
- package/src/message/current-message.tsx +157 -0
- package/src/message/current-tool-state.ts +161 -0
- package/src/message/message-content.tsx +1391 -0
- package/src/message/paced-text-machine.ts +73 -0
- package/src/message/prompt-message.stories.tsx +149 -0
- package/src/message/relative-time.ts +45 -0
- package/src/message/user-message-quote-parts.ts +16 -0
- package/src/message/user-message-quotes.stories.tsx +797 -0
- package/src/message/user-message-quotes.tsx +135 -0
- package/src/pierre/comment-hover-machine.ts +53 -0
- package/src/pierre/comment-hover.ts +131 -0
- package/src/pierre/comment-selection-machine.ts +257 -0
- package/src/pierre/commented-lines.ts +106 -0
- package/src/pierre/diff-selection.ts +91 -0
- package/src/pierre/file-find-machine.ts +323 -0
- package/src/pierre/file-find.ts +537 -0
- package/src/pierre/file-runtime.ts +42 -0
- package/src/pierre/file-selection.ts +140 -0
- package/src/pierre/index.ts +344 -0
- package/src/pierre/media.ts +140 -0
- package/src/pierre/render-machine.ts +381 -0
- package/src/pierre/selection-bridge.ts +82 -0
- package/src/pierre/selection-machine.ts +198 -0
- package/src/pierre/virtualizer.ts +114 -0
- package/src/pierre/worker.ts +46 -0
- package/src/sources/experiment.ts +59 -0
- package/src/sources/site-icon.tsx +53 -0
- package/src/sources/sources-chip.tsx +57 -0
- package/src/sources/sources-expand-machine.ts +101 -0
- package/src/sources/sources-panel.tsx +249 -0
- package/src/sources/sources-title.tsx +21 -0
- package/src/sources/sources.css +266 -0
- package/src/sources/sources.ts +141 -0
- package/src/storybook/current-session-fixtures.ts +1492 -0
- package/src/storybook/current-session-scenarios.ts +76 -0
- package/src/storybook/current-session-story.tsx +154 -0
- package/src/storybook/index.ts +43 -0
- package/src/styles/index.css +19 -0
- package/src/timeline/__snapshots__/group-labels.test.ts.snap +110 -0
- package/src/timeline/__snapshots__/placement.test.ts.snap +1041 -0
- package/src/timeline/code-blocks.stories.tsx +105 -0
- package/src/timeline/commentary.stories.tsx +70 -0
- package/src/timeline/commentary.ts +38 -0
- package/src/timeline/detail.ts +111 -0
- package/src/timeline/error-card.stories.tsx +134 -0
- package/src/timeline/error-spacing.stories.tsx +71 -0
- package/src/timeline/facts.ts +493 -0
- package/src/timeline/file-changes.stories.tsx +436 -0
- package/src/timeline/group-label-fixtures.ts +97 -0
- package/src/timeline/mermaid.stories.tsx +131 -0
- package/src/timeline/place.ts +280 -0
- package/src/timeline/placement-fixtures.ts +365 -0
- package/src/timeline/placement-reactivity.ts +133 -0
- package/src/timeline/projection.ts +1261 -0
- package/src/timeline/research-and-agents.stories.tsx +461 -0
- package/src/timeline/session-timeline-row.tsx +1675 -0
- package/src/timeline/session-timeline.tsx +68 -0
- package/src/timeline/steer-arrival-machine.ts +134 -0
- package/src/timeline/terminal-work.stories.tsx +464 -0
- package/src/timeline/timeline-row.stories.tsx +1069 -0
- package/src/timeline/timeline-row.ts +238 -0
- package/src/timeline/turn-phase-machine.ts +112 -0
- package/src/timeline/user-message-fold.stories.tsx +194 -0
- package/src/timeline/user-runs.ts +87 -0
- package/src/timeline-next/__snapshots__/placement.test.ts.snap +990 -0
- package/src/timeline-next/compaction.tsx +236 -0
- package/src/timeline-next/errors.ts +101 -0
- package/src/timeline-next/event-row.tsx +168 -0
- package/src/timeline-next/events.ts +103 -0
- package/src/timeline-next/index.ts +10 -0
- package/src/timeline-next/nested-rail.ts +125 -0
- package/src/timeline-next/projection.ts +1028 -0
- package/src/timeline-next/row.tsx +1728 -0
- package/src/timeline-next/rules.ts +89 -0
- package/src/timeline-next/separator.tsx +73 -0
- package/src/timeline-next/spacing.ts +127 -0
- package/src/timeline-next/status-line.tsx +41 -0
- package/src/timeline-next/status.ts +33 -0
- package/src/timeline-next/stories/compare-renderer.stories.tsx +190 -0
- package/src/timeline-next/stories/compare-sessions/.gitignore +3 -0
- package/src/timeline-next/stories/compare.stories.tsx +486 -0
- package/src/timeline-next/stories/playground.stories.tsx +297 -0
- package/src/timeline-next/stories/session-replay.ts +1156 -0
- package/src/timeline-next/stories/session-timeline.tsx +50 -0
- package/src/timeline-next/stories/subagent-status.stories.tsx +132 -0
- package/src/timeline-next/timeline-next.css +649 -0
- package/src/timeline-next/tools/__snapshots__/activity-label.test.ts.snap +39 -0
- package/src/timeline-next/tools/activity-label.ts +166 -0
- package/src/timeline-next/tools/assistant-content.tsx +84 -0
- package/src/timeline-next/tools/context-group.tsx +619 -0
- package/src/timeline-next/tools/error-card.tsx +147 -0
- package/src/timeline-next/tools/explore.tsx +119 -0
- package/src/timeline-next/tools/file-group.tsx +128 -0
- package/src/timeline-next/tools/patch.tsx +174 -0
- package/src/timeline-next/tools/shell.tsx +186 -0
- package/src/timeline-next/tools/thought.tsx +87 -0
- package/src/timeline-next/tools/tool-display.tsx +119 -0
- package/src/tools/ansi.ts +8 -0
- package/src/tools/context-group-label.ts +123 -0
- package/src/tools/file-runs.ts +35 -0
- package/src/tools/project-path.ts +18 -0
- package/src/tools/read-group.stories.tsx +159 -0
- package/src/tools/run-machine.ts +185 -0
- package/src/tools/shell-output-machine.ts +233 -0
- package/src/tools/shell-output.ts +91 -0
- package/src/tools/subagent-row-variants.stories.tsx +129 -0
- package/src/tools/tool-group.stories.tsx +345 -0
- package/src/tools/tool-renderer.tsx +2876 -0
- package/src/v2/components/line-comment-annotations-v2.tsx +215 -0
- package/src/v2/components/session-file-panel-v2.tsx +149 -0
- package/src/v2/components/session-progress-indicator-v2.css +5 -0
- package/src/v2/components/session-progress-indicator-v2.stories.tsx +86 -0
- package/src/v2/components/session-progress-indicator-v2.tsx +16 -0
- package/src/v2/components/session-review-empty-changes-v2.tsx +17 -0
- package/src/v2/components/session-review-empty-no-git-v2.tsx +28 -0
- package/src/v2/components/session-review-file-preview-v2-virtualize.ts +5 -0
- package/src/v2/components/session-review-file-preview-v2.tsx +266 -0
- package/src/v2/components/session-review-v2.css +653 -0
- package/src/v2/components/session-review-v2.tsx +422 -0
- package/src/v2/components/sidebar-presence-machine.ts +69 -0
- package/tsconfig.json +20 -0
- package/README.md +0 -3
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
export const REVIEW_FOCUS_TIMEOUT_MS = 2000
|
|
2
|
+
|
|
3
|
+
/** A parent's request to reveal one saved comment. `attempt` grows with each new target, so a late result or acknowledgement of an older target is ignored. */
|
|
4
|
+
export type ReviewFocusState =
|
|
5
|
+
| { readonly status: "idle"; readonly attempt: number }
|
|
6
|
+
| { readonly status: "revealing"; readonly attempt: number; readonly file: string; readonly commentId: string }
|
|
7
|
+
| {
|
|
8
|
+
readonly status: "settled"
|
|
9
|
+
readonly attempt: number
|
|
10
|
+
readonly file: string
|
|
11
|
+
readonly commentId: string
|
|
12
|
+
readonly outcome: "revealed" | "unavailable" | "timeout"
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type ReviewFocusEvent =
|
|
16
|
+
| { readonly type: "focus.requested"; readonly file: string; readonly commentId: string; readonly available: boolean }
|
|
17
|
+
| { readonly type: "focus.cleared" }
|
|
18
|
+
| { readonly type: "reveal.succeeded"; readonly attempt: number }
|
|
19
|
+
| { readonly type: "reveal.timed-out"; readonly attempt: number }
|
|
20
|
+
| { readonly type: "disposed" }
|
|
21
|
+
|
|
22
|
+
export type ReviewFocusEffect =
|
|
23
|
+
| { readonly type: "cancel-reveal" }
|
|
24
|
+
| { readonly type: "open-comment"; readonly file: string; readonly commentId: string }
|
|
25
|
+
| { readonly type: "expand-file"; readonly file: string }
|
|
26
|
+
| { readonly type: "reveal"; readonly attempt: number }
|
|
27
|
+
| { readonly type: "acknowledge"; readonly attempt: number; readonly deferred: boolean }
|
|
28
|
+
|
|
29
|
+
export type ReviewFocusTransition = {
|
|
30
|
+
readonly state: ReviewFocusState
|
|
31
|
+
readonly effects: readonly ReviewFocusEffect[]
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export const INITIAL_REVIEW_FOCUS_STATE: ReviewFocusState = Object.freeze({ status: "idle", attempt: 0 })
|
|
35
|
+
|
|
36
|
+
const CANCEL_REVEAL: ReviewFocusEffect = Object.freeze({ type: "cancel-reveal" })
|
|
37
|
+
|
|
38
|
+
const NO_EFFECTS: readonly ReviewFocusEffect[] = Object.freeze([])
|
|
39
|
+
|
|
40
|
+
export function transitionReviewFocus(state: ReviewFocusState, event: ReviewFocusEvent): ReviewFocusTransition {
|
|
41
|
+
if (event.type === "focus.requested") {
|
|
42
|
+
// A parent that sets the same target again, before it clears the request, does not restart the reveal.
|
|
43
|
+
if (state.status !== "idle" && state.file === event.file && state.commentId === event.commentId)
|
|
44
|
+
return { state, effects: NO_EFFECTS }
|
|
45
|
+
|
|
46
|
+
const attempt = state.attempt + 1
|
|
47
|
+
const cancel = state.status === "idle" ? [] : [CANCEL_REVEAL]
|
|
48
|
+
const target = { attempt, file: event.file, commentId: event.commentId }
|
|
49
|
+
|
|
50
|
+
if (!event.available)
|
|
51
|
+
return {
|
|
52
|
+
state: { status: "settled", ...target, outcome: "unavailable" },
|
|
53
|
+
effects: [...cancel, { type: "acknowledge", attempt, deferred: true }],
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return {
|
|
57
|
+
state: { status: "revealing", ...target },
|
|
58
|
+
effects: [
|
|
59
|
+
...cancel,
|
|
60
|
+
{ type: "open-comment", file: event.file, commentId: event.commentId },
|
|
61
|
+
{ type: "expand-file", file: event.file },
|
|
62
|
+
{ type: "reveal", attempt },
|
|
63
|
+
],
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (event.type === "focus.cleared" || event.type === "disposed") {
|
|
68
|
+
if (state.status === "idle") return { state, effects: NO_EFFECTS }
|
|
69
|
+
|
|
70
|
+
return { state: { status: "idle", attempt: state.attempt }, effects: [CANCEL_REVEAL] }
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (state.status !== "revealing" || event.attempt !== state.attempt) return { state, effects: NO_EFFECTS }
|
|
74
|
+
|
|
75
|
+
if (event.type === "reveal.succeeded")
|
|
76
|
+
return {
|
|
77
|
+
state: { ...state, status: "settled", outcome: "revealed" },
|
|
78
|
+
effects: [
|
|
79
|
+
CANCEL_REVEAL,
|
|
80
|
+
// The comment may have arrived after the request, so open it again now that it rendered.
|
|
81
|
+
{ type: "open-comment", file: state.file, commentId: state.commentId },
|
|
82
|
+
{ type: "acknowledge", attempt: state.attempt, deferred: false },
|
|
83
|
+
],
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
return {
|
|
87
|
+
state: { ...state, status: "settled", outcome: "timeout" },
|
|
88
|
+
effects: [CANCEL_REVEAL, { type: "acknowledge", attempt: state.attempt, deferred: false }],
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/** The file a reveal keeps mounted while it waits for the comment to render. */
|
|
93
|
+
export function reviewFocusPinnedFile(state: ReviewFocusState) {
|
|
94
|
+
return state.status === "revealing" ? state.file : undefined
|
|
95
|
+
}
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
/* The quiet automatic compaction divider. Every state keeps the same box: only opacity, transforms, a light blur and
|
|
2
|
+
the light's position move, so the timeline never shifts. */
|
|
3
|
+
[data-component="session-compaction-message"][data-quiet] {
|
|
4
|
+
--session-compaction-delay: 0ms;
|
|
5
|
+
--session-compaction-cycle: 3.2s;
|
|
6
|
+
|
|
7
|
+
&[data-enter="grace"] {
|
|
8
|
+
--session-compaction-delay: 400ms;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
&[data-enter] [data-slot="session-compaction-divider"] {
|
|
12
|
+
animation: session-compaction-fade 320ms ease-out var(--session-compaction-delay) both;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/* Its own name restarts the fade when a compaction ends inside the grace, and nothing inside transitions, so only
|
|
16
|
+
Compacted appears. */
|
|
17
|
+
&[data-enter="now"] {
|
|
18
|
+
[data-slot="session-compaction-divider"] {
|
|
19
|
+
animation-name: session-compaction-enter;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
[data-slot="session-compaction-line"]::before,
|
|
23
|
+
[data-slot="session-compaction-light"],
|
|
24
|
+
[data-slot="session-compaction-running"],
|
|
25
|
+
[data-slot="session-compaction-done"],
|
|
26
|
+
[data-slot="session-compaction-glint-stem"],
|
|
27
|
+
[data-slot="session-compaction-glint-ending"] {
|
|
28
|
+
transition: none;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
[data-slot="session-compaction-divider"] {
|
|
33
|
+
padding: 0;
|
|
34
|
+
border: 0;
|
|
35
|
+
border-radius: 6px;
|
|
36
|
+
background: none;
|
|
37
|
+
font: inherit;
|
|
38
|
+
cursor: pointer;
|
|
39
|
+
|
|
40
|
+
&:disabled {
|
|
41
|
+
cursor: default;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&:focus-visible {
|
|
45
|
+
outline: 2px solid var(--v2-border-border-focus);
|
|
46
|
+
outline-offset: 2px;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
[data-slot="session-compaction-line"] {
|
|
51
|
+
position: relative;
|
|
52
|
+
overflow: hidden;
|
|
53
|
+
|
|
54
|
+
&[data-side="end"] {
|
|
55
|
+
transform: scaleX(-1);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&::before {
|
|
59
|
+
content: "";
|
|
60
|
+
position: absolute;
|
|
61
|
+
inset: 0;
|
|
62
|
+
background: var(--v2-border-border-strong);
|
|
63
|
+
opacity: 0.6;
|
|
64
|
+
transition: opacity 360ms ease-out;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/* Each light starts at the outer end and travels to the label. Its brightest point reaches the line's end at 49.5% of
|
|
69
|
+
the cycle, where it starts to cool as it slides off. */
|
|
70
|
+
[data-slot="session-compaction-light"] {
|
|
71
|
+
position: absolute;
|
|
72
|
+
inset: 0;
|
|
73
|
+
transition:
|
|
74
|
+
opacity 360ms ease-out,
|
|
75
|
+
display 360ms allow-discrete;
|
|
76
|
+
|
|
77
|
+
&::after {
|
|
78
|
+
content: "";
|
|
79
|
+
position: absolute;
|
|
80
|
+
inset-block: 0;
|
|
81
|
+
left: 0;
|
|
82
|
+
width: 40%;
|
|
83
|
+
background: linear-gradient(
|
|
84
|
+
90deg,
|
|
85
|
+
transparent,
|
|
86
|
+
color-mix(in srgb, var(--v2-text-text-muted) 55%, transparent) 65%,
|
|
87
|
+
transparent
|
|
88
|
+
);
|
|
89
|
+
animation: session-compaction-gather var(--session-compaction-cycle) linear var(--session-compaction-delay)
|
|
90
|
+
infinite backwards;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/* The label is one word, so it changes colour as one. Its parts inherit that colour and never transition their own,
|
|
95
|
+
which would trail behind it. */
|
|
96
|
+
[data-slot="session-compaction-label"] {
|
|
97
|
+
transition: color 150ms ease-out;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
[data-slot="session-compaction-ending"] > span {
|
|
101
|
+
grid-area: 1 / 1;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/* Only the ending changes when the compaction ends: ing rolls up and out, then ed rolls up into its place. The
|
|
105
|
+
ending's box fits the wider of the two, so the stem and lines hold still. */
|
|
106
|
+
[data-slot="session-compaction-running"],
|
|
107
|
+
[data-slot="session-compaction-glint-ending"] {
|
|
108
|
+
transition:
|
|
109
|
+
opacity 200ms cubic-bezier(0.4, 0, 1, 1),
|
|
110
|
+
transform 200ms cubic-bezier(0.4, 0, 1, 1),
|
|
111
|
+
filter 200ms cubic-bezier(0.4, 0, 1, 1);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
[data-slot="session-compaction-done"] {
|
|
115
|
+
opacity: 0;
|
|
116
|
+
transform: translateY(3px);
|
|
117
|
+
filter: blur(2px);
|
|
118
|
+
transition:
|
|
119
|
+
opacity 280ms cubic-bezier(0.2, 0.8, 0.2, 1) 80ms,
|
|
120
|
+
transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1) 80ms,
|
|
121
|
+
filter 280ms cubic-bezier(0.2, 0.8, 0.2, 1) 80ms;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/* The label warms only once each light lands on it, then cools before the next one arrives. */
|
|
125
|
+
[data-slot="session-compaction-glint"] {
|
|
126
|
+
position: absolute;
|
|
127
|
+
inset: 0;
|
|
128
|
+
display: flex;
|
|
129
|
+
pointer-events: none;
|
|
130
|
+
color: var(--v2-text-text-muted);
|
|
131
|
+
opacity: 0;
|
|
132
|
+
animation: session-compaction-glint var(--session-compaction-cycle) linear var(--session-compaction-delay) infinite
|
|
133
|
+
backwards;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
[data-slot="session-compaction-glint-stem"] {
|
|
137
|
+
transition: opacity 200ms ease-out;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
[data-state="done"] {
|
|
141
|
+
[data-slot="session-compaction-line"]::before {
|
|
142
|
+
opacity: 1;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
[data-slot="session-compaction-light"] {
|
|
146
|
+
display: none;
|
|
147
|
+
opacity: 0;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
[data-slot="session-compaction-running"],
|
|
151
|
+
[data-slot="session-compaction-glint-ending"] {
|
|
152
|
+
opacity: 0;
|
|
153
|
+
transform: translateY(-3px);
|
|
154
|
+
filter: blur(2px);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
[data-slot="session-compaction-glint"] {
|
|
158
|
+
animation-play-state: paused;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
[data-slot="session-compaction-glint-stem"] {
|
|
162
|
+
opacity: 0;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
[data-slot="session-compaction-done"] {
|
|
166
|
+
opacity: 1;
|
|
167
|
+
transform: none;
|
|
168
|
+
filter: none;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
&[aria-expanded="true"] [data-slot="session-compaction-label"] {
|
|
172
|
+
color: var(--v2-text-text-muted);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/* A tap leaves :hover behind, which would keep a closed divider looking open. */
|
|
176
|
+
@media (hover: hover) {
|
|
177
|
+
&:not(:disabled):hover [data-slot="session-compaction-label"] {
|
|
178
|
+
color: var(--v2-text-text-muted);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/* The summary is reference material, so its body sits a step quieter than the conversation around it. */
|
|
184
|
+
[data-slot="session-compaction-summary"] {
|
|
185
|
+
padding-bottom: 8px;
|
|
186
|
+
animation: session-compaction-fade 200ms ease-out both;
|
|
187
|
+
|
|
188
|
+
[data-component="markdown"] {
|
|
189
|
+
color: var(--v2-text-text-muted);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
@media (prefers-reduced-motion: reduce) {
|
|
194
|
+
[data-slot="session-compaction-line"]::before {
|
|
195
|
+
opacity: 1;
|
|
196
|
+
transition: none;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
[data-slot="session-compaction-light"],
|
|
200
|
+
[data-slot="session-compaction-glint"] {
|
|
201
|
+
display: none;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
&[data-enter] [data-slot="session-compaction-divider"] {
|
|
205
|
+
animation-duration: 200ms;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
[data-slot="session-compaction-running"],
|
|
209
|
+
[data-state="done"] [data-slot="session-compaction-running"],
|
|
210
|
+
[data-slot="session-compaction-done"] {
|
|
211
|
+
transform: none;
|
|
212
|
+
filter: none;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
:dir(rtl) [data-component="session-compaction-message"][data-quiet] [data-slot="session-compaction-line"] {
|
|
218
|
+
transform: scaleX(-1);
|
|
219
|
+
|
|
220
|
+
&[data-side="end"] {
|
|
221
|
+
transform: none;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
@keyframes session-compaction-fade {
|
|
226
|
+
from {
|
|
227
|
+
opacity: 0;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
@keyframes session-compaction-enter {
|
|
232
|
+
from {
|
|
233
|
+
opacity: 0;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/* Travel runs 0–70% on one ease-in-out, so the light never stops or jumps. Opacity has its own keyframes: it fades up
|
|
238
|
+
early, holds, and cools from the moment the light reaches the label. */
|
|
239
|
+
@keyframes session-compaction-gather {
|
|
240
|
+
0% {
|
|
241
|
+
transform: translateX(-100%);
|
|
242
|
+
opacity: 0;
|
|
243
|
+
animation-timing-function: cubic-bezier(0.4, 0, 0.6, 1);
|
|
244
|
+
}
|
|
245
|
+
14%,
|
|
246
|
+
49.5% {
|
|
247
|
+
opacity: 1;
|
|
248
|
+
}
|
|
249
|
+
70%,
|
|
250
|
+
100% {
|
|
251
|
+
transform: translateX(250%);
|
|
252
|
+
opacity: 0;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
@keyframes session-compaction-glint {
|
|
257
|
+
0%,
|
|
258
|
+
49% {
|
|
259
|
+
opacity: 0;
|
|
260
|
+
animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
|
|
261
|
+
}
|
|
262
|
+
57% {
|
|
263
|
+
opacity: 0.75;
|
|
264
|
+
animation-timing-function: cubic-bezier(0.4, 0, 0.6, 1);
|
|
265
|
+
}
|
|
266
|
+
82%,
|
|
267
|
+
100% {
|
|
268
|
+
opacity: 0;
|
|
269
|
+
}
|
|
270
|
+
}
|