Skip to content

Conversation

@lorenzocorallo
Copy link
Member

@lorenzocorallo lorenzocorallo commented Sep 26, 2025

  • voting utility
  • handle voting via menu
  • change menu lib to allow Menu Data updates
  • integrate backend to get voters (members of Direttivo + who is the Pres)
  • add functionality (it should actually ban the person)
  • add real commands

lorenzocorallo and others added 9 commits September 29, 2025 23:31
* feat: module coordinator

* chore: folder structure

* fix: don't know how variables work

* fix: websocket lifecycle

* feat: BanAll message update on progress

* feat: unicode progress bar!!!!

* fix(group-mgmt): join+admin correct handling

* feat: ban-all

---------

Co-authored-by: Lorenzo Corallo <[email protected]>
@lorenzocorallo lorenzocorallo marked this pull request as ready for review October 2, 2025 00:14
Copilot AI review requested due to automatic review settings October 2, 2025 00:14
Copy link
Contributor

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.

Pull Request Overview

This PR implements a comprehensive "Ban All" voting system that allows Direttivo members to vote on banning/unbanning users across all network groups. The implementation includes voting utilities, queue-based job processing, menu interactions, and comprehensive test coverage.

  • Implements voting logic with presidential tie-breaking rules specific to Direttivo governance
  • Adds interactive voting menus with real-time progress tracking during ban execution
  • Integrates job queue system using BullMQ for scalable ban/unban operations across multiple groups

Reviewed Changes

Copilot reviewed 33 out of 36 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/vote.test.ts Comprehensive test suite for voting outcome calculations
tests/throttle.test.ts Test coverage for throttle utility function
src/utils/vote.ts Core voting logic implementing Direttivo governance rules
src/utils/throttle.ts Utility for rate-limiting function calls
src/utils/progress.ts Progress bar visualization utilities
src/utils/wait.ts Async utilities including new Awaiter class
src/modules/tg-logger/ban-all.ts Ban All voting menu and UI logic
src/modules/moderation/ban-all.ts Queue-based job processing for ban operations
src/commands/banall.ts CLI commands for initiating ban/unban requests
src/lib/modules/index.ts Module coordination system for shared dependencies
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copilot AI review requested due to automatic review settings October 2, 2025 00:37
Copilot AI review requested due to automatic review settings October 2, 2025 00:40
Copy link
Contributor

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.

Pull Request Overview

Copilot reviewed 34 out of 37 changed files in this pull request and generated 5 comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copilot AI review requested due to automatic review settings October 2, 2025 00:48
Copy link
Contributor

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.

Pull Request Overview

Copilot reviewed 34 out of 37 changed files in this pull request and generated 4 comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copilot AI review requested due to automatic review settings October 2, 2025 01:04
Copy link
Contributor

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.

Pull Request Overview

Copilot reviewed 34 out of 37 changed files in this pull request and generated 4 comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copilot AI review requested due to automatic review settings October 2, 2025 01:22
Copy link
Contributor

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.

Pull Request Overview

Copilot reviewed 34 out of 37 changed files in this pull request and generated 4 comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Contributor

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.

Pull Request Overview

Copilot reviewed 34 out of 37 changed files in this pull request and generated 2 comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copilot AI review requested due to automatic review settings October 2, 2025 01:27
Copy link
Contributor

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.

Pull Request Overview

Copilot reviewed 35 out of 38 changed files in this pull request and generated 2 comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)

src/utils/vote.ts:1

  • There's a typo: 'absteined' should be 'abstained'.
import type { User } from "grammy/types"

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@lorenzocorallo
Copy link
Member Author

Finally, Copilot ended its monologue

@toto04
Copy link
Contributor

toto04 commented Oct 2, 2025

LGTM 👍

@lorenzocorallo lorenzocorallo merged commit a3a68a0 into main Oct 2, 2025
1 check passed
@lorenzocorallo lorenzocorallo deleted the banall branch October 2, 2025 01:33
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.

3 participants