Skip to content

Conversation

@monofuel
Copy link
Contributor

@monofuel monofuel commented Dec 1, 2025

Screenshot From 2025-12-01 16-20-28

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +112 to +116
proc getHeartCount(outputs: seq[ItemAmount], itemNames: seq[string]): int =
## Returns total hearts produced by this protocol.
for output in outputs:
if output.itemId == 5: # "heart" item
return output.count

Choose a reason for hiding this comment

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

P1 Badge Heart protocols never sorted first due to wrong item id

The new getHeartCount checks for output.itemId == 5, but the replay item names place "heart" at index 4 by default (see replays.nim item_names list), and other replays may order items differently. As a result the helper returns 0 for actual heart outputs, so the sort comparator treats heart-producing protocols as non-heart and the UI never promotes them; the Asana requirement to show higher-heart recipes first fails whenever the heart item id is not exactly 5 (the default case).

Useful? React with 👍 / 👎.

@treeform treeform added this pull request to the merge queue Dec 1, 2025
Merged via the queue into main with commit 0eaabc9 Dec 1, 2025
27 checks passed
@treeform treeform deleted the monofuel/heart-order branch December 1, 2025 21:56
zfogg pushed a commit that referenced this pull request Dec 20, 2025
-
https://app.asana.com/1/1209016784099267/project/1209513563278644/task/1212076117461974
- show protocols with more hearts first, then fewer
- after hearts, show other recipes in any order.

<img width="588" height="664" alt="Screenshot From 2025-12-01 16-20-28"
src="https://github.com/user-attachments/assets/064facb5-d54e-4009-a93d-101c932c9a93"
/>
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