Skip to content

feat: log filter#1643

Open
Souls-R wants to merge 26 commits intoJohnstonCode:masterfrom
Souls-R:master
Open

feat: log filter#1643
Souls-R wants to merge 26 commits intoJohnstonCode:masterfrom
Souls-R:master

Conversation

@Souls-R
Copy link

@Souls-R Souls-R commented Oct 7, 2024

add simple log filter just in side panel
image

Copilot AI review requested due to automatic review settings February 7, 2026 13:19
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces basic filtering for repository log entries in the side-panel “Repositories” view, while also modernizing the extension/tooling and rebranding the project as a community-maintained fork.

Changes:

  • Add author/message filtering commands and in-memory filter state to repolog tree view.
  • Upgrade TypeScript/Node/tooling (tsconfig target/module, ESLint flat config, test runner libs, npm + sass scripts).
  • Update packaging/release workflows and rename/rebrand the extension (IDs, publisher, engines, CI).

Reviewed changes

Copilot reviewed 53 out of 57 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
tsconfig.json Update TS target/module settings for newer Node/ES features.
src/watchers/repositoryFilesWatcher.ts Adjust watcher callback typing and guard null filename.
src/vscodeModules.ts Update iconv-lite module resolution and simplify catch.
src/util/globMatch.ts Update minimatch imports and match helper construction.
src/treeView/dataProviders/svnProvider.ts Formatting/structure adjustments to provider class.
src/test/testUtil.ts Update extension ID and adjust QuickPick typing in test overrides.
src/test/runTest.ts Switch to @vscode/test-electron runner.
src/test/repository.test.ts Guard teardown disposal to avoid crashes.
src/test/index.ts Update Mocha/glob imports and migrate glob usage to promise API.
src/test/extension.test.ts Update extension ID in tests.
src/test/commands.test.ts Add more defensive setup/skip logic for CI robustness.
src/temp_svn_fs.ts Use NodeJS.Timeout typing and minor cleanup.
src/svnRepository.ts Formatting, safer catches, encoding option update, and typing tweaks.
src/svnFileSystemProvider.ts Formatting cleanup for event exposure.
src/source_control_manager.ts Formatting cleanup and safer catch blocks.
src/repository.ts Timeout typing updates and safer error handling/casts.
src/quickPickItems/folderItem.ts Constructor formatting only.
src/messages.ts Minor formatting change in CSP meta construction.
src/input/revert.ts Simplify catch.
src/ignoreitems.ts Constructor formatting only.
src/historyView/repoLogProvider.ts Add filter commands/UI + apply filtering in log tree rendering.
src/historyView/itemLogProvider.ts Formatting + simplify catch.
src/historyView/common.ts Update dayjs imports (default import style).
src/historyView/branchChangesProvider.ts Formatting change to class declaration.
src/fs/write_file.ts Swap original-fs to fs.
src/fs/unlink.ts Swap original-fs to fs.
src/fs/stat.ts Swap original-fs to fs.
src/fs/rmdir.ts Swap original-fs to fs.
src/fs/readdir.ts Swap original-fs to fs.
src/fs/read_file.ts Swap original-fs to fs.
src/fs/mkdir.ts Swap original-fs to fs.
src/fs/lstat.ts Swap original-fs to fs.
src/fs/exists.ts Swap original-fs to fs.
src/fs/access.ts Swap original-fs to fs.
src/extension.ts Safer error casting and minor cleanup.
src/contexts/isSvn19orGreater.ts Remove eslint suppression comment.
src/contexts/isSvn18orGreater.ts Remove eslint suppression comment.
src/commands/upgrade.ts Formatting cleanup.
src/commands/switchBranch.ts Safer error shape checks before using stderr fields.
src/commands/resolveAll.ts Safer error casting before using stderr.
src/commands/merge.ts Safer error shape checks and stderr usage.
src/commands/deleteUnversioned.ts Simplify catch.
src/commands/commitWithMessage.ts Safer error casting for stderrFormated.
src/commands/commit.ts Safer error casting for stderrFormated.
src/commands/command.ts Simplify catch.
src/commands/checkout.ts Safer error casting for svn error codes.
package.json Rebrand extension + update engines/deps/scripts + add filter commands to contributes.
eslint.config.js Introduce ESLint flat config.
CONTRIBUTING.md Update contributor workflow for npm/Node 22/tooling changes.
CHANGELOG.md Add 3.0.4 entry for fork/CI-related fixes.
.releaserc.json Update semantic-release config and VSIX asset handling.
.github/workflows/releaseOpenVsx.yml Remove standalone OpenVSX release workflow.
.github/workflows/main.yml Major CI update: Node 22, npm, packaging artifacts, new release job.
.eslintrc.js Remove legacy ESLint config (replaced by flat config).
.eslintignore Remove legacy ignore file (replaced by flat config ignores).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +2 to 10
"name": "svn-scm-community",
"displayName": "SVN (Community Edition)",
"description": "Integrated Subversion source control - Community maintained fork",
"version": "3.0.4",
"publisher": "svn-community",
"engines": {
"vscode": "^1.53.0"
"node": ">=22.18.0",
"vscode": "^1.85.0"
},
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description/title indicates this is only adding a log filter, but this diff also includes a major package rename/publisher change, engine bumps, dependency/tooling upgrades, and CI/release pipeline rewrites. Please either update the PR description to reflect the full scope or split these unrelated changes into separate PRs to reduce review/rollback risk.

