Lucky-Yuan00 / pe

0 stars 0 forks source link

Transactions that do not exist in reality can also be deleted. #3

Open Lucky-Yuan00 opened 1 week ago

Lucky-Yuan00 commented 1 week ago

Description When the user enters remove-all-txs after no previous transactions have been performed, there is no message that the transaction cannot be deleted because there are currently no transactions that can be deleted. Instead, the message to remove the transaction is still executed. This might mislead the user that there was a previous transaction and it has been deleted by him?

Steps to Reproduce What would you like to do?


list-txs No transaction available.


What would you like to do?


remove-all-txs All transactions removed!!!

Expected Behavior Cannot be deleted as there are no current transactions.

Actual Behavior All transactions removed!!!

Evidence image.png

nus-se-bot commented 4 days ago

Team's Response

We believe that this is a 50-50 option. When nothing exists, clearing everything or clearing nothing is the same. So choosing which to output in this case is very based on preference. We believe that it is purely based on your preference that you really want us to output "nothing to be cleared" in this case.

Items for the Tester to Verify

:question: Issue response

Team chose [response.Rejected]

Reason for disagreement: Thank you for the team's response, but I disagree with the notion that this is a "50-50" issue or merely a matter of user preference. Based on the actual behavior, the system's message "All transactions removed!!!" when there are no transactions is illogical and potentially misleading. It may cause users to believe that previous transactions existed and were deleted, which is not the case. This is not a preference issue but a flaw in functional design.

Specifically, the remove-all-txs command should return a message such as "No transactions to delete" when there are no transactions present, clearly reflecting the system's current state. A robust system must provide accurate feedback to users about the results of their actions, particularly for critical commands such as "clear" or "delete." If the system returns "All transactions removed" when there were no transactions to begin with, it leads to several issues:

User Misguidance: Users might think their deletion command affected transactions that never existed, leading to confusion about the system's behavior. Deviation from Expected Behavior: Deletion operations inherently imply modifying existing data. If no data exists, the system should communicate this explicitly instead of simulating a non-existent action. Violation of Consistency: The system should provide consistent feedback across similar contexts. For example, when attempting to delete a non-existent object, most systems would return "Nothing to delete" rather than falsely confirming a deletion.

Therefore, I recommend the team review this design and implement a more logical response, such as "No transactions to delete," to ensure the system's behavior aligns with its functionality and improves user experience. This is not a user preference issue but a functional design flaw that should be addressed to prevent potential user confusion and misoperation.