I thought this was never ok in the main panel?

I know ground and neutral in the sub should not be tied together but i think i missed the part about the main ? Refresh my memory.
neutral and grounds should not be tied together ?

You missed the part about describing exactly what you are referring to, and including a pic to back up your concerns. Also, to share what your ‘memory’ is telling you, giving us the opportunity to suggest corrections if necessary.

It looks like someone terminated the neutrals on the EGC bus. Is this in a separate structure? Do you have a photo of the entire panel?

It’s my understanding that neutrals and grounds sharing a bus bar at the main panel is OK.

I should mention this is also part of a solar system and yes the is a main disconnect at the solar connection. So this is ok ?

From what is shown in the photo the neutral current is travelling on the panel enclosure which is not permitted.

This graphic is helpful for common/ground conductor conditions in panels. Print it and keep it on a clipboard for use during your inspections:

Main service panel, neutrals and grounds can share the same bus bar. Terminations remain the same. one neutral wire is permitted under 1 lug. No other neutrals or grounds are permitted to be under the screw