From 006366ef8099c8313ae596bf6267e9f98dfbeb5e Mon Sep 17 00:00:00 2001 From: Christian Kolset Date: Sun, 20 Sep 2026 22:30:13 -0600 Subject: Make Channel the single source of truth for a reading's name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Device tab stays hardware-only (pins, wiring, may vary per workstation); the Channels window owns the profile-facing identity. Concretely: - Fix a real regression: SerialDevice generic-format Apply & Reconnect nulled out custom channel_names/units every time (no fallback, unlike every other optional field in reconfigure()), silently reverting to sig0/sig1/... ids. - Plot legend now live-tracks the current Signal/Channel name instead of freezing tr.label at add-time, so a rename shows up without re-adding the trace. - Add an inline quick-reconnect (combo + button, pre-selects the actual current source) directly on each Channel block in the Channels window, for the common single-source case — rewiring hardware no longer means touching every Plot/pipeline that referenced it. - Collapse the Channel ID field behind an "ID ▸" advanced toggle; channel_id is already auto-derived from the name (_slug_id) and rarely needs to be seen. - Devices tab's Signal "Name" column relabeled "Label" with a tooltip — de-emphasized now that Channel name is the real identity. - Move "create a Channel from this Signal" from a column on the Devices tab's signal table to a ⊕ button on each Signal row in the Channels tab's Namespace panel — the action now lives where the identity is created, not on the hardware tab. Only that instance opts in (on_create_channel); the read-only Namespace dock on the main window is unaffected. - Floor the Namespace panel's width at its columns' natural size so dragging the Channels-tab splitter narrower can't push the ⊕ column behind the horizontal scrollbar. - Breadcrumb log when a profile-saved Signal override can't be applied because the signal_id no longer exists. Co-Authored-By: Claude Sonnet 5 --- ui/windows/devices_window.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'ui/windows/devices_window.py') diff --git a/ui/windows/devices_window.py b/ui/windows/devices_window.py index 5d47681..15549f1 100644 --- a/ui/windows/devices_window.py +++ b/ui/windows/devices_window.py @@ -157,8 +157,14 @@ class SignalsTab(QWidget): self._table.setObjectName("channelTable") self._table.setColumnCount(6) self._table.setHorizontalHeaderLabels( - ["Device", "On", "Name", "Unit", "Min", "Max"] + ["Device", "On", "Label", "Unit", "Min", "Max"] ) + name_hdr_item = self._table.horizontalHeaderItem(self._C_NAME) + if name_hdr_item is not None: + name_hdr_item.setToolTip( + "Technical label only — for the profile-facing name, create a Channel " + "in the Channels window." + ) hdr = self._table.horizontalHeader() hdr.setSectionResizeMode(self._C_NAME, QHeaderView.ResizeMode.Stretch) hdr.setSectionResizeMode(self._C_DEVICE, QHeaderView.ResizeMode.ResizeToContents) -- cgit v1.2.3