Skip to content

Conversation

coodos
Copy link
Contributor

@coodos coodos commented Aug 19, 2025

Description of change

Issue Number

Type of change

  • Breaking (any change that would cause existing functionality to not work as expected)
  • New (a change which implements a new feature)
  • Update (a change which updates existing functionality)
  • Fix (a change which fixes an issue)
  • Docs (changes to the documentation)
  • Chore (refactoring, build scripts or anything else that isn't user-facing)

How the change has been tested

Change checklist

  • I have ensured that the CI Checks pass locally
  • I have removed any unnecessary logic
  • My code is well documented
  • I have signed my commits
  • My code follows the pattern of the application
  • I have self reviewed my code

Summary by CodeRabbit

  • New Features
    • Hidden tap action on Settings “Version” to retry eVault profile creation.
    • System messages supported across apps (no-sender), with dedicated UI styling and timeline display.
    • eVoting: choose a Group when creating a poll; automated deadline summaries posted to group chats; new group CRUD endpoints.
    • Cerberus: charter change announcements, automated interval checks, admin endpoints to manage monitoring.
  • Improvements
    • Chat type auto-derived from participants; DM de-duplication; prevent editing/deleting/archiving system messages.
  • Chores
    • Added dependencies for GraphQL, cron, and OpenAI integrations.

Copy link
Contributor

coderabbitai bot commented Aug 19, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Adds system-message support and group context across multiple platforms; introduces EVault client/adapter, mapping DB, and health checks; refactors chat type to be derived by participants; adds cron-based deadline checks and Cerberus interval monitoring; extends APIs/entities/migrations for groups/messages; updates GraphQL server to access runtime w3id; adds hidden retry flow in wallet settings.

Changes

Cohort / File(s) Summary
Wallet Settings hidden retry
infrastructure/eid-wallet/src/routes/(app)/settings/+page.svelte
Replaces static version text with tap-triggered eVault profile retry (10 taps), with state, timing, feedback, and async retry via globalState.vaultController.retryProfileCreation().
EVault core wiring
infrastructure/evault-core/src/evault.ts, infrastructure/evault-core/src/protocol/graphql-server.ts
GraphQLServer now receives EVault instance; adds dynamic w3id accessor and uses it in webhook payloads; constructor signature extended.
Web3 Adapter: DB
infrastructure/web3-adapter/src/db/index.{d.ts,js}, .../mapping.db.{d.ts,js}
Adds MappingDatabase (SQLite) with CRUD for ID mappings; exposes via index re-exports.
Web3 Adapter: EVault client
infrastructure/web3-adapter/src/evault/evault.{d.ts,js,ts}
Introduces EVaultClient with token, endpoint resolution, retries; TS version adds per-w3id caching, health checks, timeouts, and status/maintenance methods.
Web3 Adapter: Public surface & core
infrastructure/web3-adapter/src/index.{d.ts,js,ts}
Adds spinUpEVault/createGroupEVault helpers; adds Web3Adapter class (mappings, handleChange, readOnly guard); provisioning and group manifest creation with retries.
Web3 Adapter: Logging
infrastructure/web3-adapter/src/logging/*
Adds Pino logger and Loki transport; index re-exports logging APIs.
Web3 Adapter: Mapper
infrastructure/web3-adapter/src/mapper/mapper.{d.ts,js,ts}, .../mapper.types.{d.ts,js,ts}
Adds mapping functions (toGlobal/fromGlobal), path resolution, calc/date helpers; TS broadens timestamp normalization; types introduce IMapping (with readOnly), options, and responses.
Web3 Adapter: Config
infrastructure/web3-adapter/tsconfig.json
Sets moduleResolution to NodeNext.
Blabsy chat type & system messages
platforms/blabsy/src/components/chat/*, .../lib/context/chat-context.tsx, .../lib/firebase/utils.ts, .../lib/types/{chat,message}.ts, platforms/blabsy-w3ds-auth-api/src/controllers/WebhookController.ts
Derives chat type from participant count; removes explicit type from creation; updates UI to use getChatType; adds system-message handling (senderId nullable, isSystemMessage flag) in UI and webhook.
Cerberus platform: packages & data model
platforms/cerberus/package.json, .../database/{data-source.ts,entities/*,migrations/*}
Adds deps; introduces Message system-message fields and VotingObservation entity; enables sync; migrations for messages/system flag and observations.
Cerberus platform: services & controllers
platforms/cerberus/src/controllers/*, .../services/*, .../index.ts
Adds system-message guards; webhook supports system messages, charter change notifications; adds Interval service (cron/OpenAI), VotingContext service, CharterMonitoring; exports PlatformEVaultService; periodic check-ins and admin routes.
eVoting frontend
platforms/eVoting/src/app/(app)/*, .../lib/pollApi.ts, platforms/eVoting/package.json
Adds group selection to create poll; extends Poll types with group; removes "Your Votes" UI section; adds Select dependency; pollApi gains getUserGroups.
eVoting API: entities, services, routes
platforms/evoting-api/src/*
Adds Group and Message entities/migrations; system-message flow; poll deadlines with cron (CronManagerService, DeadlineCheckService); updates Auth login to require existing user; webhook refactor to services+adapter; new group routes and cron endpoints.
eVoting API: mappings & subscriber
platforms/evoting-api/src/web3adapter/**/*, .../watchers/subscriber.ts
Adds/updates JSON mappings (users/groups/messages), readOnly flags; subscriber enriches entities, handles junctions, locking, delayed dispatch; updates base URL and relations.
Group Charter Manager API
platforms/group-charter-manager-api/src/**/*
Adds Message entity/migration; user/group services updated (ename normalization, charter updates, Cerberus ensure); new admin endpoint; webhook extra body log; data source includes Message; subscriber relations tweak.
Group Charter Manager frontend
platforms/group-charter-manager/src/app/*, .../components/auth/*
Adjusts charter template text; UI prefers user.name; User type gains optional name; removes login card h1.
Pictique API
platforms/pictique-api/src/**/*
Adds system-message support (nullable sender, isSystemMessage), migration; restrict chat dedup to DMs; skip system messages in read/delete; add findChatByParticipants; webhook creates system messages via service.
Pictique frontend
platforms/pictique/src/lib/fragments/ChatMessage/ChatMessage.svelte
Adds system-message rendering, link styling, optional sender prop, optional userImgSrc.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant Wallet as Wallet Settings
  participant VC as VaultController
  User->>Wallet: Tap "Version" (x10 within 3s windows)
  Wallet->>Wallet: Count taps, show feedback
  Wallet->>VC: retryProfileCreation()
  VC-->>Wallet: resolve (success/error)
  Wallet->>User: Show success/error message
Loading
sequenceDiagram
  participant EV as eVault Webhook
  participant Adapter as Web3Adapter
  participant MapDB as MappingDatabase
  participant Svc as Domain Service (User/Group/Message)
  EV->>Adapter: Incoming envelope (schemaId, data, w3id)
  Adapter->>Adapter: Resolve mapping by schemaId
  Adapter->>MapDB: getLocalId(globalId)
  Adapter-->>EV: Locked? skip else continue
  Adapter->>Adapter: fromGlobal(...)
  Adapter->>Svc: Upsert entity (users/groups/messages)
  Svc-->>Adapter: Entity updated/created
  Adapter->>MapDB: storeMapping(localId, globalId)
  Adapter-->>EV: 200 OK
Loading
sequenceDiagram
  participant Cron as CronManager
  participant DLS as DeadlineCheckService
  participant Polls as DB: Polls
  participant Msg as MessageService
  Cron->>DLS: checkExpiredPolls()
  DLS->>Polls: Find expired polls (deadlineMessageSent=false)
  Polls-->>DLS: List of polls
  loop each poll with groupId
    DLS->>Msg: createVoteDeadlineMessage(groupId, title, id, creator, deadline)
    Msg-->>DLS: System message persisted
    DLS->>Polls: Mark deadlineMessageSent=true
  end
Loading

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~150 minutes

Possibly related PRs

  • prototype#100 — Adjusts GraphQLServer constructor and w3id handling; overlaps with this PR’s GraphQLServer changes.
  • prototype#188 — Introduces VaultController and global state; related to wallet Settings invoking retryProfileCreation.
  • prototype#115 — Earlier Web3Adapter introduction; this PR expands adapter, EVault client, and mappings.

Poem

A tap-tap-tap—ten hops, then go!
The vault wakes up from status low.
Cron drums tick, and charters sing,
System whispers do their thing.
Chats decide by count, not name—
Signals align; we ship the same.
—o(>_<)o 🐇

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/group-chat-fix

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@coodos coodos force-pushed the fix/group-chat-fix branch from f01bc65 to e5318d8 Compare August 19, 2025 00:30
@sosweetham sosweetham merged commit 63647bf into main Aug 19, 2025
1 of 4 checks passed
@sosweetham sosweetham deleted the fix/group-chat-fix branch August 19, 2025 00:31
@coderabbitai coderabbitai bot mentioned this pull request Sep 21, 2025
6 tasks
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