Skip to content

fix(discovery-client,app): Delete displayName property; fix OT-2 vs. Flex LPC confusion#21707

Merged
SyntaxColoring merged 6 commits into
edgefrom
name_is_display_name
Jun 10, 2026
Merged

fix(discovery-client,app): Delete displayName property; fix OT-2 vs. Flex LPC confusion#21707
SyntaxColoring merged 6 commits into
edgefrom
name_is_display_name

Conversation

@SyntaxColoring

@SyntaxColoring SyntaxColoring commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

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: name and displayName. 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 in name but stripped from displayName. 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 full name. The few exceptions were:

  • Name sorting and filtering. This explains why the local dev server appears in a "random" place in the devices page: opentrons-dev was getting sorted as dev.
  • A thing in Labware Position Check that looked up a robot by its name and then did different things depending on whether it's a Flex or OT-2. This had a bug where the lookup code was expecting name, but the calling code was providing displayName. The upshot is that robots with opentrons- in their name would be misidentified as OT-2s.

This PR deletes displayName and changes everything to use the full original name instead.

Test Plan and Hands on Testing

  • Smoke-test the devices page.
  • Smoke-test the "choose a robot" slideout from the protocols page.

Review requests

Does this make sense, conceptually?

Risk assessment

Low. Thankfully, displayName wasn't used in very many places.

@SyntaxColoring SyntaxColoring requested review from a team and TamarZanzouri and removed request for a team June 10, 2026 17:50

@janiejaffe janiejaffe left a comment

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.

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

@SyntaxColoring SyntaxColoring marked this pull request as ready for review June 10, 2026 18:27
@SyntaxColoring

Copy link
Copy Markdown
Contributor Author

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.

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

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.

holly shit this is old

@TamarZanzouri TamarZanzouri left a comment

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.

if we are good with removing display name and using name instead it works for me

@SyntaxColoring SyntaxColoring merged commit 6f2c76b into edge Jun 10, 2026
50 checks passed
@SyntaxColoring SyntaxColoring deleted the name_is_display_name branch June 10, 2026 19:30
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