Skip to content

Conversation

@meganrm
Copy link
Contributor

@meganrm meganrm commented Nov 22, 2025

Problem

Estimated review size: Medium

closes #207 and #204

Solution

Added the written content for the 3rd module and updated the simulation to handle a new Agent, D

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

Steps to Verify:

  1. bun dev
  2. click on Competitive Binding on the progress bar to go to that section
  3. follow the instructions

there are still more things to do to finish this module

@meganrm meganrm requested a review from a team as a code owner November 22, 2025 02:28
@meganrm meganrm requested review from toloudis and tyler-foster and removed request for a team November 22, 2025 02:28
@meganrm meganrm requested a review from Copilot November 22, 2025 02:29
Copy link
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 adds support for a third module on competitive binding by introducing Agent D and updating the simulation system to handle multiple complex formations. The changes extend the existing two-agent binding system to support a competitive inhibitor that can bind to the same target as Agent B.

Key changes:

  • Added Agent D as a competitive inhibitor with its own binding characteristics
  • Refactored the simulation to track multiple complex types (AB, AC, AD) separately
  • Updated the UI and content to guide users through the competitive binding experiment

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/types/index.ts Added new agent types (D, Adjustable_2, Complex_3), product name (AD), and ViewType enum
src/simulation/context.tsx Added viewport type state and setter to simulation context
src/simulation/PreComputedSimulationData.ts Renamed AgentFunction to AgentType, updated method names
src/simulation/LiveSimulationData.ts Added Agent D configuration, restructured concentrations by module, added competitive binding logic
src/simulation/ISimulationData.ts Updated interface to reflect AgentType rename and method signature changes
src/simulation/BindingSimulator2D.ts Refactored to track multiple complex types with individual colors, removed unused productColor parameter
src/simulation/BindingInstance.ts Modified unbinding to return the released child instance
src/content/LowAffinity.tsx Fixed typo in completion message
src/content/Competitive.tsx Added complete content flow for competitive binding module
src/components/main-layout/LeftPanel.tsx Hidden events over time plot for competitive binding module
src/components/concentration-display/LiveConcentrationDisplay.tsx Fixed Math.min to Math.max for step calculation
src/components/concentration-display/ConcentrationSlider.tsx Added decimal number formatting for slider marks
src/components/ViewSwitch.tsx Refactored to use context-based view state instead of local state
src/App.tsx Added experiment initialization, view state management, and module-specific concentration handling

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

meganrm and others added 7 commits November 25, 2025 09:46
Co-authored-by: toloudis <toloudis@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@meganrm meganrm requested a review from Copilot December 5, 2025 01:38
Copy link
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 14 out of 14 changed files in this pull request and generated 3 comments.


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

meganrm and others added 3 commits December 4, 2025 17:41
@meganrm meganrm requested a review from Copilot December 5, 2025 01:44
Copy link
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 14 out of 14 changed files in this pull request and generated 2 comments.


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

@meganrm meganrm requested a review from Copilot December 5, 2025 01:47
Copy link
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 14 out of 14 changed files in this pull request and generated 3 comments.


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

Comment on lines +72 to +76
index={
index < 1 && index > 0
? Number(index.toFixed(1))
: index
}
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

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

[nitpick] The conditional formatting logic for decimal marks is unclear and fragile. Consider extracting this to a named function with a descriptive name like formatSliderMark to improve readability and make the intent explicit.

Copilot uses AI. Check for mistakes.
meganrm and others added 2 commits December 4, 2025 17:50
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@meganrm meganrm requested a review from Copilot December 5, 2025 02:01
Copy link
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 14 out of 14 changed files in this pull request and generated 1 comment.


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

Comment on lines +88 to +109
title: "Start the experiment",
content: (
<>
We cannot directly measure the formation of <AD /> (which is why
it's shown in grey). To figure out how strongly <D /> binds to{" "}
<A /> we're going to keep track of how adding more <D /> affects
the amount of <AB /> formed.
</>
),
layout: LayoutType.LiveSimulation,
section: Section.Introduction,
actionButton: <StartExperiment />,
progressionElement: PLAY_BUTTON_ID,
callToAction: (
<>
Click the <strong>Start experiment</strong> button to reset the
simulation and begin by pressing <strong>play</strong>!
</>
),
},

{
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

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

Two consecutive page entries have identical title, content, layout, section, and actionButton. The only difference is progressionElement (START_EXPERIMENT_ID vs PLAY_BUTTON_ID). This duplication should be eliminated by either combining into one entry or extracting common content.

Suggested change
title: "Start the experiment",
content: (
<>
We cannot directly measure the formation of <AD /> (which is why
it's shown in grey). To figure out how strongly <D /> binds to{" "}
<A /> we're going to keep track of how adding more <D /> affects
the amount of <AB /> formed.
</>
),
layout: LayoutType.LiveSimulation,
section: Section.Introduction,
actionButton: <StartExperiment />,
progressionElement: PLAY_BUTTON_ID,
callToAction: (
<>
Click the <strong>Start experiment</strong> button to reset the
simulation and begin by pressing <strong>play</strong>!
</>
),
},
{

Copilot uses AI. Check for mistakes.
@meganrm meganrm merged commit 0030d55 into main Dec 5, 2025
3 checks passed
@meganrm meganrm deleted the feature/3rd-module branch December 5, 2025 02:02
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.

Need a new agent that competes with B

3 participants