Skip to content

Conversation

pcarranzav
Copy link
Member

@pcarranzav pcarranzav commented Feb 12, 2025

Implements inboxes as described in #133.

Inboxes can be created for accounts or for spaces.
Some simple demo interfaces are provided for both in the events app: a space chat, and a way to send messages to account inboxes for the test accounts.

A complete interface is implemented in useHypergraphApp, but a simpler API is available with useSpaceInbox and useAccountInbox.

Future improvements can be made in other PRs:

  • Iterate on the interfaces, maybe add an ensureAccountInbox like we have for space inboxes?
  • Iterate on how we store the inboxes and messages, currently this is part of the SpaceStorageEntry so we might re-render too many things when a message is received. It might be better to store space inboxes in their own storage entry separate from spaces?
  • Add the ability to create inboxes that accept specific schemas or arbitrary knowledge

@nikgraf nikgraf mentioned this pull request Apr 1, 2025
@pcarranzav pcarranzav marked this pull request as ready for review April 3, 2025 20:37
@pcarranzav pcarranzav changed the title feat: add inboxes (wip) feat: add account and space inboxes Apr 4, 2025
@nikgraf nikgraf requested a review from Copilot April 4, 2025 15:00
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 45 out of 47 changed files in this pull request and generated 1 comment.

Files not reviewed (2)
  • apps/server/prisma/migrations/20250306204530_add_inboxes/migration.sql: Language not supported
  • apps/server/prisma/schema.prisma: Language not supported
Comments suppressed due to low confidence (1)

apps/events/src/routes/space/$spaceId.tsx:110

  • The 'plaintext' property is referenced when displaying messages, but the corresponding message objects only include ciphertext. Please review how message decryption or the property naming should be handled.
<div>{msg.plaintext}</div>

Copy link
Collaborator

@nikgraf nikgraf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yay, let's ship it 👏

@pcarranzav pcarranzav merged commit 14f4920 into main Apr 28, 2025
4 checks passed
@pcarranzav pcarranzav deleted the pcv/inbox branch April 28, 2025 20:04
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.

2 participants