fix(discovery-client,app): Delete displayName property; fix OT-2 vs. Flex LPC confusion#21707
Merged
Conversation
janiejaffe
approved these changes
Jun 10, 2026
janiejaffe
left a comment
Contributor
There was a problem hiding this comment.
I understand that we as opentrons developers build on top of the sins of our forebearers but the fact that we use the user entered display name to determine a robots identity is so insane. anyways looks good to me
Contributor
Author
Yep, it's bad. I've exhumed the ancient Jira ticket for fixing this and moved it into a slightly more visible place: EXEC-2732 |
| } | ||
|
|
||
| export const mockBaseRobot: BaseRobot = { | ||
| // NOTE(mc, 2020-11-10): it's important that name and displayName are |
Contributor
There was a problem hiding this comment.
holly shit this is old
TamarZanzouri
approved these changes
Jun 10, 2026
TamarZanzouri
left a comment
Contributor
There was a problem hiding this comment.
if we are good with removing display name and using name instead it works for me
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This makes a small simplification to the way that we deal with robot names in the frontend.
In the course of doing that, this fixes a bug where we would accidentally use OT-2 logic for Labware Position Check if a Flex robot happened to contain the string
opentrons-in its name.Details
Our types for a robot contained two properties:
nameanddisplayName. Both of those properties carried what we would colloquially call the "robot display name." For example, if a user has named their robot"Otie", the value of both of those properties would be"Otie".The sole difference between the two was that, if the name happened to contain the string
opentrons-, that would be present innamebut stripped fromdisplayName. I haven't looked into the details of why we were doing that, but it was probably from ancient OT-2 history.In practice, today, almost nothing was using the stripped
displayName. We were almost always using the fullname. The few exceptions were:opentrons-devwas getting sorted asdev.name, but the calling code was providingdisplayName. The upshot is that robots withopentrons-in their name would be misidentified as OT-2s.This PR deletes
displayNameand changes everything to use the full originalnameinstead.Test Plan and Hands on Testing
Review requests
Does this make sense, conceptually?
Risk assessment
Low. Thankfully,
displayNamewasn't used in very many places.