Copilot uses AI. Check for mistakes.
Comment on lines 3 to 7
export function matchAll(
path: string,
patterns: string[],
opts: minimatch.IOptions = {}
opts: object = {}
): boolean {
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

opts is typed as object, but it is passed to minimatch(...) and should match minimatch's options type (e.g., MinimatchOptions or Parameters<typeof minimatch>[2]). Using object here weakens type-safety and can also be incompatible with the minimatch function signature under strict TS.

Copilot uses AI. Check for mistakes.
Comment on lines +18 to +21
permissions:
contents: write
issues: write
pull-requests: write
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The build job requests write permissions (contents/issues/PRs) even for pull_request runs. This unnecessarily increases the blast radius if untrusted code runs in CI. Reduce permissions for build/test jobs to read-only, and keep write permissions only on the dedicated release/publish job(s).

Copilot uses AI. Check for mistakes.
Comment on lines 224 to 231
window.showQuickPick = (
items: any[] | Thenable<any[]>,
items: readonly string[] | Thenable<readonly string[]>,
...args: any[]
): Thenable<any | undefined> => {
let next = overridesShowQuickPick.shift();
if (typeof next === "undefined") {
return originalShowQuickPick.call(null, [items, ...args]);
return originalShowQuickPick.call(null, [items as any, ...args]);
}
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fallback path (no override queued) delegates to originalShowQuickPick using .call(null, [items, ...args]), which passes a single array as the first argument instead of spreading arguments. This changes the call signature and can break tests that rely on the real showQuickPick behavior. Use .apply(null, [items, ...args]) or call with spread args.

Copilot uses AI. Check for mistakes.
Comment on lines +137 to +147
public filterAuthorGui() {
const box = window.createInputBox();
box.prompt = "Set filter for commit authors, empty to reset";
box.value = this.filterAuthor;
box.onDidAccept(async () => {
this.filterAuthor = box.value;
box.dispose();
this._onDidChangeTreeData.fire(undefined);
});
box.show();
}
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The InputBox is only disposed on accept. If the user cancels (Esc) or the box is hidden, it will remain undisposed and keep event handlers alive. Add an onDidHide handler (or use window.showInputBox) to ensure the box is disposed in all cases.

Copilot uses AI. Check for mistakes.
Comment on lines +426 to 438
// filter
const logFiltered = logentries.filter(
({ author, msg }) =>
(this.filterAuthor === "" || author.includes(this.filterAuthor)) &&
(this.filterMsg === "" || msg.includes(this.filterMsg))
);

window.showInformationMessage(
`Filtered ${logFiltered.length} of ${logentries.length} entries`
);
const result = transform(logFiltered, LogTreeItemKind.Commit, element);
insertBaseMarker(cached, logentries, result);
if (!cached.isComplete) {
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

insertBaseMarker computes the insertion index from the unfiltered logentries array, but result is built from logFiltered. When filters are active, the splice index can be wrong (or beyond result.length), placing the BASE marker incorrectly. Pass the same (filtered) entries to insertBaseMarker or adjust insertBaseMarker to compute the index relative to the displayed list.

Copilot uses AI. Check for mistakes.
Comment on lines +433 to +435
window.showInformationMessage(
`Filtered ${logFiltered.length} of ${logentries.length} entries`
);
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Showing an information message inside getChildren will pop up a notification every time the tree is expanded/refreshed, which is very noisy and can block user workflow. Consider removing this message or only showing feedback when the filter is set/changed (e.g., in the filter commands) instead of during rendering.

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +7
import js from '@eslint/js';
import tseslint from '@typescript-eslint/eslint-plugin';
import tsparser from '@typescript-eslint/parser';
import prettier from 'eslint-plugin-prettier';
import prettierConfig from 'eslint-config-prettier';

export default [
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This flat ESLint config uses ESM import/export default in eslint.config.js, but the repo does not set "type": "module" in package.json. In that case Node will treat .js as CommonJS and ESLint will fail to load the config. Rename the file to eslint.config.mjs or convert it to CommonJS (require/module.exports).

Suggested change
import js from '@eslint/js';
import tseslint from '@typescript-eslint/eslint-plugin';
import tsparser from '@typescript-eslint/parser';
import prettier from 'eslint-plugin-prettier';
import prettierConfig from 'eslint-config-prettier';
export default [
const js = require('@eslint/js');
const tseslint = require('@typescript-eslint/eslint-plugin');
const tsparser = require('@typescript-eslint/parser');
const prettier = require('eslint-plugin-prettier');
const prettierConfig = require('eslint-config-prettier');
module.exports = [

Copilot uses AI. Check for mistakes.
- name: Get package version
id: package-version
run: |
echo "PACKAGE_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Get package version step has nested double-quotes in the shell command, which will break the echo line in bash. Use single quotes around the Node expression or escape the inner quotes so PACKAGE_VERSION is correctly written to $GITHUB_ENV.

Suggested change
echo "PACKAGE_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV
echo "PACKAGE_VERSION=$(node -p 'require(\"./package.json\").version')" >> $GITHUB_ENV

Copilot uses AI. Check for mistakes.
Comment on lines +240 to +244
- name: Publish to OpenVSX Registry
if: startsWith(github.ref, 'refs/tags/')
run: npx ovsx publish svn-scm-community-ovsx.vsix
env:
OVSX_PAT: ${{ secrets.OVSX_TOKEN }} No newline at end of file
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Publish to OpenVSX Registry is guarded by startsWith(github.ref, 'refs/tags/'), but this workflow only triggers on pushes to master, PRs, or workflow_dispatch (no tag trigger). As written, this step will never run. Either add a tag trigger (e.g. push: tags: ['v*']) or adjust the condition to match the actual release flow.

Copilot uses AI. Check for mistakes.
Souls-R and others added 10 commits February 7, 2026 21:31
Windows lacks svnadmin needed for some tests. Will fix properly later.
Implements svn lock command to get file locks.

Co-authored-by: Chris Bachhuber <chris.bachhuber@eu.socionext.com>
Adds svn.copyPermalink command to copy file URL at current revision to clipboard.

Co-authored-by: Chris Bachhuber <chris.bachhuber@eu.socionext.com>
SlikSVN includes svnadmin which is required for tests.
TortoiseSVN only provides svn client without admin tools.
* Support locking binary files

* Use .lib instead of .png

* Fix test

* Reset to main

* Fix compilation

* Try to make CI green

* Reset to main

* Remove comments

* Reduce test execution time

* Remove comments

* Re-add useful comment

---------

Co-authored-by: Chris Bachhuber <chris.bachhuber@eu.socionext.com>
* feat: ability to toggle headless mode for tests

* Reset to main

---------

Co-authored-by: Chris Bachhuber <chris.bachhuber@eu.socionext.com>
Co-authored-by: Chris Bachhuber <chris.bachhuber@eu.socionext.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants