Skip to content

[refactor] Rename facilitator-feedback route param: [groupId] -> [meetPersonId] (#2487)#2592

Merged
Will-Howard merged 1 commit into
masterfrom
wh-2487-facilitator-feedback-rename-2026-06
Jun 1, 2026
Merged

[refactor] Rename facilitator-feedback route param: [groupId] -> [meetPersonId] (#2487)#2592
Will-Howard merged 1 commit into
masterfrom
wh-2487-facilitator-feedback-rename-2026-06

Conversation

@Will-Howard

Copy link
Copy Markdown
Collaborator

Description

Every caller of /facilitator-feedback/[groupId] passes a meetPerson id (the value comes from meetPerson.id, not a group id), so the dynamic-param name is misleading for anyone opening the file. The URL path is unchanged — only the param name (and the page-internal router.query read) move.

To keep stale tabs alive during the deploy window, the renamed page reads both names with a fallback: (router.query.meetPersonId ?? router.query.groupId). A follow-up PR removes the fallback once the deploy stabilises.

Issue

Fixes #2487

Developer checklist

…tPersonId] (#2487)

Every caller of this route passes a meetPerson id; the `groupId` segment name
was misleading. The URL path itself is unchanged.

Reads both `meetPersonId` and `groupId` from `router.query` as a defensive
fallback for stale clients during the deploy window. Follow-up PR drops the
fallback.
@Will-Howard Will-Howard temporarily deployed to wh-2487-facilitator-feedback-rename-2026-06 - bluedot-preview PR #2592 June 1, 2026 13:27 — with Render Destroyed
@coderabbitai

coderabbitai Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

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

More reviews will be available in 31 minutes and 25 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: 991f19df-5e94-4422-9a96-655aa1d94326

📥 Commits

Reviewing files that changed from the base of the PR and between 4eaecc6 and 9e898cd.

📒 Files selected for processing (3)
  • apps/website/src/__tests__/pages/facilitator-feedback/[meetPersonId].test.tsx
  • apps/website/src/pages/facilitator-feedback/[meetPersonId].tsx
  • apps/website/src/pages/facilitator-feedback/[meetPersonId]/success.tsx
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch wh-2487-facilitator-feedback-rename-2026-06

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.

@Will-Howard Will-Howard temporarily deployed to wh-2487-facilitator-feedback-rename-2026-06 - bluedot-storybook-preview PR #2592 June 1, 2026 13:27 — with Render Destroyed
@greptile-apps

greptile-apps Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR renames the Next.js dynamic route segment from [groupId] to [meetPersonId] across the facilitator-feedback flow (main page, success page, and their tests), correcting a misleading param name — callers have always passed a meetPerson.id, never a group id. The URL path is unchanged; only the file names and internal router.query reads move.

  • Main and success pages: router.query.groupId is replaced with (router.query.meetPersonId ?? router.query.groupId) to keep stale browser tabs functional during the deploy window; a follow-up PR will remove the fallback once the deploy stabilises.
  • Test file: Import path and mock router query are updated to reflect the new param name, though the new groupId fallback branch has no test coverage.

Confidence Score: 4/5

Safe to merge — this is a pure rename with a well-scoped backward-compat fallback; the URL path is unchanged so no external links or API calls break.

The rename itself is clean and the fallback is harmless. The only gap is that the new groupId fallback expression is untested, meaning a regression there would be invisible until the follow-up removal PR. No runtime data or auth paths are affected.

The test file would benefit from a second case covering the groupId-only scenario before the follow-up removal PR lands.

Important Files Changed

Filename Overview
apps/website/src/pages/facilitator-feedback/[meetPersonId].tsx Renamed from [groupId].tsx; adds a backward-compat fallback (router.query.meetPersonId ?? router.query.groupId) during the deploy window. Fallback is safe but untested.
apps/website/src/pages/facilitator-feedback/[meetPersonId]/success.tsx Renamed from [groupId]/success.tsx; applies the same groupId fallback. Since users only reach this page after submitting from the main page (new bundle), the fallback here is unlikely to ever fire, but is harmless.
apps/website/src/tests/pages/facilitator-feedback/[meetPersonId].test.tsx Renamed from [groupId].test.tsx; updates the mock router to use meetPersonId. The new fallback code path (when only groupId is present) has no test coverage.

Sequence Diagram

sequenceDiagram
    participant Browser
    participant NextRouter
    participant FeedbackPage as [meetPersonId].tsx
    participant SuccessPage as [meetPersonId]/success.tsx

    Browser->>NextRouter: GET /facilitator-feedback/rec123
    NextRouter->>FeedbackPage: "router.query.meetPersonId = "rec123""
    Note over FeedbackPage: meetPersonId = query.meetPersonId ?? query.groupId
    FeedbackPage->>Browser: Render feedback form

    Browser->>FeedbackPage: Submit feedback
    FeedbackPage->>NextRouter: router.push(/facilitator-feedback/rec123/success)
    NextRouter->>SuccessPage: "router.query.meetPersonId = "rec123""
    Note over SuccessPage: meetPersonId = query.meetPersonId ?? query.groupId
    SuccessPage->>Browser: Render success page
Loading

Reviews (1): Last reviewed commit: "[refactor] Rename facilitator-feedback r..." | Re-trigger Greptile

Comment on lines 16 to 23
const mockRouter = {
query: { groupId: 'rec-facilitator' },
query: { meetPersonId: 'rec-facilitator' },
isReady: true,
asPath: '/facilitator-feedback/rec-facilitator',
pathname: '/facilitator-feedback/[groupId]',
pathname: '/facilitator-feedback/[meetPersonId]',
push: vi.fn(),
replace: vi.fn(),
};

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 Missing test for the groupId fallback path

The new backward-compat expression (router.query.meetPersonId ?? router.query.groupId) is the only functional code change in this PR, but the existing test only exercises meetPersonId. A stale-client scenario where router.query only contains groupId (and meetPersonId is absent) has no coverage, so a regression in the fallback could go undetected before the follow-up removal PR lands.

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

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

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@Will-Howard Will-Howard merged commit 8aee159 into master Jun 1, 2026
9 checks passed
@Will-Howard Will-Howard deleted the wh-2487-facilitator-feedback-rename-2026-06 branch June 1, 2026 13:37
Will-Howard added a commit that referenced this pull request Jun 5, 2026
Stale tabs from before the rename have rolled over by now; no caller writes
the old `groupId` param anymore.
Will-Howard added a commit that referenced this pull request Jun 5, 2026
Stale tabs from before the rename have rolled over by now; no caller writes
the old `groupId` param anymore.
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.

Rename facilitator-feedback route param: [groupId].tsx -> [meetPersonId].tsx

1 participant