
ip
Created Jan 2026
The Parser class has been updated to recognize and handle the find command, properly routing user inputs to a new FindCommand execution flow. Additionally, module imports within the parser were reorganized for better code readability and structure. This addition lays the groundwork for allowing users to search their task lists seamlessly by keywords.
A new FindCommand class has been introduced to support querying tasks that contain a specific keyword. It handles user input validation by throwing an exception if the keyword is missing, delegates the search operation to the task list, and hands the matching tasks off to the UI for rendering. This provides users with a convenient way to quickly locate specific items without having to manually read through the entire list.
The UI class has been updated with a new showFindResults method to handle displaying task search matches to the user. This method iterates through the provided list of matching tasks and formats them as a numbered list, or displays a placeholder message if no tasks are found. This makes the interface more robust for upcoming search functionalities.
Added a new findByKeyword method to the TaskList class to iterate through the current tasks and find matches. By stripping whitespace and comparing both the task description and the keyword in lowercase, the search becomes fully case-insensitive. This implements the necessary logic for users to quickly retrieve relevant tasks using related search terms.
Previously, Event tasks were loaded from storage using raw strings for their start and end dates. The Storage component has now been updated to properly reconstruct these into LocalDateTime objects using DateTimeUtil. Additionally, a validation step was added to gracefully discard any events where the end time precedes the start time. This change ensures that all tasks are robustly structured and reliable for manipulation once the application initializes.
Previously, the starting and ending times for Event tasks were being saved to storage using their default string representations. This patch updates the storage encoder to utilize dedicated formatting methods, ensuring dates are persisted in a consistent yyyy-MM-dd HHmm format. This small fix guarantees that event timings are accurately preserved and parsed when the application restarts.
The task parser has been updated so that the /from and /to parameters for Event tasks are now parsed as LocalDateTime objects instead of plain strings. By leveraging the existing DateTimeUtil.parseDeadlineDateTime method, this change provides more robust date and time validations for events. This ensures that all temporal data is standardized, enabling better scheduling and formatting capabilities moving forward.
The Event task model has been refactored to use LocalDateTime for its from and to boundaries rather than plain strings. This allows the application to cleanly format dates for both the user interface and persistent storage using a dedicated DateTimeUtil. Moving to a structured date type makes event time tracking much more robust and manageable.
The Deadline class has been refactored to utilize LocalDateTime instead of raw strings for date handling. Deadlines are now properly parsed internally and serialized using the standard yyyy-MM-dd HHmm format in the storage file structure. Moving forward, any malformed deadline entries loaded from previous invalid states will be cleanly skipped, ensuring improved application stability.
The Deadline task has been refactored to store its due date as a LocalDateTime instance rather than a plain string. The command parser was also updated to convert user inputs from the /by argument into date-time objects using a dedicated DateTimeUtil. This standardized approach enables much more robust date handling, paving the way for proper formatting, persistent storage, and programmatic logic like chronological sorting.
A new DateTimeUtil class has been introduced to streamline parsing dates from user input and structuring them for storage and UI display. It standardizes input parsing to expect a yyyy-MM-dd HHmm pattern, while formatting dates into a more readable MMM dd yyyy, HH:mm output for users. This change ensures a consistent handling of context like deadlines and events across the codebase.
The main event loop was refactored to replace a monolithic switch statement with an object-oriented Command pattern. The Parser now returns executable Command objects directly, delegating the logic that was previously housed in private static methods within the main class. This cleans up the top-level application structure and makes adding new commands much more maintainable.
To improve request routing and separation of concerns, the Parser class now includes a dedicated parse method that evaluates the first word of user inputs. It uses a switch statement to map these inputs directly to specific Command classes like TodoCommand, DeadlineCommand, and ExitCommand. This establishes a much cleaner Command pattern structure, streamlining how operations are instantiated and executed within the application.