Depending on the company, the design discussion you're talking about has happened:
1. In verbal discussions with other devs before fingers ever touch keyboards
2. In long-form writing (Text docs, then Google docs, then later Notion)
3. In per-project slack channels
4. Out loud, on a whiteboard.
Right now it's very much #4 because my company is 2 devs and a founder. But even here, I wouldn't expect to get anything non-trivial into pull request before figuring out the overall structure with the other dev verbally or in writing.