Skip to content

feat: RNCP planner page (shortest path to the RNCP titles) - #74

Open
justeozan wants to merge 1 commit into
lucas-ht:mainfrom
justeozan:feat/rncp-planner
Open

justeozan wants to merge 1 commit into
lucas-ht:mainfrom
justeozan:feat/rncp-planner

Conversation

@justeozan

Copy link
Copy Markdown

Adds a /planner page (no login needed): pick one or more RNCP titles and it shows the shortest list of projects to get them, fastest in days or fewest projects.

  • Data: title rules from gcc.42.fr; prerequisites from the intra holy graph. Prerequisites count in XP, projects and days.
  • Optimizer (optimizer/, plain Python, no deps): solves the 15 title combinations offline and writes src/data/planner.json, so the page computes nothing at runtime. python3 optimizer/build.py --no-variants regenerates it (~15 min).
  • Page: one card per condition, with intra links, piscine icon, unfoldable prerequisites and the cost of swapping a project. A bottom bar lists alternative plans and a compare view shows them side by side. It reuses the existing UI components and theme.
  • Nav link "Planner" added. No changes to existing pages.

Checks: tsc, biome format, cspell and optimizer/test_planner.py pass. biome lint reports only pre-existing issues outside these files.

🤖 Everything in this PR (optimizer, data and page) was written by Claude (Anthropic) via Claude Code, at the request of @justeozan.

Written by Claude (Anthropic) via Claude Code.
Copilot AI balanced review requested due to automatic review settings November 20, 2026 23:41
@vercel

vercel Bot commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Someone is attempting to deploy a commit to the lucas-ht Team on Vercel.

A member of the Team first needs to authorize it.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-20T23:47:12.255397Z b7b6870 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@github-actions github-actions Bot added the source When any source file is changed label Nov 20, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b7b6870022

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread optimizer/build.py
Comment on lines +203 to +204
ok = {g["unit"] for g in ds.groups if g["kind"] != "dag"} | set(ds.unit_ids)
return sorted({row_id(ds, p) for p in pool} & ok)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve later chain steps in exported pools

For the shipped full-mask data, apprenticeship alternatives can satisfy the professional-experience requirement via final steps 1864, 1872, or 1880, but ok contains only g["unit"] for each chain, which is its first step, so the intersection removes all of those qualifying final steps. Path.buildSections consumes the exported data.pools, and selecting one of these visible alternatives (for example plan #12 for rncp6-1) therefore puts the apprenticeship projects under Extra XP while the Experiences card reports 2/2 without showing the projects that supplied that total; export all realizable chain members or otherwise preserve their pool membership.

Useful? React with 👍 / 👎.

Comment thread src/app/planner/page.tsx
function parseInitial(params: SearchParams): PlannerInitialState {
const titles = (first(params.titles) ?? "")
.split(",")
.filter((key): key is TitleKey => TITLE_KEYS.includes(key as TitleKey));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Deduplicate titles before initializing selection

When a shared or manually edited URL contains duplicates such as ?titles=rncp6-1,rncp6-1, this filter retains both copies. Clicking that active title then sees current.length > 1 and removes both copies, leaving selected empty; the combination lookup fails and the page shows no path even though the toggle is intended to keep at least one title selected. Deduplicate the parsed keys before storing them as the initial selection.

Useful? React with 👍 / 👎.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

source When any source file is changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants