diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 00000000000..ffed2561417 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,30 @@ +## Description + + +## Type of Change + +- [ ] Bug fix +- [ ] New feature +- [ ] Enhancement +- [ ] Documentation update +- [ ] Other (please describe) + +## Validation Checklist + +- [ ] I have run `npm run validate-pr` and all checks passed +- [ ] I have added/updated tests for my changes +- [ ] I have updated relevant documentation +- [ ] I have tested edge cases and error scenarios +- [ ] My code follows the project's coding standards and TypeScript strict mode guidelines + +## Testing Steps + +1. +2. +3. + +## Related Issues + + +## Additional Notes + \ No newline at end of file diff --git a/package.json b/package.json index 9a56d08cebf..22415cb343c 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,8 @@ "watch-extensions": "node --max-old-space-size=8192 ./node_modules/gulp/bin/gulp.js watch-extensions watch-extension-media", "watch-extensionsd": "deemon npm run watch-extensions", "kill-watch-extensionsd": "deemon --kill npm run watch-extensions", - "precommit": "node build/hygiene.js", + "precommit": "npm run validate-pr", + "validate-pr": "bash ./scripts/validate-pr.sh", "gulp": "node --max-old-space-size=8192 ./node_modules/gulp/bin/gulp.js", "electron": "node build/lib/electron", "7z": "7z", @@ -237,4 +238,4 @@ "optionalDependencies": { "windows-foreground-love": "0.5.0" } -} +} \ No newline at end of file diff --git a/scripts/validate-pr.sh b/scripts/validate-pr.sh new file mode 100644 index 00000000000..5635259398e --- /dev/null +++ b/scripts/validate-pr.sh @@ -0,0 +1,32 @@ +#!/bin/bash +set -e + +# Run TypeScript checks +echo "Running TypeScript checks..." +npm run monaco-compile-check +npm run tsec-compile-check +npm run vscode-dts-compile-check + +# Run linting +echo "Running linting checks..." +npm run eslint +npm run stylelint + +# Run tests +echo "Running tests..." +npm run test-node +npm run test-browser + +# Run smoke tests +echo "Running smoke tests..." +npm run smoketest + +# Run layer validation +echo "Running layer validation..." +npm run valid-layers-check + +# Run hygiene checks +echo "Running hygiene checks..." +npm run hygiene + +echo "All checks passed successfully!" \ No newline at end of file diff --git a/src/tsconfig.base.json b/src/tsconfig.base.json index e354b0ed463..47ea9eb615a 100644 --- a/src/tsconfig.base.json +++ b/src/tsconfig.base.json @@ -9,8 +9,11 @@ "noUnusedLocals": true, "allowUnreachableCode": false, "strict": true, - "exactOptionalPropertyTypes": false, - "useUnknownInCatchVariables": false, + "exactOptionalPropertyTypes": true, + "useUnknownInCatchVariables": true, + "noUncheckedIndexedAccess": true, + "noImplicitAny": true, + "noFallthroughCasesInSwitch": true, "forceConsistentCasingInFileNames": true, "target": "es2022", "useDefineForClassFields": false, @@ -22,4 +25,4 @@ ], "allowSyntheticDefaultImports": true } -} +} \ No newline at end of file diff --git a/src/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.ts b/src/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.ts index e716f2af8d8..c7f989f74ef 100644 --- a/src/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.ts +++ b/src/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.ts @@ -128,7 +128,12 @@ export class AuxiliaryWindow extends BaseWindow implements IAuxiliaryWindow { this._register(addDisposableListener(this.window, EventType.RESIZE, () => this.layout())); - this._register(addDisposableListener(this.container, EventType.SCROLL, () => this.container.scrollTop = 0)); // Prevent container from scrolling (#55456) + this._register(addDisposableListener(this.container, EventType.SCROLL, (e: Event) => { + // Only prevent scrolling if it's not from a user interaction or programmatic scroll + if (!e.isTrusted || !this.container.contains(document.activeElement)) { + this.container.scrollTop = 0; + } + })); // Prevent unwanted automatic scrolling while allowing user interaction (#55456) if (isWeb) { this._register(addDisposableListener(this.container, EventType.DROP, e => EventHelper.stop(e, true))); // Prevent default navigation on drop @@ -525,4 +530,4 @@ export class BrowserAuxiliaryWindowService extends Disposable implements IAuxili } } -registerSingleton(IAuxiliaryWindowService, BrowserAuxiliaryWindowService, InstantiationType.Delayed); +registerSingleton(IAuxiliaryWindowService, BrowserAuxiliaryWindowService, InstantiationType.Delayed); \ No newline at end of file