Description:
The view command allows duplicate t/ prefixes without warning the user. When multiple t/ prefixes are included, the system accepts the last one as valid and disregards the rest, which can lead to confusion. This behavior is inconsistent with other commands, such as add, where duplicate prefixes are not permitted if they are not supposed to contain duplicates. The inconsistency in handling duplicate prefixes may lead users to misunderstand how the command processes input.
Steps to Reproduce:
- Enter the command view t/bob12 t/alice34 (intentionally using duplicate t/ prefixes).
- Observe that no warning or error message appears regarding the duplicate prefix.
- Note that the system accepts the last t/ value (in this case, t/alice34) as the input.
Expected Behavior:
When duplicate t/ prefixes are detected, the system should display an error or warning to the user, similar to the behavior in other commands where duplicate prefixes are not allowed.
Actual Behavior:
The system accepts the last occurrence of the t/ prefix and disregards previous entries without any warning or error message, which may lead to user confusion and unexpected results.
Suggested Improvement:
Implement a check for duplicate t/ prefixes in the view command, with an error or warning message if duplicates are detected.
Ensure consistency across commands by standardizing the handling of duplicate prefixes, particularly for those not designed to accept duplicates.
Description:
The view command allows duplicate t/ prefixes without warning the user. When multiple t/ prefixes are included, the system accepts the last one as valid and disregards the rest, which can lead to confusion. This behavior is inconsistent with other commands, such as add, where duplicate prefixes are not permitted if they are not supposed to contain duplicates. The inconsistency in handling duplicate prefixes may lead users to misunderstand how the command processes input.
Steps to Reproduce:
Expected Behavior:
When duplicate t/ prefixes are detected, the system should display an error or warning to the user, similar to the behavior in other commands where duplicate prefixes are not allowed.
Actual Behavior:
The system accepts the last occurrence of the t/ prefix and disregards previous entries without any warning or error message, which may lead to user confusion and unexpected results.
Suggested Improvement:
Implement a check for duplicate t/ prefixes in the view command, with an error or warning message if duplicates are detected.
Ensure consistency across commands by standardizing the handling of duplicate prefixes, particularly for those not designed to accept duplicates.