Skip to content

fix: rename duplicate "Learning Requests" to "Surveys" in mobile nav#1002

Open
ayesha1145 wants to merge 4 commits intoalphaonelabs:mainfrom
ayesha1145:main
Open

fix: rename duplicate "Learning Requests" to "Surveys" in mobile nav#1002
ayesha1145 wants to merge 4 commits intoalphaonelabs:mainfrom
ayesha1145:main

Conversation

@ayesha1145
Copy link

@ayesha1145 ayesha1145 commented Mar 3, 2026

Summary

Fixed duplicate navigation label in mobile menu.

Changes

  • In base.html, the COMMUNITY section mobile nav had
    "Learning Requests" appearing twice
  • Second item links to /en/surveys/ so renamed it to "Surveys"

Issue

Fixes duplicate label bug found in mobile navigation menu

Summary by CodeRabbit

  • Style

    • Community dropdown label changed from "Learning Requests" to "Surveys" for clearer navigation.
  • Bug Fixes

    • Homepage "latest success story" now excludes placeholder/test entries titled "test" (case-insensitive), ensuring a valid, published story appears.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

👀 Peer Review Required

Hi @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:

  • Go to the PR page and click "Reviewers" on the right sidebar.
  • Select a team member or contributor to review your changes.
  • Once they approve, this reminder will be automatically removed.

Thank you for contributing! 🎉

@github-actions github-actions bot added the files-changed: 1 PR changes 1 file label Mar 3, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 3, 2026

Warning

Rate limit exceeded

@ayesha1145 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 15 minutes and 2 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 ID: ac810ba5-c35f-4be6-8aab-8c6c0c778c38

📥 Commits

Reviewing files that changed from the base of the PR and between 17dd38a and 6e434dd.

📒 Files selected for processing (1)
  • web/views.py

Walkthrough

Updated COMMUNITY dropdown label from "Learning Requests" to "Surveys" and adjusted the homepage query to exclude SuccessStory entries whose title equals "test" (case-insensitive) when selecting the latest story.

Changes

Cohort / File(s) Summary
Navigation Label Update
web/templates/base.html
Changed COMMUNITY dropdown item text from "Learning Requests" to "Surveys"; the URL ({% url 'surveys' %}) remains unchanged.
Homepage Query Filter
web/views.py
Added filter to exclude SuccessStory records with title exactly "test" (case-insensitive) from the latest_success_story query before ordering by published_at.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: renaming a duplicate label in the navigation from 'Learning Requests' to 'Surveys' in the mobile nav, which matches the primary modification in base.html.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot]
coderabbitai bot previously approved these changes Mar 3, 2026
@github-actions github-actions bot added files-changed: 2 PR changes 2 files and removed files-changed: 1 PR changes 1 file labels Mar 4, 2026
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

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.

ℹ️ Review info

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: c46e1236-5fb1-4f20-8a7b-309fbbdb36d8

📥 Commits

Reviewing files that changed from the base of the PR and between 80aed18 and d998acf.

📒 Files selected for processing (1)
  • web/views.py

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This PR has 1 unresolved review conversation. Please resolve them before this PR can be merged.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

♻️ Duplicate comments (1)
web/views.py (1)

324-324: ⚠️ Potential issue | 🟡 Minor

Wrap 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.

ℹ️ Review info

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 053147cf-d22c-406d-b50e-d73c75998743

📥 Commits

Reviewing files that changed from the base of the PR and between d998acf and 17dd38a.

📒 Files selected for processing (1)
  • web/views.py

@github-actions github-actions bot dismissed their stale review March 4, 2026 03:22

All review conversations have been resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

files-changed: 2 PR changes 2 files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant