Skip to content

Settings page - Usage Quotas - #428

Merged
generall merged 13 commits into
masterfrom
settings-page
Aug 4, 2026
Merged

Settings page - Usage Quotas#428
generall merged 13 commits into
masterfrom
settings-page

Conversation

@trean

@trean trean commented Jul 31, 2026

Copy link
Copy Markdown
Contributor
image

@trean trean changed the title WIP: Settings page - quotas Settings page - Usage Quotas Aug 3, 2026
@trean
trean marked this pull request as ready for review August 3, 2026 15:43
@trean
trean requested review from Copilot and generall August 3, 2026 15:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 /settings route, 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_WIDTH and 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);
}
};
generall and others added 2 commits August 4, 2026 10:21
- 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
generall merged commit 0500cfc into master Aug 4, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants