feat(frontend): add /layout page#85
Merged
Merged
Conversation
418a0af to
4437d75
Compare
4437d75 to
9a1f913
Compare
There was a problem hiding this comment.
Pull request overview
This PR introduces a new frontend /layout route to edit the bot’s cluster/shard layout and persist the updated layout to the backend.
Changes:
- Added a
/layoutpage UI for adding/removing clusters and shards and saving the result. - Introduced a
LayoutManagerutility to model cluster/shard mutations and export an API payload. - Added a new
updateBotLayoutremote command to PATCH the bot layout and refresh cluster data.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| packages/frontend/src/routes/(app)/layout/+page.svelte | New UI for editing clusters/shards and saving layout changes. |
| packages/frontend/src/routes/(app)/layout/+layout.svelte | Adds a layout wrapper for the new /layout route. |
| packages/frontend/src/lib/utils/LayoutManager.svelte.ts | New client-side layout model handling add/remove/export of clusters/shards. |
| packages/frontend/src/lib/remotes/bot.remote.ts | Adds updateBotLayout PATCH command and refreshes clusters on success. |
Comments suppressed due to low confidence (1)
packages/frontend/src/routes/(app)/layout/+page.svelte:122
- The add-cluster button is icon-only and has no accessible name (
aria-label/title). Add an accessible label so assistive technologies can describe the action.
<button
class="btn btn-lg aspect-video flex rounded-lg bg-surface-50-950 text-surface-700-300 hover:text-primary-700-300"
onclick={() => layout.add()}
>
<PlusIcon />
</button>
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+62
to
+66
| <h3 class="font-bold text-surface-800-200"> | ||
| Cluster {String(index).padStart(2, "0")} | ||
| <span class="text-surface-500 text-sm" | ||
| >({cluster.shards.length})</span | ||
| > |
Comment on lines
+70
to
+75
| <button | ||
| class="btn-icon btn-icon-sm hover:text-error-800-200 hover:bg-surface-100-900 transition-colors" | ||
| onclick={() => layout.remove(index)} | ||
| > | ||
| <XIcon /> | ||
| </button> |
a9ex
reviewed
May 16, 2026
a9ex
approved these changes
May 16, 2026
zowks
added a commit
that referenced
this pull request
May 16, 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.
Description
This PR adds the
/layoutpageContext / Motivation
This page is needed to edit the clusters and shards layout.
While keeping shard IDs compliant with Discord's API requirements
Screenshots
/layoutChecklist
Additional Notes