mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-09 08:04:45 +00:00
Cancelling a proof-of-work mining job used to silently discard the post (the sign+broadcast continuation only ran on a successfully mined template). Users had no way to publish the note un-mined once they'd started waiting. Now abandoning a template post asks what to do instead of discarding: - The × on the mining banner opens a dialog with "Send without PoW", "Discard post", or tap-away to keep mining. Only shown for jobs that carry a plain un-mined fallback (template posts); opaque work jobs (reactions, reposts, anonymous posts, gift wraps) keep the direct cancel since they have no template to fall back to. - The mining foreground-service notification gains a "Send now" action that publishes every eligible queued post without proof of work. Implementation: the queue keeps the un-mined publish continuation alongside the miner. sendWithoutPow() sets a flag the worker picks up on its next isActive poll; the miner aborts and the plain template is published through the same sign+broadcast path the mined template would have used, off the worker pool. PoWJobState exposes canSendWithoutPow so the UI knows which jobs support it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012kLVFV7ps4HfXDDJPNqi82