Repository navigation
feat(rooms): a member may let a portal send messages and reactions in a room without asking while it is open - #457
Merged
Conversation
… a room without asking while it is open Every page write is confirmed in the wallet's own window, so a portal chat asked for a confirm on every message. A message's or a reaction's confirm now offers an unticked box: "Send messages and reactions in <room> without asking while this room is open". - Bound to one page document: the tab and the browser's `documentId` (`pageSessionOf`), taken from the call's and the watch port's sender. A reload or navigation is a new document and asks again. - "While this room is open" is the document holding a `rooms.watch` port on that room (`roomOpened`): the last port closing (leaving the room, the tab closing, a reload, the worker sleeping) ends it. Offered only while one is. - Covers `putMessage` (replies too), `react` and `unreact` for that origin, community, VTA, room and member; never notes, files or other writes. Gates 1-3, `recordMembersNotListed` and the value checks still apply. - Also ends on `tabs.onRemoved`, the share ending (`reviewSessionGrants` on any share change), 30 minutes idle, 8 hours from the confirm however used, the wallet locking, or Stop in the Communities tab. - More than 10 writes in a rolling minute, or a message over 4,000 characters, is confirmed as usual; the grant stays. - Held in the background's memory only, never stored. While any is live the action's tooltip names the rooms and the badge reads LIVE. - The page cannot ask for, see or extend it; the page contract is unchanged. - CLAUDE.md names this second bounded exception, and widening it joins "What breaks it". Signed-off-by: Glenn Gore <glenn.g@affinidi.com>
stormer78
added a commit
to OpenVTC/verifiable-trust-infrastructure
that referenced
this pull request
Nov 26, 2026
…e wallet's session grant (#2836) OpenVTC/vta-browser-plugin#457 adds a second bounded exception to "every page write is confirmed": messages and reactions while the one page holds the room open through its watch. The portal needs no code change (the page contract is unchanged); the portal-rooms rule now names the grant and says to keep the watch held for exactly as long as the room is shown, since its closing ends the grant. Signed-off-by: Glenn Gore <glenn.g@affinidi.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by the user: a portal chat should not need a confirm window for every message while the member is in the room.
What
A message's or reaction's confirm offers an unticked box: "Send messages and reactions in without asking while this room is open in ". Ticking it creates a session grant (
src/room-session-grant.ts), the second bounded exception to "every page write is confirmed", after #455's reaction grant.Lifetime: what "while this room is open" means
tab.idplus the browser'sdocumentId(pageSessionOf), read from thesenderof both therooms.*call and theROOM_WATCH_PAGE_PORT. A reload or navigation is a new document and asks again.roomOpened, counted per document and room). The portal's room page keeps one open while it shows the room andstop()s it on leaving. The last port closing ends the grant: leaving the room, closing the tab, reloading, navigating away, or the extension's background worker being stopped.tabs.onRemoved; the share ending (reviewSessionGrantson any share-storage change); 30 minutes with no write under it; 8 hours from the confirm however used; the wallet locking (RUNTIME_LOCK_WALLET); Stop in the console.Scope
putMessage(replies too),reactandunreactfor the same origin, community, VTA, room and member.recordMembersNotListedand value validation.MAX_BODYis 1 MiB and already refuses outright, so a chat-sized bound is used instead.Visibility
RUNTIME_ROOM_SESSION_GRANTS(extension pages only).sessionGrantcrosses the consent window only with an approval, from a prompt that offered it.Deviations
documentId.Rules
CLAUDE.md: gate 4, the "no remember" sentence and the reaction-grant section now name this exception precisely. "What breaks it" adds: widening the grant to notes, files or other writes; letting it outlive the document (storing it, keying it by tab alone); lifting its idle limit, cap or rate limit; removing the badge or tooltip; renewing it without a confirm.Tests
tests/room-page-session-grant.test.mts, 11 tests:Lint, build and
check-task-versionspass; all workspace tests pass (extension 1623, core 1348).