feat: add a clear command to reset the in-session history
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
Research direction
Start in SimpleCalc/Program.cs, where the history and exit command checks run before the operator switch, and read RememberResult and ShowHistory to see how historyCount and historyNext are maintained. Add a case-insensitive clear command that resets the buffer state and prints a confirmation, then list it in the README command section. Done means that running two calculations, history, clear, and history shows two lines and then an empty list, and a smoke test covers that sequence.
Written by the indexing model from the issue text.
Description
The only in-session commands are history and exit (Program.cs checks these before the operator switch). The 3-slot history ring buffer (#19) keeps growing stale results for the life of the session with no way to clear it — once a user has run a few unrelated calculations, history shows a mix they cannot reset without restarting the process.
Evidence
grep -n '"history"\|"exit"' SimpleCalc/Program.cs→ the two only command checks; noclear/resetanywhere.RememberResult/ShowHistorymanagehistoryCount/historyNextbut nothing zeroes the buffer.
Suggested scope
- Recognise
clear(case-insensitive, like the other commands): resethistoryCount = 0,historyNext = 0, blank the slots, and print confirmation. - Document in the README command list; add a smoke test: run two calcs,
history(2 lines),clear,history(empty).
- Dominant language
- C#
- Stars
- 0
- Forks
- 0
- Avg merge
- 1h 12m
- Merged PRs (30d)
- 4
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from billyx86/CSharp-SimpleCalculator
-
bug good first issue
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
enhancement good first issue
Difficulty 3/5 1-2 days Newbie friendliness 65/100
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
All issues in billyx86/CSharp-SimpleCalculator
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 80/100
Unity-Technologies/unity-agent-plugin#118 ·
Maintainers usually reply within 1 day
-
The Recommended preset turns on Import Uno DSP, which only works with the Material themePossibly taken @agneszitte claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 92/100
unoplatform/uno.templates#2388 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
eyalgolan/statecraft-israel#2732 ·
Maintainers usually reply within 1 day
-
要トリアージ
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
Maintainers usually reply within 1 day
-
kind/chore status/draft
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Altinn/altinn-events#1158 ·
Maintainers usually reply within 1 day