Longstreet - Brevet Major - Molino Del Ray - 8th September 1847. Full promotion to Major - July 1858 - 8th Infantry. Lt. Col CSA June 22 1861... except appointed Brigadier General dated as of June 17th.
Lt Col in the Army of the Confederate States of America (ACSA, the regular army), and BG in the Provisional Army of the Confederate States (PACS, the volunteer force).
All BG's at this time were PACS. There were only 5 regular (ACSA) generals of any grade (and all of them BG), and two of them (JEJ and Beauregard) were at 1st BR. All the initial crop of BG's were dated with seniority to 17th June, but not all had received the rank by the time of Bull Run. For example - Jackson was a Colonel of Virginia Militia initially and on 3rd July he received a covering letter from RE Lee and his Commission as a BG in PACS. I'm not sure he ever received a regular ACSA Commission.
There is some mixing of ACSA and PACS/ Militia rank in this chart - Kirby Smith's Lt Colonelcy for example was regular (he was on paper Lt Col of the 1st CS Cavalry).
Brigade numberings were on the fly, and do not reflect seniority.
Army of Shenandoah
BG (ACSA) JE Johnston
1st: Jackson, entered as Colonel in the Va Militia (27th April) and one of the initial crop of PACS BGs
2nd: Bartow, Colonel of Georgia Militia
3rd: Bee, entered service as a regular (ACSA) Major (in one of the infantry regiments), and fought at BR as a BG. He ranked Jackson, having been appointed in June.
4th: EK Smith: Smith was Johnston's AAG and was Lt Col in the regulars. He received a BG Commission before Jackson, it being in place on 2nd July when JEJ complains this deprives him.
Given their regular ranks I believe the order in the AoS goes:
BG (ACSA) JE Johnston
BG (PACS) EK Smith
BG (PACS) BE Bee
BG (PACS) TJ Jackson
and then the Colonels
Army of the Potomac
BG (ACSA) PGT Beauregard
1st: BG (PACS) ML Bonham, entered service commanding the 1st SC Bde, and was made a PACS BG back on 23rd May.
2nd: BG (PACS) RS Ewell, entered service as a ACSA Major
3rd: BG (PACS) DR Jones, entered service as a ACSA Major and Beauregard's COS.
4th: BG (PACS) Longstreet, entered service as a ACSA Lt Col
5th: Col PStG Cocke - Va Militia
6th Col JA Early - Va Militia
7th: Col NG Evans - SC Militia
BG (PACS) TH Holmes, entered service as a regular (ACSA) Colonel, and is certainly the senior PACS BG in either army.
I believe the order will be:
BG (ACSA) Beauregard
BG (PACS) Bonham
BG (PACS) Holmes
BG (PACS) Longstreet
BG (PACS) Ewell
BG (PACS) DR Jones
and combined:
BG (ACSA) JE Johnston
BG (ACSA) Beauregard
BG (PACS) Bonham
BG (PACS) Holmes
BG (PACS) EK Smith
BG (PACS) Longstreet
BG (PACS) Ewell*
BG (PACS) BE Bee*
BG (PACS) DR Jones*
BG (PACS) TJ Jackson
* based on US Army seniority