Skip to content

Comments

MPT-18369: add helpdesk foundation with cases#218

Draft
svazquezco wants to merge 1 commit intomainfrom
codex/mpt-18369-helpdesk-foundation-channels-cases
Draft

MPT-18369: add helpdesk foundation with cases#218
svazquezco wants to merge 1 commit intomainfrom
codex/mpt-18369-helpdesk-foundation-channels-cases

Conversation

@svazquezco
Copy link
Contributor

@svazquezco svazquezco commented Feb 24, 2026

🤖 Codex-generated PR — Please review carefully.

Summary

  • keep helpdesk module scaffold with sync/async entrypoints on MPTClient/AsyncMPTClient
  • keep only helpdesk cases service in this PR
  • remove helpdesk channels service and related unit/e2e tests from this PR
  • expand helpdesk cases e2e tests to cover create, get, update, and fetch_page
  • add environment-safe behavior in cases e2e: skip create-based tests when backend create is unavailable (server 500)

Validation

  • make check
  • make test args="tests/unit/resources/helpdesk tests/unit/test_mpt_client.py"
  • make test args="tests/e2e/helpdesk/cases/test_sync_cases.py tests/e2e/helpdesk/cases/test_async_cases.py" (2 passed, 6 skipped)

Scope

  • this PR implements helpdesk foundation + cases only
  • channels implementation is out of scope for this PR

Closes MPT-18369

  • Added helpdesk module foundation to MPTClient and AsyncMPTClient with sync/async entrypoints
  • Implemented Helpdesk and AsyncHelpdesk resource classes providing access to cases API
  • Added CasesService and AsyncCasesService supporting collection, create, get, update, and custom actions (complete, process, query)
  • Defined Case model for the helpdesk cases resource with endpoint /public/v1/helpdesk/cases
  • Added comprehensive end-to-end tests for cases API covering create, get, update, and list operations with environment-safe behavior (gracefully skips create tests when backend unavailable)
  • Added unit tests for Helpdesk classes and CasesService/AsyncCasesService
  • Updated public API exports to include Helpdesk and AsyncHelpdesk types in mpt_api_client.resources

@svazquezco svazquezco requested a review from a team as a code owner February 24, 2026 15:01
@coderabbitai
Copy link

coderabbitai bot commented Feb 24, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1096816 and 256e648.

📒 Files selected for processing (11)
  • mpt_api_client/mpt_client.py
  • mpt_api_client/resources/__init__.py
  • mpt_api_client/resources/helpdesk/__init__.py
  • mpt_api_client/resources/helpdesk/cases.py
  • mpt_api_client/resources/helpdesk/helpdesk.py
  • tests/e2e/helpdesk/cases/conftest.py
  • tests/e2e/helpdesk/cases/test_async_cases.py
  • tests/e2e/helpdesk/cases/test_sync_cases.py
  • tests/unit/resources/helpdesk/test_cases.py
  • tests/unit/resources/helpdesk/test_helpdesk.py
  • tests/unit/test_mpt_client.py
🚧 Files skipped from review as they are similar to previous changes (5)
  • tests/unit/resources/helpdesk/test_helpdesk.py
  • mpt_api_client/resources/helpdesk/helpdesk.py
  • tests/unit/resources/helpdesk/test_cases.py
  • tests/e2e/helpdesk/cases/test_sync_cases.py
  • tests/e2e/helpdesk/cases/test_async_cases.py

📝 Walkthrough

Walkthrough

Adds a Helpdesk resource to the client library: synchronous and asynchronous Helpdesk classes with CasesService/AsyncCasesService (including complete/process/query actions), exposes types via package init exports, and includes unit and end-to-end tests and test fixtures for cases.

Changes

Cohort / File(s) Summary
Client API surface
mpt_api_client/mpt_client.py, mpt_api_client/resources/__init__.py, mpt_api_client/resources/helpdesk/__init__.py
Exported AsyncHelpdesk and Helpdesk; added helpdesk property to AsyncMPTClient and MPTClient to expose the new resource.
Helpdesk implementation
mpt_api_client/resources/helpdesk/helpdesk.py, mpt_api_client/resources/helpdesk/cases.py
Added Helpdesk/AsyncHelpdesk wrappers and Case model plus CasesService/AsyncCasesService with CRUD and custom actions: complete, process, query.
Unit tests
tests/unit/resources/helpdesk/test_helpdesk.py, tests/unit/resources/helpdesk/test_cases.py, tests/unit/test_mpt_client.py
New unit tests verifying service/property wiring, method presence, and client exports updated to include Helpdesk types.
End-to-end tests & fixtures
tests/e2e/helpdesk/cases/test_sync_cases.py, tests/e2e/helpdesk/cases/test_async_cases.py, tests/e2e/helpdesk/cases/conftest.py
Added sync and async e2e tests for create/get/update/list flows and fixtures/helpers for queue and case data extraction.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Jira Issue Key In Title ✅ Passed The PR title contains exactly one Jira issue key in the correct format MPT-18369.
Test Coverage Required ✅ Passed PR modifies 5 code files and includes 6 test files across unit and e2e test suites, meeting the requirement that test files be included.
Single Commit Required ✅ Passed PR contains a single coherent feature addition for helpdesk foundation with cases, presented sequentially without multiple independent commits.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@tests/unit/resources/helpdesk/test_cases.py`:
- Around line 49-77: The test function test_custom_resource_actions_no_data (and
the similar no-data test later) declares an unused parameter input_status in the
pytest.mark.parametrize, causing ARG001; remove input_status from the param list
and from the parametrize tuples so only the action is parametrized (e.g. change
("action", "input_status") to ("action",) and provide ("process",), ("query",),
("complete",)), and update the corresponding pytest.mark.parametrize for the
other no-data test the same way so the test functions only accept the single
used argument and the unused parameter is eliminated.

ℹ️ Review info

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d0c4a94 and d18e10b.

📒 Files selected for processing (14)
  • mpt_api_client/mpt_client.py
  • mpt_api_client/resources/__init__.py
  • mpt_api_client/resources/helpdesk/__init__.py
  • mpt_api_client/resources/helpdesk/cases.py
  • mpt_api_client/resources/helpdesk/channels.py
  • mpt_api_client/resources/helpdesk/helpdesk.py
  • tests/e2e/helpdesk/cases/test_async_cases.py
  • tests/e2e/helpdesk/cases/test_sync_cases.py
  • tests/e2e/helpdesk/channels/test_async_channels.py
  • tests/e2e/helpdesk/channels/test_sync_channels.py
  • tests/unit/resources/helpdesk/test_cases.py
  • tests/unit/resources/helpdesk/test_channels.py
  • tests/unit/resources/helpdesk/test_helpdesk.py
  • tests/unit/test_mpt_client.py

@svazquezco svazquezco force-pushed the codex/mpt-18369-helpdesk-foundation-channels-cases branch from d18e10b to 336d5b5 Compare February 24, 2026 15:30
@svazquezco svazquezco force-pushed the codex/mpt-18369-helpdesk-foundation-channels-cases branch 3 times, most recently from 829acef to 1096816 Compare February 24, 2026 18:14
@svazquezco svazquezco changed the title MPT-18369: add helpdesk foundation with channels and cases MPT-18369: add helpdesk foundation with cases Feb 24, 2026
@svazquezco svazquezco force-pushed the codex/mpt-18369-helpdesk-foundation-channels-cases branch from 1096816 to 256e648 Compare February 24, 2026 18:31
@sonarqubecloud
Copy link

@svazquezco svazquezco marked this pull request as draft February 24, 2026 18:42
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.

1 participant