Skip to content

feat(hub): add optional external notification delivery - #373

Open
lukasoppermann wants to merge 4 commits into
mainfrom
lukasoppermann-slack-notification-delivery
Open

lukasoppermann wants to merge 4 commits into
mainfrom
lukasoppermann-slack-notification-delivery

Conversation

@lukasoppermann

@lukasoppermann lukasoppermann commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: ece1e3a7358e33f5de99d8959ea306fadc1769da

Dimension Assessment Rationale
Change confidence 8/10 ↑ Full Rails suite, frontend checks, and extension tests passed on an earlier revision.
↑ The CI test-isolation failure was reproduced and fixed; focused Rails and frontend checks passed on this revision.
↑ Delivery concurrency and recovery have regression coverage; 11 stories were rendered.
↓ Live Chatterbox delivery and deployment image build remain unverified.
↓ Local CI reported an inherited critical gem advisory and could not verify dependency ages because registry DNS failed.

Why

Hub keeps review activity in its Inbox, but teams may also want selected updates delivered outside Hub. This adds an optional path without changing Inbox behavior or sending anything from standard installations.

What changes

Users can opt in to hourly external digests, mute updates for individual prototypes, and manage delivery from a new Notifications page. Hub administrators can pause delivery for everyone. Delivery uses a generic provider hook; a deployment must supply an adapter, and historical activity is not backfilled.

Storybook screenshots

Components/Repository User Menu / Notification Settings — System theme, desktop viewport.

Components/Repository User Menu / Notification Settings

Hub/Features/Review/Shell Header / External Notifications — System theme, desktop viewport.

Hub/Features/Review/Shell Header / External Notifications

Hub/Features/Review/Shell Header / External Notifications Muted — System theme, desktop viewport.

Hub/Features/Review/Shell Header / External Notifications Muted

Hub/Pages/Notification settings / Empty — System theme, desktop viewport.

Hub/Pages/Notification settings / Empty

Hub/Pages/Notification settings / Single — System theme, desktop viewport.

Hub/Pages/Notification settings / Single

Hub/Pages/Notification settings / Multiple — System theme, desktop viewport.

Hub/Pages/Notification settings / Multiple

Hub/Pages/Notification settings / Administrator — System theme, desktop viewport.

Hub/Pages/Notification settings / Administrator

Hub/Pages/Notification settings / Save Failure — System theme, desktop viewport.

Hub/Pages/Notification settings / Save Failure

Hub/Pages/Notification settings / Mutes Unavailable — System theme, desktop viewport.

Hub/Pages/Notification settings / Mutes Unavailable

Hub/Pages/Security/Fresh authorization / Notification Delivery — System theme, desktop viewport.

Hub/Pages/Security/Fresh authorization / Notification Delivery

Hub/Pages/Security/Fresh authorization / Notification Delivery Continuing — System theme, desktop viewport.

Hub/Pages/Security/Fresh authorization / Notification Delivery Continuing

Adds an hourly, opt-out digest hook for Inbox activity with personal
on/off, per-prototype mutes and an admin kill switch. Standard
installations have no adapter and send nothing.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@lukasoppermann
lukasoppermann requested review from a team and nshki as code owners November 25, 2026 15:35
Copilot AI adaptive review requested due to automatic review settings November 25, 2026 15:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Unresolved delivery races can send excerpts from deleted threads or canceled batches to external providers.

13 open issues
What changed in this PR

Adds optional external notification delivery alongside Hub’s existing Inbox. Standard installations send nothing; an operator-supplied adapter enables delivery of new eligible activity without backfilling history.

Changes:

  • Adds durable hourly digests, retry handling, recovery scheduling, and delivery retention.
  • Adds personal delivery preferences, prototype mutes, and a freshly authorized administrator switch.
  • Adds settings UI, navigation controls, tests, Storybook fixtures, and operator documentation.

Rendered UI review remains unverified because Storybook could not start.

