Skip to content

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

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

fix: rename duplicate "Learning Requests" to "Surveys" in mobile nav#1002
ayesha1145 wants to merge 7 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

    • Updated navigation label in community dropdown.
  • Bug Fixes

    • Improved homepage success stories display by filtering out test entries.

@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 3 minutes and 53 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 configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: f387fa13-910c-4393-b1da-6ad0acc5702e

📥 Commits

Reviewing files that changed from the base of the PR and between 3ac9fa6 and 0ba46ef.

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

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

The 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

Cohort / File(s) Summary
Navigation Label Update
web/templates/base.html
Changed COMMUNITY dropdown menu item label from "Learning Requests" to "Surveys"; URL remains unchanged.
Homepage Query Filter
web/views.py
Added .exclude(title__iexact="test") filter to the SuccessStory queryset to exclude test entries when fetching the latest success story; reformatted assignment into parenthesized block.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 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 primary change: renaming a duplicate navigation label from 'Learning Requests' to 'Surveys' in the mobile navigation menu, which aligns with the main modification in web/templates/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.

coderabbitai[bot]
coderabbitai bot previously approved these changes Mar 4, 2026
@github-actions github-actions bot added files-changed: 3 PR changes 3 files and removed files-changed: 2 PR changes 2 files 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/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

📥 Commits

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

📒 Files selected for processing (2)
  • web/templates/emails/_body_.code-search
  • web/views.py

@github-actions github-actions bot added files-changed: 2 PR changes 2 files and removed files-changed: 3 PR changes 3 files labels Mar 4, 2026
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-329: ⚠️ Potential issue | 🟡 Minor

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

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: bdbc5021-046a-4135-95a9-4000209d4d86

📥 Commits

Reviewing files that changed from the base of the PR and between 1bb5d95 and 3ac9fa6.

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

@github-actions github-actions bot dismissed their stale review March 4, 2026 20:06

All review conversations have been resolved.

@ayesha1145
Copy link
Author

@coderabbitai review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 4, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@ayesha1145
Copy link
Author

PR #1002 is ready for human review! CodeRabbit has reviewed all changes and conversations are resolved. Would love a maintainer to take a look 😊

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