Consider dropping Alpine.js and writing its 19 directive uses directly #163
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up to #145, which was fixed by taking option 1 (fetch Alpine at build time under a verified sha256) rather than option 3 (drop it). Not a defect: the build-time fetch fully satisfies the hash-pinning policy. This is the optional further step, deliberately deferred out of the 1.0 cycle.
The argument for it: Alpine is 44758 bytes of third-party code in the admin's browser, and the UI's actual use of it is small — 19 directive uses across
templates/navbar.html,templates/source_detail.htmlandtemplates/source_logs.html. Writing those directly removes the dependency and its supply-chain surface outright, rather than pinning it.The argument against doing it in 1.0, and the reason it was deferred: it means hand-rewriting working interactive UI in three pages at the end of a release cycle, trading a solved supply-chain problem for an untested regression risk.
If taken up:
static/js/app.js.<script defer src="/s/js/alpine.min.js">loader fromtemplates/base.html.static/vendor.sha256and the Alpine block fromscript/fetch-assets. Both are built to survive that:static/vendor_test.goiterates the manifest, and.gitignore/.dockerignoreentries for the artifact would go with it.