Skip to content

feat(tasks): say the relay's task refusals in plain words - #3705

Draft
morgmart wants to merge 2 commits into
morganm/tasksfrom
morganm/tasks-refusals
Draft

morgmart wants to merge 2 commits into
morganm/tasksfrom
morganm/tasks-refusals

Conversation

@morgmart

@morgmart morgmart commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

What this does

When the relay turns down a task save, people now see why in plain words. Stacked on #3561.

block/buzz#9602 gives each refusal of a task save a fixed reason code and the people involved. This PR reads those codes:

  • Someone assigned can't see the task: "Riley can’t see #mobile, so they can’t be assigned. Nothing was saved." It names the task's place when the app can read it, and says "where this task lives" when it can't. If the app doesn't know a name, it says "One of the people assigned can’t see #mobile." It never shows a key.
  • An agent assigned: "Only people can be assigned, and Fizz is an agent."
  • Too many assignees: "A task can have up to 4 people assigned."
  • An agent signing a save: "Only a person can save a task, not an agent."
  • Any other refusal, including a code the app doesn't know or text with no code: "This change isn’t allowed. Nothing was saved." People never see the relay's own words. Before this, they appeared after "Couldn’t save the task:".
  • Creator mismatch: the relay names the creator it keeps, so the app sends the save again once with that creator, without asking. That corrects a task whose creator tag was wrong, saved before the relay checked it.

The relay's own text

People get only the plain line. The relay's text is still kept in two places:

  • An agent's tool result has the plain line, then "The relay said: …" with the relay's exact text, because an agent can act on it.
  • Every refusal of this kind is logged as a warning with the relay's text, the same way other bundled plugins log failures.

Edits check only the people they add

Like the relay, an agent's edit is now checked only for the people it adds. Someone assigned who has since lost access no longer blocks an unrelated edit. A move still checks everyone, and the move preview still names who will be unassigned.

There is no "lost access" line on the task. The app can't always read the member lists it would need, so it could wrongly say someone lost access. That line comes back once the relay can answer "who can read this" directly.

Stack and order

Testing

  • Store tests cover each code in plain words. They check a name when it's known and its absence when it isn't, and the place's name when it's readable with the fallback when it isn't. An unknown code or uncoded text gives the generic line, the error keeps the relay's text, and the text is logged. A creator mismatch resends once with the relay's creator (or with none), and only once.
  • Tool tests: the agent tool shows the plain line followed by the relay's text, and an edit that adds nobody saves even though an assignee lost access.

Screenshots

The refusal appears as the usual error toast on the task.

Someone assigned can't see the place, wide, light:
Named refusal, wide, light

Narrow, dark:
Named refusal, narrow, dark

Any other refusal, wide, dark:
Generic refusal, wide, dark

Narrow, light:
Generic refusal, narrow, light

🤖 Generated with Claude Code

morgmart and others added 2 commits November 16, 2026 23:29
The relay names each refusal of a task save with a NIP-AR reason code
and the keys involved (block/buzz#9602). Each code now reads as a plain
sentence that names the people the app knows; an unknown code, or text
with no code, gets one plain line, never the relay's words or a key.

A creator-changed refusal names the creator the relay keeps, so the save
is sent again once with it, without asking.

Someone assigned who can no longer see where a task lives is named on
the task, and whoever can edit can unassign them. As the relay rules,
an edit is checked only for the people it adds, so they don't block it.

Co-authored-by: Carl <c217fe6b9d958f41c3a5e030dccc7f626775a923089cb6491305eade75ea1f1b@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>
…ccess guess

- Name the task's place when known ("Riley can't see #mobile"), with
  "where this task lives" as the fallback; "One of the people assigned"
  when names aren't known; "This change isn't allowed" for anything else.
- An agent's tool result carries the relay's own text after the plain
  line, and every invalid refusal is logged with it.
- Drop the lost-access line and its Unassign button: the app can't always
  read the member lists it would need, so it could flag people who can
  still see the task. It returns with the relay's "who can read" answer.

Co-authored-by: Carl <c217fe6b9d958f41c3a5e030dccc7f626775a923089cb6491305eade75ea1f1b@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>

This branch has not been deployed

No deployments
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.

1 participant