Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/frontend/src/app/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export const userSlice = createSlice({
state.bookmarked = [];
},
showFCEs: (state, action: PayloadAction<boolean>) => {
state.showFCEs = action.payload;
state.showFCEs = false;
Comment on lines 75 to +76
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: The FCE kill switch is incomplete. FCEs can still be enabled on the /saved and /schedules pages via the ShowFilter component, bypassing the intended restriction.
Severity: HIGH

Suggested Fix

To ensure the kill switch is comprehensive, the savedShowFCEs reducer in user.ts should also be hardcoded to return false. This will prevent the ShowFilter component from enabling FCEs on the /saved and /schedules pages.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: apps/frontend/src/app/user.ts#L75-L76

Potential issue: The emergency kill switch for FCEs is incomplete. The pull request
hardcodes the `showFCEs` state to `false`, which disables the feature on the main course
search page. However, a separate state, `savedShowFCEs`, is used for the `/saved` and
`/schedules` pages. This state and its corresponding reducer were not modified.
Consequently, a signed-in user can navigate to their saved courses or schedules, use the
`ShowFilter` component to toggle FCEs on, and successfully view FCE data, bypassing the
intended kill switch.

Did we get this right? 👍 / 👎 to inform future reviews.

},
showCourseInfos: (state, action: PayloadAction<boolean>) => {
state.showCourseInfos = action.payload;
Expand Down
2 changes: 1 addition & 1 deletion apps/frontend/src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default function Header(): ReactElement {
return (
<div className="">
<div className="lg:p-1.5 md:p-2 p-3 lg:text-lg md:text-base text-xs text-white text-center bg-[#007fff]">
Spring 2026 instructors and room information temporarily unavailable due to changes in the Schedule of Classes.
Spring/Summer 2026 instructors and room information temporarily unavailable due to changes in the Schedule of Classes.
</div>

<div className="flex flex-row items-center justify-between p-6 bg-gray-50 h-16">
Expand Down
2 changes: 1 addition & 1 deletion apps/frontend/src/components/SearchBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ const SearchBar = () => {

const setShowAll = (e: React.ChangeEvent<HTMLInputElement>) => {
dispatch(userSlice.actions.showAll(e.target.checked));
if (isSignedIn) dispatch(userSlice.actions.showFCEs(e.target.checked));
// if (isSignedIn) dispatch(userSlice.actions.showFCEs(e.target.checked));
dispatch(userSlice.actions.showCourseInfos(e.target.checked));
dispatch(userSlice.actions.showSchedules(e.target.checked));
};
Expand Down
Loading