Name groups: library labels, legend captions, manifest + journal persistence (#187) - #191
Merged
Merged
Conversation
The per-panel y-range lookup reads the summary column id out of each trace's hovertemplate (variable=<id>). With Spread on, the app's hover rewrite from #40 had already replaced that id with the pretty axis title by the time the ranges were applied, so none of them matched a facet axis and every panel stayed autoscaled. figure_json now resolves the variable -> axis map straight after collection.plot and passes it to _apply_y_ranges. Adds regression tests for both-ends and one-sided ranges on the spread path. Co-authored-by: Jan Petter Maehlen <jepe@ife.no>
Edits made inside the Manage cells dialog used to fire one plot round-trip each, and every response redrew the chart on arrival, so after a burst of edits the figure kept re-rendering long after the dialog had closed. Edits now route through _replotAfterEdit(), which only flags a pending redraw while the modal is open; closing it redraws the current tab once. Every plot fetch also carries a per-chart sequence number, and a response overtaken by a newer request is dropped rather than drawn, with the busy spinner held until the last in-flight request settles. The modal footer says when the refresh happens. Adds a Playwright e2e test counting /api/plots requests. Co-authored-by: Jan Petter Maehlen <jepe@ife.no>
…istence (#187) Groups can now be named in the Manage cells modal. The name is used by cellpy for group-averaged traces, captions the per-cell legend entries of that group, is saved in project.json (groups: [{id, label}]) and is read from the group_label column of batch journals. POST /api/groups/{group} sets it; /api/state carries a groups list. Co-authored-by: Jan Petter Maehlen <jepe@ife.no>
…ot-cells-modal-713a Co-authored-by: Jan Petter Maehlen <jepe@ife.no>
Co-authored-by: Jan Petter Maehlen <jepe@ife.no>
…87-group-names-713a Co-authored-by: Jan Petter Maehlen <jepe@ife.no>
Base automatically changed from
cursor/184-defer-replot-cells-modal-713a
to
main
October 4, 2026 06:21
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.
Closes #187.
What
Groups can now be named, and the name follows the group everywhere:
group <n>placeholder, cell count). Blank restores the default. Renames follow the deferred-replot rule from update plots when cells modal closes #184. Group number inputs (sidebar + table) show the group name as a tooltip.collect._batchhands cellpy the name asgroup_labels, so group-averaged traces are named after it. Per-cell traces of a named group get a Plotlylegendgrouptitle(summary + cycles pane) viacollect.group_titles()./api/statecarriesgroups: [{id, label, name, n_cells, color}];POST /api/groups/{group}with{"label": "…"}sets the name and returns the state.CellMeta.group_labelis the effective name.project.jsongains an optionalgroups: [{id, label}]section (saved for named groups that hold cells; older manifests still open).cellpy_adapter.load_journal()returns(cells, group_labels)read from the journal'sgroup_labelcolumn (cellpy'sgroup <n>placeholders are not treated as names).load_journal_cells()stays as a thin wrapper. The journal job applies the names.Design
Names are library-level (
Library._group_labels, keyed by group number), not a per-cell field.Library.all()stamps aCellRecord.group_labelsnapshot so the collectors see it without threading a map through every call site. See.issueflows/04-designs-and-guides/manage-cells-modal.md→ "Group names".Tests
tests/test_core.py: library semantics; names reach the grouped legend; legend-group titles on ungrouped summary and cycles figures.tests/test_projects.py: save → open round trip; manifest withoutgroups.tests/test_journal.py:group_labelread (present/absent); journal job applies names via the API.tests/test_api.py:/api/groups/{group}+ state shape.tests/test_gui_playwright.py(e2e, local): name / un-name a group in the modal, legend caption after close.uv run pytest -q -p no:warnings: all green (3 skips, example data).Walkthrough
Demo cells → regroup two cells into group 1 → name it "Anodes" in the Groups strip → close → legend captions the group → Group avg trace is named "Anodes" → Save project (manifest contains
groups: [{"id": 1, "label": "Anodes"}]).issue187_group_names_walkthrough.mp4
To show artifacts inline, enable in settings.