-
Notifications
You must be signed in to change notification settings - Fork 4
Explore page improvements #709
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ved workflow widgets
- Added logic to hide editor when user does not belong to a workspace
|
Unable to Process PR Review The author of this PR does not exist on Entelligence Dashboard. Please add the user to Entelligence AI here to enable reviews for this user. |
WalkthroughThis change updates the Possibly related PRs
Suggested reviewers
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this 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
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
usage_costs/migrations/0032_alter_modelpricing_model_name_alter_modelpricing_sku.py(1 hunks)widgets/explore.py(1 hunks)widgets/saved_workflow.py(6 hunks)widgets/workflow_search.py(1 hunks)
🧰 Additional context used
🪛 Pylint (3.3.7)
usage_costs/migrations/0032_alter_modelpricing_model_name_alter_modelpricing_sku.py
[refactor] 6-6: Too few public methods (0/2)
(R0903)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Analyze (python)
🔇 Additional comments (6)
widgets/explore.py (1)
116-116: Good threshold adjustment for run count display.Raising the threshold from >1 to ≥50 effectively reduces visual clutter by only highlighting workflows with significant usage, which improves the user experience.
widgets/workflow_search.py (1)
189-196: Well-implemented privacy control for editor visibility.The logic correctly hides last editor information when the user isn't a member of the workspace, and the defensive use of
getattrwith a default value handles cases where theis_memberattribute might not be present.widgets/saved_workflow.py (3)
31-31: Proper implementation of the hide_last_editor feature.The parameter is consistently added with appropriate defaults and properly threaded through the function calls. The conditional logic in
render_footer_breadcrumbscorrectly respects the visibility control.Also applies to: 84-84, 168-168, 196-196
132-132: Good UX improvement for author name display.Increasing the max-width from 100px to 150px provides more space for author names, reducing truncation and improving readability.
211-211: Consistent threshold adjustment with other files.The run count display threshold change aligns with the same modification in
widgets/explore.py, ensuring consistent behavior across the application.usage_costs/migrations/0032_alter_modelpricing_model_name_alter_modelpricing_sku.py (1)
272-281: SKU choices are well-defined and appropriate.The integer-based SKU choices with clear descriptions provide good categorization for different model usage types.
| ("dream_shaper", "DreamShaper (Lykon)"), | ||
| ("dreamlike_2", "Dreamlike Photoreal 2.0 (dreamlike.art)"), | ||
| ("sd_2", "Stable Diffusion v2.1 (stability.ai)"), | ||
| ("sd_1_5", "Stable Diffusion v1.5 (RunwayML)"), | ||
| ("dall_e", "Dall-E (OpenAI)"), | ||
| ("gpt_image_1", "GPT Image 1 (OpenAI)"), | ||
| ("instruct_pix2pix", "✨ InstructPix2Pix (Tim Brooks)"), | ||
| ("openjourney_2", "Open Journey v2 beta [Deprecated] (PromptHero)"), | ||
| ("openjourney", "Open Journey [Deprecated] (PromptHero)"), | ||
| ("analog_diffusion", "Analog Diffusion [Deprecated] (wavymulder)"), | ||
| ("protogen_5_3", "Protogen v5.3 [Deprecated] (darkstorm2150)"), | ||
| ("jack_qiao", "Stable Diffusion v1.4 [Deprecated] (Jack Qiao)"), | ||
| ( | ||
| "rodent_diffusion_1_5", | ||
| "Rodent Diffusion 1.5 [Deprecated] (NerdyRodent)", | ||
| ), | ||
| ("sd_2", "Stable Diffusion v2.1 (stability.ai)"), | ||
| ("runway_ml", "Stable Diffusion v1.5 (RunwayML)"), | ||
| ("dall_e", "Dall-E (OpenAI)"), | ||
| ("jack_qiao", "Stable Diffusion v1.4 [Deprecated] (Jack Qiao)"), | ||
| ("wav2lip", "LipSync (wav2lip)"), | ||
| ("sadtalker", "LipSync (sadtalker)"), | ||
| ], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix duplicate model choices that will cause Django validation errors.
Multiple models appear as duplicates in the choices list:
dream_shaper(lines 224, 241)dreamlike_2(lines 225, 242)sd_2(lines 226, 243, 257)dall_e(lines 228, 245, 259)gpt_image_1(lines 230, 246)- Several others with duplicate keys
Django choice fields cannot have duplicate keys as this will cause validation errors.
Remove the duplicate entries to fix the model choices:
- ("dream_shaper", "DreamShaper (Lykon)"),
- ("dreamlike_2", "Dreamlike Photoreal 2.0 (dreamlike.art)"),
- ("sd_2", "Stable Diffusion v2.1 (stability.ai)"),
- ("sd_1_5", "Stable Diffusion v1.5 (RunwayML)"),
- ("dall_e", "Dall-E (OpenAI)"),
- ("gpt_image_1", "GPT Image 1 (OpenAI)"),
- ("instruct_pix2pix", "✨ InstructPix2Pix (Tim Brooks)"),
- ("openjourney_2", "Open Journey v2 beta [Deprecated] (PromptHero)"),
- ("openjourney", "Open Journey [Deprecated] (PromptHero)"),
- ("analog_diffusion", "Analog Diffusion [Deprecated] (wavymulder)"),
- ("protogen_5_3", "Protogen v5.3 [Deprecated] (darkstorm2150)"),
- ("jack_qiao", "Stable Diffusion v1.4 [Deprecated] (Jack Qiao)"),
- (
- "rodent_diffusion_1_5",
- "Rodent Diffusion 1.5 [Deprecated] (NerdyRodent)",
- ),
- ("sd_2", "Stable Diffusion v2.1 (stability.ai)"),
- ("runway_ml", "Stable Diffusion v1.5 (RunwayML)"),
- ("dall_e", "Dall-E (OpenAI)"),
- ("jack_qiao", "Stable Diffusion v1.4 [Deprecated] (Jack Qiao)"),Committable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In
usage_costs/migrations/0032_alter_modelpricing_model_name_alter_modelpricing_sku.py
between lines 241 and 263, there are duplicate entries in the model choices list
which will cause Django validation errors. Identify and remove all duplicate
keys so that each model key appears only once in the choices list, ensuring no
repeated keys like "sd_2", "dall_e", "jack_qiao", and others remain.
Q/A checklist
You can visualize this using tuna:
To measure import time for a specific library:
To reduce import times, import libraries that take a long time inside the functions that use them instead of at the top of the file:
Legal Boilerplate
Look, I get it. The entity doing business as “Gooey.AI” and/or “Dara.network” was incorporated in the State of Delaware in 2020 as Dara Network Inc. and is gonna need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Dara Network Inc can use, modify, copy, and redistribute my contributions, under its choice of terms.