Improve JSON dynamic progress bars#207
Conversation
…ource data has it.
|
@nimble-turtle is attempting to deploy a commit to the guibranco's projects Team on Vercel. A member of the Team first needs to authorize it. |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpdates the README to show two dynamic JSON progress bar examples (one with a title label and one without) in a preview table, and introduces a helper in app.py to suppress trailing .0 for integer-like float progress values before rendering. Class diagram for updated progress formatting in app moduleclassDiagram
class app {
+dict get_style_fields(style)
+object format_progress_text(progress)
+dict get_template_fields(progress)
}
app : get_style_fields(style)
app : format_progress_text(progress)
app : get_template_fields(progress)
class format_progress_text {
+object format_progress_text(progress)
}
class get_template_fields {
+dict get_template_fields(progress)
}
get_template_fields --> format_progress_text : calls
Flow diagram for formatting progress text without unnecessary decimal pointflowchart TD
A[Input progress value] --> B{Is progress a float?}
B -- No --> E[Return progress as is]
B -- Yes --> C{Is progress an integer value?}
C -- Yes --> D[Convert progress to int and return]
C -- No --> E[Return progress as is]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 40 minutes and 51 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughDocumentation updated with an expanded examples table showing multiple JSON-derived progress visualizations. A new helper function Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
|
|
Overall Grade |
Security Reliability Complexity Hygiene |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| Secrets | Apr 14, 2026 5:24p.m. | Review ↗ | |
| Python | Apr 14, 2026 5:24p.m. | Review ↗ |
Important
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
|
Please provide a description for this pull request. |
|
Failed to generate code suggestions for PR |
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Consider having
format_progress_textconsistently return a string (e.g.,str(int(progress))for whole-number floats) to avoid changing the type ofprogress_textfrom float to int and to keep downstream template/consumers behavior more predictable. - You might want to reuse or factor out the long JSON sample URL in the README (e.g., via link references or a base URL variable) to avoid duplication and make future updates to that URL less error-prone.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider having `format_progress_text` consistently return a string (e.g., `str(int(progress))` for whole-number floats) to avoid changing the type of `progress_text` from float to int and to keep downstream template/consumers behavior more predictable.
- You might want to reuse or factor out the long JSON sample URL in the README (e.g., via link references or a base URL variable) to avoid duplication and make future updates to that URL less error-prone.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
TIP This summary will be updated as you push new changes. Give us feedback
There was a problem hiding this comment.
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 `@app.py`:
- Around line 345-349: format_progress_text currently converts integral floats
to int, causing source-authored 73.0 to become 73; revert that behavior by
removing the int coercion in format_progress_text so a float is returned
unchanged (thus preserving "73.0" when serialized), and also update
extract_progress_with_jsonpath to avoid collapsing original numeric types into
float (preserve the original JSON token type or capture the original string form
and pass it through) so the formatter receives the actual source representation.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Fixes:
Summary by CodeRabbit
Documentation
Bug Fixes