Use random starting balances only when saved balances are missing #23

Closed
opened 2025-11-03 16:37:28 +01:00 by admin-backup · 7 comments
admin-backup commented 2025-11-03 16:37:28 +01:00 (Migrated from 172.24.0.1:8928)

Problem

Every startup currently creates random leave quantities. Users need their saved inputs to take precedence while retaining random starting values when no balance list has been saved.

Resulting behavior

Use one balance list. Restore readable saved balances first; otherwise generate the current random defaults. Startup behavior determines the source of the values.

Acceptance criteria

  • A readable saved list takes precedence, including an empty list.
  • When no saved balance list remains, generate the existing CP, RTT, and Other rows with quantities from 10 through 20 inclusive and the current availability/expiry defaults.
  • Unreadable balance data is deleted by #22 before this fallback is used.
  • Leave generated defaults unsaved until the first balance edit. Merely visiting or calculating must not persist them.
  • On the first balance edit, #21 saves the entire current list; subsequent visits restore that list instead of replacing it with new random values.
  • Keep one set of planning inputs. Provide no Personal/Demo profiles, separate rule copies, or random/manual mode control.

Verification

Use controlled random values to verify the existing inclusive range and rendered default rows when storage is absent. Seed saved quantities outside that range and verify they are restored unchanged; cover an empty saved list. Verify untouched defaults remain unsaved and an edited list survives a fresh visit.

Coordination

Coordinate saved-data detection with #22 and first-edit saving with #21.

## Problem Every startup currently creates random leave quantities. Users need their saved inputs to take precedence while retaining random starting values when no balance list has been saved. ## Resulting behavior Use one balance list. Restore readable saved balances first; otherwise generate the current random defaults. Startup behavior determines the source of the values. ## Acceptance criteria - A readable saved list takes precedence, including an empty list. - When no saved balance list remains, generate the existing CP, RTT, and Other rows with quantities from 10 through 20 inclusive and the current availability/expiry defaults. - Unreadable balance data is deleted by [#22](https://gitea.nessar.fr/nessar/vac-optimizer/issues/22) before this fallback is used. - Leave generated defaults unsaved until the first balance edit. Merely visiting or calculating must not persist them. - On the first balance edit, [#21](https://gitea.nessar.fr/nessar/vac-optimizer/issues/21) saves the entire current list; subsequent visits restore that list instead of replacing it with new random values. - Keep one set of planning inputs. Provide no Personal/Demo profiles, separate rule copies, or random/manual mode control. ## Verification Use controlled random values to verify the existing inclusive range and rendered default rows when storage is absent. Seed saved quantities outside that range and verify they are restored unchanged; cover an empty saved list. Verify untouched defaults remain unsaved and an edited list survives a fresh visit. ## Coordination Coordinate saved-data detection with [#22](https://gitea.nessar.fr/nessar/vac-optimizer/issues/22) and first-edit saving with [#21](https://gitea.nessar.fr/nessar/vac-optimizer/issues/21).
nessar commented 2026-10-02 14:54:42 +02:00 (Migrated from 172.24.0.1:8928)

Completion audit — 2026-10-02

Published UserInputService initializes random quantities, and DayInput lets the user edit quantities. There is no explicit random/manual mode selector. Clarify whether existing editable random defaults fulfil the request or a selectable mode is required. Local uncommitted input changes must not be treated as published completion.

Evidence: reviewed issue requirements/discussions and f1f0835 (published application source; live main 57a39c81 only adds Renovate configuration). Tested an isolated checkout of the published source: 20 test files, 157/157 tests passed, including the five benchmark scenarios. Local commit 51978f7 and uncommitted edits were inspected separately and are not evidence of published completion.

Completion audit — 2026-10-02 Published UserInputService initializes random quantities, and DayInput lets the user edit quantities. There is no explicit random/manual mode selector. Clarify whether existing editable random defaults fulfil the request or a selectable mode is required. Local uncommitted input changes must not be treated as published completion. Evidence: reviewed issue requirements/discussions and f1f0835 (published application source; live main 57a39c81 only adds Renovate configuration). Tested an isolated checkout of the published source: 20 test files, 157/157 tests passed, including the five benchmark scenarios. Local commit 51978f7 and uncommitted edits were inspected separately and are not evidence of published completion.
nessar commented 2026-10-04 21:18:06 +02:00 (Migrated from 172.24.0.1:8928)

mentioned in issue #21

mentioned in issue #21
nessar commented 2026-10-04 21:18:09 +02:00 (Migrated from 172.24.0.1:8928)

mentioned in issue #22

mentioned in issue #22
nessar commented 2026-10-04 21:18:11 +02:00 (Migrated from 172.24.0.1:8928)

changed title from mode aléatoire ou valeur user pour le nb de jours to Use random starting balances only when saved balances are missing

<p>changed title from <code class="idiff"><span class="idiff left right deletion">mode aléatoire ou valeur user pour le nb de jours</span></code> to <code class="idiff"><span class="idiff left right addition">Use random starting balances only when saved balances are missing</span></code></p>
nessar commented 2026-10-04 21:18:11 +02:00 (Migrated from 172.24.0.1:8928)

changed the description

changed the description
nessar commented 2026-10-04 23:33:30 +02:00 (Migrated from 172.24.0.1:8928)

mentioned in commit b76e311576

mentioned in commit b76e311576bccb92a71819459f84f44d3c86fdd4
nessar (Migrated from 172.24.0.1:8928) closed this issue 2026-10-04 23:36:00 +02:00

Preserved GitLab #23 history: source attribution, exact timestamps, discussion grouping and review positions. Historical diff snapshots: 1; visible source notes: 6.

gitlab-35-issue-23.md (SHA-256 18b95188669258fc784c11159dadfbce09ceeadd99aee4e4b5249df9d5901c47)

gitlab-35-issue-23.json (SHA-256 a986deb412ed597b491169712889427857b113f02db9386f6720c66813682cde)

Old CI job execution and reports are omitted. Original source files and rollback backups remain protected.

<!-- gitlab-to-gitea-history:35:Issue:23 --> Preserved GitLab #23 history: source attribution, exact timestamps, discussion grouping and review positions. Historical diff snapshots: 1; visible source notes: 6. [gitlab-35-issue-23.md](https://gitea.nessar.fr/attachments/fb735028-4690-42df-979e-11ca469cac28) (SHA-256 `18b95188669258fc784c11159dadfbce09ceeadd99aee4e4b5249df9d5901c47`) [gitlab-35-issue-23.json](https://gitea.nessar.fr/attachments/fa59e95d-dabf-4587-8b3a-7a6112204b7f) (SHA-256 `a986deb412ed597b491169712889427857b113f02db9386f6720c66813682cde`) Old CI job execution and reports are omitted. Original source files and rollback backups remain protected.
gitea-emergency added this to the Development project 2026-10-11 22:14:31 +02:00
gitea-emergency moved this to Closed in Development on 2026-10-11 22:14:31 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: nessar/vac-optimizer#23