Skip to content

(CODUX-146) Render per-response emotions and animations - #2909

Merged
numnx merged 1 commit into
feature/CODUX-214-3d-chat-agentfrom
task/feature-codux-21-t03-codex-3990c00a-mrg6tts9
Jul 11, 2026
Merged

(CODUX-146) Render per-response emotions and animations#2909
numnx merged 1 commit into
feature/CODUX-214-3d-chat-agentfrom
task/feature-codux-21-t03-codex-3990c00a-mrg6tts9

Conversation

@numnx

@numnx numnx commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator

🧩 Task: Render per-response emotions and animations

Automated task PR opened by Code UX for T03.

📋 Summary

Sprint: Sprint 214 · 3d Chat Agent · Task: T03

Make the 3D Chat agent truthful, expressive, stable, and richly interactive by separating project-manager activity from background work, adding validated response emotions and animations, improving idle/resume life, refining animated tools, and documenting the complete runtime contract.

🤖 Model & Provider

Provider Codex CLI
Model gpt-5.6-sol

⏱️ Timing

Started 2026-07-11 09:54:19 UTC
Finished 2026-07-11 10:00:41 UTC
Duration 6m 22s

📊 Token Usage

Metric Value
Input tokens 152,104
Cached input tokens 2,724,096
Output tokens 13,487
Total tokens 2,889,687
Invocations 1
Tool calls 34
Active time 5m 51s

Included usage estimate (subscription/local login): $2.53

✅ QA Review

⏳ QA review runs after this PR is opened. Check the task card in the dashboard for the outcome once it lands.

📝 Full Task Prompt
## Objective
Render the latest Project Manager response’s validated `agentEffect` as a transient stage emotion, animation, caption, or `codeux:agent` cue without replacing the normal chat transcript.

## Scope
- `dashboard/src/v2/lib/agent-response-effects.ts`: pure effect normalization and fence extraction helpers.
- `dashboard/src/v2/components/chat/cinematic/CinematicStage.tsx`: latest-response effect resolution and stage integration.
- `dashboard/src/v2/components/chat/cinematic/StageWidgets.tsx`: `codeux:agent` segment support while preserving malformed fences as markdown.
- `dashboard/src/v2/components/agents/AgentAvatarScene.tsx`: optional animation prop and animation choreography entry point.
- `dashboard/src/v2/components/agents/LazyAgentAvatarScene.tsx`: pass-through typing and reduced-motion fallback behavior.
- `tests/dashboard/v2/agent-response-effects.test.ts`.
- `tests/dashboard/v2/stage-widgets.test.tsx`.

## Implementation Requirements
1. Normalize effects from assistant metadata and `codeux:agent` JSON fences using the same supported-value bounds as the backend; ignore malformed values and preserve unknown fences as ordinary markdown.
2. Add an optional animation prop to the lazy and WebGL avatar boundaries and map supported animation identifiers to existing expression/choreography primitives, including a static semantic fallback when reduced motion is active.
3. Apply effects only to the latest agent response in the cinematic stage, with precedence of error and active Project Manager runtime state over response effect over idle micro-expression; keep markdown, widgets, timestamps, and Threads rendering unchanged.

## Constraints
- Do not trust arbitrary provider strings as CSS classes, DOM attributes, Three.js operations, or unbounded timers.
- Do not make response effects control runtime truth or suppress errors, pending states, or accessibility labels.
- Keep all response effects optional and backward compatible with messages that have no metadata.

## Verification
- Run `pnpm exec vitest run tests/dashboard/v2/agent-response-effects.test.ts tests/dashboard/v2/stage-widgets.test.tsx`.
- Run `pnpm run typecheck:dashboard` and `pnpm run build`.
- Verify valid effects animate the latest stage response, malformed effects fall back safely, and reduced-motion users receive an understandable static cue.
🌿 Branch Info

Base: feature/CODUX-214-3d-chat-agent
Head: task/feature-codux-21-t03-codex-3990c00a-mrg6tts9


🤖 Generated by Code UX

@numnx
numnx merged commit 84e612a into feature/CODUX-214-3d-chat-agent Jul 11, 2026
20 checks passed
@numnx
numnx deleted the task/feature-codux-21-t03-codex-3990c00a-mrg6tts9 branch July 11, 2026 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant