feat: upgrade toolchain and soften sync recovery after network blips
Bump Vite 8, matrix-js-sdk, and related deps; fix immer/vanilla-extract imports for new majors. Replace blocking sync error dialog with background recovery on wake/offline, and disable Vite auto-open in dev. Add feature handoff documentation index.
This commit is contained in:
83
docs/handoff/features/direct-messages/HANDOFF.md
Normal file
83
docs/handoff/features/direct-messages/HANDOFF.md
Normal file
@@ -0,0 +1,83 @@
|
||||
# Direct messages — handoff
|
||||
|
||||
## Summary
|
||||
|
||||
The DMs panel lists direct chats and provides flows to start new conversations. Uses `m.direct` account data to identify DM rooms.
|
||||
|
||||
## User-facing behavior
|
||||
|
||||
- Sidebar Direct tab shows DM rooms sorted
|
||||
- Create new DM / group chat
|
||||
- DM room opens in direct route layout
|
||||
- Paarrot logo badge states on tab (shared with home tab styling)
|
||||
|
||||
## Architecture
|
||||
|
||||
```
|
||||
client/direct/
|
||||
Direct.tsx — DM room list page
|
||||
DirectCreate.tsx — start new chat
|
||||
useDirectRooms.ts — room list from m.direct
|
||||
RoomProvider.tsx — route-level room context
|
||||
mDirectAtom — direct room index
|
||||
```
|
||||
|
||||
## Key files
|
||||
|
||||
| Path | Role |
|
||||
|------|------|
|
||||
| `cinny/src/app/pages/client/direct/Direct.tsx` | DM list |
|
||||
| `cinny/src/app/pages/client/direct/DirectCreate.tsx` | Create DM |
|
||||
| `cinny/src/app/pages/client/direct/useDirectRooms.ts` | List logic |
|
||||
| `cinny/src/app/pages/client/sidebar/DirectTab.tsx` | Sidebar tab |
|
||||
| `cinny/src/app/state/mDirectList.ts` | `mDirectAtom` |
|
||||
| `cinny/src/app/hooks/useDirectUsers.ts` | DM user helpers |
|
||||
|
||||
## Data model
|
||||
|
||||
| Key | Scope |
|
||||
|-----|-------|
|
||||
| `m.direct` | User account data — map userId → roomIds[] |
|
||||
|
||||
## Dependencies
|
||||
|
||||
- matrix-js-sdk DM APIs
|
||||
- `is_direct` on member events
|
||||
|
||||
## Integration points
|
||||
|
||||
- **home-and-sidebar**: DirectTab
|
||||
- **routing-and-navigation**: `DIRECT_PATH`
|
||||
- **create-flows**: create-chat feature
|
||||
- **room-timeline**: same Room component for DM rooms
|
||||
|
||||
## Testing
|
||||
|
||||
### Manual
|
||||
|
||||
1. Start DM with user; appears in direct list.
|
||||
2. Group DM with multiple users.
|
||||
3. Unread badge on Direct tab.
|
||||
|
||||
### Automated
|
||||
|
||||
- None
|
||||
|
||||
## Known issues & gotchas
|
||||
|
||||
- `m.direct` can be stale — client may repair on sync
|
||||
- DM vs private room distinction relies on account data
|
||||
|
||||
## Future work
|
||||
|
||||
- Pin favorite DMs
|
||||
- DM search filter
|
||||
|
||||
## Related docs
|
||||
|
||||
- [home-and-sidebar HANDOFF](../home-and-sidebar/HANDOFF.md)
|
||||
- [create-flows HANDOFF](../create-flows/HANDOFF.md)
|
||||
|
||||
## Add your extra things here
|
||||
|
||||
- `getDirectRoomPath` in pathUtils for DM room URLs
|
||||
Reference in New Issue
Block a user