Skip to content

Ensure current user channel is resolved before DesktopAgentProxy is used#1858

Merged
kriswest merged 5 commits intomainfrom
1857-starting-an-app-on-a-channel
Apr 17, 2026
Merged

Ensure current user channel is resolved before DesktopAgentProxy is used#1858
kriswest merged 5 commits intomainfrom
1857-starting-an-app-on-a-channel

Conversation

@kriswest
Copy link
Copy Markdown
Contributor

@kriswest kriswest commented Apr 16, 2026

Describe your change

Resolves a regression for web-based Desktop Agents that implement their own user channel management (where an app may start already joined to a channel) by:

  • Retrieving the current channel from the Desktop Agent on startup. In prior releases this happened on calling addContextListener, but was removed since.
  • Preventing a race condition with addContextListener by making DefaultChannelSupport implement Connectable — moving the getUserChannel() and addEventListener initialization calls from fire-and-forget promises in the constructor into a connect() method that is properly awaited via the DesktopAgentProxy's existing connectables lifecycle.
  • Reducing redundant requests for the current channel and user channel list by ensuring the caches for each are always used when populated.
  • Adding tests for ChannelSupport cases where the Desktop Agent has preset a user channel

Related Issue

resolves #1857

Contributor License Agreement

  • I acknowledge that a contributor license agreement is required and that I have one in place or will seek to put one in place ASAP.

Review Checklist

  • Issue: If a change was made to the FDC3 Standard, was an issue linked above?
  • CHANGELOG: Is a CHANGELOG.md entry included?

@kriswest kriswest requested a review from a team as a code owner April 16, 2026 17:53
@netlify
Copy link
Copy Markdown

netlify bot commented Apr 16, 2026

Deploy Preview for fdc3 ready!

Name Link
🔨 Latest commit 4753fa2
🔍 Latest deploy log https://app.netlify.com/projects/fdc3/deploys/69e1526742ce1400083c5ae1
😎 Deploy Preview https://deploy-preview-1858.preview-fdc3.finos.org
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 16, 2026

Codecov Report

❌ Patch coverage is 96.66667% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 95.61%. Comparing base (b753eee) to head (4753fa2).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...-agent-proxy/src/channels/DefaultChannelSupport.ts 96.55% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             main    #1858    +/-   ##
========================================
  Coverage   95.61%   95.61%            
========================================
  Files          69       69            
  Lines        4675     4680     +5     
  Branches      833      582   -251     
========================================
+ Hits         4470     4475     +5     
  Misses        205      205            

☔ 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.

@kriswest
Copy link
Copy Markdown
Contributor Author

@Roaders @julianna-ciq I think this resolves the regression we discussed and fixes an existing race condition. I'll push a v2.2.2-beta.2 with this in to facilitate easier testing.

@kriswest kriswest changed the title 1857 starting an app on a channel Ensure current user channel is resolved before DesktopAgentProxy is used Apr 16, 2026
Copy link
Copy Markdown
Contributor

@Roaders Roaders left a comment

Choose a reason for hiding this comment

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

LGTM

@kriswest kriswest merged commit db2cbf2 into main Apr 17, 2026
7 checks passed
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.

V2.2.2-beta.1 regression: If the desktop agent changes the current user channel the agent-proxy is not aware of the change

3 participants