fix: rename duplicate "Learning Requests" to "Surveys" in mobile nav#1002
fix: rename duplicate "Learning Requests" to "Surveys" in mobile nav#1002ayesha1145 wants to merge 7 commits intoalphaonelabs:mainfrom
Conversation
👀 Peer Review RequiredHi @ayesha1145! This pull request does not yet have a peer review. Before this PR can be merged, please request a review from one of your peers:
Thank you for contributing! 🎉 |
|
Warning Rate limit exceeded
⌛ 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. ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughThe changes modify the COMMUNITY dropdown navigation label from "Learning Requests" to "Surveys" and update the homepage logic to exclude SuccessStory entries with title "test" (case-insensitive) when selecting the latest story. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@web/views.py`:
- Line 324: The queryset chain assigned to latest_success_story is exceeding max
line length; break the chain into a wrapped expression using parentheses and
one-call-per-line formatting so it passes Black/flake8 (e.g., start with
SuccessStory.objects.filter(...).exclude(...).order_by(...).first() split across
lines), keeping the same call order and the variable name latest_success_story
to preserve behavior.
- Line 325: Remove the stray Markdown fence token (```) on the stray line that
makes web/views.py invalid, and reformat the long queryset assignment to
latest_success_story so it does not exceed 120 characters: break the queryset
chain across multiple lines (e.g., put each call like .filter(...),
.exclude(...), .order_by(...), .first() on its own line and align them) and
ensure the file passes Black formatting and parses as valid Python.
There was a problem hiding this comment.
♻️ Duplicate comments (1)
web/views.py (1)
324-324:⚠️ Potential issue | 🟡 MinorWrap the queryset chain to meet the 120-character lint limit.
Line 324 is still over the project max line length; this will keep flake8/Black checks failing.
♻️ Proposed fix
- latest_success_story = SuccessStory.objects.filter(status="published").exclude(title__iexact="test").order_by("-published_at").first() + latest_success_story = ( + SuccessStory.objects.filter(status="published") + .exclude(title__iexact="test") + .order_by("-published_at") + .first() + )As per coding guidelines
**/*.py: "Format Python code with Black using 120-character line length" and "Python code must pass flake8 with max line length 120".🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@web/views.py` at line 324, The single long queryset assignment for latest_success_story exceeds the 120-char limit; refactor the expression by breaking the SuccessStory.objects chain across multiple lines—call filter(...), then .exclude(...), then .order_by("-published_at") and finally .first() each on their own wrapped lines so the whole statement stays under 120 characters and preserves the same behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@web/views.py`:
- Line 324: The single long queryset assignment for latest_success_story exceeds
the 120-char limit; refactor the expression by breaking the SuccessStory.objects
chain across multiple lines—call filter(...), then .exclude(...), then
.order_by("-published_at") and finally .first() each on their own wrapped lines
so the whole statement stays under 120 characters and preserves the same
behavior.
All review conversations have been resolved.
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@web/templates/emails/_body_.code-search`:
- Around line 1-129: This accidentally committed VS Code Search Editor artifact
web/templates/emails/_body_.code-search should be removed from the PR and
prevented from future commits: remove the file from Git tracking (keep a local
copy if needed) and commit that removal, then add the pattern *.code-search to
.gitignore and commit the updated .gitignore so VS Code search artifacts are
ignored going forward; target the file named
web/templates/emails/_body_.code-search and the repository .gitignore when
making these changes.
In `@web/views.py`:
- Around line 324-329: The multiline queryset assignment to latest_success_story
is mis-indented; reformat the continuation lines so they are indented under the
opening parenthesis of the assignment (i.e., align .filter(...), .exclude(...),
.order_by(...), and .first() as a continuation block under the "(" after
latest_success_story = ( ) ) to satisfy Black/flake8 style checks for
SuccessStory.objects.filter/exclude/order_by.first usage.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: dcc70321-68e7-4338-9f53-8605c40b88f2
📒 Files selected for processing (2)
web/templates/emails/_body_.code-searchweb/views.py
There was a problem hiding this comment.
♻️ Duplicate comments (1)
web/views.py (1)
324-329:⚠️ Potential issue | 🟡 MinorFix queryset continuation indentation for formatter/lint compliance.
Line 325 to Line 329 should be indented as a continuation block under the opening parenthesis.
♻️ Proposed fix
latest_success_story = ( - SuccessStory.objects.filter(status="published") - .exclude(title__iexact="test") - .order_by("-published_at") - .first() -) + SuccessStory.objects.filter(status="published") + .exclude(title__iexact="test") + .order_by("-published_at") + .first() + )As per coding guidelines
**/*.py: "Format Python code with Black using 120-character line length", "Python code must pass flake8 with max line length 120", and "**/*.py: Fix linting errors in code".🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@web/views.py` around lines 324 - 329, The queryset assignment to latest_success_story is not indented as a proper continuation under the opening parenthesis; reformat the block so the chained calls starting with SuccessStory.objects.filter(...) through .first() are indented one level under the opening parenthesis (i.e., align continuation lines under the parenthesis) to satisfy Black/flake8 formatting; update the SuccessStory.objects.filter(...).exclude(...).order_by(...).first() block accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@web/views.py`:
- Around line 324-329: The queryset assignment to latest_success_story is not
indented as a proper continuation under the opening parenthesis; reformat the
block so the chained calls starting with SuccessStory.objects.filter(...)
through .first() are indented one level under the opening parenthesis (i.e.,
align continuation lines under the parenthesis) to satisfy Black/flake8
formatting; update the
SuccessStory.objects.filter(...).exclude(...).order_by(...).first() block
accordingly.
All review conversations have been resolved.
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
PR #1002 is ready for human review! CodeRabbit has reviewed all changes and conversations are resolved. Would love a maintainer to take a look 😊 |
Summary
Fixed duplicate navigation label in mobile menu.
Changes
"Learning Requests" appearing twice
Issue
Fixes duplicate label bug found in mobile navigation menu
Summary by CodeRabbit
Style
Bug Fixes