Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/cornell-dti/course-plan/llms.txt

Use this file to discover all available pages before exploring further.

Courseplan uses a lightweight feature flag system called GateKeeper (src/feature-flags.ts). Each flag is a named toggle stored in localStorage. Because flags are read at module load time, toggling one triggers a page reload so the updated value takes effect immediately throughout the app.

Current feature flags

Flag nameDescription
APIBFulfillmentAP/IB exam credit fulfillment tracking
CaseCASE distribution requirement support
RequirementConflictsHighlights courses involved in double-counting constraint violations
RequirementDebuggerDeveloper overlay showing raw requirement fulfillment graph data
ToggleRequirementsBarBtnButton to collapse/expand the requirements sidebar
ProfileUser profile page
MultiplePlansSupport for creating and switching between multiple four-year plans
SavedCoursesCourse collection / saved-courses panel
Schedule GeneratorExperimental automated schedule generation feature

Enabling and disabling flags at runtime

Open the browser developer console on any Courseplan page. The window.GK object exposes enable* and disable* methods for every registered flag:
// Enable a flag (persists in localStorage, reloads the page)
window.GK.enableRequirementDebugger()
window.GK.enableMultiplePlans()

// Disable a flag (removes the localStorage entry, reloads the page)
window.GK.disableRequirementDebugger()
window.GK.disableMultiplePlans()
Flag names in window.GK use the exact PascalCase name from FeatureFlagName, prefixed with enable or disable. Note that Schedule Generator (with a space) becomes window.GK.enableSchedule Generator — use bracket notation for flags whose names contain spaces: window.GK['enableSchedule Generator']().
Each flag’s state is persisted in localStorage under the key CP_GK-<FlagName>. For example, enabling RequirementDebugger sets CP_GK-RequirementDebugger to "true". You can inspect or clear flags directly in the Application → Local Storage panel of your browser’s DevTools.
Every call to enableFlagName() or disableFlagName() immediately calls window.location.reload(). Any unsaved in-memory state will be lost when the page reloads.

Checking a flag in application code

Import the default export from feature-flags.ts and call the appropriate checker:
import featureFlagCheckers from './feature-flags';

if (featureFlagCheckers.isRequirementDebuggerEnabled()) {
  // show debug overlay
}
Checker method names follow the pattern is<FlagName>Enabled.

Adding a new feature flag

Adding a flag requires two edits in src/feature-flags.ts:
  1. Add the flag name to the FeatureFlagName union type.
  2. Pass the same string to registerFeatureFlagChecker.
// 1. Extend the union type
type FeatureFlagName =
  | 'APIBFulfillment'
  | 'Case'
  | 'RequirementConflicts'
  | 'RequirementDebugger'
  | 'ToggleRequirementsBarBtn'
  | 'Profile'
  | 'MultiplePlans'
  | 'SavedCourses'
  | 'Schedule Generator'
  | 'YourNewFlag';         // ← add here

// 2. Pass it to registerFeatureFlagChecker
const featureFlagCheckers: FeatureFlagCheckers = registerFeatureFlagChecker(
  'APIBFulfillment',
  'Case',
  'RequirementConflicts',
  'RequirementDebugger',
  'ToggleRequirementsBarBtn',
  'Profile',
  'MultiplePlans',
  'SavedCourses',
  'Schedule Generator',
  'YourNewFlag'            // ← add here
);
After this change, featureFlagCheckers.isYourNewFlagEnabled() is available everywhere in the app, and window.GK.enableYourNewFlag() / window.GK.disableYourNewFlag() are accessible in the browser console.
Use PascalCase (no spaces) for new flag names so they are directly callable as window.GK.enableYourNewFlag() without bracket notation.

Build docs developers (and LLMs) love