feat: real-time notifications + UI fixes for industrial deployment - #2960
feat: real-time notifications + UI fixes for industrial deployment#2960somi2306 wants to merge 5 commits into
Conversation
New features: - Add useNotifications hook: real-time Socket.io notifications with Chainlit native auth - Add NotificationBell component: unread badge, popover list, type indicators - Add LeftSidebar/Search: thread history search functionality Bug fixes: - Fix Alert: use div instead of p to allow block-level children (Skeleton) - Fix AutoResizeTextarea: add forwardRef + useImperativeHandle to expose ref externally - Fix BlinkingCursor: replace static cursor with animated 3-dot typing indicator - Fix Logo/Avatar: resolve absolute URLs for reverse-proxy/standalone deployments - Fix ThreadList: use SidebarMenuAction to avoid invalid HTML nesting - Fix ThreadList: track active thread from URL params for correct highlight state - Fix ThreadList: add stopPropagation on delete/rename/share actions Compatibility: - Update shadcn/ui components to latest API (data-slot, React.ComponentProps) - Fix react-markdown PluggableList import for newer versions Tested in production: Chainlit + Next.js 14 + Nginx reverse proxy PFE ENSMR 2026 - Copilote Industriel OCP Jorf Lasfar
There was a problem hiding this comment.
11 issues found across 63 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
- Fix P0: chat/index.tsx — correct useNavigate usage (router.push undefined) - Fix P1: alert-dialog.tsx — restore shadow-root portal container - Fix P1: ThreadOptions.tsx — remove static duplicate id - Fix P1: Video.tsx — wrap ReactPlayer in Suspense boundary - Fix P1: Messages/index.tsx — restore BlinkingCursor for running state - Fix P2: Attachments.tsx — remove unnecessary String() coercion - Fix P2: Attachment.tsx — use isImage && imageUrl for container width - Fix P2: MessagesContainer — add apiClient to useCallback deps - Fix P2: Plotly.tsx — wrap JSON.parse in try/catch - Fix P3: ThreadOptions.tsx — fix BOM and UTF-8 encoding artifacts
There was a problem hiding this comment.
1 issue found across 10 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
dokterbob
left a comment
There was a problem hiding this comment.
Great work @somi2306! Would love to get at least some of these goodies merged.
However, with the size of this PR and the mix of different fixes and features, as it stands, it's impossible to do so.
Please, if you would be so kind, shoot a PR for each bug and feature separately and we will gladly consider them!
Also, note that for the sake of maintainability... especially for an industrial deployment, we strongly urge you to contribute E2E tests, at least for newly added features!
Thanks!
New features:
Bug fixes:
Compatibility:
Tested in production: Chainlit + Next.js 14 + Nginx reverse proxy PFE ENSMR 2026 - Copilote Industriel OCP Jorf Lasfar
Summary by cubic
Adds real-time notifications with a bell and faster thread search. Improves SSR for charts and video, routing, shadow-root portals, and reverse-proxy URL handling, and updates UI primitives to the latest
shadcn/ui.New Features
useNotifications: real-timesocket.io-clientfeed using@chainlit/react-clientauth; tracks unread and “mark all read”.NotificationBell: unread badge and popover list with type indicators and timestamps.Bug Fixes
useNavigateusage and correct NewChat route.SidebarMenuAction; stopPropagation on actions; accessible trigger button.AutoResizeTextareaviaforwardRef; safer image previews/progress for attachments.react-plotly.js(withJSON.parsetry/catch) andreact-playerinSuspense; restoreBlinkingCursorwith animated dots.react-markdownplugin import; includeKaTeXCSS.shadcn/uiAPIs; ensure dropdown/alert portals target the shadow-root.MessagesContainer.Written for commit 091826f. Summary will update on new commits.