Skip to content

Quick apply redirects to facilitator applications#2613

Merged
joshestein merged 2 commits into
masterfrom
josh/quick-apply-redirect-to-facilitator-applicaitons
Jun 5, 2026
Merged

Quick apply redirects to facilitator applications#2613
joshestein merged 2 commits into
masterfrom
josh/quick-apply-redirect-to-facilitator-applicaitons

Conversation

@joshestein

Copy link
Copy Markdown
Collaborator

Description

When I built this, I assumed that the panel should redirect to the first upcoming round. This was incorrect. It should rather redirect to the facilitator-applications route.

@Will-Howard Will-Howard temporarily deployed to josh/quick-apply-redirect-to-facilitator-applicaitons - bluedot-preview PR #2613 June 5, 2026 10:18 — with Render Destroyed
@Will-Howard Will-Howard temporarily deployed to josh/quick-apply-redirect-to-facilitator-applicaitons - bluedot-storybook-preview PR #2613 June 5, 2026 10:19 — with Render Destroyed
@coderabbitai

coderabbitai Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2e11c087-d1e6-4c8b-ac06-d4dbe70e5c00

📥 Commits

Reviewing files that changed from the base of the PR and between bea3f69 and aa67774.

📒 Files selected for processing (2)
  • apps/website/src/components/courses/SidebarFacilitateAgainPanel.test.tsx
  • apps/website/src/components/courses/SidebarFacilitateAgainPanel.tsx

📝 Walkthrough

Walkthrough

This PR modifies SidebarFacilitateAgainPanel to simplify its eligibility logic and routing behaviour. The component previously selected the earliest open round and linked directly to that round via a query parameter; it now checks whether any eligible course/round combination exists and links to the general facilitator applications page. The tests are updated to expect the new /facilitator-applications target and to validate gating across multiple course slug scenarios.

Possibly related PRs

  • bluedotimpact/bluedot#2609: Initial "Quick Apply" panel implementation that this PR builds upon by changing its eligibility check and navigation pattern.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description provides a brief explanation of the change but lacks several required template sections including an issue reference, developer checklist, and screenshot section. Add the missing required sections from the template: Issue reference (Fixes #...), completed developer checklist items, and screenshot section if there are visual changes.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: updating the quick apply redirect destination from a specific round to the facilitator applications route.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch josh/quick-apply-redirect-to-facilitator-applicaitons

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.

@greptile-apps

greptile-apps Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes the redirect destination for the "Quick apply to facilitate again" sidebar panel: it previously linked to the first upcoming round's quick-apply URL (/facilitator-applications/quick-apply?round=<id>), but the intended behavior is to send users to the general facilitator applications page (/facilitator-applications).

  • SidebarFacilitateAgainPanel.tsx: Simplified the data-lookup from finding the first round to checking whether the current course slug has any eligible round, and updated the link href from a dynamic round URL to ROUTES.facilitatorApplications.url.
  • SidebarFacilitateAgainPanel.test.tsx: Tests updated to assert the new static /facilitator-applications href and confirm panels for empty-rounds or unmatched slugs render nothing.

Confidence Score: 5/5

Safe to merge — a focused, well-tested one-component change with no side effects on other parts of the codebase.

The change is minimal: one data-lookup expression and one href string replaced with a static route constant. Loading and empty-data states both continue to return null correctly. The tests cover the happy path and the guard conditions, and the new assertions match the updated behavior exactly.

No files require special attention.

Important Files Changed

Filename Overview
apps/website/src/components/courses/SidebarFacilitateAgainPanel.tsx Changed from finding the first round to checking course eligibility, and updated the link destination to the static facilitator-applications route. Logic is correct and handles loading/empty states properly.
apps/website/src/components/courses/SidebarFacilitateAgainPanel.test.tsx Tests updated to match new static href and new eligibility-check semantics; coverage is appropriate for both the happy path and the no-rounds/missing-slug cases.

Sequence Diagram

sequenceDiagram
    participant User
    participant SidebarPanel as SidebarFacilitateAgainPanel
    participant tRPC as tRPC (eligibleRounds)
    participant FacilitatorApps as /facilitator-applications

    User->>SidebarPanel: visits course page
    SidebarPanel->>tRPC: useQuery (eligibleRounds)
    tRPC-->>SidebarPanel: EligibleRoundsCourse[]
    SidebarPanel->>SidebarPanel: "some(course => courseSlug matches && rounds.length > 0)"
    alt no eligible round
        SidebarPanel-->>User: render nothing
    else has eligible round
        SidebarPanel-->>User: render Quick apply to facilitate again link
        User->>FacilitatorApps: click navigate to /facilitator-applications
    end
Loading

Reviews (1): Last reviewed commit: "Update tests" | Re-trigger Greptile

@joshestein joshestein merged commit 854befb into master Jun 5, 2026
7 checks passed
@joshestein joshestein deleted the josh/quick-apply-redirect-to-facilitator-applicaitons branch June 5, 2026 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants