Problem
sp-update <branch> accepts any branch and the tRPC system.triggerUpdate({ branch }) mutation already validates + forwards it. But UpdateCard.tsx only offers a main / dev picker for non-standard branches — there's no way to install a feature branch (e.g. feat/sp-bundle-logs) from the UI without SSHing in.
This came up testing #580 — to dogfood the new `sp-bundle-logs` from a real install, the only paths today are:
- ssh in and run
sudo sp-update feat/sp-bundle-logs
scripts/deploy <pod> feat/sp-bundle-logs from a dev machine
A textbox-or-dropdown for arbitrary branch would let support / contributors run unreleased branches without leaving the web UI.
Proposal
In src/components/status/UpdateCard.tsx:
- Add a "Custom branch…" option to the branch-picker step alongside main / dev
- Render a text input when selected; validate against the same
^[a-zA-Z0-9._\-/]+$ regex used in system.triggerUpdate
- Same WAN-unblock prompt + restart flow as standard updates
- Show a clear warning that custom branches are unreleased
Acceptance
- Branch picker shows three options: main, dev, custom
- Custom input validates the branch name client-side before submit
- Submitting an invalid branch (e.g.
evil; rm -rf /) is rejected with a usable error
- Service restarts and reconnects same as standard update path
- Existing main/dev flow unchanged
Refs
Problem
sp-update <branch>accepts any branch and the tRPCsystem.triggerUpdate({ branch })mutation already validates + forwards it. ButUpdateCard.tsxonly offers amain/devpicker for non-standard branches — there's no way to install a feature branch (e.g.feat/sp-bundle-logs) from the UI without SSHing in.This came up testing #580 — to dogfood the new `sp-bundle-logs` from a real install, the only paths today are:
sudo sp-update feat/sp-bundle-logsscripts/deploy <pod> feat/sp-bundle-logsfrom a dev machineA textbox-or-dropdown for arbitrary branch would let support / contributors run unreleased branches without leaving the web UI.
Proposal
In
src/components/status/UpdateCard.tsx:^[a-zA-Z0-9._\-/]+$regex used insystem.triggerUpdateAcceptance
evil; rm -rf /) is rejected with a usable errorRefs
src/server/routers/system.ts:269triggerUpdate already does the heavy liftingsrc/components/status/UpdateCard.tsx:54isStandardBranchis where the picker decision lives