Signed-off-by: Seongmin Lee git@boltless.me
+75
-4
knotmirror/adminpage.go
+1
-1
knotmirror/knotmirror.go
+4
knotmirror/models/models.go
+72
-4
knotmirror/resyncer.go
+29
knotmirror/templates/base.html
+15
knotmirror/templates/repos.html
History
2 rounds
3 comments
1 commit
expand
collapse
Signed-off-by: Seongmin Lee <git@boltless.me>
expand 3 comments
@lewis.moe Seems like I forgot to remove temporary comment again... 馃槄
Few design choices I made for internal admin page:
- I'm using htmx from external CDN to make knotmirror build step simpler
- Those endpoints are used through htmx based web interface so I can safely remove that comment.
I personally think vibe-coded admin page backed by JSON based API would fit better (just like indigo/relay/relay-admin-ui) but I didn't want to deal with LLM or whole npm business so I ended up writing basic html templates for the admin page. If someone could submit a JS slop version, I'd prefer it tbh. It's just an admin page intended to be interactive as much as possible and we won't touch it often. It's pretty basic so we can rewrite everything whenever we want to.
Also we can easily hide the admin page with basic password authentication if frontend is hosted separately from api.
But for this time, I found simple dedicated templates hosted through tailscale network was faster & simplest solution. Do you think we should reuse some bits from appview UI and introduce whole session management stuffs?
yeah no need to re-invent the wheel, what you have already is good
1 commit
expand
collapse
Signed-off-by: Seongmin Lee <git@boltless.me>
knotmirror/adminpage.go:45I think it would be nicest to build all our UI through the main tangled appview UI to build on top of the auth. internal-tool-ui from scratch for one-off things like this turn into a bag full of not-documented random UIs that nobody ever knows or visits, ask me how I know