Skip to content

feat(rooms): a member may let a portal react in one room for 30 minutes without asking - #455

Merged
stormer78 merged 1 commit into
mainfrom
feat/reaction-grant
Nov 26, 2026
Merged

stormer78 merged 1 commit into
mainfrom
feat/reaction-grant

Conversation

@stormer78

Copy link
Copy Markdown
Contributor

Every page write is confirmed in the wallet's own window, so a portal chat asked for a confirm on every emoji (after #454). The user chose a bounded, revocable reaction grant (option A of the review).

What changes

  • The prompt: a reaction's confirm is compact (emoji, the message as the wallet read it, who signs) and offers an unticked box: "Let add and remove your reactions in for 30 minutes without asking."
  • Where the grant lives: reactionsUntil on the share itself, so it is keyed exactly as the share is (origin, community, VTA, room, member). It ends with the share: Stop sharing, the page's forget, a fresh choose, or the share lapsing. It is capped at 30 minutes and at the share's expiry, and never extended by use.
  • While it is live: react/unreact from that origin for that room run without a window. Gates 1–3, the value checks and recordMembersNotListed still run. Messages, notes and files are always confirmed.
  • Who can grant it: only that box on an approval. deliverConsentResult passes it only with approved, and requestRoomConsent only from a prompt that offered it. The page can neither request nor see a grant; the page contract is unchanged.
  • Console: the Communities tab lists a live grant with the minutes left and a Stop, beside Stop sharing.
  • CLAUDE.md: "no remember" now names this one bounded exception. Widening it (beyond reactions, one room or 30 minutes, or renewing it without the box) is added to "What breaks it".

Design deviation from the brief

The brief keyed the grant as its own record (origin, hostDid, vtaDid, roomId, kind=reaction). I put it on the share record instead: same key, same storage and revocation by construction, with no second record to keep in step.

Tests

tests/room-page-reaction-grant.test.mts (9):

  • the offer, unticked
  • only the box grants it, and a denial with the box ticked grants nothing (gates and consent window)
  • no window under a live grant
  • use never extends it, and it ends at 30 minutes
  • one room only
  • a message or note under a grant is still confirmed
  • it ends when stopped, revoked or re-shared
  • the key (origin, member) is checked, and it is capped by the share
  • a tampered value is no grant

The existing reply/react tests were updated for the offer. Locally: npm run lint, npm test (extension 1609, core 1348, others) and npm run build all pass.

…es without asking

Every page write is confirmed in the wallet's own window, so a portal chat
asked for a confirm on every emoji. The member now chooses, in a reaction's own
confirm (made compact: the emoji, the message as the wallet read it, who signs),
an unticked box: "let <portal> add and remove your reactions in <room> for 30
minutes without asking".

- The grant is `reactionsUntil` on the share itself, so it is keyed exactly as
  the share is (origin, community, VTA, room, member) and ends with it: Stop
  sharing, the page's `forget`, a fresh `choose`, or the share lapsing. Capped
  at 30 minutes and at the share's own expiry; never extended by use.
- While it is live, `react` / `unreact` from that origin for that room run with
  no window. Gates 1-3, the value checks and `recordMembersNotListed` still
  apply. Messages, notes and files are always confirmed.
- Only that box on an approval grants it: `deliverConsentResult` passes it only
  with `approved`, and `requestRoomConsent` only from a prompt that offered it.
  The page cannot ask for or see a grant; the page contract is unchanged.
- The console's Communities tab lists a live grant with the minutes left and a
  Stop, beside Stop sharing.
- CLAUDE.md: "no remember" now names this one bounded exception, and widening
  it (beyond reactions, one room, 30 minutes, or renewing without the box)
  joins "What breaks it".

Signed-off-by: Glenn Gore <glenn.g@affinidi.com>
@stormer78
stormer78 merged commit 2c5730a into main Nov 26, 2026
4 checks passed
@stormer78
stormer78 deleted the feat/reaction-grant branch November 26, 2026 06:09
stormer78 added a commit to OpenVTC/verifiable-trust-infrastructure that referenced this pull request Nov 26, 2026
… grant (#2833)

OpenVTC/vta-browser-plugin#455 lets a member grant a portal, in a reaction's
own confirm, 30 minutes of reacting in one room without a window. The portal
rooms entry said the wallet confirms every reaction; it now says so except
under that grant, which the page can neither request nor see.

Signed-off-by: Glenn Gore <glenn.g@affinidi.com>
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