As was hinted, the second attack when two-weapon fighting takes a bonus action. That means a fighter with Extra Attack using Action Surge gets only 5 attacks (4 normal + 1 extra), not up to 8 (4 normal + 4 extra, depending on interpretation). Not sure how I feel about that yet.