I did some research with some collaborators, and we have been writing an article ("paper A") describing the work.
A few days ago I received a request to review an article ("paper B") that covers most of our work. The authors of paper B have clearly worked independently on the same topic and beaten us to submission. (And fair play to them.)
This leads me to a number of related dilemmas:
The first, and I think easiest to resolve, is whether I have a conflict of interest in reviewing paper B. I think I can write a fair review, but I intend to tell the editor and allow them to decide whether I should proceed.
The other dilemmas arise mainly because I am bound by peer-review confidentiality. I should note that paper B is not available as a preprint.
Can tell my co-authors about paper B? I am convinced that confidentiality forbids me from showing paper B to them, but can I tell them that it exists and what it covers? My feeling is that the answer is 'no'.
But then, if I cannot tell my co-authors about paper B, then it seems I have to allow our paper A to proceed to submission even although I know of the overlap with paper B.
I am extremely uncomfortable with this, although one can take the view that since our work was independent, our paper A could still be published.
Furthermore, my first impression is that paper B is not suitable for the general journal to which it was submitted, but that I would recommend acceptance to a high-quality specialist journal, such as the one to which we intended to submit our paper A. This raises an unpleasant prospect: if our paper A proceeds to submission and publication, the authors of paper B might believe that I had rejected their paper and plagarized their work (a situation discussed in this question). This situation could arise even if I turn down the review request. Naturally, I want to avoid this.
How should I proceed? Could I ask the editor for permission to inform my co-authors about paper B?