Skip to content

graff — a fast agentic coding harness in Zig: multi-provider, MCP, workflows, DGM evolution loop, TS/Python SDKs

Python

GUI: entrance + streaming motion for chat messages

Rach Pradhancf00a08a7025
diff --git a/gui/src/components/chat/ChatMessageRow.tsx b/gui/src/components/chat/ChatMessageRow.tsx
index 8a4469e7..d47abb06 100644
--- a/gui/src/components/chat/ChatMessageRow.tsx
+++ b/gui/src/components/chat/ChatMessageRow.tsx
@@ -33,7 +33,7 @@ function UserChatMessage({ text, workspacePath }: UserChatMessageProps) {
.filter((item): item is NonNullable<typeof item> => item != null);
return (
- <article className="flex w-full flex-col items-end gap-2 select-text">
+ <article className="cg-message-in flex w-full flex-col items-end gap-2 select-text">
{attachments.length > 0 ? (
<AttachmentTray
attachments={attachments}
@@ -62,7 +62,7 @@ function MarkdownChatMessage({
<article className="max-w-3xl">
<ChatMarkdown
text={text}
- className={toneClassName}
+ className={`cg-stream-in ${toneClassName ?? ""}`}
workspacePath={workspacePath}
/>
</article>
diff --git a/gui/src/styles/index.css b/gui/src/styles/index.css
index 063bd18e..f4c1d276 100644
--- a/gui/src/styles/index.css
+++ b/gui/src/styles/index.css
@@ -670,3 +670,46 @@
> .dv-sash::after {
background: rgb(255 255 255 / 5%);
}
+
+/* --- Chat entrance + streaming motion (transitions.dev-style easings) --- */
+
+/* Message slides up + fades in as it lands in the thread. */
+@keyframes cg-message-in {
+ from {
+ opacity: 0;
+ transform: translateY(12px);
+ }
+ to {
+ opacity: 1;
+ transform: translateY(0);
+ }
+}
+
+.cg-message-in {
+ /* easeOutExpo — a soft, fast-settling deceleration */
+ animation: cg-message-in 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
+}
+
+/* Streaming assistant text: each freshly rendered block fades up gently so the
+ answer "flows in" rather than snapping token-by-token. */
+@keyframes cg-stream-in {
+ from {
+ opacity: 0;
+ transform: translateY(4px);
+ }
+ to {
+ opacity: 1;
+ transform: translateY(0);
+ }
+}
+
+.cg-stream-in > * {
+ animation: cg-stream-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .cg-message-in,
+ .cg-stream-in > * {
+ animation: none;
+ }
+}