Noah was a righteous man?

בדרותיו. יֵשׁ מֵרַבּוֹתֵינוּ דּוֹרְשִׁים אוֹתוֹ לְשֶׁבַח, כָּל שֶׁכֵּן אִלּוּ הָיָה בְדוֹר צַדִּיקִים הָיָה צַדִּיק יוֹתֵר; וְיֵשׁ שֶׁדּוֹרְשִׁים אוֹתוֹ לִגְנַאי, לְפִי דוֹרוֹ הָיָה צַדִּיק וְאִלּוּ הָיָה בְדוֹרוֹ שֶׁל אַבְרָהָם לֹא הָיָה נֶחְשָׁב לִכְלוּם (סנה' ק"ח):

בדורותיו IN HIS GENERATIONS — Some of our Rabbis explain it (this word) to his credit: he was righteous even in his generation; it follows that had he lived in a generation of righteous people he would have been even more righteous owing to the force of good example. Others, however, explain it to his discredit: in comparison with his own generation he was accounted righteous, but had he lived in the generation of Abraham he would have been accounted as of no importance (cf. Sanhedrin 108a).

את האלהים התהלך נח. וּבְאַבְרָהָם הוּא אוֹמֵר אֲשֶׁר הִתְהַלַּכְתִּי לְפָנָיו? (ברא' כ"ד), נֹחַ הָיָה צָרִיךְ סַעַד לְתָמְכוֹ, אֲבָל אַבְרָהָם הָיָה מִתְחַזֵּק וּמְהַלֵּךְ בְצִדְקוֹ מֵאֵלָיו:

את האלהים התהלך נח NOAH WALKED WITH GOD — In the case of Abraham Scripture says, (Genesis 24:40) ‘‘[God] before whom I walked”; Noah needed God’s support to uphold him in righteousness, Abraham drew his moral strength from himself and walked in his righteousness by his own effort (Genesis Rabbah 30:10).

https://www.myjewishlearning.com/article/what-must-we-risk/
https://www.myjewishlearning.com/article/a-paradigm-for-environmental-consciousness/

(בראשית ו, ט) אלה תולדות נח [נח איש צדיק תמים היה בדורותיו] א"ר יוחנןבדורותיו ולא בדורות אחרים וריש לקיש אמרבדורותיו כ"ש בדורות אחרים

"These are the generations of Noah...[Noah was a righteous man, perfect in his generation]. Rabbi Yochanan said: "In his generation" he was considered righteous, but not in other generations. Reish Lakish said, "In his generation" and even the more so in other generations.

(ב)בדרתיו. יש מרבותינו דורשים אותו לשבח, כל שכן שאלו היה בדור צדיקים היה צדיק יותר, ויש שדורשים אותו לגנאי, לפי דורו היה צדיק, ואלו היה בדורו של אברהם לא היה נחשב לכלום:

(2) "In his generation..." - (Sanhedrin 109) Some of our rabbis interpret this as praise, meaning, all the more so, if he had been in a generation filled with righteous people, he would have been even more righteous. And there are those who interpret it as criticism, meaning, if he had been in Abraham's generation, he would not have been thought of as anything special.

Rabbi Ronit Tsadok, IKAR High Holy Days 5782
The thing about the window on the ark is that it also brings the outside world in.
Before the flood, Noah was not concerned with the brokenness around him. The Torah tells us Noah walked with God, and the commentary Rav Yitzchak Abravanel explains that this means Noah didn’t engage the people of his time at all. There was corruption and a devaluing of human life, and widespread theft and so much more that he wasn’t paying attention to. And I don’t imagine Noah looked out the window of his ark much at the beginning either. It might have been too difficult to attend to his own distress and also witness the loss of life outside.
But when it got quiet, after the rains stopped, Noah could look outside again. When we are scared and overwhelmed, it can be hard to look beyond ourselves. But when we can catch our breath, even just a little? We must widen our gaze. Look out the window.
Adapted from Rabbi Elimelech of Lizensk
There are two kinds of “righteous” people: one who is truly righteous and one who just dresses like a righteous person in a fur coat. Each of them faces the winter in a different way. One will go out and collect wood for the fire; the other will wrap himself in his fur coat. The one who collects wood lights a fire and invites others to join her. She not only warms herself, but others as well. The one who makes himself cozy in his own heavy coat is secure, but those around him will freeze. The genuinely righteous person is the one who shares their warmth with others.