Commit Graph

8 Commits

Author SHA1 Message Date
stellarshenson
14734c0961 fix: use extra_host_config for privileged container mode
DockerSpawner requires extra_host_config['privileged'] = True instead of
spawner.privileged. Bumped version to 3.4.1.
2025-12-12 16:10:02 +01:00
stellarshenson
2674703317 feat: split docker access into docker-sock and docker-privileged groups
- docker-sock: mounts /var/run/docker.sock (container orchestration)
- docker-privileged: runs with --privileged flag (hardware access)

Updated pre_spawn_hook to check both groups and set spawner.volumes
or spawner.privileged accordingly. Documentation updated.
2025-12-12 15:54:47 +01:00
stellarshenson
d0de218074 docs: fix docker.sock security warnings and add alert styling
Corrected security warnings to accurately describe docker.sock access:
- Changed 'host system' to 'Docker host' (docker.sock grants access to Docker
  daemon, not physical host system)
- Applied warning alert style (alert-block alert-warning) to security notes in
  README.md for better visibility

Updated in:
- README.md: Two security warnings (Requirements section, Privileged Access)
- doc/docker-socket-permissions.md: Security note
- .claude/CLAUDE.md: Security warning

Security warnings now use HTML alert boxes for emphasis and accurate terminology.
2025-11-10 00:18:10 +01:00
stellarshenson
522403f89d docs: further simplify docker-socket-permissions.md
Reduced from 66 to 19 lines focusing on essentials:
- Simplified pre-spawn hook code
- Built-in group mechanism
- Admin panel management
- Security warning

Removed verbose explanations, use cases, auditing commands.
2025-11-09 23:02:20 +01:00
stellarshenson
12953ee4d6 feat: add optional volume descriptions for UI
Added VOLUME_DESCRIPTIONS config dict allowing optional user-friendly
descriptions for volumes shown in management UI.

Changes:
- Added VOLUME_DESCRIPTIONS dict in jupyterhub_config.py (optional, co-defined
  with DOCKER_SPAWNER_VOLUMES)
- Exposed volume_descriptions via c.JupyterHub.template_vars
- Updated home.html to conditionally display descriptions if defined
- If volume not in VOLUME_DESCRIPTIONS, no description shown (UI remains agnostic)

Configuration example:
VOLUME_DESCRIPTIONS = {
    'home': 'User home directory files, configurations',
    'workspace': 'Project files, notebooks, code',
    'cache': 'Temporary files, pip cache, conda cache'
}

Documentation:
- Updated .claude/CLAUDE.md with Manage Volumes implementation details
- Simplified Restart Server section for consistency
- Added template variables to doc/ui-template-customization.md

UI now shows volume name, Docker volume path, and optional description
(if configured). Fully backward compatible - descriptions are optional.
2025-11-09 22:50:13 +01:00
stellarshenson
7ba01412d1 docs: simplify documentation to minimal modus primaris style
Drastically reduced documentation length focusing only on essential
implementation facts:

- doc/notifications.md: Reduced from 250 to 35 lines - key technical facts,
  handler implementation, template details, dependencies, error handling
- doc/ui-template-customization.md: Reduced from 132 to 55 lines - technical
  facts, JavaScript patterns, Bootstrap 5 syntax, CSRF protection, build process
- doc/docker-socket-permissions.md: Reduced from 186 to 66 lines - implementation
  facts, pre-spawn hook code, built-in group system, security implications, usage

All documentation now follows super-minimal "glimpse of implementation" approach
with bullet points and code snippets, absent of lengthy narrative and marketing
language.
2025-11-09 22:23:54 +01:00
stellarshenson
9eda62edd7 docs: add comprehensive documentation and update screenshots
Added three new documentation files following modus primaris style:
- doc/ui-template-customization.md: Guide for extending JupyterHub UI
  templates with RequireJS, Bootstrap 5, CSRF protection, and custom handlers
- doc/docker-socket-permissions.md: Docker socket access control documentation
  covering group-based permissions, security implications, and best practices
- doc/notifications.md: Complete notification broadcast system documentation
  including implementation details, API integration, error handling, and
  troubleshooting

Updated UI screenshots in README.md:
- Replaced screenshot-restart-server.png with screenshot-home.png showing
  complete user control panel (restart server + volume management)
- Added screenshot-send-notification.png showing admin notification broadcast
  interface with message composer, type selector, and delivery results

All documentation follows consistent structure: brief overview, key facts in
bullet points, explanatory narrative, and technical specifications without
excessive nesting or marketing language.
2025-11-09 22:20:28 +01:00
stellarshenson
0e39fac7ac feat: add admin notification broadcast system for active JupyterLab servers
Implemented comprehensive notification broadcast functionality allowing
administrators to send notifications to all active user JupyterLab servers
simultaneously through a dedicated admin panel.

Core Features:
- Admin-only notification panel accessible at /hub/notifications
- Concurrent delivery to all active servers using asyncio with 5s timeout
- Temporary API token generation (5-minute expiry) for authentication
- Support for 6 notification types: default, info, success, warning, error, in-progress
- 140-character message limit with live character counter
- Auto-close toggle and dismiss button in notifications
- Dynamic endpoint URL construction using spawner.server.base_url
- Comprehensive error handling with user-friendly messages
- One-line logging per server with message preview and outcome

Technical Implementation:
- Created BroadcastNotificationHandler in custom_handlers.py
- Created NotificationsPageHandler for admin UI rendering
- Added notifications.html template with Bootstrap 5 form
- Registered handlers in jupyterhub_config.py extra_handlers
- Sends to /jupyterlab-notifications-extension/ingest endpoint
- Payload includes type, message, autoClose, and actions array
- Navigation link added to home.html for admin access

Integration:
- Requires jupyterlab_notifications_extension installed on JupyterLab servers
- Uses correct payload format (type field, not variant)
- Includes Dismiss action button for manual notification closure

Documentation:
- Updated .claude/CLAUDE.md with complete feature documentation
- Updated README.md Features section with notification broadcast details
- Updated .claude/JOURNAL.md with implementation summary
- Removed obsolete FEATURE_PLAN.md

Version: 3.2.0 (bumped from 3.1.2)
2025-11-09 22:05:06 +01:00