having trouble with datives in Thucydidean sentence.

Context: Thucydides introduces a flashback to describe how the Athenians rose to such power that the Peloponnesian alliance became fearful.

οἱ γὰρ Ἀθηναῖοι τρόπῳ τοιῷδε ἦλθον ἐπὶ τὰ πράγματα ἐν οἷς ηὐξήθησαν. (Thuc. 1.89)

I don’t understand how this sentence works. In a general way it must mean something like, “Here is how Athens got involved in affairs so that Athens’s power grew.” More literally, “The Athenians came in this way to affairs in which their power grew.”

I believe that I am stumbling over"τοιῷδε" and “ἐπὶ τὰ πράγματα”, but I’m also unsure how “ἦλθον” works.

πῶς ἦλθον οἱ Ἀθηναῖοι;

τρόπῳ τινὶ ἦλθον οἱ Ἀθηναῖοι.

τίς τρόπος;

τρόπῳ τοιῷδε περὶ οὗ λέγει ὁ Θουκυδίδης.

ποῖ ἦλθον οἱ Ἀθηναῖοι;

ἐπὶ ταῦτα τὰ πράγματα ἦλθον.

τίνα πράγματα;

τὰ πράγματα ἐν οἷς ηὐξήθησαν οἱ Ἀθηναῖοι.

Many thanks to Joel for that instructive exercise.

Here is the sentence again.

οἱ γὰρ Ἀθηναῖοι τρόπῳ τοιῷδε ἦλθον ἐπὶ τὰ πράγματα ἐν οἷς ηὐξήθησαν. (Thuc. 1.89)

Now here I type some translationese for correction.

οἱ γὰρ Ἀθηναῖοι For the Athenians
τρόπῳ τοιῷδε in a manner such as this
ἦλθον came
ἐπὶ τὰ πράγματα upon the affairs [i.e. upon the historical circumstances]
ἐν οἷς in which [antecedent is τὰ πράγματα ]
ηὐξήθησαν they became great in power.