Skip to content

feat: send bridge completion web pushes#145

Merged
ecarreras merged 6 commits into
mainfrom
issue-144-desktop-notifications
Jun 26, 2026
Merged

feat: send bridge completion web pushes#145
ecarreras merged 6 commits into
mainfrom
issue-144-desktop-notifications

Conversation

@pilipilisbot

@pilipilisbot pilipilisbot commented Jun 25, 2026

Copy link
Copy Markdown
Owner

Summary

  • Replace GitHub completion comments with real browser Push API notifications for bridge job completions.
  • Store dashboard push subscriptions by signed-in GitHub login and notify the triggering human actor plus coalesced human actors when dispatched jobs finish done or blocked.
  • Add the dashboard bell control, packaged service worker, VAPID/env docs, and keep no-dispatch/no-op jobs plus bot actors quiet.
  • Automatically derive the notification icon from GITHUB_AGENT_BRIDGE_GITHUB_APP_ID or GITHUB_AGENT_BRIDGE_GITHUB_APP_SLUG, while keeping GITHUB_AGENT_BRIDGE_WEB_PUSH_ICON_URL as an explicit override.

Screenshot

Dashboard web push bell

Tests

  • .venv/bin/python -m pytest -q tests/test_web_push.py
  • .venv/bin/python -m pytest -q tests/test_executor.py tests/test_backend.py tests/test_web_push.py
  • npm test -- --run src/main.test.tsx
  • npm run build
  • .venv/bin/python -m pytest -q tests/test_executor.py tests/test_backend.py tests/test_web_push.py tests/test_github_followup_detection.py
  • .venv/bin/python -m pytest -q
  • npm test
  • npm run build

Co-authored-by: ecarreras <294235+ecarreras@users.noreply.github.com>
@ecarreras

Copy link
Copy Markdown
Owner

@pilipilisbot però què collons has fet? el que vull són notificacions a nivell web amb push, no notificacions a github...

Replace the GitHub completion-comment notification path with browser Push API subscriptions tied to dashboard GitHub users. Add dashboard subscription endpoints, service worker support, executor delivery, docs, and tests.

Co-authored-by: ecarreras <294235+ecarreras@users.noreply.github.com>
@pilipilisbot pilipilisbot force-pushed the issue-144-desktop-notifications branch from 8b883a6 to b999a49 Compare June 25, 2026 15:51
@pilipilisbot pilipilisbot changed the title feat: notify users when bridge jobs complete feat: send bridge completion web pushes Jun 25, 2026
@pilipilisbot

Copy link
Copy Markdown
Owner Author

Tens raó: havia tirat pel camí equivocat amb comentaris de GitHub.

Ho he corregit a b999a49: ara el PR implementa notificacions web Push reals des del dashboard:

  • subscripcions Push guardades per login de GitHub autenticat al dashboard;
  • notificació al trigger actor i actors coalesced quan un job dispatchat acaba done o blocked;
  • service worker + botó de campana al dashboard;
  • configuració VAPID/env i captura al body del PR.

També he actualitzat títol/body del PR. Validació local: pytest -q, tests enfocats, npm test, npm run build. CI del nou head també passa: dashboard + pytest 3.11/3.12.

@ecarreras

Copy link
Copy Markdown
Owner

@pilipilisbot hi ha alguna forma de fer servir la imatge configurada a laa app de GitHub

Let deployments set GITHUB_AGENT_BRIDGE_WEB_PUSH_ICON_URL so browser push notifications can use the public GitHub App avatar URL while falling back to the bundled bridge icon.

Co-authored-by: ecarreras <294235+ecarreras@users.noreply.github.com>
@pilipilisbot

Copy link
Copy Markdown
Owner Author

Sí. Ho he deixat fet a 907fc8c.

Ara el payload de web push inclou icon des de GITHUB_AGENT_BRIDGE_WEB_PUSH_ICON_URL, i el service worker fa servir aquest valor abans de caure al /bridge-icon.svg empaquetat. Això permet configurar-hi directament la URL pública de l'avatar de la GitHub App, per exemple:

GITHUB_AGENT_BRIDGE_WEB_PUSH_ICON_URL=https://avatars.githubusercontent.com/in/123456?s=192&v=4

També he actualitzat systemd/env.example, README i docs d'instal·lació/operació/OAuth. Validació feta:

  • .venv/bin/python -m pytest -q tests/test_web_push.py
  • npm test -- --run src/main.test.tsx
  • npm run build

PR body actualitzat amb aquest canvi.

@ecarreras

Copy link
Copy Markdown
Owner

@pilipilisbot joder que se li pot posar una url ja m'ho penso, era pq hi faci automàticament sense haver de buscar el carai de url

Use configured GitHub App id or slug to derive the browser push notification icon automatically, while keeping the explicit icon URL as an override.

Co-authored-by: ecarreras <294235+ecarreras@users.noreply.github.com>
@pilipilisbot

pilipilisbot commented Jun 26, 2026

Copy link
Copy Markdown
Owner Author

Fet a 0acca0a: ja no cal enganxar la URL de l'avatar.

Ara el web push resol la icona automàticament així:

  • primer respecta GITHUB_AGENT_BRIDGE_WEB_PUSH_ICON_URL si es vol forçar una URL concreta;
  • si no, usa GITHUB_AGENT_BRIDGE_GITHUB_APP_ID per construir https://avatars.githubusercontent.com/in/<id>?s=192&v=4;
  • si no hi ha id però hi ha GITHUB_AGENT_BRIDGE_GITHUB_APP_SLUG, consulta l'API pública /apps/{slug}, cacheja l'id i deriva la mateixa URL d'avatar.

He actualitzat systemd/env.example, README i docs perquè el camí recomanat sigui app id/slug i la URL quedi només com override. Validació:

  • .venv/bin/python -m pytest -q tests/test_web_push.py -> 5 passed
  • .venv/bin/python -m pytest -q tests/test_executor.py tests/test_backend.py tests/test_web_push.py -> 85 passed, 1 warning existent de Starlette/httpx

@ecarreras ecarreras merged commit 5e657a5 into main Jun 26, 2026
3 checks passed
@ecarreras ecarreras deleted the issue-144-desktop-notifications branch June 26, 2026 04:03
@pilipilisbot

Copy link
Copy Markdown
Owner Author

PR merged. Final state:

No extra code change from this job: the triggering event was the merge event, and the web push + automatic GitHub App icon work is already included in the merged PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants