devlog number three i think— refactored my webview and tsc found a wall of bugs i didn’t know existed
my whole chat UI was living inside one giant TypeScript template string, so any typo inside it was invisible to the compiler — it’s just a string, not real code, so i wouldn’t find out until the webview silently broke with a cryptic error buried in a totally different console. pulled the js/css out into real files (src/webview/main.js, styles.css), loaded via asWebviewUri, and the second main.js became an actual file, vs code’s checker instantly caught a broken ternary, a typo’d getElementByid, a missing comma, and an else if with no condition — bugs that had been silently killing the whole script this whole time. went further and turned on checkJs/allowJs project-wide, which forces real type safety on plain js (learned JSDoc casts like /** @type {HTMLTextAreaElement} / to handle it), though i did nuke my build for a minute by forgetting to scope tsconfig.json’s include to src/**/ first — ts tried to type-check my own compiled output. also shipped a live token counter today that tracks input/output against the context window so JARVIS doesn’t just silently blow past it.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.