Skip to content

feat: embedded applications#1557

Open
ruipbatista wants to merge 3 commits intomainfrom
feat/applications-open-by-default
Open

feat: embedded applications#1557
ruipbatista wants to merge 3 commits intomainfrom
feat/applications-open-by-default

Conversation

@ruipbatista
Copy link
Contributor

@ruipbatista ruipbatista commented Mar 6, 2026

https://canvasmedical.atlassian.net/browse/KOALA-4387

This pull request introduces a new system for embeddable applications within Canvas, adding support for the SHOW_APPLICATION effect and the APPLICATION__ON_GET event. It refactors the application handler architecture to allow for more flexible and testable embedded applications, and updates the test suite to cover the new functionality. The most important changes are grouped below by theme.

Core framework enhancements:

  • Added the SHOW_APPLICATION effect to EffectType and the APPLICATION__ON_GET event to EventType enums in canvas_generated/messages/effects_pb2.pyi and canvas_generated/messages/events_pb2.pyi, enabling applications to be discovered and described via a standardized effect and event. [1] [2] [3] [4]
  • Introduced the ShowApplicationEffect class in canvas_sdk/effects/show_application.py, which encapsulates application metadata for the new effect type.

Application handler refactor:

  • Refactored canvas_sdk/handlers/application.py to add ApplicationScope, EmbeddedApplication, and update NoteApplication to inherit from EmbeddedApplication. This enables scope-based registration and visibility, and centralizes application event handling logic. [1] [2]

Testing improvements:

  • Added comprehensive tests for embedded applications in canvas_sdk/tests/handlers/test_embedded_application.py, covering scope, visibility, identifier resolution, event dispatch, and payload correctness.
  • Updated canvas_sdk/tests/handlers/test_note_application.py to test the new NoteApplication API, including deprecation of the old handle() method, visibility logic, open-by-default, and identifier fallback.

These changes collectively modernize the Canvas application integration model, making it easier to register, discover, and interact with embeddable applications in a standardized way.

@github-actions github-actions bot added the Jira: Not Linked PR body does not contain a Jira link label Mar 6, 2026
@codecov
Copy link

codecov bot commented Mar 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.96%. Comparing base (8ad3cfa) to head (a1b1095).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1557      +/-   ##
==========================================
- Coverage   93.61%   91.96%   -1.65%     
==========================================
  Files         491       17     -474     
  Lines       22018      386   -21632     
  Branches     1020       33     -987     
==========================================
- Hits        20612      355   -20257     
+ Misses       1253       30    -1223     
+ Partials      153        1     -152     
Flag Coverage Δ
plugin-abnormal_lab_task_notification 100.00% <ø> (ø)
plugin-api_samples 33.33% <ø> (ø)
plugin-appointment_coverage_label 100.00% <ø> (ø)
plugin-coverage_metadata_sync 100.00% <ø> (ø)
plugin-my_first_plugin 100.00% <ø> (ø)
plugin-patient_summary_chart_groups 100.00% <ø> (ø)
plugin-preact_hello_world 100.00% <ø> (ø)
plugin-send_all_prescriptions 100.00% <ø> (ø)
plugin-simple_note_button_plugin 100.00% <ø> (ø)
plugin-supervising_provider_prescribe 100.00% <ø> (ø)
plugin-supervising_provider_prescribe_protocol 100.00% <ø> (ø)
plugin-upsert_patient_metadata 100.00% <ø> (ø)
plugin-vitals_visualizer_plugin 98.43% <ø> (ø)
py3.11 ?
py3.12 ?
sdk-core ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ruipbatista ruipbatista changed the title [DRAFT] add dynamic applications feat: embedded applications Mar 9, 2026
@ruipbatista ruipbatista marked this pull request as ready for review March 9, 2026 15:15
@ruipbatista ruipbatista requested a review from a team as a code owner March 9, 2026 15:15
@github-actions github-actions bot added Jira: Linked PR body contains a Jira link and removed Jira: Not Linked PR body does not contain a Jira link labels Mar 9, 2026
@ruipbatista ruipbatista force-pushed the feat/applications-open-by-default branch from c81cc7e to 4bb2438 Compare March 9, 2026 15:21
@ruipbatista ruipbatista force-pushed the feat/applications-open-by-default branch from 4bb2438 to a1b1095 Compare March 11, 2026 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Jira: Linked PR body contains a Jira link

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant