Repository navigation
fix(school): preserve lesson discussions across course renames - #356
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Bundle size3 of 194 bundles changed.
Measured 22 packed archives separately; full report includes their compressed bytes without installed dependencies. |
Summary
Course address edits currently split generated lesson discussions and leave My comments links pointing at the old address. This focused follow-up to #354 keeps discussion identity stable:
Generated return links use
/learn/~<courseId>/lessons/<lessonId>to distinguish IDs from colliding course slugs. Published course lookup accepts an explicit~<id>and a bare stable ID as a fallback to current-slug lookup, under the existing permission and publication checks. Draft, archived and missing courses return 404. Pathname hooks are generated only for Kanban, which still needs its board context.Evidence
After: recovered regression coverage posts a question, renames the course, reloads its new address and follows My comments back to the same discussion. API tests cover published IDs, current/obsolete slugs and unpublished denial; scaffold tests cover encoded stable IDs across all frameworks and standalone helper generation.
noUnusedLocalsfor all three frameworks, generated Next.js and docs production builds, changed-file Biome and registry regeneration (no generated diff). An additional collision regression failed before the explicit-ID fix and passed afterward. 2 Chromium regressions passed against the production build (School rename/return and Kanban task return), with fresh trace/video artifacts. The first browser attempt had a stale local API origin; correcting the owned server environment made both pass without source changes. The three committed E2E overlays now match the generated links; their contract check failed before alignment and passes afterward. Full local suite and React Router/TanStack browser runs are left to CI.~return-link marker; fresh browser traces/video verify that final link. They require the owner's archive login and LAN or private Tailscale access.Merge Danger
Door: two-way
No schema or dependency changes. This correction does not migrate stored slug-based comment resource IDs. Adopters with existing generated discussions need an application-owned resource-ID migration before switching conventions; manually configured plain IDs remain application-owned. That limit is acceptable for this focused follow-up because it corrects new scaffolds without silently rewriting stored comments. Header-free raw SSG prefetch remains current-slug based; authorized runtime/HTTP course lookup supports stable IDs.
Existing shared School page routing requires course/lesson IDs that fit a single decoded URL segment (no
/). URI encoding keeps stored resource identity unambiguous, but slash-containing IDs still require custom return routing. This pre-existing framework routing limit is now explicit in both documentation pages; this focused correction does not change shared routing.Blast Radius: integrations
Generated School discussion helpers and public published-course lookup. School, Comments and other optional integrations remain independently usable.