Mohamed Boudra 6ba5c466a1 Add timestamp behavior E2E tests and verify bug is fixed
WHAT:
- Added initializeAgent() and clearAgentAttention() methods to DaemonClient
  (packages/server/src/server/test-utils/daemon-client.ts:268-304)
- Added E2E tests for timestamp behavior
  (packages/server/src/server/daemon.e2e.test.ts:482-570):
  - "opening agent without interaction does not update timestamp"
  - "sending message DOES update timestamp"

RESULT:
Bug verified as already fixed in commit 32e111e (Dec 2, 2025) which removed
timestamp thrashing - previously lastActivityAt/updatedAt was updated on
every agent_stream event (15+ times/second during streaming).

Server only sets agent.updatedAt in:
- recordUserMessage (agent-manager.ts:436)
- handleStreamEvent (agent-manager.ts:864)
NOT in clearAgentAttention or initializeAgent flows.

EVIDENCE:
- npm run test --workspace=@paseo/server -- daemon.e2e.test.ts -t "timestamp"
  (2 passed in 9.08s)
- Playwright test showed agent stayed in position 4 with unchanged timestamp
  after clicking

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 17:42:33 +07:00
2025-12-25 11:31:56 +07:00
Description
Languages
TypeScript 98.1%
JavaScript 1.3%
Shell 0.1%
Swift 0.1%