Hardware→Outpost: in-app notification instead of the after-recording popup#767
Hardware→Outpost: in-app notification instead of the after-recording popup#767dhamariT wants to merge 3 commits into
Conversation
…popup Per review, recording a timelapse on a hardware project shouldn't throw a modal — it should drop a notification in the inbox instead. - New Notifications::HardwareMovedToOutpost type (inbox-only/low priority, aggregatable so repeat recordings keep one unread notice), registered + given an alert-triangle icon, with an inbox partial linking to Outpost. - Fire it from LookoutSessionsController#create for hardware projects (flag hardware_to_outpost), after the session is created so recording is unaffected. - Remove the on-recorder popup: the record.html.erb render + the capture controller's showHardwareOutpostNotice trigger/method. Project *creation* (new hardware project / hardware mission) still shows the Outpost popup up front — that's unchanged. Notification links to outpost.hackclub.com. Gated by hardware_to_outpost (+ the notification system's own week_2_release rollout flag).
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 7d92c89. Configure here.
|
|
||
| def preview_text | ||
| "Building hardware? It all happens over on Hack Club Outpost now." | ||
| end |
There was a problem hiding this comment.
Missing aggregate group key
Medium Severity
HardwareMovedToOutpost sets aggregatable but leaves the default build_group_key (nil). Other aggregatable notification types define a non-nil key so the partial unique index can dedupe unread rows; with a nil group_key, concurrent notify calls can each insert a separate unread notification instead of one aggregated notice.
Reviewed by Cursor Bugbot for commit 7d92c89. Configure here.
| # inbox notification rather than the old on-recorder popup, without blocking | ||
| # the recording. | ||
| if @project.hardware? && Flipper.enabled?(:hardware_to_outpost, current_user) | ||
| Notifications::HardwareMovedToOutpost.notify(recipient: current_user, record: @project) |
There was a problem hiding this comment.
Timelapse nudge lost without inbox
Medium Severity
The recorder Outpost modal was removed for users with only hardware_to_outpost, while the replacement notification is skipped unless week_2_release is enabled for the recipient inside Notification.notify. Those users no longer get any timelapse Outpost nudge.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 7d92c89. Configure here.
…icon Two follow-ups on the notification: 1) Notify everyone who already has a hardware project, not only those who record a timelapse. New OneTime::BackfillHardwareOutpostNotificationsJob sweeps every member of a hardware project (dry-run by default; the notif is aggregatable + self-gates on week_2_release, so no dupes/spam). New hardware projects can't be created on Stardance anymore, so this audience is fixed. 2) Prettier icon: instead of the generic alert-triangle line icon, show a colour chip cropped from the Outpost flame logo (borrowed from the sidebar widget). item_component gains optional image icons (TYPE_ICON_IMAGES); the notifications SCSS crops the wide wordmark to its flame side as a rounded, full-colour badge.
The cropped wordmark chip looked off. Swap it for the actual Outpost flame favicon (square, transparent) and drop the crop hack — render it whole with object-fit: contain so nothing clips.


Per review feedback: recording a timelapse on a hardware project shouldn't throw a modal — send an in-app notification instead (lands in the notifications list, like the achievement/shop-order rows).
What changed
Notifications::HardwareMovedToOutpost— inbox-only (low priority, no Slack/email), aggregatable so a builder who records repeatedly keeps a single unread notice instead of a pile. Registered inNotifications::Registryand given analert-triangleicon; inbox partial reads "Hardware projects have moved to Hack Club Outpost" with the subtitle "Building hardware? It all happens over on Hack Club Outpost now." and links to outpost.hackclub.com.LookoutSessionsController#createfor hardware projects (flaghardware_to_outpost), after the session is created — recording is unaffected.record.html.erbrender + the capture controller'sshowHardwareOutpostNoticetrigger/method.Unchanged
Project creation (starting a new hardware project, or picking a hardware mission in the setup wizard) still shows the Outpost popup up front — this only moves the timelapse nudge from a modal to a notification. The popup partial + modal controller are still used there.
Gating
Fires only when the user has
hardware_to_outpost(the feature flag) andweek_2_release(the notification system's own rollout gate — every notification type inherits this).Testing
ruby -c/node --check/ ERB parse all clean; net +17 lines.Note
Low Risk
Changes are feature-flagged, non-blocking on the recording path, and the backfill defaults to dry-run; no auth or payment logic touched.
Overview
Hardware → Outpost messaging for Lookout timelapses moves from a blocking modal on the recorder to an in-app notification that appears when a hardware project starts a Lookout session (after the session is created, recording unchanged).
Adds
Notifications::HardwareMovedToOutpost: low-priority, inbox-only, aggregatable, with an inbox partial linking to Outpost and preview copy. Notification rows can show a brand image chip (Outpost favicon) via newTYPE_ICON_IMAGESstyling in the item component.Removes the hardware Outpost modal from
record.html.erbandshowHardwareOutpostNoticein the capture controller. Project creation / setup wizards still use the existing Outpost popup.Adds a one-time backfill job (dry-run by default) to notify all users with hardware project memberships, reusing the same
notifypath and aggregation rules.Gated by
hardware_to_outposton the Lookout create path and the notification system’s usual rollout gates onnotify.Reviewed by Cursor Bugbot for commit 3a8c5e8. Bugbot is set up for automated code reviews on this repo. Configure here.