Skip to content

Valeri/Miscellaneous-Block#1138

Open
Valeri-kula wants to merge 11 commits into
mainfrom
misblock
Open

Valeri/Miscellaneous-Block#1138
Valeri-kula wants to merge 11 commits into
mainfrom
misblock

Conversation

@Valeri-kula

Copy link
Copy Markdown
Contributor

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.

@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: 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")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

Comment on lines +580 to +584
const miscellaneousSemester = filteredTerms.find(
(term) => term.name === "Miscellaneous"
);
const regularSemesters = filteredTerms
.filter((term) => term.name !== "Miscellaneous")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 Valeri-kula changed the title Misblock/Valeri Valeri/Miscellaneous-Block Apr 23, 2026
@ARtheboss

Copy link
Copy Markdown
Contributor

@Valeri-kula docker-compose.yml has some unrelated changes related to your .env stuff. Please remove that

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