Habitability: what your landlord must fix
Habitability concerns can include conditions that make a home unsafe or unfit to live in, such as lack of essential services, water intrusion, pests, unsafe wiring, or sanitation failures. The required response depends on the problem and how urgent it is.
Report the issue in writing with dates and photos. Give access for repairs and keep a log of calls and visits. For urgent health or safety issues, contact the appropriate City inspection agency rather than waiting on an email thread.
Do not withhold rent or repair-and-deduct without legal advice. Those remedies are governed by state law and can carry risk if used incorrectly.
Source: SF repair-problem guidance.