Skip to content

fix: add currentSelectionPlan as a param on getSubmissionsPath - #92

Open
tomrndom wants to merge 1 commit into
masterfrom
fix/redirect-current-selection-plan
Open

tomrndom wants to merge 1 commit into
masterfrom
fix/redirect-current-selection-plan

Conversation

@tomrndom

@tomrndom tomrndom commented Sep 9, 2026

Copy link
Copy Markdown
  • use currentSelectionPlan as prefered to return if passed

ref: https://app.clickup.com/t/9014802374/86bbwpr4d

Signed-off-by: Tomás Castillo tcastilloboireau@gmail.com

Summary by CodeRabbit

  • Bug Fixes

    • Submissions links now preserve the currently selected presentation plan when navigating from preview and confirmation pages.
    • Navigation uses the selected plan’s identifier instead of an outdated landing-plan value when both are available.
    • When no plan is selected, submissions continue to open the complete plan list as before.
  • Tests

    • Added coverage to verify that the current selection takes precedence over stale plan settings.

…urn on done button

Signed-off-by: Tomás Castillo <tcastilloboireau@gmail.com>
@coderabbitai

coderabbitai Bot commented Sep 9, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Essentials

Run ID: 77291c5f-01f4-4183-8d00-4659957d172f

📥 Commits

Reviewing files that changed from the base of the PR and between 2da7845 and a27ad59.

📒 Files selected for processing (4)
  • src/pages/preview-presentation-page.js
  • src/pages/thankyou-presentation-page.js
  • src/utils/methods.js
  • src/utils/methods.test.js

Included review availability: 4 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.


📝 Walkthrough

Walkthrough

The submission path helper now accepts an optional current selection plan ID. Preview and thank-you presentation pages pass the selected plan ID during completion. Tests verify that the current plan overrides a stored landing plan.

Changes

Selection plan routing

Layer / File(s) Summary
Submission path selection
src/utils/methods.js, src/utils/methods.test.js
getSubmissionsPath uses the explicit current selection plan ID before the summit landing plan. Tests cover differing current and stored plans.
Completion navigation
src/pages/preview-presentation-page.js, src/pages/thankyou-presentation-page.js
Both completion handlers pass the selected plan ID to getSubmissionsPath.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to a27ad

Completion navigation now uses the currently selected plan when available, with fallback behavior retained and coverage added for stale landing-plan values. No merge-blocking risk remains.

Suggested reviewers: smarcet

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: adding the current selection plan as a parameter to getSubmissionsPath.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 4…
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.
✨ 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 fix/redirect-current-selection-plan

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

@tomrndom tomrndom self-assigned this Sep 9, 2026
@smarcet
smarcet requested a review from romanetar September 9, 2026 16:42
Comment thread src/utils/methods.js
const selectionPlanLandingId = getAllowedLandingSelectionPlanId(summit);
return selectionPlanLandingId ? `all-plans/${selectionPlanLandingId}` : 'all-plans';
export const getSubmissionsPath = (summit, currentSelectionPlanId) => {
const selectionPlanId = currentSelectionPlanId || getAllowedLandingSelectionPlanId(summit);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@tomrndom @smarcet I don't think bypassing the selectionPlanId is a good idea. Please read this: https://github.com/fntechgit/call-for-presentations/blob/master/src/utils/methods.js#L268.
Maybe it should be the other way around ? if stale SP_LANDING then use presentation's selection Plan ?

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