[Partner Nodes] add new "arrow-1.1" and "arrow-1.1-max" SVG models#13447
[Partner Nodes] add new "arrow-1.1" and "arrow-1.1-max" SVG models#13447Kosinkadink merged 2 commits intomasterfrom
Conversation
Signed-off-by: bigcat88 <bigcat88@icloud.com>
📝 WalkthroughWalkthroughThe PR refactors Arrow model configuration in the Quiver nodes by introducing shared model definitions and helper functions. Hardcoded model options are replaced with dynamically generated configurations for 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
comfy_api_nodes/nodes_quiver.py (1)
117-128: Duplicate pricing expression across both nodes — consider a small helper.The exact same jsonata
exprblock (anddepends_on) is repeated verbatim at Lines 117–128 and Lines 233–244. A tiny helper like_arrow_price_badge()returning anIO.PriceBadge(...)would keep the two nodes in lockstep when the next pricing tweak inevitably arrives, and it sidesteps the classic "updated one, forgot the other" bug. The model→substring matching ("max"/"preview") is also a bit fragile for future model names, so centralizing it helps there too.♻️ Suggested refactor (module-level helper)
+_ARROW_PRICE_EXPR = """ +( + $contains(widgets.model, "max") + ? {"type":"usd","usd":0.3575} + : $contains(widgets.model, "preview") + ? {"type":"usd","usd":0.429} + : {"type":"usd","usd":0.286} +) +""" + + +def _arrow_price_badge() -> "IO.PriceBadge": + return IO.PriceBadge( + depends_on=IO.PriceBadgeDepends(widgets=["model"]), + expr=_ARROW_PRICE_EXPR, + )Then at both call sites:
- price_badge=IO.PriceBadge( - depends_on=IO.PriceBadgeDepends(widgets=["model"]), - expr=""" - ( - $contains(widgets.model, "max") - ? {"type":"usd","usd":0.3575} - : $contains(widgets.model, "preview") - ? {"type":"usd","usd":0.429} - : {"type":"usd","usd":0.286} - ) - """, - ), + price_badge=_arrow_price_badge(),🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@comfy_api_nodes/nodes_quiver.py` around lines 117 - 128, Extract the duplicated PriceBadge creation into a single helper function (e.g., _arrow_price_badge()) that returns IO.PriceBadge with the shared IO.PriceBadgeDepends(widgets=["model"]) and the jsonata pricing expr; then replace both direct IO.PriceBadge(...) occurrences with a call to _arrow_price_badge(). Ensure the helper centralizes the model matching logic (the "max"/"preview" substring checks) so future updates apply in one place and both nodes that currently construct IO.PriceBadge use that helper.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@comfy_api_nodes/nodes_quiver.py`:
- Around line 117-128: Extract the duplicated PriceBadge creation into a single
helper function (e.g., _arrow_price_badge()) that returns IO.PriceBadge with the
shared IO.PriceBadgeDepends(widgets=["model"]) and the jsonata pricing expr;
then replace both direct IO.PriceBadge(...) occurrences with a call to
_arrow_price_badge(). Ensure the helper centralizes the model matching logic
(the "max"/"preview" substring checks) so future updates apply in one place and
both nodes that currently construct IO.PriceBadge use that helper.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 62a9fdbd-085d-4eae-ae01-d54f6f2b3e95
📒 Files selected for processing (1)
comfy_api_nodes/nodes_quiver.py
API Node PR Checklist
Scope
Pricing & Billing
If Need pricing update:
QA
Comms