gitdataai/libs/api/room
ZhenYi 09645d8641 fix: resolve multiple bugs across backend and frontend
Security fixes:
- Remove WS token from plaintext log output (ws_universal.rs)
- Replace weak LCG PRNG with rand::thread_rng() for access key generation
- Add project membership check to issue triage endpoint (prevent unauthorized AI usage)
- Validate deepLinkUrl to prevent javascript: navigation (XSS defense-in-depth)

Data integrity fixes:
- Fix UUID truncation in AI model sync (as_u128() as i64 -> timestamp_millis)
- Wrap PR cascade delete in database transaction
- Add missing cascade deletes for room_message_reaction, room_message_edit_history, room_notifications
- Fix N+1 query for last_commit_times (single grouped query instead of per-repo)

Panic prevention:
- Replace unwrap() with safe fallbacks in health/metrics endpoints (email, git-hook apps)
- Replace unwrap() in access key scopes serialization
- Replace expect() in tool executor result map with synthetic error
- Replace expect() in log level parsing with default fallback

Logic bugs:
- Fix users_online metric double-decrement (decrement only when count reaches 0)
- Fix Map iteration + deletion bug in universal-ws.ts onclose handler
- Fix stale audioStream reference in catch block (use local stream variable)
- Add missing reInit event cleanup in carousel.tsx
- Fix email retry backoff integer overflow ((1 << i) as u64 -> 1u64 << i)

React fixes:
- Use message.id instead of index as key in message-list
- Add audio stream cleanup on unmount in use-audio-recording
2026-04-27 13:54:21 +08:00
..
ai.rs init 2026-04-15 09:08:09 +08:00
category.rs init 2026-04-15 09:08:09 +08:00
draft_and_history.rs init 2026-04-15 09:08:09 +08:00
member.rs init 2026-04-15 09:08:09 +08:00
message.rs init 2026-04-15 09:08:09 +08:00
mod.rs feat(room): add attachment upload/download API and attach files to messages 2026-04-20 19:32:11 +08:00
notification.rs init 2026-04-15 09:08:09 +08:00
pin.rs init 2026-04-15 09:08:09 +08:00
reaction.rs feat(room): add attachment upload/download API and attach files to messages 2026-04-20 19:32:11 +08:00
room.rs init 2026-04-15 09:08:09 +08:00
thread.rs init 2026-04-15 09:08:09 +08:00
upload.rs fix: room attachment upload (Set Uuid::nil, NotFound with msg, Ok wrapper) and silence dead_code warnings 2026-04-20 19:48:05 +08:00
ws_handler.rs fix(ws): replace unreachable_unchecked with safe fallback for TypingStart/TypingStop 2026-04-24 00:04:18 +08:00
ws_types.rs feat(room): implement typing indicator broadcast with Redis 10s TTL 2026-04-24 00:04:09 +08:00
ws_universal.rs fix: resolve multiple bugs across backend and frontend 2026-04-27 13:54:21 +08:00
ws.rs refactor(api,agent): migrate libs/api room ws and libs/agent client to tracing 2026-04-21 22:31:13 +08:00