@@ -588,29 +588,26 @@ export class EventHookService {
588588 eventType : context . eventType ,
589589 } ;
590590
591- // Build click URL with deep-link if project context is available
592- let clickUrl = action . clickUrl ;
593- if ( ! clickUrl && endpoint . defaultClickUrl ) {
594- clickUrl = endpoint . defaultClickUrl ;
595- // If we have a project path and the click URL looks like the server URL,
596- // append deep-link path
597- if ( context . projectPath && clickUrl ) {
598- try {
599- const url = new URL ( clickUrl ) ;
600- // Add featureId as query param for deep linking to board with feature output modal
601- if ( context . featureId ) {
602- url . pathname = '/board' ;
603- url . searchParams . set ( 'featureId' , context . featureId ) ;
604- } else if ( context . projectPath ) {
605- url . pathname = '/board' ;
606- }
607- clickUrl = url . toString ( ) ;
608- } catch ( error ) {
609- // If URL parsing fails, log warning and use as-is
610- logger . warn (
611- `Failed to parse defaultClickUrl "${ clickUrl } " for deep linking: ${ error instanceof Error ? error . message : String ( error ) } `
612- ) ;
591+ // Resolve click URL: action-level overrides endpoint default
592+ let clickUrl = action . clickUrl || endpoint . defaultClickUrl ;
593+
594+ // Apply deep-link parameters to the resolved click URL
595+ if ( clickUrl && context . projectPath ) {
596+ try {
597+ const url = new URL ( clickUrl ) ;
598+ // Add featureId as query param for deep linking to board with feature output modal
599+ if ( context . featureId ) {
600+ url . pathname = '/board' ;
601+ url . searchParams . set ( 'featureId' , context . featureId ) ;
602+ } else {
603+ url . pathname = '/board' ;
613604 }
605+ clickUrl = url . toString ( ) ;
606+ } catch ( error ) {
607+ // If URL parsing fails, log warning and use as-is
608+ logger . warn (
609+ `Failed to parse click URL "${ clickUrl } " for deep linking: ${ error instanceof Error ? error . message : String ( error ) } `
610+ ) ;
614611 }
615612 }
616613
0 commit comments