Surface malformed courses instead of silently skipping them#69
Merged
Conversation
A directory under courses/ that looks like a course attempt (it has a pages/ folder) but lacks course.config.js was silently filtered out of the course listing, leaving a confusing "course not found" with no cause. It is now reported under "Skipped (missing course.config.js)" when the workspace's courses are listed. Legitimate non-course content (a README, a shared-assets folder) is left out of the warning. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
listHint called both listCourses and listMalformedCourses, each doing its own readdirSync plus per-entry stats. Partition the directory in a single scanCourses pass and derive both lists from it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A directory under
courses/that looks like a course attempt — it has apages/folder — but is missing itscourse.config.jswas silently filtered out of the course listing. Users hit a confusing "course not found" / empty listing with no indication of the cause.It's now reported under a "Skipped (missing course.config.js)" section whenever the workspace's courses are listed (e.g. course-not-found and no-course-specified errors).
Why this scope
The big workspace breakages (mangled root
package.json, deletedcourses/) already surface clear errors from pnpm or the existing resolver. Silent course-dropping was the one place the tooling actively hid a problem, so that's all this fixes — no speculativetessera doctor/ full workspace validator.The
pages/heuristic keeps legitimate non-course content (a README, a shared-assets folder) out of the warning.Tests
listMalformedCourses()unit tests (flagspages/-without-config, ignores plain dirs and valid courses) plus aresolveCoursetest asserting the malformed course appears in the hint.pnpm checkclean.🤖 Generated with Claude Code