Skip to content

Use cyclist emoji instead of red cross for pending deliveries#490

Merged
neal-bpm merged 1 commit intomainfrom
vn/cyclist-emoji-pending-delivery
Apr 18, 2026
Merged

Use cyclist emoji instead of red cross for pending deliveries#490
neal-bpm merged 1 commit intomainfrom
vn/cyclist-emoji-pending-delivery

Conversation

@neal-bpm
Copy link
Copy Markdown
Contributor

@neal-bpm neal-bpm commented Apr 17, 2026

Describe your changes

Use cyclist emoji instead of red cross for pending deliveries

Summary

Replace the red cross with a cyclist emoji for pending deliveries in Slack campaign summaries.

Checklist before requesting a review

  • I have performed a self-review of my code
  • If it is a core feature, I have added tests.
  • Are there other PRs or Issues that I should link to here?
  • Will this be part of a product update? If yes, please write one phrase
    about this update in the description above.

Summary by cubic

Slack messages now show 🚴 for non-completed deliveries instead of ❌. This clarifies that pending or in-progress deliveries are active, not failed.

Written for commit 716da9f. Summary will update on new commits.

Summary by CodeRabbit

  • Bug Fixes
    • Improved delivery status indicators in Slack notifications by updating the display for non-completed deliveries to show a bicycle emoji instead of an error icon, enhancing visual clarity.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 17, 2026

📝 Walkthrough

Walkthrough

The delivery_status_icon/1 function's fallback behavior was updated to render the bicyclist emoji (:bicyclist:) for all non-:completed delivery statuses instead of the previous cross mark emoji (:x:).

Changes

Cohort / File(s) Summary
Slack API Payload Builder
lib/bike_brigade/slack_api/payload_builder.ex
Updated fallback emoji in delivery_status_icon/1 from :x: to :bicyclist: for non-:completed delivery statuses.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A cyclist replaces the X,
No more frowns to perplex!
Instead of red crosses that bore,
Pedaling emoji forevermore! 🚴

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: replacing the red cross emoji with a cyclist emoji for pending deliveries, which aligns with the code changes in the payload_builder.ex file.
Description check ✅ Passed The PR description follows the template structure with a clear description of changes, includes an additional summary by an automated tool, and completes most checklist items. The description is comprehensive and addresses the purpose of the change.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch vn/cyclist-emoji-pending-delivery

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@neal-bpm neal-bpm marked this pull request as ready for review April 17, 2026 20:26
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@lib/bike_brigade/slack_api/payload_builder.ex`:
- Around line 181-182: The helper delivery_status_icon/1 currently maps every
non-:completed status to :bicyclist:, which wrongly shows :failed and :removed
as active; update the delivery_status_icon function to pattern-match the actual
DeliveryStatusEnum variants (e.g. :completed, :failed, :removed, and the
specific pending/in-progress atoms used in lib/bike_brigade/delivery/task.ex) so
that terminal states like :failed and :removed return distinct icons (e.g. :x:
or :no_entry:) while only pending/in-progress statuses return :bicyclist:,
keeping delivery_status_icon/1 exhaustive and explicit.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 1e730dea-b1c7-4b9f-8398-34e660371835

📥 Commits

Reviewing files that changed from the base of the PR and between 1a634a4 and 716da9f.

📒 Files selected for processing (1)
  • lib/bike_brigade/slack_api/payload_builder.ex

Comment on lines 181 to +182
defp delivery_status_icon(:completed), do: ":white_check_mark:"
defp delivery_status_icon(_), do: ":x:"
defp delivery_status_icon(_), do: ":bicyclist:"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Avoid showing failed/removed deliveries as active cyclists.

Line 182 now maps every non-:completed status to :bicyclist:. Since DeliveryStatusEnum also includes :failed and :removed in lib/bike_brigade/delivery/task.ex:12-18, those states will be displayed as active/in-progress deliveries rather than failed/removed. Consider matching only pending/in-progress statuses explicitly and preserving distinct icons for terminal non-completed states.

🚴 Proposed status-specific mapping
 defp delivery_status_icon(:completed), do: ":white_check_mark:"
-defp delivery_status_icon(_), do: ":bicyclist:"
+defp delivery_status_icon(:pending), do: ":bicyclist:"
+defp delivery_status_icon(:picked_up), do: ":bicyclist:"
+defp delivery_status_icon(:failed), do: ":x:"
+defp delivery_status_icon(:removed), do: ":no_entry_sign:"

As per coding guidelines, “This is an Elixir/Phoenix application. Review for Elixir best practices, proper use of pattern matching, and Phoenix context boundaries.”

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
defp delivery_status_icon(:completed), do: ":white_check_mark:"
defp delivery_status_icon(_), do: ":x:"
defp delivery_status_icon(_), do: ":bicyclist:"
defp delivery_status_icon(:completed), do: ":white_check_mark:"
defp delivery_status_icon(:pending), do: ":bicyclist:"
defp delivery_status_icon(:picked_up), do: ":bicyclist:"
defp delivery_status_icon(:failed), do: ":x:"
defp delivery_status_icon(:removed), do: ":no_entry_sign:"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@lib/bike_brigade/slack_api/payload_builder.ex` around lines 181 - 182, The
helper delivery_status_icon/1 currently maps every non-:completed status to
:bicyclist:, which wrongly shows :failed and :removed as active; update the
delivery_status_icon function to pattern-match the actual DeliveryStatusEnum
variants (e.g. :completed, :failed, :removed, and the specific
pending/in-progress atoms used in lib/bike_brigade/delivery/task.ex) so that
terminal states like :failed and :removed return distinct icons (e.g. :x: or
:no_entry:) while only pending/in-progress statuses return :bicyclist:, keeping
delivery_status_icon/1 exhaustive and explicit.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 1 file

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="lib/bike_brigade/slack_api/payload_builder.ex">

<violation number="1" location="lib/bike_brigade/slack_api/payload_builder.ex:182">
P2: The catch-all `_` maps terminal failure states (`:failed`, `:removed`) to `:bicyclist:`, making them appear as active in-progress deliveries. Match pending/in-progress statuses explicitly and preserve distinct icons for failed/removed states.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.


defp delivery_status_icon(:completed), do: ":white_check_mark:"
defp delivery_status_icon(_), do: ":x:"
defp delivery_status_icon(_), do: ":bicyclist:"
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot Apr 17, 2026

Choose a reason for hiding this comment

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

P2: The catch-all _ maps terminal failure states (:failed, :removed) to :bicyclist:, making them appear as active in-progress deliveries. Match pending/in-progress statuses explicitly and preserve distinct icons for failed/removed states.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At lib/bike_brigade/slack_api/payload_builder.ex, line 182:

<comment>The catch-all `_` maps terminal failure states (`:failed`, `:removed`) to `:bicyclist:`, making them appear as active in-progress deliveries. Match pending/in-progress statuses explicitly and preserve distinct icons for failed/removed states.</comment>

<file context>
@@ -179,7 +179,7 @@ defmodule BikeBrigade.SlackApi.PayloadBuilder do
 
   defp delivery_status_icon(:completed), do: ":white_check_mark:"
-  defp delivery_status_icon(_), do: ":x:"
+  defp delivery_status_icon(_), do: ":bicyclist:"
 
   def filter_mrkdwn(nil) do
</file context>
Fix with Cubic

@neal-bpm neal-bpm merged commit f9f2db7 into main Apr 18, 2026
3 checks passed
@neal-bpm neal-bpm deleted the vn/cyclist-emoji-pending-delivery branch April 18, 2026 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants