Skip to content

Feature/release module#209

Merged
meganrm merged 6 commits intomainfrom
feature/release-module
Mar 27, 2026
Merged

Feature/release module#209
meganrm merged 6 commits intomainfrom
feature/release-module

Conversation

@meganrm
Copy link
Copy Markdown
Contributor

@meganrm meganrm commented Mar 9, 2026

  • Fix grammatical typo in KdQuestion.tsx helper text ("look at the where" → "look at where")
  • Remove unconditional console.log("NEW BINDING SIMULATOR") debug statement in App.tsx (guarded behind process.env.NODE_ENV !== "production")
  • Rename shadowed inner let bestFit variable to fitResult inside the bestFit useMemo in EquilibriumPlot.tsx

Full set of changes in this PR:

  • Rename precomputed simulation name→type map for clarity and tweak live binding parameters
  • Update equilibrium plot logic to support competitive binding (Ki) with exponential regression and 50%-inhibition annotation
  • Rename shadowed inner variable bestFitfitResult inside EquilibriumPlot useMemo
  • Small UI/UX updates: enable navigation button, add quiz hint text, lock page scrolling, reset additional analysis state
  • Remove debug console.log (guarded behind dev-only check)
  • Fix grammatical typo in KdQuestion helper text

⚡ Quickly spin up Copilot coding agent tasks from anywhere on your macOS or Windows machine with Raycast.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the live-simulation equilibrium/Kd plotting and related UI flow, including adding competitive binding (Ki) support and a few UI/parameter tweaks.

Changes:

  • Rename the precomputed simulation name→type map for clarity and tweak live binding parameters.
  • Update equilibrium plot logic to support competitive binding (Ki) with different fit/annotation behavior.
  • Small UI/UX updates (enable navigation button, add quiz hint text, lock page scrolling, reset additional analysis state).

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/simulation/PreComputedSimulationData.ts Renames static map used to derive agent/product types.
src/simulation/LiveSimulationData.ts Adjusts binding parameter (kOn) and formatting.
src/simulation/BindingSimulator2D.ts Formatting-only changes (trailing commas).
src/index.css Enables overflow: hidden on body.
src/content/LowAffinity.tsx Enables nextButton at end of Low Affinity content.
src/components/quiz-questions/KdQuestion.tsx Adds additional hint paragraph for answering the question.
src/components/plots/EquilibriumPlot.tsx Adds module-dependent regression/annotation logic (Kd vs Ki).
src/App.tsx Expands analysis reset, minor navigation behavior change, and adds a debug log.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +97 to +100
<p>
If you're not sure, look at the where the line crosses the 50%
mark on the <strong>Equilibrium concentration plot.</strong>
</p>
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

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

The new helper text has a grammatical typo: "look at the where" should be "look at where".

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@copilot apply changes based on this feedback

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fixed in c8b057b — removed the extra "the" so the text now reads "look at where the line crosses the 50%".

Comment on lines +54 to +67
if (module === Module.A_B_D_AB) {
bestFit = regression.exponential(regressionData);
const max = Math.max(...y);
const min = Math.min(...y);
const halfMax = (max - min) / 2 + min;
// for exponential, the equation is in the form y = a * e^(b*x)
// bestFit.equation[0] is a and bestFit.equation[1] is b, so to solve for x when y is halfMax:
// halfMax = a * e^(b*x)
// halfMax / a = e^(b*x)
// ln(halfMax / a) = b*x
// x = ln(halfMax / a) / b
value =
Math.log(halfMax / bestFit.equation[0]) / bestFit.equation[1];
} else {
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

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

When module === Module.A_B_D_AB and there are no recorded points yet, y can be empty here. In that case Math.max(...y)/Math.min(...y) evaluate to -Infinity/Infinity, making halfMax and the derived value become NaN. Consider guarding this branch (and skipping regression) until you have enough data points.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

background-color: var(--background-color);
color: var(--text-color);
/* overflow: hidden; */
overflow: hidden;
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

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

Setting body { overflow: hidden; } prevents page scrolling and can clip content on smaller viewports or when text is zoomed, which is an accessibility regression. Prefer scoping overflow constraints to the simulation container/canvas, or allow vertical scrolling (overflow-y: auto) while controlling only the area that must be fixed.

Suggested change
overflow: hidden;
overflow-x: hidden;
overflow-y: auto;

Copilot uses AI. Check for mistakes.
meganrm and others added 3 commits March 27, 2026 15:48
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…o to avoid variable shadowing

Agent-Logs-Url: https://github.com/simularium/binding-sim-edu/sessions/25c7a586-2e66-4802-954b-ec3df06ecf12

Co-authored-by: meganrm <5170636+meganrm@users.noreply.github.com>
@meganrm meganrm marked this pull request as ready for review March 27, 2026 22:55
@meganrm meganrm requested a review from a team as a code owner March 27, 2026 22:55
@meganrm meganrm requested review from ShrimpCryptid and toloudis and removed request for a team, ShrimpCryptid and toloudis March 27, 2026 22:55
@meganrm meganrm merged commit cb90c6a into main Mar 27, 2026
3 checks passed
@meganrm meganrm deleted the feature/release-module branch March 27, 2026 22:57
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.

3 participants