Skip to content

feat: improving Task API#180

Merged
tnaum-ms merged 11 commits into
feature/copy-and-pastefrom
dev/tnaum/copy-and-paste-1-5-dummy-task
Jun 18, 2025
Merged

feat: improving Task API#180
tnaum-ms merged 11 commits into
feature/copy-and-pastefrom
dev/tnaum/copy-and-paste-1-5-dummy-task

Conversation

@tnaum-ms

Copy link
Copy Markdown
Collaborator

This pull request introduces new task-related features and updates localization strings to support task management and progress tracking. The most significant changes include the addition of a DemoTask class to demonstrate task handling and progress updates, and new localized strings for task states and operations.

Task Management Enhancements:

  • src/services/tasks/DemoTask.ts: Added a DemoTask class that simulates a task with progress updates and optional failure for testing purposes. It includes initialization, cleanup, and error handling logic.
  • src/services/tasks/index.ts: Exported the DemoTask class to make it accessible for use in other parts of the application.

Localization Updates:

  • l10n/bundle.l10n.json: Added several new localized strings related to task states and operations, including messages for task initialization, progress tracking, completion, failure, and stopping. [1] [2] [3] [4] [5] [6]

@tnaum-ms tnaum-ms requested a review from Copilot June 17, 2025 21:52

This comment was marked as outdated.

@tnaum-ms tnaum-ms marked this pull request as ready for review June 17, 2025 21:53
@tnaum-ms tnaum-ms linked an issue Jun 18, 2025 that may be closed by this pull request
@tnaum-ms tnaum-ms requested a review from Copilot June 18, 2025 12:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances task management by introducing a simulated DemoTask, exporting it for wider use, and adding localized messages to support task lifecycle states.

  • Introduce DemoTask class with progress updates, optional failure simulation, and cleanup logic
  • Export DemoTask in the tasks index for external consumption
  • Add new localization keys for task initialization, progress, completion, failure, and stopping
  • Update contributor guidelines regarding test file placement

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

File Description
src/services/tasks/DemoTask.ts Implements DemoTask class that simulates work, reports progress, and optionally fails
src/services/taskService.test.ts Adds comprehensive unit tests for TaskService and task state flows
l10n/bundle.l10n.json Adds localized strings for task states and operations
.github/copilot-instructions.md Revises testing guideline for test file placement
Comments suppressed due to low confidence (2)

src/services/tasks/DemoTask.ts:16

  • Newly introduced DemoTask lacks dedicated unit tests. Consider adding tests to verify its progress reporting, cleanup behavior, and failure simulation.
export class DemoTask extends Task {

.github/copilot-instructions.md:239

  • [nitpick] This update may conflict with the repository's convention of placing tests under the test/ folder mirroring source structure. Clarify whether tests should be co-located with code or in a separate test/ directory.
- Keep tests in the same directory as the code they test.

Comment thread src/services/tasks/DemoTask.ts Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@tnaum-ms tnaum-ms merged commit c41401b into feature/copy-and-paste Jun 18, 2025
5 checks passed
@tnaum-ms tnaum-ms deleted the dev/tnaum/copy-and-paste-1-5-dummy-task branch June 18, 2025 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Copy-and-Paste: 1.5. Implement a dummy task

2 participants