Valeri/Miscellaneous-Block#1138
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e6e4dae436
ℹ️ 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".
| (sum, units) => sum + units, | ||
| const miscellaneousTermIds = new Set( | ||
| planTerms | ||
| .filter((term) => term.name === "Miscellaneous") |
There was a problem hiding this comment.
Classify miscellaneous totals by term type, not name
The new total-units exclusion uses term.name === "Miscellaneous", but name is user-editable, so this can miscount units in both directions: a regular semester renamed to “Miscellaneous” will be wrongly excluded from totals, and a real misc term renamed to anything else will start counting again. Since this feature depends on identifying the special misc bucket reliably, use an immutable discriminator (for example term.term === Terms.Misc) instead of display text.
Useful? React with 👍 / 👎.
| const miscellaneousSemester = filteredTerms.find( | ||
| (term) => term.name === "Miscellaneous" | ||
| ); | ||
| const regularSemesters = filteredTerms | ||
| .filter((term) => term.name !== "Miscellaneous") |
There was a problem hiding this comment.
Select the miscellaneous dock term by enum instead of label
The bottom dock routing is also keyed to the literal name "Miscellaneous", so renaming the real misc term makes it disappear from the dock and render as a normal semester, while any normal semester renamed to that label gets moved into the misc dock. That breaks the intended drag-and-drop bank behavior for renamed terms and can make the actual misc bank inaccessible. The split between miscellaneousSemester and regularSemesters should use the term’s type field rather than its mutable name.
Useful? React with 👍 / 👎.
|
@Valeri-kula docker-compose.yml has some unrelated changes related to your .env stuff. Please remove that |
This is to create the miscellaneous bank. It will appear at the bottom of the page when you either have a class in drag state or you hover over the block with your mouse. When you move classes into it - it removes it from the total units and when you pull classes out of it into the semester blocks it would add the units to the total.