“Which” to Modify a Whole Sentence
Which is used to modify a noun or a pronoun. Sometimes which can also refer not just to one word, but to the whole sentence. Using which to add extra information to the previous clause is common in speaking.
Example: He showed me around the town, which was very kind of him. — Он показал мне город, и это было очень любезно с его стороны.
When you find it in writing it comes after a comma to indicate a pause in speech.
Example: He’s got pink walls and a green carpet, which to my mind looks all wrong. — У него розовые стены и зеленый ковер, что на мой взгляд выглядит совсем неуместно.
Example: Sally was late, which surprised me. — Салли опоздала, что удивило меня.