Making an extension practical to maintain
The main obstacle was understanding the code before changing it. The extension relied on large JavaScript files, while its behavior was spread across assistant pages, background code, a popup, and a sidebar. A change to shared data could affect several of those places.
I made those connections explicit in the TypeScript rewrite. Messages, storage, memory records, API responses, and provider configuration received shared types. Content scripts still handled the differences between assistant websites, but developers could follow the data they exchanged with the rest of the extension.
That structure also gave the browser builds a common source. Chrome used a background service worker; Firefox needed a different background-script declaration and its own browser settings. I kept those differences in their manifests and build configuration rather than maintaining separate versions of the feature code.
