Sequence in the noble eightfold path
Right view is the leader ('forerunner') of the path.
When you realize idle chatter leads to more dukkha, this is right view leading your speech.
When the mind maintains right speech in communication, this is right mindfulness.
In actually practising the path, right view &amp; right mindfulness work together, as described below:

Of those, right view is the forerunner. And how is right view the forerunner? One discerns wrong speech as wrong speech and right speech
as right speech.
One makes an effort for the abandoning of wrong speech &amp; for entering right speech: This is one's right effort. One is mindful to abandon
wrong speech &amp; to enter &amp; remain in right speech: This is one's right
mindfulness. Thus these three qualities — right view, right effort &amp;
right mindfulness — run &amp; circle around right speech.
Maha-Cattarisaka Sutta: The Great Forty