Skip to content

Quick apply via '/facilitated-courses'#2621

Merged
joshestein merged 7 commits into
masterfrom
josh/2608-quick-apply-facilitated-courses
Jun 8, 2026
Merged

Quick apply via '/facilitated-courses'#2621
joshestein merged 7 commits into
masterfrom
josh/2608-quick-apply-facilitated-courses

Conversation

@joshestein

Copy link
Copy Markdown
Collaborator

Description

Adds a new panel to the 'facilitated courses' route that redirects users to 'facilitated applications' where they can quickly reapply to facilitate again.

Issue

Fixes #2608

Developer checklist

Screenshot

image image

@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@joshestein, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 29 minutes and 24 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, 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 include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 113795c5-4744-4423-adc9-7eb5da280eb7

📥 Commits

Reviewing files that changed from the base of the PR and between 71f3ce3 and 6b23ffd.

📒 Files selected for processing (2)
  • apps/website/src/components/my-courses/QuickApplyBanner.stories.tsx
  • apps/website/src/stores/quickApplyBanner.ts
📝 Walkthrough

Walkthrough

This PR introduces a quick-apply banner feature for the facilitated-courses page. The implementation consists of three parts: a persisted Zustand store that tracks which banner dismissals the user has made, a QuickApplyBanner React component that queries eligible facilitator application rounds and conditionally renders a banner with hide and quick-apply actions, and integration of that component into the facilitated-courses layout. The component derives a deterministic dismissal key from sorted round IDs and only shows the banner when the user has eligible rounds and has not dismissed the specific combination.

Possibly related PRs

  • bluedotimpact/bluedot#2613: Updates "quick apply" navigation in the new QuickApplyBanner alongside SidebarFacilitateAgainPanel to use the general facilitator applications route without round-specific query parameters.
  • bluedotimpact/bluedot#2606: Establishes the trpc.facilitatorApplications.eligibleRounds query endpoint that the QuickApplyBanner component directly consumes.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title concisely captures the main change: adding quick apply functionality to the facilitated-courses route.
