Skip to content

Conversation

@avidflyer17
Copy link
Owner

Summary

  • render load average gauge and per-period cards
  • display CPU, memory, disk stats and top processes

Testing

  • ./tests/run.sh (fails: Commande requise manquante : mpstat)

https://chatgpt.com/codex/tasks/task_e_68b061475154832da03fdbc7678e7951

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

Codex Review: Here are some suggestions.

Reply with @codex fix comments to fix any unresolved comments.

About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".

Comment on lines +437 to +439
const parts = String(value).split(/[\s,]+/).filter(Boolean);
if (parts.length < 3)
return null;

Choose a reason for hiding this comment

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

[P1] Parse load averages that use commas as decimal separators

The new parseLoadAverage splits the input on every comma and whitespace. Audit files serialise the three loads as a comma‑only string such as "0,13,0,23,0,23", so this logic turns 0,13 into two numbers (0 and 13) and the 5‑minute average becomes 13, which later clamps to 100 % and shows a constant critical load. Consider normalising decimal commas before splitting so 0,13,0,23,0,23 becomes three 0.13 values.

Useful? React with 👍 / 👎.

Comment on lines +393 to +396
function parseSizeToBytes(str) {
if (!str)
return null;
const m = String(str).trim().match(/^([0-9]+(?:[.,][0-9]+)?)\s*(B|KB|MB|GB|TB|KiB|MiB|GiB|TiB)?$/i);

Choose a reason for hiding this comment

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

[P1] Support memory sizes without trailing “B” suffix

The parseSizeToBytes regex only matches units like GiB or MB. The bundled audit JSON uses values such as "15Gi" and "108Mi", which fail the regex and return null, so the RAM and swap cards show N/A and 0 % even though the data is present. Widen the pattern or map to handle Ki, Mi, Gi, etc. so memory usage is calculated correctly.

Useful? React with 👍 / 👎.

Comment on lines +556 to +559
if (usage != null) {
requestAnimationFrame(() => {
const pct = Math.max(0, Math.min(100, usage));
fillU.style.width = pct + '%';

Choose a reason for hiding this comment

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

[P1] Define adjustBarValue before using it in metric bars

Several new rendering functions call adjustBarValue(...) inside requestAnimationFrame, but this helper is not defined anywhere in viewer.js. At runtime each callback throws ReferenceError: adjustBarValue is not defined, leaving the bar labels unstyled and littering the console. The function exists in audits/scripts/modules/ui.js, so it needs to be imported or implemented here.

Useful? React with 👍 / 👎.

@avidflyer17 avidflyer17 merged commit c035285 into dev Aug 28, 2025
1 check passed
@avidflyer17 avidflyer17 deleted the codex/corriger-sections-affichees-vides branch August 28, 2025 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants