Search ParentLink points at a library view, not at the librarygotchas / searchOften …/Forms/AllItems.aspx, so used as a path it empties a Path: filter and can send a save into Forms while a GetList probe still passes; normalize on read and on write
Turn a library URL someone pasted into web + library + foldersnippets / restSP.Web.GetWebUrlFromPageUrl, called on the CURRENT web, resolves the web of any URL in the tenant (other site collections too, 404 for a missing site); strip Forms/…aspx, prefer the ?id= folder, take the first segment…
webUrl + a server-relative URL doubles the site pathgotchas / rest-apiSurvives for months as a display value or grouping key and breaks the first time it becomes a filter; build object URLs from the origin in one helper