Skip to content

feat: device labels — user-assigned names for network devices (#80) - #85

Merged
reloadfast merged 1 commit into
mainfrom
feat/device-labels-80
Mar 1, 2026
Merged

reloadfast merged 1 commit into
mainfrom
feat/device-labels-80

Conversation

@reloadfast

Copy link
Copy Markdown
Owner

Summary

Closes #80

Lets users annotate any device with a human-readable label (e.g. "daughter's laptop", "Synology NAS", "old printer"). Labels survive re-scans, show as the primary identifier in the device table, and can be edited inline without leaving the page.

Changes

Backend

  • Device model: new nullable label (VARCHAR) column
  • db.py: migration for existing databases
  • DeviceOut schema: exposes label
  • PATCH /api/devices/{id}/label: set or clear the label (empty string → null)

Frontend

  • api.ts: Device.label: string | null
  • DevicesPage: hostname column now shows label ?? hostname ?? —; hover reveals ✏ button for inline editing (blur/Enter to save, Escape to cancel)
  • DeviceDetailPage: Label row added to metadata card with same inline edit UX; subtitle in page header reflects label if set

- Add nullable 'label' column to devices table with migration
- PATCH /api/devices/{id}/label endpoint to set or clear label
- DevicesPage: shows label (or hostname fallback) with hover ✏ inline editor
- DeviceDetailPage: label row in metadata with inline editing, shows label as subtitle

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@reloadfast
reloadfast merged commit f1620f3 into main Mar 1, 2026
7 checks passed
@reloadfast
reloadfast deleted the feat/device-labels-80 branch March 1, 2026 11:46
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.

Device labels/notes: add free-text label field per device for user identification

1 participant