Skip to content

Make raiseIntent context argument optional - #1983

Open
Roaders wants to merge 2 commits into
mainfrom
raiseIntent-context-optional
Open

Make raiseIntent context argument optional#1983
Roaders wants to merge 2 commits into
mainfrom
raiseIntent-context-optional

Conversation

@Roaders

@Roaders Roaders commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

The context argument of raiseIntent is now optional (context?: Context | null). Apps that only raise an intent to obtain a result no longer need to pass the fdc3.nothing context explicitly.

When context is omitted (or null/undefined is passed) the Desktop Agent proxy substitutes the fdc3.nothing context type, so the wire protocol is unchanged, the IntentHandler is untouched, and intent listeners always receive a concrete context. This is an additive, non-breaking change for TypeScript applications.

  • fdc3-standard: make context optional/null on the DesktopAgent interface and update the JSDoc and examples
  • fdc3-agent-proxy: substitute fdc3.nothing when no context is provided
  • website docs: mirror the interface change
  • tests: add proxy scenarios for the no-context and null-context cases
  • CHANGELOG: add entry under [Unreleased] > Changed

Describe your change

Related Issue

resolves #1708

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?
  • API changes: Does this PR include changes to any of the FDC3 APIs (DesktopAgent, Channel, PrivateChannel, Listener, Bridging)?
    • Docs & Sources: If yes, were both documentation (/docs) and sources updated?

      JSDoc comments on interfaces and types should be matched to the main documentation in /docs
    • Conformance tests: If yes, are conformance test definitions (/toolbox/fdc3-conformance) still correct and complete?

      Conformance test definitions should cover all required aspects of an FDC3 Desktop Agent implementation, which are usually marked with a MUST keyword, and optional features (SHOULD or MAY) where the format of those features is defined
    • Schemas: If yes, were changes applied to the Bridging and FDC3 for Web protocol schemas?

      The Web Connection protocol and Desktop Agent Communication Protocol schemas must be able to support all necessary aspects of the Desktop Agent API, while Bridging must support those aspects necessary for Desktop Agents to communicate with each other
      • If yes, was code generation (npm run build) run and the results checked in?

        Generated code will be found at /src/api/BrowserTypes.ts and/or /src/bridging/BridgingTypes.ts
  • Context types: Were new Context type schemas created or modified in this PR?
    • Were the field type conventions adhered to?
    • Was the BaseContext schema applied via allOf (as it is in existing types)?
    • Was a title and description provided for all properties defined in the schema?
    • Was at least one example provided?
    • Was code generation (npm run build) run and the results checked in?

      Generated code will be found at /src/context/ContextTypes.ts
  • Intents: Were new Intents created in this PR?

@Roaders
Roaders requested a review from a team as a code owner July 14, 2026 09:55
@netlify

netlify Bot commented Jul 14, 2026

Copy link
Copy Markdown

Deploy Preview for fdc3 ready!

Name Link
🔨 Latest commit eb7f231
🔍 Latest deploy log https://app.netlify.com/projects/fdc3/deploys/6a97cb4661db0c000812ae21
😎 Deploy Preview https://deploy-preview-1983.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

codecov-commenter commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.03%. Comparing base (cb00631) to head (eb7f231).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1983   +/-   ##
=======================================
  Coverage   95.03%   95.03%           
=======================================
  Files          73       73           
  Lines        4251     4252    +1     
  Branches      596      597    +1     
=======================================
+ Hits         4040     4041    +1     
  Misses        211      211           

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Roaders
Roaders requested review from a team and removed request for a team July 15, 2026 08:51
@Roaders Roaders added this to the FDC3 3.1 milestone Jul 16, 2026
@Roaders
Roaders force-pushed the raiseIntent-context-optional branch from 277eea1 to 07aaa53 Compare July 23, 2026 07:45
@kriswest kriswest modified the milestones: FDC3 3.1, FDC3 3.0 Jul 23, 2026
julianna-ciq
julianna-ciq previously approved these changes Aug 10, 2026

@julianna-ciq julianna-ciq 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.

lgtm

@Roaders
Roaders force-pushed the raiseIntent-context-optional branch from 07aaa53 to b925adb Compare August 20, 2026 13:09
@Roaders Roaders added this to the FDC3 3.0 milestone Aug 20, 2026
@Roaders
Roaders force-pushed the raiseIntent-context-optional branch from b925adb to 0b75945 Compare August 27, 2026 14:39
@Roaders

Roaders commented Aug 27, 2026

Copy link
Copy Markdown
Contributor Author

agreement given to merge in #2153 . need re-approval to be able to merge

@kriswest kriswest 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.

Need to add the new MUST to the conformance section for DAs that inject the API as it won't be handled for them by the agent-proxy.

If a target app for the intent cannot be found with the criteria provided or the user either closes the resolver UI or otherwise cancels resolution, the promise MUST be rejected with an `Error` object with a `message` chosen from the [`ResolveError`](Errors#resolveerror) enumeration, or (if connected to a Desktop Agent Bridge) the [`BridgingError`](Errors#bridgingerror) enumeration. If a specific target `app` parameter was set, but either the app or app instance is not available, the promise MUST be rejected with an `Error` object with either the `ResolveError.TargetAppUnavailable` or `ResolveError.TargetInstanceUnavailable` string as its `message`. If an invalid context object is passed as an argument the promise MUST be rejected with an `Error` object with the [`ResolveError.MalformedContext`](Errors#resolveerror) string as its `message`.

If you wish to raise an intent without a context, use the `fdc3.nothing` context type. This type exists so that apps can explicitly declare support for raising an intent without context.
If you wish to raise an intent without a context, the `context` argument may be omitted (or `null`/`undefined` passed). In this case the Desktop Agent MUST substitute the `fdc3.nothing` context type, which apps may use to explicitly declare support for raising an intent without context. A `{ type: "fdc3.nothing" }` context may also be passed explicitly.

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.

As there's a must here it needs adding to the DA conformance requirements section:

https://fdc3.finos.org/docs/next/api/spec#desktop-agent-api-standard-compliance

### Desktop Agent API Standard Compliance

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

updated and rebased

The context argument of raiseIntent is now optional
(context?: Context | null). Apps that only raise an intent to obtain a
result no longer need to pass the fdc3.nothing context explicitly.

When context is omitted (or null/undefined is passed) the Desktop Agent
proxy substitutes the fdc3.nothing context type, so the wire protocol is
unchanged, the IntentHandler is untouched, and intent listeners always
receive a concrete context. This is an additive, non-breaking change for
TypeScript applications.

- fdc3-standard: make context optional/null on the DesktopAgent interface
  and update the JSDoc and examples
- fdc3-agent-proxy: substitute fdc3.nothing when no context is provided
- website docs: mirror the interface change
- tests: add proxy scenarios for the no-context and null-context cases
- CHANGELOG: add entry under [Unreleased] > Changed
@Roaders
Roaders force-pushed the raiseIntent-context-optional branch from 0b75945 to eb7f231 Compare September 2, 2026 07:07
@Roaders
Roaders requested a review from kriswest September 2, 2026 07:18
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.

Make raiseIntent context optional

4 participants