Skip to content

fix(web): show the default limits instead of "no limit" - #316

Merged
samuelmbabhazi merged 1 commit into
mainfrom
fix/301-limits-shown-in-ui
Nov 16, 2026
Merged

samuelmbabhazi merged 1 commit into
mainfrom
fix/301-limits-shown-in-ui

Conversation

@samuelmbabhazi

@samuelmbabhazi samuelmbabhazi commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

Follow-up to #313 (issue #301).

What changed

The "Resource limits" section of an application's configuration showed no limit for a CPU or a memory limit that shipkeep.yml leaves out. Since #313 that is no longer true: the application runs under 1 CPU and 512Mi. The section now shows 1 CPU (default) and 512Mi (default) (1 CPU (par défaut), 512Mi (par défaut) in French).

The two texts are fixed strings so that they can be translated. A test compares them with DEFAULT_RESOURCES from @shipkeep/config-schema, so they cannot drift from what the control plane applies. The unused no limit translation is removed.

How it was tested

  • New unit tests for the section: no resources, one limit declared, and the texts against DEFAULT_RESOURCES in both languages. Putting no limit back makes the test fail.
  • In Chromium against a control plane image built from this change, on the page of a real application without resources: French and English at 1440 × 900, French at 390 × 844. An application that declares 250m and 64Mi still shows its own values.

Security considerations

Text only. No new input, request or secret path.

Before merging

UI change: waiting for the maintainer to look at the screenshots.

Summary by CodeRabbit

  • New Features
    • Resource limits now display the default CPU and memory values when no limits are specified, instead of showing “no limit.”
    • French-language displays include translations for the default CPU and memory labels.

An application without resources now runs under 1 CPU and 512Mi (#301),
so the configuration view states those values.

Refs #301

Signed-off-by: samuel mbabhazi <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The Resource limits section now displays 1 CPU and 512Mi defaults when resource values are absent. French translations and tests cover the fallback labels and displayed defaults.

Changes: Resource limit display

Layer / File(s) Summary
Define and display resource defaults
apps/web/src/app/delivery/config-sections.ts, apps/web/src/app/ui/fr.ts, apps/web/src/app/delivery/config-sections.spec.ts
The Resource limits section uses 1 CPU (default) and 512Mi (default) when values are absent, replacing no limit. French translations and tests cover these labels and their default values.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related issues

  • Issue 301 proposes 1 CPU and 512 MiB defaults for applications without a resources section. This PR displays those defaults but does not change their enforcement.

Possibly related PRs

  • shipkeepdev/shipkeep#313: This PR displays the same CPU and memory defaults that PR #313 applies to containers without a resources section.

Suggested labels: track:web

Merge Risk: Minimal · up to 0f995

The configuration view now shows the real default CPU and memory limits instead of "no limit", in English and French. The change is small and localized, and no merge-blocking risk was found.

Security architecture risk: Minimal · up to 0f995

The change corrects how existing resource defaults are displayed. No introduced or worsened risk affecting security, failure containment, rollback, or ownership is established.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title states the main change: the Resource limits section now shows the default CPU and memory limits instead of "no limit" when those values are omitted. The changeset matches this, since DEFAULT…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title states the main change: the Resource limits section now shows the default CPU and memory limits instead of "no limit" when those values are omitted. The changeset matches this, since DEFAULT_LIMIT_TEXT provides the displayed defaults, the French translation map adds the default entries, and the "no limit" translation is removed. The fix(web) prefix is a conventional commit form and is acceptable.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install timed out. The project may have too many dependencies for the sandbox.

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between fcc53f5 and 0f995d7.

Files selected for processing: 3

  • apps/web/src/app/delivery/config-sections.spec.ts
  • apps/web/src/app/delivery/config-sections.ts
  • apps/web/src/app/ui/fr.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

@samuelmbabhazi
samuelmbabhazi merged commit 55bda85 into main Nov 16, 2026
16 checks passed
@samuelmbabhazi
samuelmbabhazi deleted the fix/301-limits-shown-in-ui branch November 16, 2026 11:32
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.

1 participant