Skip to content

Surface publish success/failure as native OS notifications #3

Description

@bryanmatthewsimonson

The userscript used GM_notification to pop an OS notification when a publish succeeded or failed. The current extension only shows an in-page toast (UI.showToast), which is invisible if the user has switched tabs by the time the publish resolves.

The plumbing is already there: the background service worker handles xray:notify messages and calls chrome.notifications.create. Nothing in the content script sends those messages yet.

Fix

In src/content/13-ui.js, after successful publish and after publish failure, do:

chrome.runtime.sendMessage({
  type: 'xray:notify',
  title: 'X-Ray',
  body: <human-friendly result>
});

Do the same for the metadata-publish path in publishMetadata. Don't replace UI.showToast — we want both (toast is faster when the tab is focused; notification catches the user when it isn't).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions