Repository navigation
Allow for this chat: the picker, who it reaches, time left and End access; offer cards say what became of each - #2500
Merged
Merged
Conversation
…, with who it reaches, time left and End access; offer cards say what became of each
…rs; a neutral pick mark
…ays where the offer stands
Collaborator
Author
…ile the Mac is offline is still told; the pick drops a bot made private; an open Send card says its offer expired when the grant ends
This was referenced Nov 30, 2026
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.






Problem
#2497 adds "Allow for this chat" and offer outcomes on the backend, but no window can open a grant, see one, or end one. The offer cards also still say only "Send it" or "Waiting for you", whatever became of the offer.
Change
The link button. In a chat with a bot of another computer, the composer gets a link button: "Let Loki message bots here". It opens a pick of this computer's bots that take offered messages. The only such bot is picked already, and you can pick up to 8. Then press "Allow for this chat". The daemon decides; a refusal shows in its words ("Open the chat first, then allow it."). While the chat is allowed, the button stays lit and reopens the pick, so you can change the bots.
The line above the composer. While the grant is open, it reads "Loki can message Alpha and Beta here", then "9 min left" and End access. The time left moves calmly, once every 30 seconds. Another window shows the same line with "Allowed in another window" and no End access, and has no button.
When it ends. If the grant ends for a reason this window didn't give, the line says why once ("Nothing was sent for 10 minutes", "The connection dropped", and so on) until dismissed. Ending it yourself shows nothing. A Mac from before grants shows no button.
Offer cards. In the offering bot's chat (and on any device the offer isn't for), the card now says what the computer it is for reported:
The chat row above the card now only says "I'd like to send a message to a bot on ANIMATRIX."; the card says where it stands. On the PC, a card shows "This offer expired." with no Send. It reads its state again when the Mac's copy changes, so an offer sent under the grant turns into "Sent to Alpha" on its own.
Events. A grant change (
bots.changedwithgrant) re-reads only that chat's grant, not the whole bot list. The daemon now also sends it when a message from the granting window starts the idle time again, so the minutes left move with each message.Edges. The window keeps reading the grant while the Mac is offline, so an end then ("The connection dropped") is said once it is back. An open pick drops a bot made private meanwhile. An open Send card reads its offer again when the grant changes, so an offer whose grant ended says it expired even while the Mac can't say so.
Docs.
docs/bots.md→ "Allow for this chat" and the card states.How to review
src/renderer/components/bots/BotChatGrant.tsx: the hook, the line and the picker.BotOfferCard.tsx:waitingLineand the expired step.BotChatView.tsx: where they sit (the composer's actions and its notice line).Verification
node scripts/verify.mjsPASS @ c273b91: 16 test files (621 tests, with the grant unit test and the two-daemon test) and both typechecks.tests/renderer/botChatGrant.test.tscovers:tests/renderer/botOfferCard.test.tsadds the six states on the offering bot's chat, the expired card on the PC, a card that turns into Sent when the Mac's copy says so, and one that says it expired when the grant ends.tests/net/bridge/routed/chatGrants.test.ts: a message from the granting window tells windows the new end.Refs #2490