For the chocolate base: Preheat oven to 375 degrees. Line a 9-inch square baking pan with aluminum foil, leaving a slight overhang; butter bottom and sides of foil (not overhang).
Place butter in a large microwave-safe bowl; melt in the microwave. Add sugar and salt; whisk to combine. Whisk in egg, then cocoa and flour until smooth. Spread batter in prepared pan.
Bake just until sides begin to pull away from edges of the pan, 10 to 15 minutes (do not overbake). Let cool slightly while preparing coconut topping. Keep oven on for topping.
For coconut topping: In a medium bowl, whisk eggs with sugar and vanilla. Gently mix in flour and coconut (except 1/2 cup reserved for sprinkling).
Drop mounds of the mixture over the chocolate base; spread and pat in gently and evenly with moistened fingers. Sprinkle with reserved 1/2 cup coconut.
Bake until golden and a toothpick inserted in center comes out with moist crumbs attached, 25 to 30 minutes. Cool completely in pan. Lift cake from pan, peel off foil and cut into 24 bars. Store in an airtight container for 3 to 4 days.