Skip to content

feat(settings): initial implementation & move optout - #6

Merged
transcental merged 2 commits into
mainfrom
se-move-optout
Jul 7, 2026
Merged

feat(settings): initial implementation & move optout#6
transcental merged 2 commits into
mainfrom
se-move-optout

Conversation

@transcental

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings July 7, 2026 22:59
@transcental
transcental merged commit 804a143 into main Jul 7, 2026
2 checks passed
@transcental
transcental deleted the se-move-optout branch July 7, 2026 23:01

Copilot AI left a comment

Copy link
Copy Markdown

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 introduces a first-pass “Settings” surface for Slack Extra, backed by a new UserSettings table, and routes move behavior through per-user opt-out preferences (including moving the manual move opt-out logic into the move command path).

Changes:

  • Add a UserSettings Piccolo table + migration to persist move opt-out preferences per user.
  • Implement /settings modal + view submission handler to toggle manual/auto move preferences.
  • Enforce opt-out behavior in both automatic moves (member-joined handler) and manual channel move command.

Reviewed changes

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

Show a summary per file
File Description
slack_extra/views/settings.py Adds modal submission handler to save move preference checkboxes.
slack_extra/views/init.py Registers the new settings modal callback handler.
slack_extra/tables.py Adds UserSettings table schema for move opt-out preferences.
slack_extra/preferences.py Adds helpers to read/write move opt-out preferences and check opt-out state.
slack_extra/piccolo_migrations/slack_extra_2026_06_21t17_59_09_692057.py Creates user_settings table with opt-out columns and timestamps.
slack_extra/events/member_joined_channel/move.py Skips automatic channel moves when the user opted out of auto moves.
slack_extra/commands/settings.py Adds /settings command (modal) and settings move subcommand.
slack_extra/commands/channel/move.py Filters out users opted out of manual moves before inviting them; fixes moved count in response.
slack_extra/commands/init.py Registers the new settings command and settings move subcommand in the command registry.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +15 to +17
insert_values = {"auto_move_opt_out": opt_out}
else:
raise ValueError(f"unknown type?? {move_type}")
Comment on lines +34 to +36
if move_type == "auto":
return settings.auto_move_opt_out
raise ValueError(f"unknown type?? {move_type}")
Comment on lines +113 to +115
await send_heartbeat(
f"Skipping people who have opted out: `{sorted(opted_out_ids)}`"
)
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