Repository navigation
Add device add/edit, mark done, and an Admin backup screen - #12
Merged
Merged
Conversation
Finishes the v0.1 front end gaps from step 8 of the master plan:
- Devices: "Add device" and "Edit" forms (name, category, status, area and
location, with a new location inline, make/model/manual as a product,
serial on create, purchase and warranty fields, notes; the critical flag
for Admins only). Edits send only changed fields.
- Maintenance: "Mark done" on the overview and device page logs the date,
outcome, optional cost in the property currency, and notes, then shows
the new due date.
- Backups: GET/POST /api/v1/backups and GET /api/v1/backups/{name} to make,
list, and download .hiotbak files, for users who are Admin of every
property (a backup holds them all). The screen lists the CLI commands
for verify, restore, and export; restore stays CLI only.
Posted by Claude on behalf of @ShaneCurcuru
Generated-by: Claude Code
Resolves conflicts in the app's router list, schemas, nav, overview, and front end routes, and regenerates openapi.json and schema.d.ts. The Backups nav item now uses main's minRole style. Posted by Claude on behalf of @ShaneCurcuru Generated-by: Claude Code
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.
Requested by Shane · project thread
What and why
Finishes the v0.1 front end gaps from step 8 of
docs/_prompts/plan/HomeIOT-Master-Plan.md(front end steps 4 and 5 infrontend-options.md): the device form, "mark done" for maintenance, and an Admin backup screen. Asked for by Shane ("continue implementing v0.1").Devices
/devices/new) and Edit (/devices/$deviceId/edit), for Maintainers and Admins with manage access. Fields: name, category, status, Area and location (with "New location…" to create one inline), manufacturer/model/manual link (saved as a new product when changed), serial number (create only), install/purchase dates, price, vendor, warranty, notes. The critical flag is shown to Admins only.null.Maintenance
Backups (backend + front end)
GET /api/v1/backups,POST /api/v1/backups,GET /api/v1/backups/{name}. They make, list, and download.hiotbakfiles in the data folder'sbackups/, using the existingcreate_backup. Each create and download is written to the audit log.backups/./admin/backups, "Backups" in the nav for Admins) also lists the CLI commands for verify, merge or replace restore, and export. Restore stays CLI only, because it swaps the database under a running server.Readings and decisions to check
python-multipartor a raw body reader, which is one reason restore was left out.<input type="date">so@mantine/dates(and dayjs) isn't needed.src/test/setup.tsstubsdocument.fonts, which Mantine's autosize Textarea uses and jsdom lacks.src/api/mutations.tsand new tests are in new files, to keep conflicts with Floor plans, wall photos, and device pins (plan step 9) #8, Install guide, Docker image, docs site, and "Load sample data" #9, Add Home Assistant device import (v0.1 step 10) #10, Add full-text search and verify PostgreSQL support #11 small.router.tsx,AppLayout.tsxandOverviewPage.tsxwill still need small rebases.Not done
Testing
uv run ruff check .,ruff format --check,pyright: clean.uv run pytest: 287 passed, including 7 new backup API tests (403 for non-admins and for an Admin of only some properties, path traversal, CSRF, audit).npm run lint,tsc -b,vitest run: 82 passed (new: form values, add/edit flows, mark done, backups page). License check passes.domus servewith the sample home): added a device with a new location and product, edited it, marked a task done with a cost (the event saved with 24.50 USD and the task moved to next year), made a backup, downloaded it, anddomus backup verifyreported it OK. No horizontal scroll at phone width.Posted by Claude on behalf of @ShaneCurcuru
Generated by Claude Code