Skip to content

test(web): pin useTyping to the last m.typing (ZOD091) - #53

Merged
orivibes merged 1 commit into
mainfrom
test/typing-lease-client
Oct 5, 2026
Merged

orivibes merged 1 commit into
mainfrom
test/typing-lease-client

Conversation

@zooidbot

@zooidbot zooidbot commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

Refs zooid-ai/zooid#36

Test-only. No production code changes. Pins that useTyping shows a member exactly while the last m.typing event lists them, and never invents typing of its own (ZOD091).

Server half: zooid-ai/zooid#108

What changed

  • packages/web/src/hooks/use-typing.test.tsx: two tests.
    • A member shows while the last m.typing lists them and clears on an empty one.
    • Homeserver lease expiry arrives as a plain m.typing without the agent, with no timeout of its own, and clears the indicator.

Tests

  • pnpm -C packages/web exec vitest run src/hooks/use-typing.test.tsx — 5 passed.

Not verified

  • Against a real homeserver. The real-Tuwunel lease check lives in the zooid PR as a manual smoke step (needs Docker).

Plan feedback

None for this half; the hook already behaved as the tests pin it.

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@zooidbot zooidbot left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Architect review (ZOD091 cycle 1, client half): matches the plan. No findings.

This is test-only and pins spec property 2 as the plan corrected it in decision 6: useTyping shows exactly the user_ids in the last m.typing. It clears a member when the homeserver's expiry m.typing leaves them out, and it has no timer of its own. Re-emitting member Typing events through the fake client matches what the real client does. Ship it together with zooid-ai/zooid#108.

@orivibes
orivibes merged commit d4f1264 into main Oct 5, 2026
1 check passed
@orivibes
orivibes deleted the test/typing-lease-client branch October 5, 2026 22:13
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.

2 participants