File Description
hub/​test/​models/​notification_delivery_test.rb Covers digest delivery, recovery, access, and cancellation.
hub/​test/​integration/​notification_settings_test.rb Covers preferences, mutes, and administrator authorization.
hub/​docs/​storybook.md Documents notification settings stories.
hub/​docs/​review-collaboration.md Defines delivery behavior, privacy limits, and adapter contract.
hub/​docs/​deployment.md Explains optional adapter installation.
hub/​db/​schema.rb Records delivery tables and authorization constraints.
hub/​db/​migrate/​20261125124000_create_notification_deliveries.rb Creates delivery storage and preference tables.
hub/​config/​routes.rb Adds settings and mute endpoints.
hub/​config/​recurring.yml Schedules recovery and retention cleanup.
hub/​config/​locales/​notification_settings.en.yml Adds notification controls and failure copy.
hub/​config/​initializers/​notification_provider.rb Loads and validates operator-supplied adapters.
hub/​app/​views/​shared/​_notification_navigation.json.props Exposes the optional settings link.
hub/​app/​views/​prototypes/​show.json.props Supplies personal prototype mute controls.
hub/​app/​views/​notification_settings/​show.tsx Connects settings data to the React page.
hub/​app/​views/​notification_settings/​show.json.props Builds preferences, mute lists, and administrator data.
hub/​app/​views/​fresh_authorizations/​show.json.props Adds workspace data for delivery authorization.
hub/​app/​models/​notification.rb Records external delivery alongside Inbox activity.
hub/​app/​models/​notification_setting.rb Owns the audited deployment-wide delivery switch.
hub/​app/​models/​notification_preference.rb Stores personal delivery preferences.
hub/​app/​models/​notification_mute.rb Stores recipient-specific prototype mutes.
hub/​app/​models/​notification_delivery.rb Implements digest preparation, dispatch, retries, and cleanup.
hub/​app/​models/​fresh_authorization/​continuation.rb Registers delivery-setting continuations.
hub/​app/​models/​fresh_authorization.rb Adds the delivery authorization purpose.
hub/​app/​javascript/​pages/​notification-settings-page/​types.ts Defines settings page data.
hub/​app/​javascript/​pages/​notification-settings-page/​styles.css Styles settings forms and mute lists.
hub/​app/​javascript/​pages/​notification-settings-page/​stories.tsx Adds settings presentation states.
hub/​app/​javascript/​pages/​notification-settings-page/​index.tsx Renders preferences, mutes, and administrator controls.
hub/​app/​javascript/​pages/​notification-settings-page/​index.test.tsx Covers form values and confirmation requirements.
hub/​app/​javascript/​features/​prototype-workspace-header/​types.ts Defines optional mute action data.
hub/​app/​javascript/​features/​prototype-workspace-header/​stories.tsx Adds mute and unmute fixtures.
hub/​app/​javascript/​features/​prototype-workspace-header/​index.tsx Adds the prototype mute menu action.
hub/​app/​javascript/​components/​workspace-navigation/​types.ts Defines optional settings navigation data.
hub/​app/​javascript/​components/​workspace-navigation/​index.tsx Passes settings navigation to the account menu.
hub/​app/​javascript/​components/​repository-user-menu/​stories.tsx Adds a notification settings menu fixture.
hub/​app/​javascript/​components/​repository-user-menu/​index.tsx Adds the optional Notifications link.
hub/​app/​controllers/​notification_settings_controller.rb Loads and updates personal preferences.
hub/​app/​controllers/​notification_mutes_controller.rb Updates mutes after repository authorization.
hub/​app/​controllers/​notification_delivery_settings_controller.rb Restricts global changes to freshly authorized administrators.
hub/​app/​controllers/​concerns/​notification_delivery_available.rb Hides delivery controls when unavailable.

Review effort: Max (adaptive)

Comment thread hub/app/models/notification_delivery.rb Resolved
Comment thread hub/app/models/notification_delivery.rb Resolved
Comment thread hub/app/models/notification_delivery.rb Resolved
Comment thread hub/docs/review-collaboration.md Resolved
lukasoppermann and others added 2 commits November 30, 2026 11:57
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Comment thread hub/app/models/notification_delivery.rb Resolved
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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