What you described is not a code violation. You need 3 feet of clear space in front of a 120/208 volt panel, regardless of what is on the other side of that clear space. The clear space needs to be at least as wide as the panel itself, or 30 inches, whichever is greater. The space needs to be clear from the floor to 6.5 feet above the floor. The code reference is NEC Article 110.26.
Does this answer your question?