Description check ✅ Passed The description covers the main change, references the linked issue (#2608), completes all developer checklist items, and includes relevant screenshots.
Linked Issues check ✅ Passed The pull request successfully implements the definition of done from issue #2608 by adding a new quick apply panel to the facilitated-courses route.
Out of Scope Changes check ✅ Passed All changes are directly related to adding the quick apply banner feature; no unrelated modifications are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch josh/2608-quick-apply-facilitated-courses

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 8, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds a dismissible QuickApplyBanner to the /facilitated-courses page that surfaces when a facilitator is wrapping up a cohort and open rounds are still available. The banner queries facilitatorApplications.eligibleRounds, derives a per-opportunity dismiss key from the sorted round IDs (persisted via Zustand), and links to /facilitator-applications.

  • New component (QuickApplyBanner) with a Storybook story for both the eligible and ineligible states.
  • New Zustand persist store (quickApplyBanner) keying dismissal by the set of currently-eligible round IDs so the banner resurfaces for genuinely new opportunities.
  • Integration in facilitated-courses.tsx inside the existing data-loaded guard, placed between the next-discussion cards and the tab pills.

Confidence Score: 4/5

Safe to merge; the change is additive and the banner gracefully renders nothing on loading/error states.

The implementation is clean and well-guarded. The only notable concerns are the unconventional date-as-version in the persist store and the absence of unit tests for the new component and its dismissal logic.

No files require special attention beyond the minor version convention in apps/website/src/stores/quickApplyBanner.ts.

Important Files Changed

Filename Overview
apps/website/src/components/my-courses/QuickApplyBanner.tsx New banner component that queries eligible rounds and renders a dismissible call-to-action; dismiss key derivation is clean, loading/error states gracefully render nothing, no tests.
apps/website/src/stores/quickApplyBanner.ts New Zustand persist store for tracking dismissed banner keys; uses today's date as the schema version (20260608) which is an unusual convention for a migration version number.
apps/website/src/pages/facilitated-courses.tsx Minimal addition of QuickApplyBanner inside the existing data-loaded guard block; placement and gating look correct.
apps/website/src/components/my-courses/QuickApplyBanner.stories.tsx Storybook stories for both the eligible (default) and ineligible (empty) banner states; looks complete and correct.

Sequence Diagram

sequenceDiagram
    participant U as User (facilitator)
    participant FC as /facilitated-courses page
    participant QB as QuickApplyBanner
    participant TRPC as tRPC: eligibleRounds
    participant ZS as Zustand persist store

    U->>FC: visits /facilitated-courses
    FC->>QB: renders QuickApplyBanner
    QB->>TRPC: useQuery(facilitatorApplications.eligibleRounds)
    TRPC-->>QB: EligibleRoundsCourse[]
    QB->>QB: "derive dismissKey (sorted round IDs joined by '|')"
    QB->>ZS: read dismissedKeys[dismissKey]
    alt No eligible rounds OR already dismissed
        QB-->>FC: render null (hidden)
    else Has eligible rounds AND not dismissed
        QB-->>U: render banner with Quick Apply + Hide buttons
        alt User clicks Hide
            U->>QB: onClick dismiss
            QB->>ZS: "set dismissedKeys[dismissKey] = true (persisted to localStorage)"
            QB-->>FC: render null (hidden)
        else User clicks Quick Apply
            U->>U: navigate to /facilitator-applications
        end
    end
Loading

Reviews (1): Last reviewed commit: "`QuickApplyBanner` stories" | Re-trigger Greptile

Comment thread apps/website/src/stores/quickApplyBanner.ts Outdated
import { useQuickApplyBannerStore } from '../../stores/quickApplyBanner';
import { trpc } from '../../utils/trpc';

export const QuickApplyBanner = () => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 No tests for new component/store

The QuickApplyBanner component and the quickApplyBanner Zustand store introduce new logic (dismiss-key derivation, persistence keying by round IDs) but ship without unit tests. A test covering the case where eligibleRoundIds is empty (banner hidden), non-empty (banner visible), and a previously-dismissed key (banner hidden again) would guard against regressions in the dismissal logic.

Rule Used: Consider adding tests for any new functionality in... (source)

Learned From
bluedotimpact/bluedot#956
bluedotimpact/bluedot#969
bluedotimpact/bluedot#958

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
apps/website/src/components/my-courses/QuickApplyBanner.tsx (1)

26-31: ⚡ Quick win

Use @bluedot/ui typography primitives for banner text.

At Lines 26-31, use H4/P from @bluedot/ui rather than raw <p> elements to stay consistent with the website typography contract.

Suggested refactor
-import { CTALinkOrButton } from '`@bluedot/ui`';
+import { CTALinkOrButton, H4, P } from '`@bluedot/ui`';
...
-            <p className="text-size-sm font-bold">Quick Apply (~2 min)</p>
+            <H4 className="text-size-sm font-bold">Quick Apply (~2 min)</H4>
...
-          <p className="text-size-xs mt-1 text-pretty">
+          <P className="text-size-xs mt-1 text-pretty">
             Thanks for facilitating with BlueDot. If you want to facilitate the same course again, as a return
             facilitator, quick applying only takes 2 min!
-          </p>
+          </P>
As per coding guidelines, “Use text components from `@bluedot/ui`: `H1`, `H2`, `H3`, `H4`, `P`, and `A`.”
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/website/src/components/my-courses/QuickApplyBanner.tsx` around lines 26
- 31, Replace the raw <p> tags in the QuickApplyBanner component with the
typography primitives from `@bluedot/ui`: use H4 for the title ("Quick Apply (~2
min)") and P for the descriptive paragraph, preserving existing
className/spacing styles as props or className on those components; add the
corresponding import { H4, P } from '`@bluedot/ui`' at the top of the file and
remove the old <p> elements so the component uses H4 and P instead of plain HTML
paragraphs.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/website/src/components/my-courses/QuickApplyBanner.stories.tsx`:
- Around line 26-31: The QuickApplyBanner stories are flaky because dismissals
persist across stories; add a Storybook decorator in this file that resets the
persisted state (e.g., clear the specific localStorage key or call the store
reset used by QuickApplyBanner) before each story renders so Default and other
stories are deterministic; update the meta object (where loggedInStory() and
component QuickApplyBanner are used) to include this decorator to clear the
banner dismissal state prior to rendering.

In `@apps/website/src/components/my-courses/QuickApplyBanner.tsx`:
- Line 37: The CTALinkOrButton in QuickApplyBanner is pointing to the wrong
route constant (ROUTES.facilitatorApplications.url); update the CTA to use the
quick-apply route constant used elsewhere (e.g., ROUTES.quickApply.url or the
app's dedicated quick-apply route) so the button navigates to the quick-apply
flow; change the url prop on the CTALinkOrButton in QuickApplyBanner to the
correct ROUTES.<quickApplyName>.url constant.

---

Nitpick comments:
In `@apps/website/src/components/my-courses/QuickApplyBanner.tsx`:
- Around line 26-31: Replace the raw <p> tags in the QuickApplyBanner component
with the typography primitives from `@bluedot/ui`: use H4 for the title ("Quick
Apply (~2 min)") and P for the descriptive paragraph, preserving existing
className/spacing styles as props or className on those components; add the
corresponding import { H4, P } from '`@bluedot/ui`' at the top of the file and
remove the old <p> elements so the component uses H4 and P instead of plain HTML
paragraphs.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f5216e26-cf9f-4290-8d53-4f38af750501

📥 Commits

Reviewing files that changed from the base of the PR and between fa38cc0 and 71f3ce3.

📒 Files selected for processing (4)
  • apps/website/src/components/my-courses/QuickApplyBanner.stories.tsx
  • apps/website/src/components/my-courses/QuickApplyBanner.tsx
  • apps/website/src/pages/facilitated-courses.tsx
  • apps/website/src/stores/quickApplyBanner.ts

Comment thread apps/website/src/components/my-courses/QuickApplyBanner.stories.tsx
Comment thread apps/website/src/components/my-courses/QuickApplyBanner.tsx
@Will-Howard Will-Howard temporarily deployed to josh/2608-quick-apply-facilitated-courses - bluedot-preview PR #2621 June 8, 2026 09:14 — with Render Destroyed
@Will-Howard Will-Howard temporarily deployed to josh/2608-quick-apply-facilitated-courses - bluedot-storybook-preview PR #2621 June 8, 2026 09:14 — with Render Destroyed
@Will-Howard Will-Howard temporarily deployed to josh/2608-quick-apply-facilitated-courses - bluedot-storybook-preview PR #2621 June 8, 2026 09:17 — with Render Destroyed
@Will-Howard Will-Howard temporarily deployed to josh/2608-quick-apply-facilitated-courses - bluedot-preview PR #2621 June 8, 2026 09:17 — with Render Destroyed
@joshestein joshestein merged commit 812d429 into master Jun 8, 2026
7 checks passed
@joshestein joshestein deleted the josh/2608-quick-apply-facilitated-courses branch June 8, 2026 09:23
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.

'Quick Apply' via 'facilitated-courses'

2 participants