Private
Public Access
Bump to v1.1.0 and bring all documentation current
Version bump in both pyproject.toml and package.json. Documentation update covers everything shipped since v1.0.0 (direct messages, message deletion, custom emoji, video attachments, DM/room email notifications, active sessions, and more), and corrects claims that had gone stale -- backend/README.md and DEPLOYMENT.md both still said "no server-side session revocation" and backend/README.md said "no custom/uploaded emoji," both now false. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
+43
-23
@@ -1,13 +1,15 @@
|
||||
# DS Chat frontend
|
||||
|
||||
React 19 + TypeScript + Vite PWA. The full client for DS Chat: auth and
|
||||
invite-based signup, room CRUD with roles/invites, real-time WebSocket chat
|
||||
(Markdown, @mentions, reactions, image/file attachments with previews,
|
||||
message editing), unread indicators and presence, per-user theming
|
||||
(presets plus a custom theme builder), Web Push notifications, offline
|
||||
caching and an auto-update banner via a custom service worker, and a
|
||||
site-admin portal — wired to the backend's REST API and `/ws/chat` WebSocket
|
||||
endpoint. See [`../README.md`](../README.md) and
|
||||
invite-based signup, room CRUD with roles/invites, direct messages,
|
||||
real-time WebSocket chat (Markdown, @mentions, reactions, built-in and
|
||||
custom emoji, image/video/file attachments with previews, message editing
|
||||
and deletion), unread indicators and presence, per-user theming (presets
|
||||
plus a custom theme builder), Web Push/email notifications and a desktop-
|
||||
notification bridge, an active-sessions view for managing where you're
|
||||
logged in, offline caching and an auto-update banner via a custom service
|
||||
worker, and a site-admin portal — wired to the backend's REST API and
|
||||
`/ws/chat` WebSocket endpoint. See [`../README.md`](../README.md) and
|
||||
[`../backend/README.md`](../backend/README.md) for full local setup.
|
||||
|
||||
## Dev
|
||||
@@ -39,20 +41,24 @@ worker.
|
||||
```
|
||||
src/
|
||||
main.tsx, App.tsx routes: /login, /signup, /forgot-password, /reset-password,
|
||||
/rooms, /rooms/:roomId, /admin (AdminRoute-gated); mounts
|
||||
UpdateBanner globally and ChatSocketProvider once authed
|
||||
/rooms, /rooms/:roomId, /admin (AdminRoute-gated), /help;
|
||||
mounts UpdateBanner globally, ChatSocketProvider and
|
||||
CustomEmojiProvider once authed
|
||||
types.ts shared request/response/WS-envelope types, mirroring the
|
||||
backend's Pydantic schemas
|
||||
|
||||
api/ fetch wrappers, one file per backend resource: client
|
||||
(base fetch/error handling), auth, signup, rooms, users,
|
||||
bots, webhooks, push, admin, customThemes, uploads
|
||||
(base fetch/error handling), auth (incl. active sessions),
|
||||
signup, rooms (incl. DMs), users, bots, webhooks, push,
|
||||
admin, customThemes, customEmoji, uploads
|
||||
ws/useChatSocket.ts the WebSocket hook: connect/reconnect with backoff,
|
||||
join/leave rooms, send/edit/react, visibility-gated
|
||||
join/leave rooms, send/edit/delete/react, visibility-gated
|
||||
presence, triggers an SW update check on reconnect
|
||||
context/
|
||||
AuthContext.tsx current-user state, hydrated via GET /api/auth/me
|
||||
ChatSocketContext.tsx shares one useChatSocket instance across the app
|
||||
CustomEmojiContext.tsx fetches the site's custom emoji once, exposes a
|
||||
shortcode lookup + a refresh() called after upload/delete
|
||||
|
||||
lib/
|
||||
avatar.ts deterministic accent-color cycling for avatars
|
||||
@@ -61,7 +67,9 @@ src/
|
||||
fileSize.ts human-readable byte formatting
|
||||
lastUser.ts cached "who was I last logged in as" for offline shell render
|
||||
messageGrouping.ts groups consecutive messages by sender/time, presence lookup
|
||||
push.ts PushManager subscribe/unsubscribe, VAPID key conversion
|
||||
push.ts PushManager subscribe/unsubscribe, VAPID key conversion,
|
||||
timeout-guarded so a browser that never settles the
|
||||
permission prompt can't leave the UI stuck forever
|
||||
swUpdate.ts bridges the SW registration to useChatSocket's reconnect hook
|
||||
theme.ts applies preset/custom themes as CSS custom properties
|
||||
|
||||
@@ -73,24 +81,36 @@ src/
|
||||
|
||||
components/
|
||||
ProtectedRoute.tsx, AdminRoute.tsx auth/site-admin route guards
|
||||
TopBar.tsx, Sidebar.tsx, RoomRow.tsx room list chrome
|
||||
TopBar.tsx, Sidebar.tsx, RoomRow.tsx room list chrome (DMs and Rooms as
|
||||
independently collapsible sections)
|
||||
ChatPane.tsx, MessageList.tsx, Composer.tsx chat view: history+live merge,
|
||||
message rendering, composer/attach/send
|
||||
MessageContent.tsx, MentionAutocomplete.tsx Markdown rendering + @mention highlighting/autocomplete
|
||||
ImageLightbox.tsx, FilePreviewModal.tsx attachment viewers (image/PDF/text/Markdown)
|
||||
EmojiPicker.tsx reaction/composer emoji picker
|
||||
RoomInfoPanel.tsx room details/members/roles panel
|
||||
NewRoomModal.tsx, BrowseRoomsModal.tsx, UserPicker.tsx room creation/discovery, member picking
|
||||
message rendering (incl. deleted-message
|
||||
tombstones), composer/attach/send
|
||||
MessageContent.tsx, MentionAutocomplete.tsx Markdown rendering (mentions, room
|
||||
links, custom emoji `:shortcode:`,
|
||||
heading ids, sub/superscript) +
|
||||
@mention highlighting/autocomplete
|
||||
ImageLightbox.tsx, VideoLightbox.tsx,
|
||||
FilePreviewModal.tsx attachment viewers (image/video/PDF/
|
||||
text/Markdown)
|
||||
EmojiPicker.tsx, CustomEmojiUploadModal.tsx reaction/composer emoji picker
|
||||
(built-in + site's custom emoji) and
|
||||
its upload dialog
|
||||
RoomInfoPanel.tsx room details/members/roles/email-
|
||||
notification-toggle panel
|
||||
NewRoomModal.tsx, BrowseRoomsModal.tsx, UserPicker.tsx room creation/discovery, member
|
||||
picking (also how a DM starts)
|
||||
ProfileModal.tsx, ThemeBuilderModal.tsx, CustomThemePreview.tsx
|
||||
profile settings + the custom theme editor
|
||||
(opened in its own wide dialog) with a live,
|
||||
profile settings (incl. active-sessions
|
||||
list) + the custom theme editor (opened
|
||||
in its own wide dialog) with a live,
|
||||
hoverable mockup of the real UI
|
||||
RoomAvatar.tsx, UserAvatar.tsx avatar rendering (incl. presence dot)
|
||||
OfflineBanner.tsx, UpdateBanner.tsx connectivity state / new-version-available prompt
|
||||
|
||||
pages/
|
||||
LoginPage.tsx, SignupPage.tsx, ForgotPasswordPage.tsx, ResetPasswordPage.tsx
|
||||
ChatShellPage.tsx, AdminPage.tsx
|
||||
ChatShellPage.tsx, AdminPage.tsx, HelpPage.tsx
|
||||
|
||||
styles/tokens.css design tokens (DarkSingularity theme: colors, spacing, etc.)
|
||||
sw.ts custom service worker (injectManifest): app-shell
|
||||
|
||||
Reference in New Issue
Block a user