refactor(frontend): enhance settings page#114
Merged
Conversation
a9ex
reviewed
Jul 12, 2026
a9ex
left a comment
Member
There was a problem hiding this comment.
Depends on unmerged branch. Imports $lib/components/BoundaryFailed.svelte, which is added on refactor/frontend/clusters — won't build until that lands. Merge order: clusters → this. Findings below are independent of that.
The refactor itself is a nice improvement over main (proper <svelte:boundary> error fallback, .as() field defaults instead of imperative .set(), promise-tracking toasts). The page manages Docker image config (URL + registry auth) and bot token rotation via PATCH /bot. No delete action here.
Major
- Saving the image or the token restarts the entire fleet, with no confirmation. In
bot.service.tsupdate(),shouldForceRestart = layoutChanged || tokenChanged || dockerImageChanged; when true it removes and re-creates/starts every cluster. This page exposes image + token as plain inline "save" buttons — a stray click mid-demo tears down and restarts all clusters. Please add a confirmation step (or explanatory copy) before submitting these, and guard against double-submit at the handler level.
Minor
- The registry
username/passwordinputs arerequired, but the backend treats them as optional and never returns the password inGetBotDto. For an existing bot using auth, the empty password field blocks an image-only update unless the user re-types it. (Carried over frommain, but worth fixing here.) - Double-submit guard is soft (
disabled={!!pending}only on the button; Enter in the field can still submit). Preferpending > 0and an early-return in the submit callback. - After a successful image save,
element.reset()reverts the inputs but not theauthenticationtoggle ($state, not a form control). Cosmetic.
Verified fine
PATCH /botpayloads ({ dockerImage }/{ token }) matchUpdateBotSchema; 202/401/404 handling correct; UI updates after mutation viagetBot().set(await response.json())(no refetch needed).{const}/{let}template declaration tags and in-templateawaitare valid (svelte 5.56 +experimental.async).
Verdict: draft, blocked on clusters for the missing component. Once rebased, the main thing to address is a confirmation step before the image/token save (Major) given it restarts all clusters.
zowks
force-pushed
the
refactor/frontend/settings
branch
from
July 12, 2026 13:34
bd9fd8c to
0d55618
Compare
zowks
marked this pull request as ready for review
July 12, 2026 13:42
zowks
enabled auto-merge (squash)
July 12, 2026 13:42
a9ex
approved these changes
Jul 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request improves the user experience and error handling for the settings page, specifically in the deployment and bot token forms. The main changes include adding enhanced form submission with user feedback via toasts, better error boundaries, and improved default value handling for form fields.
User experience improvements:
.enhance()method to provide real-time feedback using toasts for loading, success, and error states during submission (toaster.promise).Error handling:
BoundaryFailedcomponent on failure, improving error visibility for users.Default value and state handling:
getBot()directly in the form, ensuring fields are always initialized with the latest data.UI consistency:
Checklist