[codex] improve client thermal efficiency and trace reporting#135
Draft
[codex] improve client thermal efficiency and trace reporting#135
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR reduces browser-side thermal load and duplicate client work in production canvas sessions, and strengthens observability artifacts for showcase validation.
User Impact / Problem
On
https://present.best/canvas, renderer CPU/GPU usage was significantly higher than expected for server-centric canvas operations. In production traces, we also saw noisy proof artifacts that were hard to reconcile with UI behavior.Root Cause
CrowdPulseWidgetcreated its own camera + MediaPipe hand tracker loop in the browser, with RAF-driven wakeups.missingTraceOnTrackedTasksgate vs displayed chips).What Changed
LiveKit / Canvas parity
publishLocalMediaandautoRequestAgentoptions in LiveKit hook stack:src/components/ui/livekit/hooks/useLivekitConnection.tssrc/components/ui/livekit/hooks/useLkAgentRequest.tssrc/components/ui/livekit/hooks/useLkToken.tssrc/components/ui/livekit/hooks/utils/lk-connect.tsCanvasParityAutopilotnow:Crowd Pulse sensor runtime
src/components/ui/productivity/crowd-pulse-sensor.tssrc/components/ui/productivity/crowd-pulse-widget.tsx480x270),Showcase / observability artifacts
scripts/observability/render-agent-trace-html.mjsagent-trace.htmland persistagentTraceHtmlpath:scripts/observability/playwright-voice-showcase-loop.mjsscripts/observability/replay-trace-canvas.mjsagentReadyin result,executingas dispatch evidence fallback,executingandmissingTraceOnTrackedTasksin HTML chips.Backward Compatibility
Validation
npm run typechecknpm test -- src/components/ui/productivity/__tests__/crowd-pulse-widget.test.tsx src/components/ui/productivity/__tests__/crowd-pulse-hand-utils.test.ts src/lib/agents/subagents/canvas-steward.test.ts src/lib/agents/conductor/__tests__/router-execute-task.test.tsnode --check scripts/observability/playwright-voice-showcase-loop.mjsnode --check scripts/observability/replay-trace-canvas.mjsnode --check scripts/observability/render-agent-trace-html.mjsnpm run lint(passes with existing repo-wide warnings; no new lint blocker introduced)Reviewer Lanes
Reviewer A (correctness/perf/regression)
Findings:
Resolution:
missingTraceOnTrackedTasks,executing) to trace HTML.Reviewer B (maintainability/architecture)
Findings:
Resolution:
Evidence Artifacts
Local artifacts generated during verification:
test-results/observability-showcase/showcase-1772098808024-8bafb2b7/de05d54b1fa6bca4cda3d34f0b78f3ab.webmtest-results/observability-showcase/showcase-1772098808024-8bafb2b7/agent-trace.htmltest-results/observability-showcase/showcase-1772098808024-8bafb2b7/result.json_zodfairy retries):test-results/observability-showcase/showcase-1772098936151-328aed0d/result.jsontest-results/observability-showcase/showcase-1772099129654-da496d40/result.jsonRemaining Risks / Follow-ups
fairy.intent_zodfailures in some runs, causing retries and partial shape fulfillment in those sessions. This PR improves thermal efficiency and observability, but does not fully remediate that upstream fairy pipeline instability.