Analyze JavaScript console errors and stack traces (from browser DevTools), locate the offending code, and produce a ready-to-apply unified diff patch with a simple smoke/unit test, run command, and risk notes. Common triggers: paste of console message + stack trace, repository file listing or file contents, or request to "just fix this error."