The vacant lots and nearly empty buildings at the foot of the Williamsburg Bridge have long served as a reminder of the Lower East Side’s gritty past, before it was inundated with young club hoppers and wealthy finance workers. Now, after more than four decades of bitter arguing, community groups and city officials have struck a tentative agreement to transform those lots near Delancey and Essex streets into a huge new development. The project goes to the City Planning Commission on Wednesday for a crucial stamp of approval. The plan would erect 1.65 million square feet of market-rate and affordable housing, retail and office space on a part of the Lower East Side north of Seward Park where the past meets the present in visually jarring ways. While the large-scale redevelopment of neighborhoods is often a bruising process for local opponents, Lower East Side groups ultimately hammered out an agreement that includes 900 units of new housing, about half of which wouldn’t be market rate. That is a virtually unprecedented proportion of affordable housing for a development project of this scale. By way of comparison, a residential and commercial project in Willets Point would have 35% of its apartment units designated as affordable.