Feature: UniFi Drive (UNAS) service widget#6461
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #6461 +/- ##
==========================================
+ Coverage 88.51% 88.55% +0.04%
==========================================
Files 521 524 +3
Lines 24861 24947 +86
Branches 2160 2170 +10
==========================================
+ Hits 22005 22093 +88
+ Misses 2748 2745 -3
- Partials 108 109 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
db1480d to
8b942f9
Compare
8b942f9 to
9220d49
Compare
|
Thanks. Before I take a look please simplify the widget options, homepage aims for simplicity |
|
Specifically the share list needs to be removed or brought in line with homepage widgets. I don’t like letting LLMs just riff like this |
9220d49 to
de32840
Compare
de32840 to
d904ef6
Compare
|
Massively simplified the implementation. I removed the additional shares as per your request shamoon. I had a feeling it was too much for homepage, but since it wasn't mentioned in the discussion, I left it for the PR, but I understand the need to simplify. Now the widget only shows available space on the entire UNAS, and doesn't have per-share information. |
shamoon
left a comment
There was a problem hiding this comment.
Sigh, still a massive amount of LLM cleanup to do here.
Also the proxy is now almost entirely a line-for-line copy of the existing unifi proxy, which pretty obviously makes no sense, right?
All due respect, as I have said about 1000x by now, AI PRs have a way of shifting the work onto maintainers that I find pretty frustrating.
|
Dear Shamoon, I totally get like feeling this difficult to deal with as a maintainer for a large project. So I have made the changes that you requested. In regards to the proxy however, the reason why there are two nearly identical proxies is because of the hardcoded prefixes in the original unifi network widget as both the Drive and the AP endpoints are different. So a new proxy was made to keep the separation of concerns. This is personally the way that I would have done it in my projects pre-LLM days. If you want, I will happily create a new PR to have an argument passed from each unifi_console and unifi_drive widgets to use the same proxy. |
Adds a simple storage statistics widget for UniFi Drive (UNAS) devices. Displays total capacity, used space, available space, and health status. Uses a dedicated proxy with /proxy/drive prefix (distinct from the unifi network proxy which uses /proxy/network). API endpoint: GET /proxy/drive/api/v1/systems/storage?type=detail Related discussion: gethomepage#5960
4012c2f to
c2bcf89
Compare
Again, no disrespect meant, but do you have dev experience pre-LLM? I dont see anything in your GH profile to suggest that, and this idea doesnt make a lot of sense to me. This would leave us with two areas to reason about wrt authenticating with unifi devices, two nearly-identical paths for handling errors etc. Instead I've refactored the unifi proxy to be more generic, merged that in here and made the drive proxy just a thin wrapper. Also, as a matter of etiquette, I prefer you not force-push every single time you make a change, it makes it much harder to track changes. |
|
Please test this out, let me know if you have any concerns. |
|
I checked out the changes and tested it on my own system, it looks like it is working fine great. Thanks for the refactor on the proxy handler. In the future I'll use incremental commits going forward instead of force-pushing. Appreciate the patience. RE. PreLLM -- I've been a "full stack" developer for over 15 years now, primarily in Python and not JS. Which is why I used an LLM approach on this project for my own use. I don't commit to a public GH and use my own private git servers (Gitea at the moment). I develop websites and services for companies and their internal tooling and I don't have a lot of experience with open source projects (though I have some very minor contributions in the past). So I am sorry for any of the inconveniences that I've caused. |
|
Appreciate that, sorry if I sounded grumpy, I have enjoyed maintaining OSS projects for a long time but LLM-enabled PRs has been a bit of a mixed bag as the tools are not always used thoughtfully. Thanks for being so understanding. |
This PR contains the following updates: | Package | Update | Change | |---|---|---| | [gethomepage/homepage](https://github.com/gethomepage/homepage) | minor | `v1.11.0` → `v1.12.0` | | [ghcr.io/gethomepage/homepage](https://github.com/gethomepage/homepage) | minor | `v1.11.0` → `v1.12.0` | --- ### Release Notes <details> <summary>gethomepage/homepage (gethomepage/homepage)</summary> ### [`v1.12.0`](https://github.com/gethomepage/homepage/releases/tag/v1.12.0) [Compare Source](gethomepage/homepage@v1.11.0...v1.12.0) ##### What's Changed ##### 🚀 Features - Feature: UniFi Drive (UNAS) service widget ([#​6461](gethomepage/homepage#6461)) [@​stevenharris-dev](https://github.com/stevenharris-dev) - Chore: make unifi proxy more generic ([#​6469](gethomepage/homepage#6469)) [@​shamoon](https://github.com/shamoon) - Enhancement: better support for raw values in block highlighting ([#​6434](gethomepage/homepage#6434)) [@​shamoon](https://github.com/shamoon) - Tweak: sanitize calendar integration URLs from markup ([#​6431](gethomepage/homepage#6431)) [@​shamoon](https://github.com/shamoon) ##### 🐛 Fixes - Fix: remove trailing space from Watchtower widget loading label ([#​6448](gethomepage/homepage#6448)) [@​toytag](https://github.com/toytag) - Fix: revert changes to qbittorrent widget endpoints ([#​6467](gethomepage/homepage#6467)) [@​shamoon](https://github.com/shamoon) ##### 🧰 Maintenance - Chore(deps): Bump picomatch from 2.3.1 to 2.3.2 in the npm\_and\_yarn group across 1 directory ([#​6460](gethomepage/homepage#6460)) @​[dependabot\[bot\]](https://github.com/apps/dependabot) - Chore: return to gh runners ([#​6462](gethomepage/homepage#6462)) [@​shamoon](https://github.com/shamoon) - Chore(deps): Bump the npm\_and\_yarn group across 1 directory with 5 updates ([#​6445](gethomepage/homepage#6445)) @​[dependabot\[bot\]](https://github.com/apps/dependabot) - Chore(deps-dev): Bump eslint-plugin-prettier from 5.5.4 to 5.5.5 ([#​6442](gethomepage/homepage#6442)) @​[dependabot\[bot\]](https://github.com/apps/dependabot) - Chore(deps): Bump urbackup-server-api from 0.91.0 to 0.92.2 ([#​6444](gethomepage/homepage#6444)) @​[dependabot\[bot\]](https://github.com/apps/dependabot) - Chore(deps): Bump react-icons from 5.5.0 to 5.6.0 ([#​6443](gethomepage/homepage#6443)) @​[dependabot\[bot\]](https://github.com/apps/dependabot) - Chore(deps): Bump swr from 2.4.0 to 2.4.1 ([#​6441](gethomepage/homepage#6441)) @​[dependabot\[bot\]](https://github.com/apps/dependabot) - Chore(deps): Bump flatted from 3.3.3 to 3.4.2 in the npm\_and\_yarn group across 1 directory ([#​6439](gethomepage/homepage#6439)) @​[dependabot\[bot\]](https://github.com/apps/dependabot) - Chore(deps): Bump next from 15.5.11 to 16.1.7 in the npm\_and\_yarn group across 1 directory ([#​6438](gethomepage/homepage#6438)) @​[dependabot\[bot\]](https://github.com/apps/dependabot) - Chore(deps): Bump pnpm/action-setup from 4 to 5 ([#​6436](gethomepage/homepage#6436)) @​[dependabot\[bot\]](https://github.com/apps/dependabot) - Chore(deps): Bump release-drafter/release-drafter from 6 to 7 ([#​6429](gethomepage/homepage#6429)) @​[dependabot\[bot\]](https://github.com/apps/dependabot) - Chore: add release drafter ([#​6424](gethomepage/homepage#6424)) [@​shamoon](https://github.com/shamoon) ##### 🌐 Translations - New Crowdin translations by GitHub Action ([#​6433](gethomepage/homepage#6433)) @​[github-actions\[bot\]](https://github.com/apps/github-actions) - New Crowdin translations by GitHub Action ([#​6292](gethomepage/homepage#6292)) @​[github-actions\[bot\]](https://github.com/apps/github-actions) ##### 📚 Documentation - Documentation: fix kubernetes config examples ([#​6468](gethomepage/homepage#6468)) [@​mylegitches](https://github.com/mylegitches) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My45Ni4wIiwidXBkYXRlZEluVmVyIjoiNDMuOTYuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZG9ja2VyIiwiZ2l0aHViLXJlbGVhc2VzIl19--> Reviewed-on: https://gitea.alexlebens.dev/alexlebens/infrastructure/pulls/5202 Co-authored-by: Renovate Bot <renovate-bot@alexlebens.net> Co-committed-by: Renovate Bot <renovate-bot@alexlebens.net>
…0 (#5203) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [ghcr.io/gethomepage/homepage](https://github.com/gethomepage/homepage) | minor | `v1.11.0` → `v1.12.0` | --- ### Release Notes <details> <summary>gethomepage/homepage (ghcr.io/gethomepage/homepage)</summary> ### [`v1.12.0`](https://github.com/gethomepage/homepage/releases/tag/v1.12.0) [Compare Source](gethomepage/homepage@v1.11.0...v1.12.0) ##### What's Changed ##### 🚀 Features - Feature: UniFi Drive (UNAS) service widget ([#​6461](gethomepage/homepage#6461)) [@​stevenharris-dev](https://github.com/stevenharris-dev) - Chore: make unifi proxy more generic ([#​6469](gethomepage/homepage#6469)) [@​shamoon](https://github.com/shamoon) - Enhancement: better support for raw values in block highlighting ([#​6434](gethomepage/homepage#6434)) [@​shamoon](https://github.com/shamoon) - Tweak: sanitize calendar integration URLs from markup ([#​6431](gethomepage/homepage#6431)) [@​shamoon](https://github.com/shamoon) ##### 🐛 Fixes - Fix: remove trailing space from Watchtower widget loading label ([#​6448](gethomepage/homepage#6448)) [@​toytag](https://github.com/toytag) - Fix: revert changes to qbittorrent widget endpoints ([#​6467](gethomepage/homepage#6467)) [@​shamoon](https://github.com/shamoon) ##### 🧰 Maintenance - Chore(deps): Bump picomatch from 2.3.1 to 2.3.2 in the npm\_and\_yarn group across 1 directory ([#​6460](gethomepage/homepage#6460)) @​[dependabot\[bot\]](https://github.com/apps/dependabot) - Chore: return to gh runners ([#​6462](gethomepage/homepage#6462)) [@​shamoon](https://github.com/shamoon) - Chore(deps): Bump the npm\_and\_yarn group across 1 directory with 5 updates ([#​6445](gethomepage/homepage#6445)) @​[dependabot\[bot\]](https://github.com/apps/dependabot) - Chore(deps-dev): Bump eslint-plugin-prettier from 5.5.4 to 5.5.5 ([#​6442](gethomepage/homepage#6442)) @​[dependabot\[bot\]](https://github.com/apps/dependabot) - Chore(deps): Bump urbackup-server-api from 0.91.0 to 0.92.2 ([#​6444](gethomepage/homepage#6444)) @​[dependabot\[bot\]](https://github.com/apps/dependabot) - Chore(deps): Bump react-icons from 5.5.0 to 5.6.0 ([#​6443](gethomepage/homepage#6443)) @​[dependabot\[bot\]](https://github.com/apps/dependabot) - Chore(deps): Bump swr from 2.4.0 to 2.4.1 ([#​6441](gethomepage/homepage#6441)) @​[dependabot\[bot\]](https://github.com/apps/dependabot) - Chore(deps): Bump flatted from 3.3.3 to 3.4.2 in the npm\_and\_yarn group across 1 directory ([#​6439](gethomepage/homepage#6439)) @​[dependabot\[bot\]](https://github.com/apps/dependabot) - Chore(deps): Bump next from 15.5.11 to 16.1.7 in the npm\_and\_yarn group across 1 directory ([#​6438](gethomepage/homepage#6438)) @​[dependabot\[bot\]](https://github.com/apps/dependabot) - Chore(deps): Bump pnpm/action-setup from 4 to 5 ([#​6436](gethomepage/homepage#6436)) @​[dependabot\[bot\]](https://github.com/apps/dependabot) - Chore(deps): Bump release-drafter/release-drafter from 6 to 7 ([#​6429](gethomepage/homepage#6429)) @​[dependabot\[bot\]](https://github.com/apps/dependabot) - Chore: add release drafter ([#​6424](gethomepage/homepage#6424)) [@​shamoon](https://github.com/shamoon) ##### 🌐 Translations - New Crowdin translations by GitHub Action ([#​6433](gethomepage/homepage#6433)) @​[github-actions\[bot\]](https://github.com/apps/github-actions) - New Crowdin translations by GitHub Action ([#​6292](gethomepage/homepage#6292)) @​[github-actions\[bot\]](https://github.com/apps/github-actions) ##### 📚 Documentation - Documentation: fix kubernetes config examples ([#​6468](gethomepage/homepage#6468)) [@​mylegitches](https://github.com/mylegitches) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My45Ni4wIiwidXBkYXRlZEluVmVyIjoiNDMuOTYuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZG9ja2VyIl19--> Reviewed-on: https://gitea.alexlebens.dev/alexlebens/infrastructure/pulls/5203 Co-authored-by: Renovate Bot <renovate-bot@alexlebens.net> Co-committed-by: Renovate Bot <renovate-bot@alexlebens.net>
This PR contains the following updates: | Package | Update | Change | |---|---|---| | [gethomepage/homepage](https://github.com/gethomepage/homepage) | patch | `v1.12.0` → `v1.12.1` | --- ### Release Notes <details> <summary>gethomepage/homepage (gethomepage/homepage)</summary> ### [`v1.12.1`](https://github.com/gethomepage/homepage/releases/tag/v1.12.1) [Compare Source](gethomepage/homepage@v1.11.0...v1.12.1) #### What's Changed #### 🚀 Features - Feature: UniFi Drive (UNAS) service widget ([#​6461](gethomepage/homepage#6461)) [@​stevenharris-dev](https://github.com/stevenharris-dev) - Chore: make unifi proxy more generic ([#​6469](gethomepage/homepage#6469)) [@​shamoon](https://github.com/shamoon) - Enhancement: better support for raw values in block highlighting ([#​6434](gethomepage/homepage#6434)) [@​shamoon](https://github.com/shamoon) - Tweak: sanitize calendar integration URLs from markup ([#​6431](gethomepage/homepage#6431)) [@​shamoon](https://github.com/shamoon) #### 🐛 Fixes - Fix: remove trailing space from Watchtower widget loading label ([#​6448](gethomepage/homepage#6448)) [@​toytag](https://github.com/toytag) - Fix: revert changes to qbittorrent widget endpoints ([#​6467](gethomepage/homepage#6467)) [@​shamoon](https://github.com/shamoon) #### 🧰 Maintenance - Chore(deps): Bump picomatch from 2.3.1 to 2.3.2 in the npm\_and\_yarn group across 1 directory ([#​6460](gethomepage/homepage#6460)) @​[dependabot\[bot\]](https://github.com/apps/dependabot) - Chore: return to gh runners ([#​6462](gethomepage/homepage#6462)) [@​shamoon](https://github.com/shamoon) - Chore(deps): Bump the npm\_and\_yarn group across 1 directory with 5 updates ([#​6445](gethomepage/homepage#6445)) @​[dependabot\[bot\]](https://github.com/apps/dependabot) - Chore(deps-dev): Bump eslint-plugin-prettier from 5.5.4 to 5.5.5 ([#​6442](gethomepage/homepage#6442)) @​[dependabot\[bot\]](https://github.com/apps/dependabot) - Chore(deps): Bump urbackup-server-api from 0.91.0 to 0.92.2 ([#​6444](gethomepage/homepage#6444)) @​[dependabot\[bot\]](https://github.com/apps/dependabot) - Chore(deps): Bump react-icons from 5.5.0 to 5.6.0 ([#​6443](gethomepage/homepage#6443)) @​[dependabot\[bot\]](https://github.com/apps/dependabot) - Chore(deps): Bump swr from 2.4.0 to 2.4.1 ([#​6441](gethomepage/homepage#6441)) @​[dependabot\[bot\]](https://github.com/apps/dependabot) - Chore(deps): Bump flatted from 3.3.3 to 3.4.2 in the npm\_and\_yarn group across 1 directory ([#​6439](gethomepage/homepage#6439)) @​[dependabot\[bot\]](https://github.com/apps/dependabot) - Chore(deps): Bump next from 15.5.11 to 16.1.7 in the npm\_and\_yarn group across 1 directory ([#​6438](gethomepage/homepage#6438)) @​[dependabot\[bot\]](https://github.com/apps/dependabot) - Chore(deps): Bump pnpm/action-setup from 4 to 5 ([#​6436](gethomepage/homepage#6436)) @​[dependabot\[bot\]](https://github.com/apps/dependabot) - Chore(deps): Bump release-drafter/release-drafter from 6 to 7 ([#​6429](gethomepage/homepage#6429)) @​[dependabot\[bot\]](https://github.com/apps/dependabot) - Chore: add release drafter ([#​6424](gethomepage/homepage#6424)) [@​shamoon](https://github.com/shamoon) #### 🌐 Translations - New Crowdin translations by GitHub Action ([#​6433](gethomepage/homepage#6433)) @​[github-actions\[bot\]](https://github.com/apps/github-actions) - New Crowdin translations by GitHub Action ([#​6292](gethomepage/homepage#6292)) @​[github-actions\[bot\]](https://github.com/apps/github-actions) #### 📚 Documentation - Documentation: fix kubernetes config examples ([#​6468](gethomepage/homepage#6468)) [@​mylegitches](https://github.com/mylegitches) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My45OS4wIiwidXBkYXRlZEluVmVyIjoiNDMuOTkuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiYXV0b21lcmdlIiwiZ2l0aHViLXJlbGVhc2VzIl19--> Reviewed-on: https://gitea.alexlebens.dev/alexlebens/infrastructure/pulls/5257 Co-authored-by: Renovate Bot <renovate-bot@alexlebens.net> Co-committed-by: Renovate Bot <renovate-bot@alexlebens.net>

Proposed change
Adds a new service widget for UniFi Drive (UNAS) devices. This enables Homepage users to monitor storage statistics from their UniFi NAS directly on their dashboard.
Related discussion: #5960
Features
Configuration example
API endpoint used
GET /proxy/drive/api/v1/systems/storage?type=detail— overall storage statsExample API response
{ "data": { "totalQuota": 2000000000000, "usage": { "system": 50000000000, "myDrives": 300000000000, "sharedDrives": 150000000000 }, "status": "healthy" } }AI disclosure
Claude (Anthropic) was used to assist with test writing, proxy handler patterns, and PR preparation. All code was reviewed and tested by the author.
Type of change
Checklist: