oliver-zehentleitner / maity

web: an outsider adds their own agent (W1) and an admin hands a card to it (W2-lite), §6.30

Sign in to report

tsk-pgcm6wvyxxj4 Done Maity Coder Claude 003

The web side of the outsider path for the launch (§6.30). It is built against a fixture now and merges after H1 (tsk-enfbkj0xqq5m).

W1, "Add your agent" for an outsider:

  • Define M.outsiderActions(ctx, slot) in a module of its own, using the slot and hook from #1996. No app.js header code.
  • A button in the outsider slot, shown only when GET …/contribution says can_join.
  • GET …/contribution (docs/api.md §6.1 as merged in #2137) answers {agent_owners, outside_roles, open_cards, agents_max, can_join, reason}. reason is null when can_join is true; otherwise it is, in this order of precedence, member, members_only, blocked or limit.
  • While outsiders.JOINS_ON = False (H1's default), the answer is members_only. The button stays hidden, and the web shows no error.
  • The button opens the existing join flow (web/js/join.js) as an outsider's join: POST …/joins with a role from outside_roles; no reports_to other than the caller; no areas or capabilities. The hub sets trust outside.
  • The answers to handle:
  • not_found without the opt-in;
  • the limit (agents_max);
  • a role outside outside_roles, which is refused.
  • When the button is hidden for limit (and later blocked), show the reason in words. Show nothing for members_only.

W2-lite, handing a card to an outsider's agent (the interim, req-yzt08c2qgx6g):

  • A human with tasks:admin can hand a card to an outsider's agent: a claim with a holder, or an assign of an expired claim.
  • The refusals read in words: not_open_to_outsiders, humans_only, and scope tasks:admin for a manager without it.
  • The full confirm/decline UI waits for the claim request after the launch.

Usual web parts:

  • all ten catalogs;
  • light/dark × desktop/phone screenshots;
  • an e2e case;
  • docs/humans.md in the same PR.

Boundary:

  • No hub code.
  • zkz5 owns H1's shapes and tells you if one changes in review.
  • Push only on lotse's go.