-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Notifications are not working #8
Comments
Thanks for raising this issue. Notifications are still work in progress |
Are they missing proper configuration or just not supposed to be working yet? |
The bulk of the actual logic behind notifications is done, i just need to tie it all together. I'm working on it right now! |
@dmatora I've updated the repo with several changes. You should be able to pull the pre-build docker image following the instructions. Notifications should be working now. Check out the new GIF demo in the README |
Hey, great job! I've never seen 1 click ClaudFlare forwarding setup before. |
Saw process.env.VERCEL_URL in the code and decided to try deploying it to vercel.
|
I saw |
Well, maybe not working so well. |
Ah, great catch. Btw, you won't see notifications from chats while the chat screen is visible on the screen. It's intended mostly for slow generations, for example using a 200B model with very low token per second, and you get a notification when the message is finished. (I'm still figuring this out because seems like iphone specifically doesn't properly signal the user having the view closed or being on another app) Yes, notifications will not work offline. This is a core limitation of how Push notifications work. Basically, your device opens a passive keep-alive socket to Google/Apple push server, and it listens for new data. To my knowledge there's no way to self host the push server. We were blessed to have VAPID standard to break away from Google/apple walled garden around push notifications, since originally push notifications from apps that were not approved by Google/Apple was impossible. |
I've just tested this and it worked offline
|
@dmatora that's a fully offline client-side notification API. Using your approach, we need to make sure that while the app is in background, the JavaScript is still being executed to periodically check whether we received the full response from the backend. I'm afraid Android/iPhone decide to suspend apps while they're in the background, so we won't be able to check whether the generation has finished, and therefore we won't be able to send the client-side notification. |
it would at least work on desktop, where I mainly chat with ai anyway |
Good point. I'll have to figure out how to give the user a choice between fully offline client side notifications, and push notifications using Google/Apple servers. |
one way would be to check if client is a desktop, but simple desktop toggle would also work (with a info tip) |
I would still check how background js throttling affects it on desktop |
Would be nice to be able to serve over https with self signed certificate, something like
this make running offline server so much easier |
Ah nice.. I'm currently use hono to serve the backend (src/server/hono.ts) I'll see how I can integrate self signed to make a seamless https connection. |
Just from preliminary research, it looks like PWA/Service worker might not work using self signed certificates. |
Well it does have issues. In safari PWA won't load. In Chrome when I launch PWA I have to approve certificate each time, which redirects me from app to Chrome, and once approved I have to click open in app to move it back. It's messy but I can't think of other solution for working offline (except developing proper desktop app - I've asked BoltAI to add notifications and author said he will think about it) But unlike push notifications, local notifications work even from page. |
Well, at some point I got tired of reapproving self issued certificate and issued let's encrypt certificate for personal domain pointing to local network Ip, got it validated via dns txt entry and got nginx reverse proxy running, pointing to local network running suaveui instance |
Nice! I suggest to look into setting up Tailscale and pointing your domain to the local Tailscale address to have private access to your instance when not connected to your home network. That's currently my setup. |
No description provided.
The text was updated successfully, but these errors were encountered: