The pull request lands on a Friday afternoon. Forty files changed, careful tests, a clear description. Your colleague has clearly worked hard on it for two weeks. And within five minutes you can see that it solves a different problem from the one the team actually has. The users asked for faster exports. This makes exports more configurable.
Your first job is to not start leaving line comments. Thirty notes about naming and error handling tell your colleague the work is nearly there. It is not, and they will spend another week polishing the wrong thing.
Talk to them directly, ideally on a call or in person, before you write anything in the review. A written "this solves the wrong problem" on a large piece of work lands very hard, and it is permanent.
Start with what you understood the goal to be, and ask what they understood. Very often the gap is in the ticket, a meeting they missed, or a sentence from a stakeholder that meant one thing to them and another to you. Find out where it came from before you decide anyone got it wrong. You may also discover they know something you do not, and the change is right after all.
If it really is the wrong direction, say so plainly and kindly. Separate the effort from the outcome. The tests are good, the code is clean, and the work still does not answer what users asked for. Both are true, and they deserve to hear both.
Then look for what can be kept. Two weeks of work rarely contains nothing useful. A refactor, a test helper, or the understanding of the export code may carry straight over into the right solution.
Afterwards, look at why nobody noticed for two weeks. Was there no early check in? Did they work quietly because asking felt like weakness? A short sketch or a draft pull request after day two would have caught this. Suggest that for next time, for everyone, not just for them.
And notice your own part. If you saw the ticket and said nothing, or were too busy to answer their question in week one, say so. It makes the feedback far easier to hear.
– Asael Shinder
Top comments (0)