Skip to content

(CODUX-146) Add idle and return-life choreography - #2917

Merged
numnx merged 1 commit into
feature/CODUX-214-3d-chat-agentfrom
task/feature-codux-21-t04-codex-01e75cf0-mrg7or5n
Jul 11, 2026
Merged

(CODUX-146) Add idle and return-life choreography#2917
numnx merged 1 commit into
feature/CODUX-214-3d-chat-agentfrom
task/feature-codux-21-t04-codex-01e75cf0-mrg7or5n

Conversation

@numnx

@numnx numnx commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator

🧩 Task: Add idle and return-life choreography

Automated task PR opened by Code UX for T04.

📋 Summary

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

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 10:18:21 UTC
Finished 2026-07-11 10:27:04 UTC
Duration 8m 43s

📊 Token Usage

Metric Value
Input tokens 109,031
Cached input tokens 3,060,736
Output tokens 15,725
Total tokens 3,185,492
Invocations 1
Tool calls 43
Active time 8m 3s

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

✅ 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
Make the idle 3D Chat agent feel present through well-timed greetings, blinking and winks, dancing or singing cues, and page-return reactions without faking work activity.

## Scope
- `dashboard/src/v2/components/chat/cinematic/use-agent-mood.ts`: visibility, focus, idle decay, and micro-interaction state machine.
- `dashboard/src/v2/components/chat/cinematic/AgentAmbientEffects.tsx`: new decorative notes, cue labels, and transient ambient effects.
- `dashboard/src/v2/components/chat/cinematic/CinematicStage.tsx`: mount ambient effects and return-engagement handling.
- `tests/dashboard/v2/use-agent-mood.test.tsx`.
- `tests/dashboard/v2/agent-ambient-effects.test.tsx`: new focused component tests.

## Implementation Requirements
1. Add document visibility and window focus/pageshow handling so a greeting or welcome-back cue occurs only after the stage was hidden or idle for the configured threshold, with listener and timer cleanup on unmount.
2. Extend the existing idle scheduler with bounded, non-overlapping cues such as wink, dance, sing-with-notes, curious glance, and short greeting captions; expose decorative notes as non-semantic visuals while keeping the cue understandable in text.
3. Disable continuous ambient motion and transient cue timers when the Project Manager is sending, actively working, errored, or the user prefers reduced motion; retain static mood, caption, and status semantics in those cases.

## Constraints
- Idle choreography must never override Project Manager runtime truth or background-activity status.
- Do not autoplay audio or introduce a new animation library; use existing GSAP/CSS/motion-token conventions and the response animation prop from T03.
- Keep timers deterministic enough for fake-timer tests and avoid rapid live-region announcements.

## Verification
- Run `pnpm exec vitest run tests/dashboard/v2/use-agent-mood.test.tsx tests/dashboard/v2/agent-ambient-effects.test.tsx`.
- Run `pnpm run test:dashboard` and `pnpm run typecheck:dashboard`.
- Verify welcome-back, idle cue, active-work suppression, cleanup, keyboard accessibility, and reduced-motion cases.
🌿 Branch Info

Base: feature/CODUX-214-3d-chat-agent
Head: task/feature-codux-21-t04-codex-01e75cf0-mrg7or5n


🤖 Generated by Code UX

@numnx
numnx merged commit ad5d6c8 into feature/CODUX-214-3d-chat-agent Jul 11, 2026
20 checks passed
@numnx
numnx deleted the task/feature-codux-21-t04-codex-01e75cf0-mrg7or5n branch July 11, 2026 10:31
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