Script pane, realtime peer sync, and logout button

- Script pane: PDF tab beside annotations; "Add script annotation" arms
  highlight mode on the draft, ✓/✕ to confirm/cancel, auto-scrolls to the
  active annotation's highlights during playback. Adds Project.script.
- Realtime: Django Channels websocket per project broadcasts attributed
  scene deltas after each save; peers merge them in (keeping local drafts).
- Logout link in the editor project-bar.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Your Name 2026-06-29 10:52:46 -04:00
parent 595ac5ba72
commit d3c8dcbdf2
13 changed files with 307 additions and 11 deletions

View file

@ -1,10 +1,8 @@
"""
ASGI config for server project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/6.0/howto/deployment/asgi/
HTTP is handled by Django as usual; websocket connections are routed to the
scene consumers so peers receive live scene deltas.
"""
import os
@ -13,4 +11,15 @@ from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'server.settings')
application = get_asgi_application()
# Initialise Django before importing anything that touches the app registry.
django_asgi_app = get_asgi_application()
from channels.auth import AuthMiddlewareStack
from channels.routing import ProtocolTypeRouter, URLRouter
import scenes.routing
application = ProtocolTypeRouter({
'http': django_asgi_app,
'websocket': AuthMiddlewareStack(URLRouter(scenes.routing.websocket_urlpatterns)),
})