Conversation
Co-authored-by: Peyton Lee <peytonalee@gmail.com>
…nding-sim-edu into feature/navigation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…nding-sim-edu into feature/navigation
…into feature/3rd-module
There was a problem hiding this comment.
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.
src/components/concentration-display/LiveConcentrationDisplay.tsx
Outdated
Show resolved
Hide resolved
src/components/concentration-display/LiveConcentrationDisplay.tsx
Outdated
Show resolved
Hide resolved
Co-authored-by: toloudis <toloudis@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
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.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…nding-sim-edu into feature/3rd-module
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
| index={ | ||
| index < 1 && index > 0 | ||
| ? Number(index.toFixed(1)) | ||
| : index | ||
| } |
There was a problem hiding this comment.
[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.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
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.
| 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>! | ||
| </> | ||
| ), | ||
| }, | ||
|
|
||
| { |
There was a problem hiding this comment.
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.
| 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>! | |
| </> | |
| ), | |
| }, | |
| { |
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.
Steps to Verify:
there are still more things to do to finish this module