Skip to content

Add ICurrentApp to expose the current app id to apps - #1442

Open
zyga69 wants to merge 1 commit into
net-daemon:mainfrom
zyga69:feat/current-app-id
Open

Add ICurrentApp to expose the current app id to apps#1442
zyga69 wants to merge 1 commit into
net-daemon:mainfrom
zyga69:feat/current-app-id

Conversation

@zyga69

@zyga69 zyga69 commented Aug 28, 2026

Copy link
Copy Markdown

Breaking change

Proposed change

Apps and services resolved in an app's DI scope had no supported way to find out which app they belong to. The only object carrying that information, ApplicationContext, is internal.

Add a small read-only ICurrentApp interface exposing the app id, and register the existing scoped ApplicationContext as its implementation. This lets an app inject ICurrentApp (or resolve it from any service in its scope) to select per-app configuration, logging, etc. IApplication is not reused for this because it also exposes lifecycle methods that apps should not call on themselves.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • The code compiles without warnings (code quality check)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration are added/changed:

@codecov

codecov Bot commented Aug 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82%. Comparing base (b12abac) to head (68874d2).

Additional details and impacted files
@@         Coverage Diff          @@
##           main   #1442   +/-   ##
====================================
- Coverage    83%     82%   -1%     
====================================
  Files       201     201           
  Lines      4162    4165    +3     
  Branches    485     485           
====================================
- Hits       3460    3455    -5     
- Misses      497     504    +7     
- Partials    205     206    +1     
Flag Coverage Δ
unittests 82% <100%> (-1%) ⬇️

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

☔ View full report in Codecov by Harness.
📢 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.

@helto4real helto4real added enhancement New feature or request pr: enhancement and removed enhancement New feature or request labels Aug 30, 2026
Apps and services resolved in an app's DI scope had no supported way to
find out which app they belong to. The only object carrying that
information, ApplicationContext, is internal.

Add a small read-only ICurrentApp interface exposing the app id, and
register the existing scoped ApplicationContext as its implementation.
This lets an app inject ICurrentApp (or resolve it from any service in
its scope) to select per-app configuration, logging, etc. IApplication
is not reused for this because it also exposes lifecycle methods that
apps should not call on themselves.
@zyga69
zyga69 force-pushed the feat/current-app-id branch from 1dd0a99 to 68874d2 Compare September 1, 2026 14:03

@helto4real helto4real left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you for your contribution.

@helto4real

Copy link
Copy Markdown
Collaborator

@zyga69 can you make sure you have commit that have verified signature, it is a security measure, just fix it and foce push and we are golden. Thank you for your contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants