While national immigration policy remains in limbo, San Francisco is about to take an historic step toward accommodating the estimated 4,000 undocumented minors who reside here, by drafting new legislation designed to help them navigate the court system.