nit: `assert(!appUIUri.getScheme().startsWith("http"))` (similarly in L33)