add a defer/recover to scws WriteJson
fix title-bar drag area
resolve typescript errors created from merging PRs