327 Commits
Author SHA1 Message Date
Brooke Kuhlmann c971c966bf Refactored design create and update resources to use same terminology
Necessary to consistent with changes introduced when adding import support so that the top level form key is `design` instead of `template`.

Milestone: patch
2026-08-12 11:59:56 -06:00
Brooke Kuhlmann 6e7d74b6d9 Added designs import resource
Necessary to import an exported (zip file) design. The full implementation is included as a single commit to capture the details of how this works. Here's the breakdown:

* *Import Action*: Creates a new screen template based on the model ID and associated zip file content that is uploaded.
* *Import Partial*: The `_import` partial provides the form within a popover via the index page to collect details from the user. This is also why the `index` template has been updated to link to the popover and also why the index view supplies the models.

In the future, reduce the responsibility of loading the models on the index view and use a import new action instead.

Milestone: minor
2026-08-12 11:42:35 -06:00
Brooke Kuhlmann 8b4cc9c08a Added designs export resource
Allows folks to export a design for sharing with others to import and use as desired.

Milestone: minor
2026-08-11 16:54:09 -06:00
Brooke Kuhlmann 7550ec9b43 Added designs show resource
Necessary to render a single design (screen template).

Milestone: minor
2026-08-10 16:53:58 -06:00
Brooke Kuhlmann e1a4081f45 Refactored design actions to use repository dependency
Reduces typing by letting `repository` represent the default repository for the actions.

Milestone: patch
2026-08-10 16:53:57 -06:00
Brooke Kuhlmann 98d4f1e6ce Updated device delete actions to use deleter
Ensures all actions use the new deleter for consistent behavior.

Milestone: minor
2026-08-05 15:10:08 -06:00
Brooke Kuhlmann c273ec2112 Fixed firmware and screen attachments
This reverts commit 5e9ab0cf02 (Removed screen and firmware struct attachment replace behavior, 2026-08-03) because you can't reliably have link:https://shrinerb.com[Shrine] upload a replacable image. We still need to have distinct methods for `#replace` and `#upload`.

This also prevents duplicate images being created.

Milestone: patch
2026-08-05 13:29:07 -06:00
Brooke Kuhlmann 5e9ab0cf02 Removed screen and firmware struct attachment replace behavior
We can safely remove the `#remove` method in favor of using `#upload` for everything now that we conditionally destroy the record only if found and the `*_data` key exists. This also updates firmware attachment behavior to mimic screen attachment behavior in order to improve consistency.

Milestone: minor
2026-08-03 16:47:46 -06:00
Brooke Kuhlmann 239b6b0dae Refactored extension renderers as generators
Naming of these objects continues to be challenging but this refactors the renderers as generators because they are producing HTML content for building images. The actual rendering of content to HTML is handled by the Liquid renderer.

Issue: 352
Milestone: patch
2026-07-30 15:14:27 -06:00
Brooke Kuhlmann 3e4c6ac8ad Updated to SimpleCov 1.0.0
link:https://github.com/simplecov-ruby/simplecov/blob/main/CHANGELOG.md#100-2026-07-12[Details]. This includes the following:

* My long standing bug has been fixed which allows for implicit elses to be ignored. This cleans up code related to using monads with pattern matching which is nice to see.
* We still can't enable ERB code coverage (this is why the templates are skipped). I've logged a few more new bugs on the SimpleCov side to tackle. This might take a while because I noticed Erik Berlin logged issues with Ruby core in order to make this possible.
* Use of the *strict* profile ensures all code committed to this project must be 100%. This also cleans up having to be explicit about this.

Milestone: patch
2026-07-18 11:30:36 -06:00
Brooke Kuhlmann c67e011a6c Updated API display errors for invalid API key
When header information is invalid or missing, we'll emphasize that the device's API key must be used. This helps clear up any ambiguity when resolving the issue.

Milestone: minor
2026-07-14 17:19:25 -06:00
Brooke Kuhlmann fc849438c1 Updated API setup show action to provision via device API key
Now that the model (payload) knows how to incorporate the device's API key, we'll use the API key in the response to ensure the response is always the same (especially when the device can be found).

Milestone: minor
2026-07-14 17:18:16 -06:00
Brooke Kuhlmann be4ea99a26 Removed computed MAC address from firmware headers model
No longer necessary now that we can use the Setup API to set the API key for a device. This means you can use either the model ID or, soon, the API key.

Issue: 347
Milestone: minor
2026-07-14 15:29:32 -06:00
Brooke Kuhlmann b363fbbd4a Added API log creation action log level
Necessary to support log levels in future firmware versions. For now, the level, is optional but will be required in the future.

Milestone: minor
2026-06-30 11:07:39 -06:00
Brooke Kuhlmann 9d11c888f1 Updated API setup show action to use computed MAC address
As with done with the Display API, we'll delegate to the model to compute the MAC address when provisioning a device. This required refactoring the action to use a private provision device method.

The `HTTP_ID` missing header spec was deleted since this header is optional now.

Milestone: minor
2026-06-29 10:54:26 -06:00
Brooke Kuhlmann aca49b238e Updated designs update action to use upsert job
Necessary to make the UI more responsive since we don't need to wait for the screen to be updated when saving content since the existing Server Sent Event will do this for us.

Milestone: minor
2026-06-29 09:02:21 -06:00
Brooke Kuhlmann 58cb2b4dc4 Refactored playlist screen show action to use current item advancer
Reduces duplication now that the original implementation is extracted to the current item advancer.

Milestone: patch
2026-06-25 15:19:14 -06:00
Brooke Kuhlmann 236f32b399 Updated designs index resource to list templates
Instead of loading the designer, we'll allow folks to create, edit, or delete templates as done with other resources.

Issue: 321
Milestone: minor
2026-06-22 12:11:58 -06:00
Brooke Kuhlmann 930f328a40 Added designs delete action
Necessary to delete an existing template.

Issue: 321
Milestone: minor
2026-06-22 12:11:58 -06:00
Brooke Kuhlmann c7693968d9 Added designs update action
Necessary to update an existing screen template.

Issue: 321
Milestone: minor
2026-06-22 12:11:58 -06:00
Brooke Kuhlmann f2551822d7 Added designs edit resource
Necessary to edit an existing design. The associated screen is updated, in real-time, as changes are saved using Server Sent Events.

Issue: 321
Milestone: minor
2026-06-22 12:11:57 -06:00
Brooke Kuhlmann 84aa3f56dd Updated designs create action
We no longer need to update the associated screen as that'll soon be handled by the update action instead. So the changes applied here simplify this action to only focus on updating (or reporting errors) for the associated screen template.

Issue: 321
Milestone: minor
2026-06-22 12:11:57 -06:00
Brooke Kuhlmann 3f5615a34d Added designs new resource
Necessary to create new designs. The welcome code is sourced from the welcome partial using an inline struct since Hanami doesn't provide a way to new up a database struct (which would be ideal).

Issue: 321
Milestone: minor
2026-06-22 12:11:57 -06:00
Brooke Kuhlmann 79f4280de5 Refactored designer to designs namespace
Necessary to allow the designer to manage multiple designs (i.e. screen templates).

Issue: 321
Milestone: patch
2026-06-22 12:11:56 -06:00
Brooke Kuhlmann 1cba0a5401 Refactored routes to reduce brevity
Cleans up the routes so there is less typing and brings the routes more inline with how Hanami resources behave.

Milestone: patch
2026-06-16 13:29:22 -06:00