Skip to content

Visualizer: show a plate lid as its own tree node, exclude it from the well count - #1147

Merged
BioCam merged 1 commit into
PyLabRobot:mainfrom
BioCam:visualizer-lid-tree-node
Jul 4, 2026
Merged

Visualizer: show a plate lid as its own tree node, exclude it from the well count#1147
BioCam merged 1 commit into
PyLabRobot:mainfrom
BioCam:visualizer-lid-tree-node

Conversation

@BioCam

@BioCam BioCam commented Jul 4, 2026

Copy link
Copy Markdown
Collaborator

A plate's lid is a regular child resource, so the sidebar tree counted it toward the plate's item total - a lidded 96-well plate read "97 wells" - and the lid never appeared as its own node because plate-like resources return no display children. Confirmed on a real serialized culture_plate (with_lid=True): 97 children, the last one a Lid.

Both stem from the same assumption that every child of a plate is a well, which stopped being true once lids became child resources.

  • Add an isLid predicate (category === "lid" or resourceType === "Lid").
  • Exclude lids from the plate and tube-rack counts, so a lidded 96-well plate reads "96 wells".
  • Return the lid from getDisplayChildren so it renders as its own collapsible tree node, while the individual wells/tips/tubes stay hidden as before.

No behavior change for lid-less plates or for the canvas: the change only touches the sidebar tree and the count label. Tip racks are unaffected in practice - PLR has no lid concept for them - and stay consistent (the filter simply yields none).

🤖 Generated with Claude Code

…om the well count

A plate's lid is a regular child resource, so the sidebar tree counted it as a
well ("97 wells" on a lidded 96-well plate) and never showed it separately.
Add an isLid predicate, exclude lids from the plate and tube-rack counts, and
return the lid from getDisplayChildren so it renders as its own collapsible node
while the individual wells/tips/tubes stay hidden.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@BioCam
BioCam force-pushed the visualizer-lid-tree-node branch from fb909bc to a6a4bd5 Compare July 4, 2026 20:50
@BioCam
BioCam merged commit 6ffb734 into PyLabRobot:main Jul 4, 2026
21 checks passed
@BioCam
BioCam deleted the visualizer-lid-tree-node branch July 4, 2026 21:00
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.

1 participant