What-If Calculator & Saved Scenarios

IC Insight provides two levels of grade simulation: temporary what-if items that affect the live overlay calculation, and saved named scenarios that can be recalled at any time.


What-If Calculator

The what-if calculator lives inside the overlay's collapsible What-If Calculator section and mirrors the same interface in the Details View.

Adding a Hypothetical Assignment

  1. Select a category from the dropdown. The dropdown lists every category from every quarter for the current course. Each option shows: Category Name (w=N) [Quarter N].
  2. Enter an assignment name (optional but helpful for identification in the list).
  3. Enter Earned and Possible point values.
  4. Click Add. The assignment is added to the selected category with a · what-if label. The grade recalculates immediately.

Hypothetical assignments are included in category averages and the overall grade exactly like real assignments.

Dropping an Assignment (What-If)

On any real assignment row in the breakdown, click Drop. The assignment is removed from both the display and the grade calculation. Click Undrop to restore it.

What-if drops are tracked by { category_id, name }. They do not include quarter context - if the same assignment name exists in multiple quarters, each must be dropped individually using the button on its specific row.

Editing an Assignment Score (What-If)

Click Edit on any assignment row. A dialog appears pre-filled with the assignment's current earned/possible. Enter new values and confirm. The edited score is shown immediately and used in calculations.

Removing What-If Items

The active what-if list under the calculator shows all current additions (with earned/possible), drops, and edits, each with a Remove (or Undo for drops) button. Clear All removes every what-if item at once.

Persistence

What-if state is saved to WI_${courseKey} in chrome.storage.local after every change. It is loaded automatically when the page initializes for the same course. The state is not cleared when you close the overlay - it persists until you click Clear All or remove items individually.

State format:

{
  "adds":  [{ "category_id": "c0", "quarter_id": "Q1", "name": "Midterm", "earned": 88, "possible": 100 }],
  "drops": [{ "category_id": "c1", "name": "Quiz 3" }],
  "edits": [{ "category_id": "c0", "name": "Homework 5", "earned": 95, "possible": 100 }]
}

Saved Scenarios

Saving a Scenario

Once you have set up a what-if configuration you want to keep, click Save Scenario in the calculator section. A dialog prompts for a scenario name. The current what-if state (all adds, drops, and edits) is saved as a named scenario tied to the current course.

Scenarios are stored in ICI_SCENARIOS_${courseKey} as an array of objects:

{
  "id": "scenario_1699999999_abc123xyz",
  "name": "If I ace the final",
  "createdAt": "2024-11-15T10:30:00.000Z",
  "modifiedAt": "2024-11-15T10:30:00.000Z",
  "adds":  [...],
  "drops": [...],
  "edits": [...]
}

Multiple scenarios can be saved per course. Each gets a unique ID built from a timestamp plus random suffix.

Loading a Scenario

From the Details View or overlay (where a scenario list is shown), select a saved scenario to load its what-if state. This replaces the current what-if state.

Scenario Comparison

The ScenariosManager.compareScenarios(base, scenarioA, scenarioB) function computes deltas between scenarios: overall grade difference and per-category average differences. This is used in the Details View to display side-by-side scenario comparison.

Deleting a Scenario

Scenarios can be deleted individually. ScenariosManager.clearScenariosForCourse(courseKey) removes all scenarios for a course (used in the data-clear flow).


Target Grade Calculator

The Target Grade Calculator answers one question: What score do I need on my next assignment in a given category to reach a target overall grade?

Access

Open the Details View for a course (click the course row in the Dashboard), then scroll down to the Target Grade Calculator section, which appears below the What-If Calculator.

Inputs

Field Description
Target % The overall percentage you want to reach (0–100).
Category The category the next assignment belongs to. Dropdown lists every category for the course; multi-quarter courses show [Quarter N] labels.
Assignment size The point value of the upcoming assignment (default: 100 if left blank).

Click Calculate or press Enter in the Target field to run the calculation.

Results

The calculator handles several scenarios:

Already at or above target

✓ Already at 96.80% (A+), which meets your 96% target.

The current overall (reflecting any active what-if items) already satisfies the target. No action needed.

Score needed (weighted gradebook)

Score at least 42.3 / 50 pts (84.6% · B) on your next Tests assignment to reach 97.00% (A+) overall. Tests: 94.20% to 96.41%

The output includes the exact earned/possible needed, the percentage and letter grade for that score, and the resulting category average change.

Score needed (points-based gradebook) For unweighted courses, the calculator sums all earned and possible points across categories and solves directly:

Score at least 89.0 / 100 pts (89.0% · B+) on your next Assignments assignment to reach 95.00% (A) overall.

Assignment too small

✗ A 20-pt assignment is not large enough. You would need 23.4 / 20 pts to reach 97.0% (A+) overall. Try an assignment worth at least 35 pts.

The red error also shows the minimum assignment size that could work.

No score needed

Score 0 pts minimum to reach 97.0% (A+) overall. Any score on this assignment keeps you there.

The existing category score is already high enough; any submission suffices.

Interaction with What-If

The Target Grade Calculator operates on the live breakdown, which includes all active what-if additions, drops, and edits. To see how a hypothetical future assignment affects the target score required, add it as a what-if item first, then use the calculator.

Multi-Quarter Courses

When a category from a specific quarter is selected, the calculation scopes to that quarter's categories only. This prevents the weight totals from being inflated by identical category names across multiple quarters.


Important Notes

  • What-if adds and edits are applied on top of permanent overrides. The order is: (1) apply permanent edits as the new source truth, (2) apply permanent additions, (3) apply what-if additions, (4) apply what-if drops/edits.
  • Synthetic assignments (rolled-up past-quarter totals in rolling mode) cannot be dropped or edited - they have no action buttons.
  • Permanently added assignments show a "Remove" button in the Permanent Edits section, not in the what-if list.