Skip to content

Peripherals Display Name Support#209

Merged
ccrisan merged 2 commits into
mainfrom
feature/peripherals-display-name
Jun 3, 2026
Merged

Peripherals Display Name Support#209
ccrisan merged 2 commits into
mainfrom
feature/peripherals-display-name

Conversation

@ccrisan

@ccrisan ccrisan commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a human-friendly display_name field for peripherals, wiring it through persistence, the HTTP API, and the frontend so peripherals can be shown/edited with a nicer label than the technical id.

Changes:

  • Add display_name to the Peripheral model serialization and persist it in the peripherals collection.
  • Extend peripherals API schemas/handlers and unit tests to accept/return display_name.
  • Update the frontend peripherals list/forms and frontend API wrapper to display and submit display_name.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/unit/qtoggleserver/peripherals/test_peripheral.py Adds unit coverage that display_name defaults to "" and is reflected in to_json().
tests/unit/qtoggleserver/peripherals/test_init.py Adds persistence/compat tests around display_name when adding peripherals.
tests/unit/qtoggleserver/peripherals/api/test_funcs.py Updates expected API payloads and adds POST validation/behavior tests for display_name.
qtoggleserver/peripherals/peripheral.py Adds display_name storage plus getter/setter and includes it in to_json().
qtoggleserver/peripherals/api/schema.py Adds display_name to POST/PATCH/PUT peripheral schemas (string, max 64).
qtoggleserver/peripherals/api/funcs.py Includes display_name in PATCH merge defaults so updates round-trip correctly.
qtoggleserver/peripherals/init.py Excludes display_name from legacy flattened params and persists display_name for dynamic peripherals.
qtoggleserver/frontend/js/peripherals/peripherals-list.js Shows display_name (fallback to id) in the peripherals list UI.
qtoggleserver/frontend/js/peripherals/peripheral-form.js Adds editable Display Name field and includes it in PATCH payload; uses it for page title.
qtoggleserver/frontend/js/peripherals/add-peripheral-form.js Adds Display Name field and submits it during peripheral creation.
qtoggleserver/frontend/js/api/peripherals.js Extends postPeripherals() to accept and send display_name.

Comment thread qtoggleserver/peripherals/__init__.py
@ccrisan ccrisan merged commit 06aa70f into main Jun 3, 2026
3 checks passed
@ccrisan ccrisan deleted the feature/peripherals-display-name branch June 3, 2026 21:28
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.

2 participants