Settings page - Usage Quotas - #428
Merged
Merged
Conversation
Drop the suffix-triggered right alignment in NumberField so the quota "New" input lines up on the left with the "Current" usage value. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new Settings page focused on usage quotas, and standardizes page container widths via shared theme constants to keep layout consistent across pages.
Changes:
- Introduces
/settingsroute, sidebar entry, and new Settings page containing a Quotas UI card. - Adds quota UI components + helpers (with unit tests) to fetch, display, edit, and save quota configuration/usage.
- Centralizes common page max-width values in
PAGE_CONTENT_WIDTHand applies them across multiple pages.
Reviewed changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/theme/constants.js | Adds PAGE_CONTENT_WIDTH constants to standardize page container widths. |
| src/routes.jsx | Registers the new /settings route. |
| src/pages/Welcome.jsx | Replaces hardcoded max width with PAGE_CONTENT_WIDTH.content. |
| src/pages/TutorialIndex.jsx | Replaces hardcoded max width with PAGE_CONTENT_WIDTH.content. |
| src/pages/Settings.jsx | Adds Settings page layout and mounts QuotasCard. |
| src/pages/Jwt.jsx | Replaces hardcoded max width with PAGE_CONTENT_WIDTH.narrow. |
| src/pages/Datasets.jsx | Switches container max width to PAGE_CONTENT_WIDTH.wide. |
| src/pages/Collections.jsx | Switches container max width to PAGE_CONTENT_WIDTH.wide. |
| src/pages/Collection.jsx | Switches container max width to PAGE_CONTENT_WIDTH.wide. |
| src/components/Sidebar/Sidebar.jsx | Adds “Settings” navigation item in the sidebar. |
| src/components/Settings/QuotasCard.jsx | Implements quota fetch/refresh, editing, validation, and save/discard UI. |
| src/components/Settings/quotaHelpers.test.js | Adds unit tests for quota helper conversions and status/usage logic. |
| src/components/Settings/quotaHelpers.js | Implements config↔form mapping, usage summarization, and status classification. |
| src/components/Settings/QuotaControls.jsx | Adds quota row + percent control UI (slider + numeric input + per-node breakdown). |
| src/components/Common/NumberField.jsx | Adds reusable numeric input with clamping and optional suffix adornment. |
| package-lock.json | Updates lockfile dependency versions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+15
to
+20
| export const formToConfig = (form, releaseMargin) => ({ | ||
| enabled: form.enabled, | ||
| max_resident_memory_percent: form.memoryEnabled ? form.memory : null, | ||
| max_disk_usage_percent: form.diskEnabled ? form.disk : null, | ||
| release_margin_percent: releaseMargin, | ||
| }); |
Comment on lines
+89
to
+102
| const save = async () => { | ||
| if (!draft) return; | ||
| setSaving(true); | ||
| try { | ||
| await axios.put('/quotas?wait=true', formToConfig(draft, releaseMargin)); | ||
| setSaved(draft); | ||
| await loadStatus(); | ||
| setError(null); | ||
| } catch (err) { | ||
| setError(readErrorMessage(err)); | ||
| } finally { | ||
| setSaving(false); | ||
| } | ||
| }; |
- Threshold descriptions now state that writes are blocked once the Qdrant process passes the RAM share / overall disk usage passes the disk share, instead of implying an allocation budget. - "Usage by node" -> "Usage by peer" (label, row prefix, tooltip). - Sort peers by id so the breakdown doesn't reshuffle on refresh; ids are u64 strings, so compare digit strings by length then lexically. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
generall
approved these changes
Aug 4, 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.
Uh oh!
There was an error while loading. Please reload this page.