GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(push): add self-hosted Web Push for paired devices by Zijian-Wang · Pull Request #58400 · anomalyco/opencode

feat(push): add self-hosted Web Push for paired devices #58400

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.

Sign up for GitHub

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

Closed
Zijian-Wang wants to merge 7 commits into anomalyco:dev from Zijian-Wang:web-push

Uh oh!

There was an error while loading. Please reload this page.

Closed

feat(push): add self-hosted Web Push for paired devices #58400

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit Hold shift + click to select a range
7a56354
fix(app): use service worker notifications on Android
Zijian-Wang Oct 23, 2026
13f5781
fix(app): link notifications to their session on the web
Zijian-Wang Oct 23, 2026
5ab223c
feat(push): add self-hosted Web Push for paired devices
Zijian-Wang Oct 23, 2026
132af44
docs(push): clarify iOS notification permission timing
Zijian-Wang Oct 23, 2026
a122d7a
fix(push): point users to the permission button
Zijian-Wang Oct 23, 2026
0be8168
fix(push): request iOS notification permission only from the enable b…
Zijian-Wang Oct 23, 2026
564c765
fix(push): use a switch for background push
Zijian-Wang Oct 23, 2026
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view
Prev Previous commit
fix(push): use a switch for background push
  • Loading branch information

Uh oh!

There was an error while loading. Please reload this page.

@Zijian-Wang
Zijian-Wang committed Oct 23, 2026
commit 564c7650d6209d50df153e6391fc61c449e7c218

There are no files selected for viewing

13 changes: 7 additions & 6 deletions 13 packages/app/src/runtime/i18n/en.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -724,13 +724,14 @@ export const dict = {
"settings.notifications.description": "Choose when to receive notifications and hear sounds",

"settings.notifications.push.title": "Background push",
"settings.notifications.push.description":
"Notify this device even when the app is closed. The server must stay awake. On iPhone and iPad, add OpenCode to the Home Screen first.",
"settings.notifications.push.hint":
"Your browser will ask for notification permission. On iPhone and iPad, add OpenCode to the Home Screen first; Safari tabs cannot receive push. On Android, Chrome or Edge can ask directly.",
"settings.notifications.push.server": "Server",
"settings.notifications.push.enable": "Enable push",
"settings.notifications.push.disable": "Disable push",
"settings.notifications.push.enabled": "Push is enabled for this device.",
"settings.notifications.push.disabled": "Push is off. Press Enable push to allow notifications.",
"settings.notifications.push.serverDescription": "Choose the server that sends notifications to this browser.",
"settings.notifications.push.toggle": "Push notifications",
"settings.notifications.push.toggleDescription": "Receive notifications while the app is closed.",
"settings.notifications.push.enabled": "Push notifications are on for this device.",
"settings.notifications.push.disabled": "Push notifications are off. Turn on the switch to allow them.",
"settings.notifications.push.updating": "Updating push subscription…",
"settings.notifications.push.insecure": "Push needs HTTPS or localhost.",
"settings.notifications.push.install": "On iPhone and iPad, add OpenCode to the Home Screen first.",
Expand Down
61 changes: 32 additions & 29 deletions 61 packages/app/src/settings/notifications/notifications.tsx
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Component, Show, createMemo } from "solid-js"
import { createStore } from "solid-js/store"
import { Button } from "@opencode/ui/button"
import { Select } from "@opencode/ui/select"
import { Switch } from "@opencode/ui/switch"
import { useLanguage } from "@/runtime/i18n/language"
Expand Down Expand Up @@ -110,38 +109,42 @@ export const SettingsNotifications: Component = () => {
<SettingsList>
<SettingsRow
title={language.t("settings.notifications.push.server")}
description={language.t("settings.notifications.push.description")}
description={language.t("settings.notifications.push.serverDescription")}
>
<div class="flex flex-wrap items-center gap-2">
<Select
data-action="settings-notifications-push-server"
options={connected()}
current={selected()}
value={(server) => server.key}
label={(server) => server.name}
onSelect={(server) => server && setPushState("key", server.key)}
placement="bottom-end"
gutter={6}
/>
<Show when={push()} keyed>
{(controller) => (
<Button
data-action="settings-notifications-push-toggle"
variant="outline"
<Select
data-action="settings-notifications-push-server"
options={connected()}
current={selected()}
value={(server) => server.key}
label={(server) => server.name}
onSelect={(server) => server && setPushState("key", server.key)}
placement="bottom-end"
gutter={6}
/>
</SettingsRow>
<Show when={push()} keyed>
{(controller) => (
<SettingsRow
title={language.t("settings.notifications.push.toggle")}
description={language.t("settings.notifications.push.toggleDescription")}
>
<div data-action="settings-notifications-push-toggle">
<Switch
checked={controller.state.enabled}
disabled={controller.state.busy || !controller.ready()}
onClick={() => void (controller.state.enabled ? controller.disable() : controller.enable())}
hideLabel
onChange={(checked) => void (checked ? controller.enable() : controller.disable())}
>
{language.t(
controller.state.enabled
? "settings.notifications.push.disable"
: "settings.notifications.push.enable",
)}
</Button>
)}
</Show>
</div>
</SettingsRow>
{language.t("settings.notifications.push.toggle")}
</Switch>
</div>
</SettingsRow>
)}
</Show>
</SettingsList>
<p class="text-12-regular text-v2-text-text-muted break-words">
{language.t("settings.notifications.push.hint")}
</p>
<Show when={push()} keyed>
{(controller) => (
<div role="status" class="text-12-regular text-v2-text-text-muted break-words">
Expand Down
Loading
Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.