Rows
A row module is a chest surrounded by planks. Each one adds nine slots to the crate carrying it, and the cell below the capacity module takes sixteen.
They add up
Rows are read across every cell and added to each other, the opposite of capacity modules where only the best offer counts. A cell added by another mod and filled with row modules therefore grows the crate further, rather than replacing what the first one gave.
A coal crate starts at 27 slots and reaches 171 with sixteen modules. A netherite crate starts at 117 and reaches 261. Which means a well equipped coal crate ends up bigger than a bare netherite one.
The smallest crate against the largest
The two lines never cross and climb at the same rate, nine slots a module. It is the starting gap that never closes, and it is also why an equipped coal crate passes a bare netherite one well before the sixteenth cell.
Placing a module, step by step
27 > 36 > 45 > 171 with all sixteen
Why the screen reopens
A menu's slot list is fixed once and for all when it is built, and nothing in the game can add to a screen already open. Placing or taking back a module therefore closes the screen and reopens it at the size wanted.
That happens at the start of the next tick, not inside the click. Without the delay, whatever the player is holding at the moment of the click would end up on the floor.
On a pair
Both halves grow by the same number of rows, one module giving one row on each side, since the two show a single screen. A netherite pair therefore goes from 234 to 522 slots.
Taking a module back follows the capacity rule: whatever was in the rows that disappear drops at the foot of the crate. A crate is only shrunk once the last screen open on it has been closed, because shrinking it under somebody else's screen would leave their menu holding slots the crate no longer has.