From 734eac07f4fc2c91194e07bfd46c4ecc2a42972e Mon Sep 17 00:00:00 2001 From: nitrobass24 Date: Sun, 16 Aug 2026 15:20:29 -0500 Subject: [PATCH 01/39] Address PR 657 review: serialize failed-queue producers, test cleanup, monotonic timing - ExtractProcess: threading.Lock around the two same-process producer threads of the failed PipeStream (ExtractWorker listener + run_loop dispatch-error path). A threading.Lock costs no semaphore, unlike the mp.Lock the review suggested (#654). - test_app_process: release exception stream/terminate flag via close_queues() in test_pop_after_kill_mid_send_does_not_block. - test_pipe_primitives: monotonic clock in test_wait_returns_promptly_when_set (the review named the timeout test, but that one already used monotonic). Co-Authored-By: Claude Fable 5 --- .../controller/extract/extract_process.py | 23 ++++++++++++++++--- .../unittests/test_common/test_app_process.py | 1 + .../test_common/test_pipe_primitives.py | 4 ++-- 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/src/python/controller/extract/extract_process.py b/src/python/controller/extract/extract_process.py index 1715704f..7b74b09c 100644 --- a/src/python/controller/extract/extract_process.py +++ b/src/python/controller/extract/extract_process.py @@ -5,6 +5,7 @@ import logging import multiprocessing import queue +import threading import time from datetime import datetime @@ -45,10 +46,12 @@ def __init__( logger: logging.Logger, completed_queue: PipeStream, failed_queue: PipeStream, + failed_queue_lock: threading.Lock, ): self.logger = logger self.completed_queue = completed_queue self.failed_queue = failed_queue + self.failed_queue_lock = failed_queue_lock def extract_completed(self, name: str, is_dir: bool, pair_id: str | None = None): self.logger.info(f"Extraction completed for {name}") @@ -60,7 +63,8 @@ def extract_completed(self, name: str, is_dir: bool, pair_id: str | None = None) def extract_failed(self, name: str, is_dir: bool, pair_id: str | None = None): self.logger.error(f"Extraction failed for {name}") failed_result = ExtractFailedResult(timestamp=datetime.now(), name=name, is_dir=is_dir, pair_id=pair_id) - self.failed_queue.put(failed_result) + with self.failed_queue_lock: + self.failed_queue.put(failed_result) def __init__(self): super().__init__(name=self.__class__.__name__) @@ -69,15 +73,26 @@ def __init__(self): self.__completed_result_queue = PipeStream() self.__failed_result_queue = PipeStream() self.__dispatch: ExtractDispatch | None = None + # Serializes the two same-process producer threads of the failed + # queue (ExtractWorker via the listener, and run_loop's dispatch-error + # path) — concurrent send() on one Connection end can corrupt data. + # A threading.Lock suffices (both are child-process threads) and costs + # no semaphore, unlike an mp.Lock (#654). Created child-side in + # run_init because locks don't survive spawn pickling. + self.__failed_queue_lock: threading.Lock | None = None @overrides(AppProcess) def run_init(self): # Create dispatch inside the process self.__dispatch = ExtractDispatch() + self.__failed_queue_lock = threading.Lock() # Add extract listener listener = ExtractProcess.__ExtractListener( - logger=self.logger, completed_queue=self.__completed_result_queue, failed_queue=self.__failed_result_queue + logger=self.logger, + completed_queue=self.__completed_result_queue, + failed_queue=self.__failed_result_queue, + failed_queue_lock=self.__failed_queue_lock, ) self.__dispatch.add_listener(listener) @@ -92,6 +107,7 @@ def run_cleanup(self): @overrides(AppProcess) def run_loop(self): assert self.__dispatch is not None + assert self.__failed_queue_lock is not None # Forward all the extract commands try: while True: @@ -108,7 +124,8 @@ def run_loop(self): is_dir=req.model_file.is_dir, pair_id=req.pair_id, ) - self.__failed_result_queue.put(failed_result) + with self.__failed_queue_lock: + self.__failed_result_queue.put(failed_result) except queue.Empty: pass diff --git a/src/python/tests/unittests/test_common/test_app_process.py b/src/python/tests/unittests/test_common/test_app_process.py index 7b44813f..fdf577f4 100644 --- a/src/python/tests/unittests/test_common/test_app_process.py +++ b/src/python/tests/unittests/test_common/test_app_process.py @@ -201,6 +201,7 @@ def test_pop_after_kill_mid_send_does_not_block(self): self.process.join() self.process.stream.pop_all() # hangs without the fix self.process.stream.close() + self.process.close_queues() self.process = None diff --git a/src/python/tests/unittests/test_common/test_pipe_primitives.py b/src/python/tests/unittests/test_common/test_pipe_primitives.py index d215e5f6..8e49ea8f 100644 --- a/src/python/tests/unittests/test_common/test_pipe_primitives.py +++ b/src/python/tests/unittests/test_common/test_pipe_primitives.py @@ -112,9 +112,9 @@ def test_wait_returns_promptly_when_set(self): flag = PipeFlag() self.addCleanup(flag.close) flag.set() - start = time.time() + start = time.monotonic() self.assertTrue(flag.wait(5)) - self.assertLess(time.time() - start, 1) + self.assertLess(time.monotonic() - start, 1) # wait does not consume self.assertTrue(flag.is_set()) From 957b186277cdb366964bdbdb8f939fe147546ef5 Mon Sep 17 00:00:00 2001 From: nitrobass24 Date: Tue, 25 Aug 2026 11:06:53 -0500 Subject: [PATCH 02/39] ci: tag manual-dispatch images from tag refs too; docs: deploy note only on master pushes A workflow_dispatch on a refs/tags/* ref produced no image tag from type=ref,event=branch, and since the dispatch metadata step runs last it emptied the manifest command's -t list. Add type=ref,event=tag. --- .github/workflows/ci.yml | 1 + website/README.md | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d3fc3a71..de6bf9d9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -493,6 +493,7 @@ jobs: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | type=ref,event=branch + type=ref,event=tag - name: Create multi-arch manifest and push working-directory: /tmp/digests diff --git a/website/README.md b/website/README.md index 067cbd9d..6e64f40b 100644 --- a/website/README.md +++ b/website/README.md @@ -28,4 +28,5 @@ npm run build ## Deploy Deployment is automated: the `docs-pages.yml` GitHub Actions workflow builds -the site and publishes it to GitHub Pages whenever `website/` changes. +the site and publishes it to GitHub Pages when changes under `website/` are +pushed to `master`. From e9b780bd0a7754e6e0feb4e8db67b33f5f76fc4a Mon Sep 17 00:00:00 2001 From: nitrobass24 Date: Tue, 25 Aug 2026 11:33:53 -0500 Subject: [PATCH 03/39] test: move applyDisableRules specs to options-list.spec; scope about-page e2e selectors The applyDisableRules suites test a pure function in options-list.ts, so they belong in its spec (AGENTS.md: specs mirror sources). The about-page e2e now targets #version / #github a / #banner span with an anchored version regex and an exact href instead of text= and substring matches. --- .../app/pages/settings/options-list.spec.ts | 152 +++++++++++++++++- .../settings/settings-page.component.spec.ts | 104 ------------ .../settings-page.disable-rules.spec.ts | 49 ------ src/e2e-playwright/tests/about.spec.ts | 13 +- 4 files changed, 158 insertions(+), 160 deletions(-) delete mode 100644 src/angular/src/app/pages/settings/settings-page.component.spec.ts delete mode 100644 src/angular/src/app/pages/settings/settings-page.disable-rules.spec.ts diff --git a/src/angular/src/app/pages/settings/options-list.spec.ts b/src/angular/src/app/pages/settings/options-list.spec.ts index d6d3cee1..bf434c0f 100644 --- a/src/angular/src/app/pages/settings/options-list.spec.ts +++ b/src/angular/src/app/pages/settings/options-list.spec.ts @@ -1,5 +1,16 @@ import { describe, it, expect } from 'vitest'; -import { getConfigValue, OPTIONS_CONTEXT_FTPS, IOption } from './options-list'; +import { + FTPS_ONLY_NOTE, + IOption, + IOptionsContext, + OVERRIDE_NOTE, + OPTIONS_CONTEXT_AUTOQUEUE, + OPTIONS_CONTEXT_FTPS, + OPTIONS_CONTEXT_SERVER, + OPTIONS_CONTEXT_VALIDATE, + applyDisableRules, + getConfigValue, +} from './options-list'; import { OptionType } from './option.component'; import { Config, DEFAULT_CONFIG } from '../../models/config'; @@ -56,3 +67,142 @@ describe('OPTIONS_CONTEXT_FTPS options', () => { expect(verify.requiresRestart).toBe(true); }); }); + +// --- applyDisableRules --- + +const inactive = { pairsEnabled: false, validateDisabled: false, protocolSftp: false }; +const buildServerContext = (hasEnabledPairs: boolean): IOptionsContext => + applyDisableRules(OPTIONS_CONTEXT_SERVER, { ...inactive, pairsEnabled: hasEnabledPairs }); +const buildFtpsContext = (protocolIsSftp: boolean): IOptionsContext => + applyDisableRules(OPTIONS_CONTEXT_FTPS, { ...inactive, protocolSftp: protocolIsSftp }); +const buildAutoqueueContext = (hasEnabledPairs: boolean): IOptionsContext => + applyDisableRules(OPTIONS_CONTEXT_AUTOQUEUE, { ...inactive, pairsEnabled: hasEnabledPairs }); + +describe('applyDisableRules: buildServerContext', () => { + it('should disable remote_path and local_path when pairs are enabled', () => { + const ctx = buildServerContext(true); + const remotePath = ctx.options.find((o) => o.valuePath[1] === 'remote_path')!; + const localPath = ctx.options.find((o) => o.valuePath[1] === 'local_path')!; + + expect(remotePath.disabled).toBe(true); + expect(remotePath.description).toBe(OVERRIDE_NOTE); + expect(localPath.disabled).toBe(true); + expect(localPath.description).toBe(OVERRIDE_NOTE); + }); + + it('should not disable remote_path and local_path when no pairs are enabled', () => { + const ctx = buildServerContext(false); + const remotePath = ctx.options.find((o) => o.valuePath[1] === 'remote_path')!; + const localPath = ctx.options.find((o) => o.valuePath[1] === 'local_path')!; + + expect(remotePath.disabled).toBeFalsy(); + expect(localPath.disabled).toBeFalsy(); + }); + + it('should not disable other server options when pairs are enabled', () => { + const ctx = buildServerContext(true); + const others = ctx.options.filter( + (o) => o.valuePath[1] !== 'remote_path' && o.valuePath[1] !== 'local_path', + ); + + for (const option of others) { + expect(option.disabled).toBeFalsy(); + } + }); +}); + +describe('applyDisableRules: buildFtpsContext', () => { + const ftpOnlyPaths = ['remote_ftp_port', 'ftp_ssl_verify_certificate']; + + it('disables the FTP-only options when the protocol is sftp', () => { + const ctx = buildFtpsContext(true); + for (const path of ftpOnlyPaths) { + const option = ctx.options.find((o) => o.valuePath[1] === path)!; + expect(option.disabled).toBe(true); + expect(option.description).toBe(FTPS_ONLY_NOTE); + } + }); + + it('enables the FTP-only options when the protocol is ftps', () => { + const ctx = buildFtpsContext(false); + for (const path of ftpOnlyPaths) { + const option = ctx.options.find((o) => o.valuePath[1] === path)!; + expect(option.disabled).toBeFalsy(); + } + }); + + it('never disables the protocol selector itself', () => { + const protocol = buildFtpsContext(true).options.find((o) => o.valuePath[1] === 'protocol')!; + expect(protocol.disabled).toBeFalsy(); + }); +}); + +describe('applyDisableRules: buildAutoqueueContext', () => { + it('should disable enabled checkbox when pairs are enabled', () => { + const ctx = buildAutoqueueContext(true); + const enabled = ctx.options.find((o) => o.valuePath[1] === 'enabled')!; + + expect(enabled.disabled).toBe(true); + expect(enabled.description).toBe(OVERRIDE_NOTE); + }); + + it('should not disable enabled checkbox when no pairs are enabled', () => { + const ctx = buildAutoqueueContext(false); + const enabled = ctx.options.find((o) => o.valuePath[1] === 'enabled')!; + + expect(enabled.disabled).toBeFalsy(); + }); + + it('should not disable other autoqueue options when pairs are enabled', () => { + const ctx = buildAutoqueueContext(true); + const others = ctx.options.filter((o) => o.valuePath[1] !== 'enabled'); + + for (const option of others) { + expect(option.disabled).toBeFalsy(); + } + }); +}); + +const buildValidateContext = (enabled: boolean): IOptionsContext => + applyDisableRules(OPTIONS_CONTEXT_VALIDATE, { ...inactive, validateDisabled: !enabled }); + +describe('applyDisableRules: buildValidateContext', () => { + it('disables auto_validate and algorithm when validation is disabled', () => { + const ctx = buildValidateContext(false); + const autoValidate = ctx.options.find((o) => o.valuePath[1] === 'auto_validate')!; + const algorithm = ctx.options.find((o) => o.valuePath[1] === 'algorithm')!; + + expect(autoValidate.disabled).toBe(true); + expect(algorithm.disabled).toBe(true); + }); + + it('keeps the original description on disabled validate options (no override note)', () => { + const ctx = buildValidateContext(false); + const autoValidate = ctx.options.find((o) => o.valuePath[1] === 'auto_validate')!; + + // validateDisabled options carry no overrideNote, so the description is unchanged. + expect(autoValidate.description).toBe( + 'Automatically validate files when download completes. Requires post-download validation above.', + ); + }); + + it('does not disable auto_validate and algorithm when validation is enabled', () => { + const ctx = buildValidateContext(true); + const autoValidate = ctx.options.find((o) => o.valuePath[1] === 'auto_validate')!; + const algorithm = ctx.options.find((o) => o.valuePath[1] === 'algorithm')!; + + expect(autoValidate.disabled).toBeFalsy(); + expect(algorithm.disabled).toBeFalsy(); + }); + + it('never disables the other validate options', () => { + const ctx = buildValidateContext(false); + const others = ctx.options.filter( + (o) => o.valuePath[1] !== 'auto_validate' && o.valuePath[1] !== 'algorithm', + ); + + for (const option of others) { + expect(option.disabled).toBeFalsy(); + } + }); +}); diff --git a/src/angular/src/app/pages/settings/settings-page.component.spec.ts b/src/angular/src/app/pages/settings/settings-page.component.spec.ts deleted file mode 100644 index 94ed5774..00000000 --- a/src/angular/src/app/pages/settings/settings-page.component.spec.ts +++ /dev/null @@ -1,104 +0,0 @@ -import '@angular/compiler'; -import { describe, it, expect } from 'vitest'; -import { - FTPS_ONLY_NOTE, - IOptionsContext, - OVERRIDE_NOTE, - OPTIONS_CONTEXT_AUTOQUEUE, - OPTIONS_CONTEXT_FTPS, - OPTIONS_CONTEXT_SERVER, - applyDisableRules, -} from './options-list'; - -const inactive = { pairsEnabled: false, validateDisabled: false, protocolSftp: false }; -const buildServerContext = (hasEnabledPairs: boolean): IOptionsContext => - applyDisableRules(OPTIONS_CONTEXT_SERVER, { ...inactive, pairsEnabled: hasEnabledPairs }); -const buildFtpsContext = (protocolIsSftp: boolean): IOptionsContext => - applyDisableRules(OPTIONS_CONTEXT_FTPS, { ...inactive, protocolSftp: protocolIsSftp }); -const buildAutoqueueContext = (hasEnabledPairs: boolean): IOptionsContext => - applyDisableRules(OPTIONS_CONTEXT_AUTOQUEUE, { ...inactive, pairsEnabled: hasEnabledPairs }); - -describe('applyDisableRules: buildServerContext', () => { - it('should disable remote_path and local_path when pairs are enabled', () => { - const ctx = buildServerContext(true); - const remotePath = ctx.options.find((o) => o.valuePath[1] === 'remote_path')!; - const localPath = ctx.options.find((o) => o.valuePath[1] === 'local_path')!; - - expect(remotePath.disabled).toBe(true); - expect(remotePath.description).toBe(OVERRIDE_NOTE); - expect(localPath.disabled).toBe(true); - expect(localPath.description).toBe(OVERRIDE_NOTE); - }); - - it('should not disable remote_path and local_path when no pairs are enabled', () => { - const ctx = buildServerContext(false); - const remotePath = ctx.options.find((o) => o.valuePath[1] === 'remote_path')!; - const localPath = ctx.options.find((o) => o.valuePath[1] === 'local_path')!; - - expect(remotePath.disabled).toBeFalsy(); - expect(localPath.disabled).toBeFalsy(); - }); - - it('should not disable other server options when pairs are enabled', () => { - const ctx = buildServerContext(true); - const others = ctx.options.filter( - (o) => o.valuePath[1] !== 'remote_path' && o.valuePath[1] !== 'local_path', - ); - - for (const option of others) { - expect(option.disabled).toBeFalsy(); - } - }); -}); - -describe('applyDisableRules: buildFtpsContext', () => { - const ftpOnlyPaths = ['remote_ftp_port', 'ftp_ssl_verify_certificate']; - - it('disables the FTP-only options when the protocol is sftp', () => { - const ctx = buildFtpsContext(true); - for (const path of ftpOnlyPaths) { - const option = ctx.options.find((o) => o.valuePath[1] === path)!; - expect(option.disabled).toBe(true); - expect(option.description).toBe(FTPS_ONLY_NOTE); - } - }); - - it('enables the FTP-only options when the protocol is ftps', () => { - const ctx = buildFtpsContext(false); - for (const path of ftpOnlyPaths) { - const option = ctx.options.find((o) => o.valuePath[1] === path)!; - expect(option.disabled).toBeFalsy(); - } - }); - - it('never disables the protocol selector itself', () => { - const protocol = buildFtpsContext(true).options.find((o) => o.valuePath[1] === 'protocol')!; - expect(protocol.disabled).toBeFalsy(); - }); -}); - -describe('applyDisableRules: buildAutoqueueContext', () => { - it('should disable enabled checkbox when pairs are enabled', () => { - const ctx = buildAutoqueueContext(true); - const enabled = ctx.options.find((o) => o.valuePath[1] === 'enabled')!; - - expect(enabled.disabled).toBe(true); - expect(enabled.description).toBe(OVERRIDE_NOTE); - }); - - it('should not disable enabled checkbox when no pairs are enabled', () => { - const ctx = buildAutoqueueContext(false); - const enabled = ctx.options.find((o) => o.valuePath[1] === 'enabled')!; - - expect(enabled.disabled).toBeFalsy(); - }); - - it('should not disable other autoqueue options when pairs are enabled', () => { - const ctx = buildAutoqueueContext(true); - const others = ctx.options.filter((o) => o.valuePath[1] !== 'enabled'); - - for (const option of others) { - expect(option.disabled).toBeFalsy(); - } - }); -}); diff --git a/src/angular/src/app/pages/settings/settings-page.disable-rules.spec.ts b/src/angular/src/app/pages/settings/settings-page.disable-rules.spec.ts deleted file mode 100644 index 3d4a8960..00000000 --- a/src/angular/src/app/pages/settings/settings-page.disable-rules.spec.ts +++ /dev/null @@ -1,49 +0,0 @@ -import '@angular/compiler'; -import { describe, it, expect } from 'vitest'; -import { IOptionsContext, OPTIONS_CONTEXT_VALIDATE, applyDisableRules } from './options-list'; - -// Covers the validate ('validateDisabled') branch of the generic -// applyDisableRules transform, which settings-page.component.spec does not exercise. -const buildValidateContext = (enabled: boolean): IOptionsContext => - applyDisableRules(OPTIONS_CONTEXT_VALIDATE, { pairsEnabled: false, validateDisabled: !enabled, protocolSftp: false }); - -describe('applyDisableRules: buildValidateContext', () => { - it('disables auto_validate and algorithm when validation is disabled', () => { - const ctx = buildValidateContext(false); - const autoValidate = ctx.options.find((o) => o.valuePath[1] === 'auto_validate')!; - const algorithm = ctx.options.find((o) => o.valuePath[1] === 'algorithm')!; - - expect(autoValidate.disabled).toBe(true); - expect(algorithm.disabled).toBe(true); - }); - - it('keeps the original description on disabled validate options (no override note)', () => { - const ctx = buildValidateContext(false); - const autoValidate = ctx.options.find((o) => o.valuePath[1] === 'auto_validate')!; - - // validateDisabled options carry no overrideNote, so the description is unchanged. - expect(autoValidate.description).toBe( - 'Automatically validate files when download completes. Requires post-download validation above.', - ); - }); - - it('does not disable auto_validate and algorithm when validation is enabled', () => { - const ctx = buildValidateContext(true); - const autoValidate = ctx.options.find((o) => o.valuePath[1] === 'auto_validate')!; - const algorithm = ctx.options.find((o) => o.valuePath[1] === 'algorithm')!; - - expect(autoValidate.disabled).toBeFalsy(); - expect(algorithm.disabled).toBeFalsy(); - }); - - it('never disables the other validate options', () => { - const ctx = buildValidateContext(false); - const others = ctx.options.filter( - (o) => o.valuePath[1] !== 'auto_validate' && o.valuePath[1] !== 'algorithm', - ); - - for (const option of others) { - expect(option.disabled).toBeFalsy(); - } - }); -}); diff --git a/src/e2e-playwright/tests/about.spec.ts b/src/e2e-playwright/tests/about.spec.ts index 631034fb..e4a46379 100644 --- a/src/e2e-playwright/tests/about.spec.ts +++ b/src/e2e-playwright/tests/about.spec.ts @@ -8,18 +8,19 @@ test.describe("About Page", () => { }); test("version number is displayed and matches format vX.Y.Z", async ({ page }) => { - const versionText = page.locator("text=/v\\d+\\.\\d+\\.\\d+/"); - await expect(versionText).toBeVisible(); - expect(await versionText.textContent()).toMatch(/v\d+\.\d+\.\d+/); + const version = page.locator("#version"); + await expect(version).toBeVisible(); + expect((await version.textContent())?.trim()).toMatch(/^v\d+\.\d+\.\d+$/); }); test("GitHub link is present and points to correct URL", async ({ page }) => { - const githubLink = page.locator('a[href*="github.com/nitrobass24/seedsync"]'); + const githubLink = page.locator("#github a"); await expect(githubLink).toBeVisible(); - expect(await githubLink.getAttribute("href")).toContain("github.com/nitrobass24/seedsync"); + expect(await githubLink.getAttribute("href")).toBe("https://github.com/nitrobass24/seedsync"); }); test('page renders with app name "SeedSync"', async ({ page }) => { - await expect(page.locator("text=SeedSync").first()).toBeVisible(); + await expect(page.locator("#banner span")).toBeVisible(); + await expect(page.locator("#banner span")).toHaveText("SeedSync"); }); }); From 34a720a70f69d1c230ca708ade9c56eadf88d281 Mon Sep 17 00:00:00 2001 From: nitrobass24 Date: Sun, 16 Aug 2026 21:34:48 -0600 Subject: [PATCH 04/39] Merge pull request #657 from nitrobass24/release/v1.0.3 Release v1.0.3 - Fix musl semaphore cap crash (#654) From e5a451bc160c0f3f964df4cf5a9ccd78c7a1afee Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 23 Aug 2026 16:43:56 +0000 Subject: [PATCH 05/39] chore(deps-dev): bump vitest from 4.1.10 to 4.1.11 in /src/angular Bumps [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest) from 4.1.10 to 4.1.11. - [Release notes](https://github.com/vitest-dev/vitest/releases) - [Changelog](https://github.com/vitest-dev/vitest/blob/main/docs/releases.md) - [Commits](https://github.com/vitest-dev/vitest/commits/v4.1.11/packages/vitest) --- updated-dependencies: - dependency-name: vitest dependency-version: 4.1.11 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- src/angular/package-lock.json | 96 +++++++++++++++++------------------ src/angular/package.json | 2 +- 2 files changed, 49 insertions(+), 49 deletions(-) diff --git a/src/angular/package-lock.json b/src/angular/package-lock.json index 28142a65..fe17b2e8 100644 --- a/src/angular/package-lock.json +++ b/src/angular/package-lock.json @@ -31,7 +31,7 @@ "jsdom": "^30.0.1", "typescript": "~6.0.3", "typescript-eslint": "8.67.0", - "vitest": "^4.1.10" + "vitest": "^4.1.11" } }, "node_modules/@ampproject/remapping": { @@ -4581,16 +4581,16 @@ } }, "node_modules/@vitest/expect": { - "version": "4.1.10", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.10.tgz", - "integrity": "sha512-YsCn+qAk1GWjQOWFEsEcL2gNQ0zmVmQu3T03qP6UyjhtmdtwtbuI+DASn/7iQB3HGTXkdBwGddzxPlmiql5vlA==", + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.11.tgz", + "integrity": "sha512-VX2x5vNJXET47KAFzwERI+KRMtTTCSWTfSMKsW7JsUsXV4psq++e3DvZpuTDOpHcxytiDs6p2nhVb2tVDiiUYw==", "dev": true, "license": "MIT", "dependencies": { "@standard-schema/spec": "^1.1.0", "@types/chai": "^5.2.2", - "@vitest/spy": "4.1.10", - "@vitest/utils": "4.1.10", + "@vitest/spy": "4.1.11", + "@vitest/utils": "4.1.11", "chai": "^6.2.2", "tinyrainbow": "^3.1.0" }, @@ -4599,13 +4599,13 @@ } }, "node_modules/@vitest/mocker": { - "version": "4.1.10", - "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.1.10.tgz", - "integrity": "sha512-v0xaezt+DKEmKfaxg133ldzADrwLGd7Ze1MfQQTYfvs8OqZIwbxyxaYURivwV7sWy5fqn3rH5uOrSp07bp44Ow==", + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.1.11.tgz", + "integrity": "sha512-2XJVD55d1o5AZous5CCGKS74g/riOj9odEt2bQpCVZeblHyHdnMeFl4jl0XjU21stf4mbjUkew2eXQZt65g5CQ==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/spy": "4.1.10", + "@vitest/spy": "4.1.11", "estree-walker": "^3.0.3", "magic-string": "^0.30.21" }, @@ -4626,9 +4626,9 @@ } }, "node_modules/@vitest/pretty-format": { - "version": "4.1.10", - "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.1.10.tgz", - "integrity": "sha512-W1HsjSH4MXQ9YfmmhLAoIYf1HRfekQCGngeIgcei6MP5QQGWUe0gkopdZQaVCFO+JDJMrAJGwa5pRpNpvy4P8Q==", + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.1.11.tgz", + "integrity": "sha512-yiZzPbGTS9Sr/JpFl8zHrcIkAofNbFV6k21vIgQN/cY/oxZeXhJv5sc/MBJ5jFKWmWs+oJHw0UXLZjmf931+Vw==", "dev": true, "license": "MIT", "dependencies": { @@ -4639,13 +4639,13 @@ } }, "node_modules/@vitest/runner": { - "version": "4.1.10", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.1.10.tgz", - "integrity": "sha512-IKI6kpIH+LmpROplyLwBBaCfMgOZOMsygVa6BARD6ahA04VRuJSa6OaVG7kRvSEMD870Vd91rSSw0eegtWyLGg==", + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.1.11.tgz", + "integrity": "sha512-LztvUgdwMNJMIkj3hQnnxiC2Xy1zNxq928W/xhjCLaNCzqTZOudjwbQf6v9IntZGPw132i2Lq2rgTRZHD3JHNw==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/utils": "4.1.10", + "@vitest/utils": "4.1.11", "pathe": "^2.0.3" }, "funding": { @@ -4653,14 +4653,14 @@ } }, "node_modules/@vitest/snapshot": { - "version": "4.1.10", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.1.10.tgz", - "integrity": "sha512-xRkfOT1qpTAi/Ti4Y1LtfRc3kEuqxGw59eN2jN9pRWMtS/XDevekhcFSqvQqjUNGksfjMJu3Y+oJ+4Ypn2OaJw==", + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.1.11.tgz", + "integrity": "sha512-pN7ikn1ON7h8ee4gIAp4AzyK+zBtJPzVbqOgu5LCEh4VaJVbPQcgYQYJIMGQPXVeJJq1fnfazis7a5pFNPahog==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "4.1.10", - "@vitest/utils": "4.1.10", + "@vitest/pretty-format": "4.1.11", + "@vitest/utils": "4.1.11", "magic-string": "^0.30.21", "pathe": "^2.0.3" }, @@ -4669,9 +4669,9 @@ } }, "node_modules/@vitest/spy": { - "version": "4.1.10", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.1.10.tgz", - "integrity": "sha512-PLf/Ugvoq5wO/b4rwYCR1h2PSIdXz7wnkQFMiUpLdtM7l6pqVFcQIBEHyT1+l+cj7mNwAfZHzqXqDyjvOuwbDw==", + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.1.11.tgz", + "integrity": "sha512-apNa/prQy2qCeywhnixOHPRCgGNhvg7T4Dapfl1GahLp/R+uhBm5cPyFoNVyqsNd2h1nJxL6BqqdIjiABL60YA==", "dev": true, "license": "MIT", "funding": { @@ -4679,13 +4679,13 @@ } }, "node_modules/@vitest/utils": { - "version": "4.1.10", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.10.tgz", - "integrity": "sha512-fy9am/HWxbaGt/Sawrp90vt6Y6jQwf1RX77cz3uwoJwJVMli/e1IEwRPnMNJ7vKfPTwo0diXifkpPvwH9v7nGA==", + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.11.tgz", + "integrity": "sha512-zTCVGpyFsGWBhllOyKlTw/vnr6D9qxsfSDyfbyZmTyjHw5N/VuvzHpHoQjm2ZJzn4RJgx5w4r7V0er69CmLgPQ==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "4.1.10", + "@vitest/pretty-format": "4.1.11", "convert-source-map": "^2.0.0", "tinyrainbow": "^3.1.0" }, @@ -8629,9 +8629,9 @@ } }, "node_modules/tinyrainbow": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-3.1.0.tgz", - "integrity": "sha512-Bf+ILmBgretUrdJxzXM0SgXLZ3XfiaUuOj/IKQHuTXip+05Xn+uyEYdVg0kYDipTBcLrCVyUzAPz7QmArb0mmw==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-3.1.1.tgz", + "integrity": "sha512-yau8yJdTt989Mm0Bd/236QnzEiPf2xLLTqUZRUJOo/3CB078LSwzei343DgtJVmfJKJE3TMINY1u42SQsP6mXw==", "dev": true, "license": "MIT", "engines": { @@ -9281,19 +9281,19 @@ } }, "node_modules/vitest": { - "version": "4.1.10", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.1.10.tgz", - "integrity": "sha512-R9jUTe5S4Qb0HCd4TNqpC7oGcrMssMRGXLW80ubjWsW9VH5GF8y1Y0SFLY9AbqSk6nt0PnOx4H4WNJYZ13GUPw==", + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.1.11.tgz", + "integrity": "sha512-fhACrNXUidIbGSBr5FlbuBkO7VWC1ZyLl0DO4CU2DrQoAPxX84Ysxs+HeGQpii5lZWV1Q4gBZTTu49mF+A6Edw==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/expect": "4.1.10", - "@vitest/mocker": "4.1.10", - "@vitest/pretty-format": "4.1.10", - "@vitest/runner": "4.1.10", - "@vitest/snapshot": "4.1.10", - "@vitest/spy": "4.1.10", - "@vitest/utils": "4.1.10", + "@vitest/expect": "4.1.11", + "@vitest/mocker": "4.1.11", + "@vitest/pretty-format": "4.1.11", + "@vitest/runner": "4.1.11", + "@vitest/snapshot": "4.1.11", + "@vitest/spy": "4.1.11", + "@vitest/utils": "4.1.11", "es-module-lexer": "^2.0.0", "expect-type": "^1.3.0", "magic-string": "^0.30.21", @@ -9321,12 +9321,12 @@ "@edge-runtime/vm": "*", "@opentelemetry/api": "^1.9.0", "@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0", - "@vitest/browser-playwright": "4.1.10", - "@vitest/browser-preview": "4.1.10", - "@vitest/browser-webdriverio": "4.1.10", - "@vitest/coverage-istanbul": "4.1.10", - "@vitest/coverage-v8": "4.1.10", - "@vitest/ui": "4.1.10", + "@vitest/browser-playwright": "4.1.11", + "@vitest/browser-preview": "4.1.11", + "@vitest/browser-webdriverio": "4.1.11", + "@vitest/coverage-istanbul": "4.1.11", + "@vitest/coverage-v8": "4.1.11", + "@vitest/ui": "4.1.11", "happy-dom": "*", "jsdom": "*", "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" diff --git a/src/angular/package.json b/src/angular/package.json index 2364447a..63bfbb27 100644 --- a/src/angular/package.json +++ b/src/angular/package.json @@ -47,6 +47,6 @@ "jsdom": "^30.0.1", "typescript": "~6.0.3", "typescript-eslint": "8.67.0", - "vitest": "^4.1.10" + "vitest": "^4.1.11" } } From b519d1d95c39ee957af21f9c73c795c1cf4f328a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 23 Aug 2026 16:42:55 +0000 Subject: [PATCH 06/39] chore(deps): bump astral-sh/setup-uv from 10.0.0 to 10.0.1 Bumps [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) from 10.0.0 to 10.0.1. - [Release notes](https://github.com/astral-sh/setup-uv/releases) - [Commits](https://github.com/astral-sh/setup-uv/compare/ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d...20cfd1bf945f4377ade1205e4dbc17946fc9a30d) --- updated-dependencies: - dependency-name: astral-sh/setup-uv dependency-version: 10.0.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cb4fbbe4..75cd0685 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -81,7 +81,7 @@ jobs: python-version: "3.13" - name: Set up uv - uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0 + uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1 - name: Install Ruff run: uv pip install --system ruff @@ -108,7 +108,7 @@ jobs: python-version: "3.13" - name: Set up uv - uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0 + uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1 - name: Install dependencies working-directory: src/python @@ -132,7 +132,7 @@ jobs: python-version: "3.13" - name: Set up uv - uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0 + uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1 - name: Install dependencies working-directory: src/python @@ -168,7 +168,7 @@ jobs: python-version: "3.13" - name: Set up uv - uses: astral-sh/setup-uv@ae62891fec2bb8e7d6c99fc78c9fec3a63790f8d # v10.0.0 + uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1 - name: Install dependencies working-directory: src/python From 6ae655933149064449a8b8a8806b6d45aff3ed8b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 23 Aug 2026 16:42:44 +0000 Subject: [PATCH 07/39] chore(deps): bump docker/setup-buildx-action from 4.2.0 to 4.3.0 Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 4.2.0 to 4.3.0. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/bb05f3f5519dd87d3ba754cc423b652a5edd6d2c...37fe631027851001ddb9b187196cc803df7f5f0e) --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-version: 4.3.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 75cd0685..a69af4e7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -228,7 +228,7 @@ jobs: uses: actions/checkout@v7 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0 + uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0 - name: Build Docker image uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0 @@ -296,7 +296,7 @@ jobs: path: /tmp/angular-output - name: Set up Docker Buildx - uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0 + uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0 - name: Log in to GitHub Container Registry uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0 @@ -383,7 +383,7 @@ jobs: uses: docker/setup-qemu-action@96fe6ef7f33517b61c61be40b68a1882f3264fb8 # v4.2.0 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0 + uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0 - name: Log in to GitHub Container Registry uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0 @@ -455,7 +455,7 @@ jobs: path: /tmp/digests - name: Set up Docker Buildx - uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0 + uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0 - name: Log in to GitHub Container Registry uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0 From 35af096e802159de1e4770b8414ed5917f5c4265 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 23 Aug 2026 16:43:42 +0000 Subject: [PATCH 08/39] chore(deps): bump the angular group in /src/angular with 10 updates Bumps the angular group in /src/angular with 10 updates: | Package | From | To | | --- | --- | --- | | [@angular/cdk](https://github.com/angular/components) | `22.1.2` | `22.1.3` | | [@angular/common](https://github.com/angular/angular/tree/HEAD/packages/common) | `22.1.1` | `22.1.3` | | [@angular/compiler](https://github.com/angular/angular/tree/HEAD/packages/compiler) | `22.1.1` | `22.1.3` | | [@angular/core](https://github.com/angular/angular/tree/HEAD/packages/core) | `22.1.1` | `22.1.3` | | [@angular/forms](https://github.com/angular/angular/tree/HEAD/packages/forms) | `22.1.1` | `22.1.3` | | [@angular/platform-browser](https://github.com/angular/angular/tree/HEAD/packages/platform-browser) | `22.1.1` | `22.1.3` | | [@angular/router](https://github.com/angular/angular/tree/HEAD/packages/router) | `22.1.1` | `22.1.3` | | [@angular/build](https://github.com/angular/angular-cli) | `22.1.4` | `22.1.5` | | [@angular/cli](https://github.com/angular/angular-cli) | `22.1.4` | `22.1.5` | | [@angular/compiler-cli](https://github.com/angular/angular/tree/HEAD/packages/compiler-cli) | `22.1.1` | `22.1.3` | Updates `@angular/cdk` from 22.1.2 to 22.1.3 - [Release notes](https://github.com/angular/components/releases) - [Changelog](https://github.com/angular/components/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/components/compare/v22.1.2...v22.1.3) Updates `@angular/common` from 22.1.1 to 22.1.3 - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/v22.1.3/CHANGELOG.md) - [Commits](https://github.com/angular/angular/commits/v22.1.3/packages/common) Updates `@angular/compiler` from 22.1.1 to 22.1.3 - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/v22.1.3/CHANGELOG.md) - [Commits](https://github.com/angular/angular/commits/v22.1.3/packages/compiler) Updates `@angular/core` from 22.1.1 to 22.1.3 - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/v22.1.3/CHANGELOG.md) - [Commits](https://github.com/angular/angular/commits/v22.1.3/packages/core) Updates `@angular/forms` from 22.1.1 to 22.1.3 - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/v22.1.3/CHANGELOG.md) - [Commits](https://github.com/angular/angular/commits/v22.1.3/packages/forms) Updates `@angular/platform-browser` from 22.1.1 to 22.1.3 - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/v22.1.3/CHANGELOG.md) - [Commits](https://github.com/angular/angular/commits/v22.1.3/packages/platform-browser) Updates `@angular/router` from 22.1.1 to 22.1.3 - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/v22.1.3/CHANGELOG.md) - [Commits](https://github.com/angular/angular/commits/v22.1.3/packages/router) Updates `@angular/build` from 22.1.4 to 22.1.5 - [Release notes](https://github.com/angular/angular-cli/releases) - [Changelog](https://github.com/angular/angular-cli/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular-cli/compare/v22.1.4...v22.1.5) Updates `@angular/cli` from 22.1.4 to 22.1.5 - [Release notes](https://github.com/angular/angular-cli/releases) - [Changelog](https://github.com/angular/angular-cli/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular-cli/compare/v22.1.4...v22.1.5) Updates `@angular/compiler-cli` from 22.1.1 to 22.1.3 - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/v22.1.3/CHANGELOG.md) - [Commits](https://github.com/angular/angular/commits/v22.1.3/packages/compiler-cli) --- updated-dependencies: - dependency-name: "@angular/cdk" dependency-version: 22.1.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: angular - dependency-name: "@angular/common" dependency-version: 22.1.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: angular - dependency-name: "@angular/compiler" dependency-version: 22.1.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: angular - dependency-name: "@angular/core" dependency-version: 22.1.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: angular - dependency-name: "@angular/forms" dependency-version: 22.1.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: angular - dependency-name: "@angular/platform-browser" dependency-version: 22.1.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: angular - dependency-name: "@angular/router" dependency-version: 22.1.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: angular - dependency-name: "@angular/build" dependency-version: 22.1.5 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: angular - dependency-name: "@angular/cli" dependency-version: 22.1.5 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: angular - dependency-name: "@angular/compiler-cli" dependency-version: 22.1.3 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: angular ... Signed-off-by: dependabot[bot] --- src/angular/package-lock.json | 648 +++++++++++++++++++++------------- src/angular/package.json | 20 +- 2 files changed, 404 insertions(+), 264 deletions(-) diff --git a/src/angular/package-lock.json b/src/angular/package-lock.json index fe17b2e8..0e6bb507 100644 --- a/src/angular/package-lock.json +++ b/src/angular/package-lock.json @@ -8,13 +8,13 @@ "name": "seedsync", "version": "1.0.3", "dependencies": { - "@angular/cdk": "^22.1.2", - "@angular/common": "^22.1.1", - "@angular/compiler": "^22.1.1", - "@angular/core": "^22.1.1", - "@angular/forms": "^22.1.1", - "@angular/platform-browser": "^22.1.1", - "@angular/router": "^22.1.1", + "@angular/cdk": "^22.1.3", + "@angular/common": "^22.1.3", + "@angular/compiler": "^22.1.3", + "@angular/core": "^22.1.3", + "@angular/forms": "^22.1.3", + "@angular/platform-browser": "^22.1.3", + "@angular/router": "^22.1.3", "@fortawesome/fontawesome-free": "^7.3.1", "bootstrap": "^5.3.8", "compare-versions": "^6.1.1", @@ -22,9 +22,9 @@ "tslib": "^2.3.0" }, "devDependencies": { - "@angular/build": "^22.1.4", - "@angular/cli": "^22.1.4", - "@angular/compiler-cli": "^22.1.1", + "@angular/build": "^22.1.5", + "@angular/cli": "^22.1.5", + "@angular/compiler-cli": "^22.1.3", "@eslint/js": "^10.0.1", "angular-eslint": "22.1.0", "eslint": "^10.8.1", @@ -49,13 +49,13 @@ } }, "node_modules/@angular-devkit/architect": { - "version": "0.2201.4", - "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.2201.4.tgz", - "integrity": "sha512-a2J9hdBYFobhMx9G0KwCdo6+LrWIOOyIeijrA/QSZiPOjg8dAprhMh7BEQkF3eT6R1q7wDGP+IElVR9LsBlXQw==", + "version": "0.2201.5", + "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.2201.5.tgz", + "integrity": "sha512-DAticcJ2tw3M+D1CH4HhlCgMK5tAb0CwSsnczNMJB9QgQsBC/JhOozQTvgnyCvagitX9u+408YcwEW/Wo2pnzA==", "dev": true, "license": "MIT", "dependencies": { - "@angular-devkit/core": "22.1.4", + "@angular-devkit/core": "22.1.5", "rxjs": "7.8.2" }, "bin": { @@ -68,9 +68,9 @@ } }, "node_modules/@angular-devkit/core": { - "version": "22.1.4", - "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-22.1.4.tgz", - "integrity": "sha512-40jG/6chng9fQuWtpg1kadPO17sRTurNh0aav6Uxebn65PfNpTpvhPIYVIcRgv4tCKdMd++YH95A8SiaIOwqig==", + "version": "22.1.5", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-22.1.5.tgz", + "integrity": "sha512-HiY6d5dkIdJs5grP9OHvgkf14QOcDIo+hbuT7YKuLItQ++ZxCwUabJMLCCJ5R0KrstE5NqED0dNcyk5WD01t5Q==", "dev": true, "license": "MIT", "dependencies": { @@ -96,13 +96,13 @@ } }, "node_modules/@angular-devkit/schematics": { - "version": "22.1.4", - "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-22.1.4.tgz", - "integrity": "sha512-UBJ7jc7B0vRfmrVwlvpmuudo1D7AfpO6ugf1BxvkM4sw5m8cJpZtaIJFKBorv0QZo78CyDOroQfQdXaijjB2ZA==", + "version": "22.1.5", + "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-22.1.5.tgz", + "integrity": "sha512-HTmo9y8wjXKtJGVTYomTjZsjWzhirpu1pPRAzsVob3eiYOuxv1qDRAgWiHXNGp5CpnbHunZweXY/WffNGOFRyA==", "dev": true, "license": "MIT", "dependencies": { - "@angular-devkit/core": "22.1.4", + "@angular-devkit/core": "22.1.5", "jsonc-parser": "3.3.1", "magic-string": "1.0.0", "ora": "9.4.1", @@ -234,14 +234,14 @@ } }, "node_modules/@angular/build": { - "version": "22.1.4", - "resolved": "https://registry.npmjs.org/@angular/build/-/build-22.1.4.tgz", - "integrity": "sha512-y5wxiyUu1DjYNG5jiFjjgFp7O5bkyYjWzy2kfyTGq+DjKMEveTzNH3tBkZrE33EJ4wYyfx+rQ01IG9nZbhfdvA==", + "version": "22.1.5", + "resolved": "https://registry.npmjs.org/@angular/build/-/build-22.1.5.tgz", + "integrity": "sha512-YqsbHZK3/HFmLLhwxa5SpN+3ABoVo5GFLV0fiEXCQg2KC7gw2pL15x692jxrq8gEGzT7O27bnjWkvFZ0bBHCnw==", "dev": true, "license": "MIT", "dependencies": { "@ampproject/remapping": "2.3.0", - "@angular-devkit/architect": "0.2201.4", + "@angular-devkit/architect": "0.2201.5", "@babel/core": "8.0.1", "@babel/helper-annotate-as-pure": "8.0.0", "@babel/helper-split-export-declaration": "7.24.7", @@ -252,7 +252,7 @@ "esbuild": "0.28.2", "https-proxy-agent": "9.1.0", "jsonc-parser": "3.3.1", - "listr2": "10.2.2", + "listr2": "11.0.0", "magic-string": "1.0.0", "mrmime": "2.0.1", "oxc-parser": "0.142.0", @@ -283,7 +283,7 @@ "@angular/platform-browser": "^22.0.0", "@angular/platform-server": "^22.0.0", "@angular/service-worker": "^22.0.0", - "@angular/ssr": "^22.1.4", + "@angular/ssr": "^22.1.5", "istanbul-lib-instrument": "^6.0.0", "karma": "^6.4.0", "less": "^4.2.0", @@ -340,23 +340,6 @@ } } }, - "node_modules/@angular/build/node_modules/listr2": { - "version": "10.2.2", - "resolved": "https://registry.npmjs.org/listr2/-/listr2-10.2.2.tgz", - "integrity": "sha512-JtNtbZj8q5BnDMR7trpwvwk3RIrANtIVzEUm8w7amp6xelLgyuq+4WZoTH913XaQAoH/cNdYhaNzBPA2U3xbDw==", - "dev": true, - "license": "MIT", - "dependencies": { - "cli-truncate": "^5.2.0", - "eventemitter3": "^5.0.4", - "log-update": "^6.1.0", - "rfdc": "^1.4.1", - "wrap-ansi": "^10.0.0" - }, - "engines": { - "node": ">=22.13.0" - } - }, "node_modules/@angular/build/node_modules/magic-string": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-1.0.0.tgz", @@ -368,9 +351,9 @@ } }, "node_modules/@angular/cdk": { - "version": "22.1.2", - "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-22.1.2.tgz", - "integrity": "sha512-YwTzVnTgZIQDLq3lnnPLINIB24e0SiDn7XxBxHSrOzD/+Y0zLAid5XIiMALXWOqa7rfdhfVh1kEeM93RRLnllQ==", + "version": "22.1.3", + "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-22.1.3.tgz", + "integrity": "sha512-6N3S71J877j9zGpCqU0PDIP4AGQf+SjJrA1Pouy+xfC8GE8sfCyIVr0Y6qnpxr5D2k2lROykAMbQekZtKEiEeA==", "license": "MIT", "dependencies": { "parse5": "^8.0.0", @@ -384,21 +367,21 @@ } }, "node_modules/@angular/cli": { - "version": "22.1.4", - "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-22.1.4.tgz", - "integrity": "sha512-Yt6q7a1vXh0ICFHnRdUOmx/gEXZ87zpkvE1eUWREUqeQ3ARkwqNZVzF3IP+s9NpDDrnc+EB9cqel9SnGZ/0z2Q==", + "version": "22.1.5", + "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-22.1.5.tgz", + "integrity": "sha512-YZkhI64INQHJkZ13h2n0/0PBrQ5ZZvFGiprrDiCOLAD0y1fehguL0PGp9HxF3ZWf+xWRyP//tIte2gmyAaiWLw==", "dev": true, "license": "MIT", "dependencies": { - "@angular-devkit/architect": "0.2201.4", - "@angular-devkit/core": "22.1.4", - "@angular-devkit/schematics": "22.1.4", + "@angular-devkit/architect": "0.2201.5", + "@angular-devkit/core": "22.1.5", + "@angular-devkit/schematics": "22.1.5", "@inquirer/prompts": "8.5.2", - "@listr2/prompt-adapter-inquirer": "4.2.4", + "@listr2/prompt-adapter-inquirer": "4.2.5", "@modelcontextprotocol/sdk": "1.30.0", - "@schematics/angular": "22.1.4", + "@schematics/angular": "22.1.5", "jsonc-parser": "3.3.1", - "listr2": "10.2.2", + "listr2": "11.0.0", "npm-package-arg": "14.0.0", "parse5-html-rewriting-stream": "8.0.1", "semver": "7.8.5", @@ -414,27 +397,10 @@ "yarn": ">= 1.13.0" } }, - "node_modules/@angular/cli/node_modules/listr2": { - "version": "10.2.2", - "resolved": "https://registry.npmjs.org/listr2/-/listr2-10.2.2.tgz", - "integrity": "sha512-JtNtbZj8q5BnDMR7trpwvwk3RIrANtIVzEUm8w7amp6xelLgyuq+4WZoTH913XaQAoH/cNdYhaNzBPA2U3xbDw==", - "dev": true, - "license": "MIT", - "dependencies": { - "cli-truncate": "^5.2.0", - "eventemitter3": "^5.0.4", - "log-update": "^6.1.0", - "rfdc": "^1.4.1", - "wrap-ansi": "^10.0.0" - }, - "engines": { - "node": ">=22.13.0" - } - }, "node_modules/@angular/common": { - "version": "22.1.1", - "resolved": "https://registry.npmjs.org/@angular/common/-/common-22.1.1.tgz", - "integrity": "sha512-5iiyPWqO3acpOPMcJWYtVbXF5z9wy43MFQQdd7wZPHfYOIC7c3KRnziWrRpELae+SkEB4srAYr6XIu9rQ743nw==", + "version": "22.1.3", + "resolved": "https://registry.npmjs.org/@angular/common/-/common-22.1.3.tgz", + "integrity": "sha512-QtMkjhiRd0EnmKR50bw3WbCWYTi6CmA72nnSz1BLQPpaLSi2goloCrPPniHz8fP+w2ESrmmlOWxs1Da3COgnQg==", "license": "MIT", "dependencies": { "tslib": "^2.3.0" @@ -443,14 +409,14 @@ "node": "^22.22.3 || ^24.15.0 || >=26.0.0" }, "peerDependencies": { - "@angular/core": "22.1.1", + "@angular/core": "22.1.3", "rxjs": "^6.5.3 || ^7.4.0" } }, "node_modules/@angular/compiler": { - "version": "22.1.1", - "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-22.1.1.tgz", - "integrity": "sha512-UfQZALwewk+WyE5fqrXT3CK0sxWXre4XojAvUdFQSZsVHTZEM1QD4FncuePa44I6BQMhfqQUvYNlqFnev4WOQg==", + "version": "22.1.3", + "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-22.1.3.tgz", + "integrity": "sha512-L8Mw2r7bGG/obqgQC+RU3mdFJ3NtLgO5gWhEC1ylcHpLCMPIAXYsMKJIL8dnS78S1wXo/omXwmJ4FiIlCwWahg==", "license": "MIT", "dependencies": { "tslib": "^2.3.0" @@ -460,9 +426,9 @@ } }, "node_modules/@angular/compiler-cli": { - "version": "22.1.1", - "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-22.1.1.tgz", - "integrity": "sha512-GLcwWqUg4i2eru3nKy989Me7483+ZPofnwgw9aMc96MWl8y8CD9CTrSff+fwh2/crUsQIqGg/uehIZRjISMD0A==", + "version": "22.1.3", + "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-22.1.3.tgz", + "integrity": "sha512-37lLaDp0RHWZ/lmJqCmIEr0HOM2D5ulHy61gqTBm7KRj3Y6ZaxR8B/JqZmeIpPzKFILVsga+NQ4A8apBUkmezw==", "dev": true, "license": "MIT", "dependencies": { @@ -483,7 +449,7 @@ "node": "^22.22.3 || ^24.15.0 || >=26.0.0" }, "peerDependencies": { - "@angular/compiler": "22.1.1", + "@angular/compiler": "22.1.3", "typescript": ">=6.0 <6.1" }, "peerDependenciesMeta": { @@ -493,9 +459,9 @@ } }, "node_modules/@angular/core": { - "version": "22.1.1", - "resolved": "https://registry.npmjs.org/@angular/core/-/core-22.1.1.tgz", - "integrity": "sha512-QFZNFzyFw9l1B1D7NCEU3YiLLBnMSejyp9mzJrzZ9vzc70BsewikcLFwuj+qqleqFmi5VW3f9GFNgwUq8dWGAg==", + "version": "22.1.3", + "resolved": "https://registry.npmjs.org/@angular/core/-/core-22.1.3.tgz", + "integrity": "sha512-313+Xkf970AmStJE0E/zNJW/9xvDExQG+6TNltBBl+KJsW0q5dffK2w2PQfV4mtTquBqYoeHSRsms4WgjBKL8g==", "license": "MIT", "dependencies": { "tslib": "^2.3.0" @@ -504,7 +470,7 @@ "node": "^22.22.3 || ^24.15.0 || >=26.0.0" }, "peerDependencies": { - "@angular/compiler": "22.1.1", + "@angular/compiler": "22.1.3", "rxjs": "^6.5.3 || ^7.4.0", "zone.js": "~0.15.0 || ~0.16.0" }, @@ -518,9 +484,9 @@ } }, "node_modules/@angular/forms": { - "version": "22.1.1", - "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-22.1.1.tgz", - "integrity": "sha512-6c5IJaCw6hAsBYl+LeQARwV4eGxfHwHTlTWfCB5dOYjMSgCCjaivkNTCUepYXFo5Fkdvw1qDiWIpAfgusAxmww==", + "version": "22.1.3", + "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-22.1.3.tgz", + "integrity": "sha512-b4ual9pgfNqcnEHord50w960DDFIytG3Qb3bu2aCgzmagvRlg9wrtwQNqY+oqY2FVq7c9McNUN7MZRcWl9HNdQ==", "license": "MIT", "dependencies": { "@standard-schema/spec": "^1.0.0", @@ -531,16 +497,16 @@ "node": "^22.22.3 || ^24.15.0 || >=26.0.0" }, "peerDependencies": { - "@angular/common": "22.1.1", - "@angular/core": "22.1.1", - "@angular/platform-browser": "22.1.1", + "@angular/common": "22.1.3", + "@angular/core": "22.1.3", + "@angular/platform-browser": "22.1.3", "rxjs": "^6.5.3 || ^7.4.0" } }, "node_modules/@angular/platform-browser": { - "version": "22.1.1", - "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-22.1.1.tgz", - "integrity": "sha512-u1HMINw++YTUzMbJB9zVhqch1iEiEl5vA88HjZYzoDagBcnIev30GRWI+QEy4Dy9GRg64hrCOl9Fke78dLQgYQ==", + "version": "22.1.3", + "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-22.1.3.tgz", + "integrity": "sha512-A8McE6AclwZa2ese4jMfZZu+qZfBFQ4Hl6CaMpzJ1C6Vv6+sXkLu9pouTosJEsUE+etVdepDsqau90lhzgw3Eg==", "license": "MIT", "dependencies": { "tslib": "^2.3.0" @@ -549,9 +515,9 @@ "node": "^22.22.3 || ^24.15.0 || >=26.0.0" }, "peerDependencies": { - "@angular/animations": "22.1.1", - "@angular/common": "22.1.1", - "@angular/core": "22.1.1" + "@angular/animations": "22.1.3", + "@angular/common": "22.1.3", + "@angular/core": "22.1.3" }, "peerDependenciesMeta": { "@angular/animations": { @@ -560,9 +526,9 @@ } }, "node_modules/@angular/router": { - "version": "22.1.1", - "resolved": "https://registry.npmjs.org/@angular/router/-/router-22.1.1.tgz", - "integrity": "sha512-sD+dN+UOAhdrqnOp3OWuR+O50msXFt+16OGL6RrM9af40iATkUbEAgU62N4KITKl4ACDisg8yhyb9J3dwCEyzQ==", + "version": "22.1.3", + "resolved": "https://registry.npmjs.org/@angular/router/-/router-22.1.3.tgz", + "integrity": "sha512-23owvZKCpdL7Yh3EzBj4OLf3x0z+jT9b57Qk96wdwI8Lsyf9L78/RJPYCutJ5r+zq3pFM/BHVKyd+2hkfH7N6Q==", "license": "MIT", "dependencies": { "tslib": "^2.3.0" @@ -571,9 +537,9 @@ "node": "^22.22.3 || ^24.15.0 || >=26.0.0" }, "peerDependencies": { - "@angular/common": "22.1.1", - "@angular/core": "22.1.1", - "@angular/platform-browser": "22.1.1", + "@angular/common": "22.1.3", + "@angular/core": "22.1.3", + "@angular/platform-browser": "22.1.3", "rxjs": "^6.5.3 || ^7.4.0" } }, @@ -1969,15 +1935,15 @@ } }, "node_modules/@inquirer/checkbox": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-5.2.1.tgz", - "integrity": "sha512-b6xmA/VlTe0ZgDQHDui+Nav470u7u49nRd8/iuhOcQPO9Ch7lGuogydhi2VOmNlZ+zXcM8IcPuNSwQcdJaF/kw==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-5.2.2.tgz", + "integrity": "sha512-Y5/bAScMy5Y+9isCx0SKbyJebMCaXXX5em0kxkj115eZNscgV9srOHrgyfS0e5xAVymIfOh9piYBKDILktsMMg==", "dev": true, "license": "MIT", "dependencies": { "@inquirer/ansi": "^2.0.7", - "@inquirer/core": "^11.2.1", - "@inquirer/figures": "^2.0.7", + "@inquirer/core": "^12.0.0", + "@inquirer/figures": "^2.0.8", "@inquirer/type": "^4.0.7" }, "engines": { @@ -1992,6 +1958,33 @@ } } }, + "node_modules/@inquirer/checkbox/node_modules/@inquirer/core": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-12.0.0.tgz", + "integrity": "sha512-+nnvFEXIB08CZNVXpvW3B+zHW96QXvGUjNKJ8NJIPqAZi5Kd4WhYt2S3C234ReepG1qw2HOlEUbjYVHBowXObA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/ansi": "^2.0.7", + "@inquirer/figures": "^2.0.8", + "@inquirer/type": "^4.0.7", + "cli-width": "^4.1.0", + "fast-wrap-ansi": "^0.2.0", + "mute-stream": "^3.0.0", + "signal-exit": "^4.1.0" + }, + "engines": { + "node": ">=23.5.0 || ^22.13.0 || ^20.17.0" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, "node_modules/@inquirer/confirm": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-6.1.1.tgz", @@ -2042,14 +2035,14 @@ } }, "node_modules/@inquirer/editor": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-5.2.2.tgz", - "integrity": "sha512-ZRVd/oD+sYsUd5zVm0NflqEzlqfYCyHNsqkHl2oWXEUHs12tCbcSFi+wVFEvD8+LGRaMUsVrE7qeo6lSG/S1Vg==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-5.3.0.tgz", + "integrity": "sha512-nnsP/IdJ8s83q7ZuObmgn12QM+uLCkab9E0Oordojbn62WUg1c+v9Ou/F/057pgh0ppX0W+Hj5bO/Dp5hsxQtA==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^11.2.1", - "@inquirer/external-editor": "^3.0.3", + "@inquirer/core": "^12.0.0", + "@inquirer/external-editor": "^3.0.4", "@inquirer/type": "^4.0.7" }, "engines": { @@ -2064,14 +2057,41 @@ } } }, + "node_modules/@inquirer/editor/node_modules/@inquirer/core": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-12.0.0.tgz", + "integrity": "sha512-+nnvFEXIB08CZNVXpvW3B+zHW96QXvGUjNKJ8NJIPqAZi5Kd4WhYt2S3C234ReepG1qw2HOlEUbjYVHBowXObA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/ansi": "^2.0.7", + "@inquirer/figures": "^2.0.8", + "@inquirer/type": "^4.0.7", + "cli-width": "^4.1.0", + "fast-wrap-ansi": "^0.2.0", + "mute-stream": "^3.0.0", + "signal-exit": "^4.1.0" + }, + "engines": { + "node": ">=23.5.0 || ^22.13.0 || ^20.17.0" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, "node_modules/@inquirer/expand": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-5.1.1.tgz", - "integrity": "sha512-YmQpenjbFSHAK3sOd44puHh3V1KXXr+JiNpUztoSQ4drLh2rTVzTap/YtlAVu/5xavifIlBfNEzJ/neZJ1a/1g==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-5.1.2.tgz", + "integrity": "sha512-OWIH1IyyWqEKIyqC9Xy+Bnga7NkGMovFdo4atYZMUOTRqf6rO2WCv9E/1MyzvOErDBCxs+9UFliRUDc50xs/jw==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^11.2.1", + "@inquirer/core": "^12.0.0", "@inquirer/type": "^4.0.7" }, "engines": { @@ -2086,10 +2106,37 @@ } } }, + "node_modules/@inquirer/expand/node_modules/@inquirer/core": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-12.0.0.tgz", + "integrity": "sha512-+nnvFEXIB08CZNVXpvW3B+zHW96QXvGUjNKJ8NJIPqAZi5Kd4WhYt2S3C234ReepG1qw2HOlEUbjYVHBowXObA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/ansi": "^2.0.7", + "@inquirer/figures": "^2.0.8", + "@inquirer/type": "^4.0.7", + "cli-width": "^4.1.0", + "fast-wrap-ansi": "^0.2.0", + "mute-stream": "^3.0.0", + "signal-exit": "^4.1.0" + }, + "engines": { + "node": ">=23.5.0 || ^22.13.0 || ^20.17.0" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, "node_modules/@inquirer/external-editor": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-3.0.3.tgz", - "integrity": "sha512-6thf5I8q7lZwzGLAxPaaGEREEkZ3nyePPDQ1oyobblxmEE8mqTLguScP7pDjUTAibiyb4hfXl+qjUEJ+di/aNA==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-3.0.4.tgz", + "integrity": "sha512-tZbbaK2ovq6vlrRBNQvjrypmrED/p5x2ncIHQ79cD55tei3dD96v5glMMA+6tiq7K104i/25DVYKWVPJuV6ptA==", "dev": true, "license": "MIT", "dependencies": { @@ -2109,9 +2156,9 @@ } }, "node_modules/@inquirer/figures": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-2.0.7.tgz", - "integrity": "sha512-aJ8TBPOGB6f/2qziPfElISTCEd5XOYTFckA2SGjhNmiKzfK/u4ot3v0DUzGVdUnKjN10EqnnEPck36BkyfLnJw==", + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-2.0.8.tgz", + "integrity": "sha512-tApbon79GM9ry56ja/Ud3SY2CL4TQsao9fIwDQbgTeNY55025GdMzQ2+UdegV/lx51VNGUB59M0v0nMpybYY4Q==", "dev": true, "license": "MIT", "engines": { @@ -2119,13 +2166,13 @@ } }, "node_modules/@inquirer/input": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-5.1.2.tgz", - "integrity": "sha512-9K/DDBSQpOyZSkt6sOVP9Vo0TR7atX2kuILsUu0x3wVcVbe97lJwIJKMLdMw25tDYuXl/qp6erT0Xs1rfmcfZg==", + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-5.1.3.tgz", + "integrity": "sha512-F/BZHtyEzP+HO+IGVd4AjBRgvX/ywm42bx8S0+dENk2YclzE9tJ3X/15THwtT6ehApmKvdYDMsVTuyyDod0gOQ==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^11.2.1", + "@inquirer/core": "^12.0.0", "@inquirer/type": "^4.0.7" }, "engines": { @@ -2140,14 +2187,41 @@ } } }, + "node_modules/@inquirer/input/node_modules/@inquirer/core": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-12.0.0.tgz", + "integrity": "sha512-+nnvFEXIB08CZNVXpvW3B+zHW96QXvGUjNKJ8NJIPqAZi5Kd4WhYt2S3C234ReepG1qw2HOlEUbjYVHBowXObA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/ansi": "^2.0.7", + "@inquirer/figures": "^2.0.8", + "@inquirer/type": "^4.0.7", + "cli-width": "^4.1.0", + "fast-wrap-ansi": "^0.2.0", + "mute-stream": "^3.0.0", + "signal-exit": "^4.1.0" + }, + "engines": { + "node": ">=23.5.0 || ^22.13.0 || ^20.17.0" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, "node_modules/@inquirer/number": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-4.1.1.tgz", - "integrity": "sha512-XF4IXAbPnGPgw0wsbC/i2tPcyfdZgDpUlhsqU0SfT4IRIGWha6Xm9VRgN5yYxJq+jnyXlfXI/nQ3ulfk0iEICA==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-4.2.0.tgz", + "integrity": "sha512-ew+fSDijsQ/WhD4TV3XLb+if400cDuzTzHfGR8sTNBXkK9CYDWoGE8fhaO8GbT312pNv1AJEOsDxy/z/HVettA==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^11.2.1", + "@inquirer/core": "^12.0.0", "@inquirer/type": "^4.0.7" }, "engines": { @@ -2162,15 +2236,42 @@ } } }, + "node_modules/@inquirer/number/node_modules/@inquirer/core": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-12.0.0.tgz", + "integrity": "sha512-+nnvFEXIB08CZNVXpvW3B+zHW96QXvGUjNKJ8NJIPqAZi5Kd4WhYt2S3C234ReepG1qw2HOlEUbjYVHBowXObA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/ansi": "^2.0.7", + "@inquirer/figures": "^2.0.8", + "@inquirer/type": "^4.0.7", + "cli-width": "^4.1.0", + "fast-wrap-ansi": "^0.2.0", + "mute-stream": "^3.0.0", + "signal-exit": "^4.1.0" + }, + "engines": { + "node": ">=23.5.0 || ^22.13.0 || ^20.17.0" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, "node_modules/@inquirer/password": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-5.1.1.tgz", - "integrity": "sha512-3XBfF7DAsp5qeDsvN5Rd1HmbNokVvEQoUM0QLrRcybC9nX96w3Pbmu7qUsb3IT3J3jBvs2+mTXaKHOUsgHMLzg==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-5.1.2.tgz", + "integrity": "sha512-nSdufycW8xynEVssFkNQEYIzTySilog0UlfOVRwh3pXzPSk4frXUT2jZWjHnKae6RU9PaoF9wfy1pGwewQuqGw==", "dev": true, "license": "MIT", "dependencies": { "@inquirer/ansi": "^2.0.7", - "@inquirer/core": "^11.2.1", + "@inquirer/core": "^12.0.0", "@inquirer/type": "^4.0.7" }, "engines": { @@ -2185,6 +2286,33 @@ } } }, + "node_modules/@inquirer/password/node_modules/@inquirer/core": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-12.0.0.tgz", + "integrity": "sha512-+nnvFEXIB08CZNVXpvW3B+zHW96QXvGUjNKJ8NJIPqAZi5Kd4WhYt2S3C234ReepG1qw2HOlEUbjYVHBowXObA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/ansi": "^2.0.7", + "@inquirer/figures": "^2.0.8", + "@inquirer/type": "^4.0.7", + "cli-width": "^4.1.0", + "fast-wrap-ansi": "^0.2.0", + "mute-stream": "^3.0.0", + "signal-exit": "^4.1.0" + }, + "engines": { + "node": ">=23.5.0 || ^22.13.0 || ^20.17.0" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, "node_modules/@inquirer/prompts": { "version": "8.5.2", "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-8.5.2.tgz", @@ -2216,13 +2344,13 @@ } }, "node_modules/@inquirer/rawlist": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-5.3.1.tgz", - "integrity": "sha512-QqdTqQddL3qPX/PPrjobpsO25NZ4dWXgTLenrR445L2ptLEYE6Z+PD5c5CNDJNx4ugRgELAIpSIJxZaO2jJ2Og==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-5.3.2.tgz", + "integrity": "sha512-oPSKrYK1X1bMkjXDzIKHUkJp195LFSfgbnVtXnjSKGFjrCbS6I+wyvfAZTwKE9BSt3HwWgfD7JfsXALBgCogzQ==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^11.2.1", + "@inquirer/core": "^12.0.0", "@inquirer/type": "^4.0.7" }, "engines": { @@ -2237,15 +2365,42 @@ } } }, + "node_modules/@inquirer/rawlist/node_modules/@inquirer/core": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-12.0.0.tgz", + "integrity": "sha512-+nnvFEXIB08CZNVXpvW3B+zHW96QXvGUjNKJ8NJIPqAZi5Kd4WhYt2S3C234ReepG1qw2HOlEUbjYVHBowXObA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/ansi": "^2.0.7", + "@inquirer/figures": "^2.0.8", + "@inquirer/type": "^4.0.7", + "cli-width": "^4.1.0", + "fast-wrap-ansi": "^0.2.0", + "mute-stream": "^3.0.0", + "signal-exit": "^4.1.0" + }, + "engines": { + "node": ">=23.5.0 || ^22.13.0 || ^20.17.0" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, "node_modules/@inquirer/search": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@inquirer/search/-/search-4.2.1.tgz", - "integrity": "sha512-xJj8QWKRSrfKoBIITLZK61dD3zwo0Rz11fgDImku30/Oe81zMdIdGgrLY2h6RkJ+KZ/GhNYIRMKnH/62qBTA5g==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@inquirer/search/-/search-4.3.0.tgz", + "integrity": "sha512-HFxXE5w727ctSUcAwrDquftJGjMgu36OeV5SHEXMlr2j/ahzmRX9xSEeVolV8tzYnTf45cg6vGkdMMRdm3RPhQ==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/core": "^11.2.1", - "@inquirer/figures": "^2.0.7", + "@inquirer/core": "^12.0.0", + "@inquirer/figures": "^2.0.8", "@inquirer/type": "^4.0.7" }, "engines": { @@ -2260,16 +2415,43 @@ } } }, + "node_modules/@inquirer/search/node_modules/@inquirer/core": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-12.0.0.tgz", + "integrity": "sha512-+nnvFEXIB08CZNVXpvW3B+zHW96QXvGUjNKJ8NJIPqAZi5Kd4WhYt2S3C234ReepG1qw2HOlEUbjYVHBowXObA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/ansi": "^2.0.7", + "@inquirer/figures": "^2.0.8", + "@inquirer/type": "^4.0.7", + "cli-width": "^4.1.0", + "fast-wrap-ansi": "^0.2.0", + "mute-stream": "^3.0.0", + "signal-exit": "^4.1.0" + }, + "engines": { + "node": ">=23.5.0 || ^22.13.0 || ^20.17.0" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, "node_modules/@inquirer/select": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-5.2.1.tgz", - "integrity": "sha512-FlDndEUww8m7BfukO2nJa25vhD+H5jxxCv4oGioKqzyWz3nPHhhw4LKdYRSlXuAx7DsdWia7iyaBPKKS95Evfw==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-5.2.2.tgz", + "integrity": "sha512-RkI8dRHWt+bh04oLixvF1kFzKC7e5rqJoHKkzcqSHATebBXFC6GmrT8ddbVkgSzLV0HnHs2cPFuBINr8otij8Q==", "dev": true, "license": "MIT", "dependencies": { "@inquirer/ansi": "^2.0.7", - "@inquirer/core": "^11.2.1", - "@inquirer/figures": "^2.0.7", + "@inquirer/core": "^12.0.0", + "@inquirer/figures": "^2.0.8", "@inquirer/type": "^4.0.7" }, "engines": { @@ -2284,6 +2466,33 @@ } } }, + "node_modules/@inquirer/select/node_modules/@inquirer/core": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-12.0.0.tgz", + "integrity": "sha512-+nnvFEXIB08CZNVXpvW3B+zHW96QXvGUjNKJ8NJIPqAZi5Kd4WhYt2S3C234ReepG1qw2HOlEUbjYVHBowXObA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/ansi": "^2.0.7", + "@inquirer/figures": "^2.0.8", + "@inquirer/type": "^4.0.7", + "cli-width": "^4.1.0", + "fast-wrap-ansi": "^0.2.0", + "mute-stream": "^3.0.0", + "signal-exit": "^4.1.0" + }, + "engines": { + "node": ">=23.5.0 || ^22.13.0 || ^20.17.0" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, "node_modules/@inquirer/type": { "version": "4.0.7", "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-4.0.7.tgz", @@ -2342,20 +2551,20 @@ } }, "node_modules/@listr2/prompt-adapter-inquirer": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/@listr2/prompt-adapter-inquirer/-/prompt-adapter-inquirer-4.2.4.tgz", - "integrity": "sha512-/KRI2DMD7JGSYaREF0Ygl7AefJ/2ase4Gc5cBiKqT5l4tFjsSJfhFGcc5nSkgl0Sp9LkCQNzl/cqbVJYP2L3dw==", + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/@listr2/prompt-adapter-inquirer/-/prompt-adapter-inquirer-4.2.5.tgz", + "integrity": "sha512-pYGy9dTdTwXdasPgyohkr0HoQ4FrkAzFnsUZl/gcnadDArbpZ8e+fgr+F9WBdNEl2y00mb9bCM4WgmoBkZJ27A==", "dev": true, "license": "MIT", "dependencies": { - "@inquirer/type": "^4.0.6" + "@inquirer/type": "^4.0.7" }, "engines": { "node": ">=22.13.0" }, "peerDependencies": { "@inquirer/prompts": ">= 3 < 9", - "listr2": "10.2.1" + "listr2": "11.0.0" } }, "node_modules/@lmdb/lmdb-darwin-arm64": { @@ -4247,14 +4456,14 @@ "peer": true }, "node_modules/@schematics/angular": { - "version": "22.1.4", - "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-22.1.4.tgz", - "integrity": "sha512-uiYKuiCnkTEbs4eOU1QJlM5NPw6BR1qgpct8VlrhS4n861WCCjTy5cxiAWJ3Doc0R72d44j3uoBfAEp7KEVn2w==", + "version": "22.1.5", + "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-22.1.5.tgz", + "integrity": "sha512-3UXlO4YoGgQ6nEBbCTGRRHTfQuDcKgHbRaiivzSinHzOYigsskwvloMsa0LCBCO/3uJpDIjJIyTW0XKhDti0iA==", "dev": true, "license": "MIT", "dependencies": { - "@angular-devkit/core": "22.1.4", - "@angular-devkit/schematics": "22.1.4", + "@angular-devkit/core": "22.1.5", + "@angular-devkit/schematics": "22.1.5", "jsonc-parser": "3.3.1", "typescript": "6.0.3" }, @@ -5189,17 +5398,17 @@ } }, "node_modules/cli-truncate": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-5.2.0.tgz", - "integrity": "sha512-xRwvIOMGrfOAnM1JYtqQImuaNtDEv9v6oIYAs4LIHwTiKee8uwvIi363igssOC0O5U04i4AlENs79LQLu9tEMw==", + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-6.1.1.tgz", + "integrity": "sha512-06p9vyLahLa4zkGcgsGxU6iEkSOiuI4fhCH6Emhe2lPAcoUv73n72DnODsnHA+5wwXGnV0n9M9/qOQJSjYhFhw==", "dev": true, "license": "MIT", "dependencies": { - "slice-ansi": "^8.0.0", + "slice-ansi": "^9.0.0", "string-width": "^8.2.0" }, "engines": { - "node": ">=20" + "node": ">=22" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -5954,13 +6163,6 @@ "node": ">= 0.6" } }, - "node_modules/eventemitter3": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.4.tgz", - "integrity": "sha512-mlsTRyGaPBjPedk6Bvw+aqbsXDtoAyAzm5MO7JgU+yVRyMQ5O8bD4Kcci7BS85f93veegeCPkL8R4GLClnjLFw==", - "dev": true, - "license": "MIT" - }, "node_modules/eventsource": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-3.0.7.tgz", @@ -7083,17 +7285,14 @@ } }, "node_modules/listr2": { - "version": "10.2.1", - "resolved": "https://registry.npmjs.org/listr2/-/listr2-10.2.1.tgz", - "integrity": "sha512-7I5knELsJKTUjXG+A6BkKAiGkW1i25fNa/xlUl9hFtk15WbE9jndA89xu5FzQKrY5llajE1hfZZFMILXkDHk/Q==", + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-11.0.0.tgz", + "integrity": "sha512-8K88S0aSrcSXdJfiZtEy5BQMnR+TyjrCGLcgAvQs6ta0NEnIm0RJ72/Pv67Jvg07cfBhDbuN74V81lSSVYEFEw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { - "cli-truncate": "^5.2.0", - "eventemitter3": "^5.0.4", - "log-update": "^6.1.0", - "rfdc": "^1.4.1", + "cli-truncate": "^6.1.1", + "log-update": "^8.0.0", "wrap-ansi": "^10.0.0" }, "engines": { @@ -7163,78 +7362,26 @@ } }, "node_modules/log-update": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/log-update/-/log-update-6.1.0.tgz", - "integrity": "sha512-9ie8ItPR6tjY5uYJh8K/Zrv/RMZ5VOlOWvtZdEHYSTFKZfIBPQa9tOAEeAWhd+AnIneLJ22w5fjOYtoutpWq5w==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-8.0.0.tgz", + "integrity": "sha512-lddSgOt3bPASrylL54ZSpy8nBHns+vBVSoILlVOx+dei300pnLRN958rj/EdlVLKuWlSESU3qdnDZdAI7FXYGg==", "dev": true, "license": "MIT", "dependencies": { - "ansi-escapes": "^7.0.0", + "ansi-escapes": "^7.3.0", "cli-cursor": "^5.0.0", - "slice-ansi": "^7.1.0", - "strip-ansi": "^7.1.0", - "wrap-ansi": "^9.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/log-update/node_modules/slice-ansi": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-7.1.2.tgz", - "integrity": "sha512-iOBWFgUX7caIZiuutICxVgX1SdxwAVFFKwt1EvMYYec/NWO5meOJ6K5uQxhrYBdQJne4KxiqZc+KptFOWFSI9w==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.2.1", - "is-fullwidth-code-point": "^5.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/chalk/slice-ansi?sponsor=1" - } - }, - "node_modules/log-update/node_modules/string-width": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", - "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^10.3.0", - "get-east-asian-width": "^1.0.0", - "strip-ansi": "^7.1.0" + "slice-ansi": "^9.0.0", + "string-width": "^8.2.0", + "strip-ansi": "^7.2.0", + "wrap-ansi": "^10.0.0" }, "engines": { - "node": ">=18" + "node": ">=22" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/log-update/node_modules/wrap-ansi": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz", - "integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.2.1", - "string-width": "^7.0.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, "node_modules/lru-cache": { "version": "11.5.2", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.2.tgz", @@ -8086,13 +8233,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/rfdc": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz", - "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==", - "dev": true, - "license": "MIT" - }, "node_modules/rolldown": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.0.tgz", @@ -8447,9 +8587,9 @@ } }, "node_modules/slice-ansi": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-8.0.0.tgz", - "integrity": "sha512-stxByr12oeeOyY2BlviTNQlYV5xOj47GirPr4yA1hE9JCtxfQN0+tVbkxwCtYDQWhEKWFHsEK48ORg5jrouCAg==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-9.0.0.tgz", + "integrity": "sha512-SO/3iYL5S3W57LLEniscOGPZgOqZUPCx6d3dB+52B80yJ0XstzsC/eV8gnA4tM3MHDrKz+OCFSLNjswdSC+/bA==", "dev": true, "license": "MIT", "dependencies": { @@ -8457,7 +8597,7 @@ "is-fullwidth-code-point": "^5.1.0" }, "engines": { - "node": ">=20" + "node": ">=22" }, "funding": { "url": "https://github.com/chalk/slice-ansi?sponsor=1" diff --git a/src/angular/package.json b/src/angular/package.json index 63bfbb27..2d956c57 100644 --- a/src/angular/package.json +++ b/src/angular/package.json @@ -24,13 +24,13 @@ "private": true, "packageManager": "npm@10.9.2", "dependencies": { - "@angular/cdk": "^22.1.2", - "@angular/common": "^22.1.1", - "@angular/compiler": "^22.1.1", - "@angular/core": "^22.1.1", - "@angular/forms": "^22.1.1", - "@angular/platform-browser": "^22.1.1", - "@angular/router": "^22.1.1", + "@angular/cdk": "^22.1.3", + "@angular/common": "^22.1.3", + "@angular/compiler": "^22.1.3", + "@angular/core": "^22.1.3", + "@angular/forms": "^22.1.3", + "@angular/platform-browser": "^22.1.3", + "@angular/router": "^22.1.3", "@fortawesome/fontawesome-free": "^7.3.1", "bootstrap": "^5.3.8", "compare-versions": "^6.1.1", @@ -38,9 +38,9 @@ "tslib": "^2.3.0" }, "devDependencies": { - "@angular/build": "^22.1.4", - "@angular/cli": "^22.1.4", - "@angular/compiler-cli": "^22.1.1", + "@angular/build": "^22.1.5", + "@angular/cli": "^22.1.5", + "@angular/compiler-cli": "^22.1.3", "@eslint/js": "^10.0.1", "angular-eslint": "22.1.0", "eslint": "^10.8.1", From 62af9996a2ff8237851905c51feff2edcf743bea Mon Sep 17 00:00:00 2001 From: nitrobass24 Date: Sun, 16 Aug 2026 23:39:35 -0500 Subject: [PATCH 09/39] chore(website): remove Docusaurus scaffold leftovers (#680) - Delete unused HomepageFeatures component (docs are served at the site root; no src/pages exists, so nothing imported it) - Delete 6 unused scaffold images (undraw_docusaurus_*, docusaurus.png, docusaurus-social-card.jpg, favicon.ico; config uses favicon.png/logo.png) - Drop clsx (HomepageFeatures was its only importer) and @docusaurus/faster (never enabled in docusaurus.config.js; removing is the smaller diff vs enabling) - Remove unreferenced scaffold npm scripts and browserslist (build emits no warning without it) - Remove default-equivalent config noise: i18n block, onBrokenLinks default, organizationName/projectName (deploy is actions/deploy-pages) Co-Authored-By: Claude Fable 5 --- website/docusaurus.config.js | 15 -- website/package-lock.json | 165 ++++++++++------- website/package.json | 22 +-- .../src/components/HomepageFeatures/index.js | 64 ------- .../HomepageFeatures/styles.module.css | 11 -- website/static/img/docusaurus-social-card.jpg | Bin 55746 -> 0 bytes website/static/img/docusaurus.png | Bin 5142 -> 0 bytes website/static/img/favicon.ico | Bin 3626 -> 0 bytes .../static/img/undraw_docusaurus_mountain.svg | 171 ------------------ .../static/img/undraw_docusaurus_react.svg | 170 ----------------- website/static/img/undraw_docusaurus_tree.svg | 40 ---- 11 files changed, 98 insertions(+), 560 deletions(-) delete mode 100644 website/src/components/HomepageFeatures/index.js delete mode 100644 website/src/components/HomepageFeatures/styles.module.css delete mode 100644 website/static/img/docusaurus-social-card.jpg delete mode 100644 website/static/img/docusaurus.png delete mode 100644 website/static/img/favicon.ico delete mode 100644 website/static/img/undraw_docusaurus_mountain.svg delete mode 100644 website/static/img/undraw_docusaurus_react.svg delete mode 100644 website/static/img/undraw_docusaurus_tree.svg diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index b421250c..0029ec51 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -25,21 +25,6 @@ const config = { // Default is the Cloudflare subpath; override for GitHub Pages via env. baseUrl: process.env.DOCS_BASE_URL || '/seedsync/', - // GitHub pages deployment config. - // If you aren't using GitHub pages, you don't need these. - organizationName: 'nitrobass24', // GitHub org/user name. - projectName: 'seedsync-website', // Repo name. - - onBrokenLinks: 'throw', - - // Even if you don't use internationalization, you can use this field to set - // useful metadata like html lang. For example, if your site is Chinese, you - // may want to replace "en" with "zh-Hans". - i18n: { - defaultLocale: 'en', - locales: ['en'], - }, - presets: [ [ 'classic', diff --git a/website/package-lock.json b/website/package-lock.json index 7e38f4dc..d6d8c887 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -11,13 +11,11 @@ "@docusaurus/core": "3.10.2", "@docusaurus/preset-classic": "3.10.2", "@mdx-js/react": "^3.0.0", - "clsx": "^2.0.0", "prism-react-renderer": "^2.3.0", "react": "^19.2.7", "react-dom": "^19.2.8" }, "devDependencies": { - "@docusaurus/faster": "3.10.2", "@docusaurus/module-type-aliases": "3.10.2", "@docusaurus/types": "3.10.2" }, @@ -3554,8 +3552,9 @@ "version": "3.10.2", "resolved": "https://registry.npmjs.org/@docusaurus/faster/-/faster-3.10.2.tgz", "integrity": "sha512-p/5E5/RyHv+QWusJMPN5i3OMJTqTgkhuwzVbB1AReDWTUHXQCmf5mlTFzGiDrWeQWIDOKsuOPn1jJh0s9LUOHA==", - "devOptional": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@docusaurus/types": "3.10.2", "@rspack/core": "^1.7.10", @@ -4128,6 +4127,7 @@ "integrity": "sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==", "license": "MIT", "optional": true, + "peer": true, "dependencies": { "@emnapi/wasi-threads": "1.2.1", "tslib": "^2.4.0" @@ -4139,6 +4139,7 @@ "integrity": "sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==", "license": "MIT", "optional": true, + "peer": true, "dependencies": { "tslib": "^2.4.0" } @@ -4149,6 +4150,7 @@ "integrity": "sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==", "license": "MIT", "optional": true, + "peer": true, "dependencies": { "tslib": "^2.4.0" } @@ -4725,15 +4727,17 @@ "version": "0.22.0", "resolved": "https://registry.npmjs.org/@module-federation/error-codes/-/error-codes-0.22.0.tgz", "integrity": "sha512-xF9SjnEy7vTdx+xekjPCV5cIHOGCkdn3pIxo9vU7gEZMIw0SvAEdsy6Uh17xaCpm8V0FWvR0SZoK9Ik6jGOaug==", - "devOptional": true, - "license": "MIT" + "license": "MIT", + "optional": true, + "peer": true }, "node_modules/@module-federation/runtime": { "version": "0.22.0", "resolved": "https://registry.npmjs.org/@module-federation/runtime/-/runtime-0.22.0.tgz", "integrity": "sha512-38g5iPju2tPC3KHMPxRKmy4k4onNp6ypFPS1eKGsNLUkXgHsPMBFqAjDw96iEcjri91BrahG4XcdyKi97xZzlA==", - "devOptional": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@module-federation/error-codes": "0.22.0", "@module-federation/runtime-core": "0.22.0", @@ -4744,8 +4748,9 @@ "version": "0.22.0", "resolved": "https://registry.npmjs.org/@module-federation/runtime-core/-/runtime-core-0.22.0.tgz", "integrity": "sha512-GR1TcD6/s7zqItfhC87zAp30PqzvceoeDGYTgF3Vx2TXvsfDrhP6Qw9T4vudDQL3uJRne6t7CzdT29YyVxlgIA==", - "devOptional": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@module-federation/error-codes": "0.22.0", "@module-federation/sdk": "0.22.0" @@ -4755,8 +4760,9 @@ "version": "0.22.0", "resolved": "https://registry.npmjs.org/@module-federation/runtime-tools/-/runtime-tools-0.22.0.tgz", "integrity": "sha512-4ScUJ/aUfEernb+4PbLdhM/c60VHl698Gn1gY21m9vyC1Ucn69fPCA1y2EwcCB7IItseRMoNhdcWQnzt/OPCNA==", - "devOptional": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@module-federation/runtime": "0.22.0", "@module-federation/webpack-bundler-runtime": "0.22.0" @@ -4766,15 +4772,17 @@ "version": "0.22.0", "resolved": "https://registry.npmjs.org/@module-federation/sdk/-/sdk-0.22.0.tgz", "integrity": "sha512-x4aFNBKn2KVQRuNVC5A7SnrSCSqyfIWmm1DvubjbO9iKFe7ith5niw8dqSFBekYBg2Fwy+eMg4sEFNVvCAdo6g==", - "devOptional": true, - "license": "MIT" + "license": "MIT", + "optional": true, + "peer": true }, "node_modules/@module-federation/webpack-bundler-runtime": { "version": "0.22.0", "resolved": "https://registry.npmjs.org/@module-federation/webpack-bundler-runtime/-/webpack-bundler-runtime-0.22.0.tgz", "integrity": "sha512-aM8gCqXu+/4wBmJtVeMeeMN5guw3chf+2i6HajKtQv7SJfxV/f4IyNQJUeUQu9HfiAZHjqtMV5Lvq/Lvh8LdyA==", - "devOptional": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@module-federation/runtime": "0.22.0", "@module-federation/sdk": "0.22.0" @@ -4786,6 +4794,7 @@ "integrity": "sha512-SeDnOO0Tk7Okiq6DbXmmBODgOAb9dp9gjlphokTUxmt8U3liIP1ZsozBahH69j/RJv+Rfs6IwUKHTgQYJ/HBAw==", "license": "MIT", "optional": true, + "peer": true, "dependencies": { "@emnapi/core": "^1.5.0", "@emnapi/runtime": "^1.5.0", @@ -5038,8 +5047,9 @@ "version": "1.7.11", "resolved": "https://registry.npmjs.org/@rspack/binding/-/binding-1.7.11.tgz", "integrity": "sha512-2MGdy2s2HimsDT444Bp5XnALzNRxuBNc7y0JzyuqKbHBywd4x2NeXyhWXXoxufaCFu5PBc9Qq9jyfjW2Aeh06Q==", - "devOptional": true, "license": "MIT", + "optional": true, + "peer": true, "optionalDependencies": { "@rspack/binding-darwin-arm64": "1.7.11", "@rspack/binding-darwin-x64": "1.7.11", @@ -5064,7 +5074,8 @@ "optional": true, "os": [ "darwin" - ] + ], + "peer": true }, "node_modules/@rspack/binding-darwin-x64": { "version": "1.7.11", @@ -5077,7 +5088,8 @@ "optional": true, "os": [ "darwin" - ] + ], + "peer": true }, "node_modules/@rspack/binding-linux-arm64-gnu": { "version": "1.7.11", @@ -5090,7 +5102,8 @@ "optional": true, "os": [ "linux" - ] + ], + "peer": true }, "node_modules/@rspack/binding-linux-arm64-musl": { "version": "1.7.11", @@ -5103,7 +5116,8 @@ "optional": true, "os": [ "linux" - ] + ], + "peer": true }, "node_modules/@rspack/binding-linux-x64-gnu": { "version": "1.7.11", @@ -5116,7 +5130,8 @@ "optional": true, "os": [ "linux" - ] + ], + "peer": true }, "node_modules/@rspack/binding-linux-x64-musl": { "version": "1.7.11", @@ -5129,7 +5144,8 @@ "optional": true, "os": [ "linux" - ] + ], + "peer": true }, "node_modules/@rspack/binding-wasm32-wasi": { "version": "1.7.11", @@ -5140,6 +5156,7 @@ ], "license": "MIT", "optional": true, + "peer": true, "dependencies": { "@napi-rs/wasm-runtime": "1.0.7" } @@ -5155,7 +5172,8 @@ "optional": true, "os": [ "win32" - ] + ], + "peer": true }, "node_modules/@rspack/binding-win32-ia32-msvc": { "version": "1.7.11", @@ -5168,7 +5186,8 @@ "optional": true, "os": [ "win32" - ] + ], + "peer": true }, "node_modules/@rspack/binding-win32-x64-msvc": { "version": "1.7.11", @@ -5181,14 +5200,16 @@ "optional": true, "os": [ "win32" - ] + ], + "peer": true }, "node_modules/@rspack/core": { "version": "1.7.11", "resolved": "https://registry.npmjs.org/@rspack/core/-/core-1.7.11.tgz", "integrity": "sha512-rsD9b+Khmot5DwCMiB3cqTQo53ioPG3M/A7BySu8+0+RS7GCxKm+Z+mtsjtG/vsu4Tn2tcqCdZtA3pgLoJB+ew==", - "devOptional": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@module-federation/runtime-tools": "0.22.0", "@rspack/binding": "1.7.11", @@ -5210,8 +5231,9 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/@rspack/lite-tapable/-/lite-tapable-1.1.0.tgz", "integrity": "sha512-E2B0JhYFmVAwdDiG14+DW0Di4Ze4Jg10Pc4/lILUrd5DRCaklduz2OvJ5HYQ6G+hd+WTzqQb3QnDNfK4yvAFYw==", - "devOptional": true, - "license": "MIT" + "license": "MIT", + "optional": true, + "peer": true }, "node_modules/@sideway/address": { "version": "4.1.5", @@ -5524,9 +5546,10 @@ "version": "1.15.43", "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.15.43.tgz", "integrity": "sha512-1CuKjFkPxIgGdeHVuNbkxmBxkcbdc08u0aiI43pFq6yY1tTVKmXT9hFEooyyKs/sJ3xf1GPHyEwTtk9Xl8dvQw==", - "devOptional": true, "hasInstallScript": true, "license": "Apache-2.0", + "optional": true, + "peer": true, "dependencies": { "@swc/counter": "^0.1.3", "@swc/types": "^0.1.27" @@ -5573,6 +5596,7 @@ "os": [ "darwin" ], + "peer": true, "engines": { "node": ">=10" } @@ -5589,6 +5613,7 @@ "os": [ "darwin" ], + "peer": true, "engines": { "node": ">=10" } @@ -5605,6 +5630,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": ">=10" } @@ -5616,14 +5642,12 @@ "cpu": [ "arm64" ], - "libc": [ - "glibc" - ], "license": "Apache-2.0 AND MIT", "optional": true, "os": [ "linux" ], + "peer": true, "engines": { "node": ">=10" } @@ -5635,14 +5659,12 @@ "cpu": [ "arm64" ], - "libc": [ - "musl" - ], "license": "Apache-2.0 AND MIT", "optional": true, "os": [ "linux" ], + "peer": true, "engines": { "node": ">=10" } @@ -5654,14 +5676,12 @@ "cpu": [ "ppc64" ], - "libc": [ - "glibc" - ], "license": "Apache-2.0 AND MIT", "optional": true, "os": [ "linux" ], + "peer": true, "engines": { "node": ">=10" } @@ -5673,14 +5693,12 @@ "cpu": [ "s390x" ], - "libc": [ - "glibc" - ], "license": "Apache-2.0 AND MIT", "optional": true, "os": [ "linux" ], + "peer": true, "engines": { "node": ">=10" } @@ -5692,14 +5710,12 @@ "cpu": [ "x64" ], - "libc": [ - "glibc" - ], "license": "Apache-2.0 AND MIT", "optional": true, "os": [ "linux" ], + "peer": true, "engines": { "node": ">=10" } @@ -5711,14 +5727,12 @@ "cpu": [ "x64" ], - "libc": [ - "musl" - ], "license": "Apache-2.0 AND MIT", "optional": true, "os": [ "linux" ], + "peer": true, "engines": { "node": ">=10" } @@ -5735,6 +5749,7 @@ "os": [ "win32" ], + "peer": true, "engines": { "node": ">=10" } @@ -5751,6 +5766,7 @@ "os": [ "win32" ], + "peer": true, "engines": { "node": ">=10" } @@ -5767,6 +5783,7 @@ "os": [ "win32" ], + "peer": true, "engines": { "node": ">=10" } @@ -5775,15 +5792,17 @@ "version": "0.1.3", "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz", "integrity": "sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==", - "devOptional": true, - "license": "Apache-2.0" + "license": "Apache-2.0", + "optional": true, + "peer": true }, "node_modules/@swc/html": { "version": "1.15.43", "resolved": "https://registry.npmjs.org/@swc/html/-/html-1.15.43.tgz", "integrity": "sha512-SKbkbdGi9SDO9cTdV+6H0/AYifnb2nDOlz5BlWxlWMXACV3kmX6WwZDo0bBdyGlO/G4jCVWdR5r84qfotU2now==", - "devOptional": true, "license": "Apache-2.0", + "optional": true, + "peer": true, "dependencies": { "@swc/counter": "^0.1.3" }, @@ -5817,6 +5836,7 @@ "os": [ "darwin" ], + "peer": true, "engines": { "node": ">=10" } @@ -5833,6 +5853,7 @@ "os": [ "darwin" ], + "peer": true, "engines": { "node": ">=10" } @@ -5849,6 +5870,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": ">=10" } @@ -5860,14 +5882,12 @@ "cpu": [ "arm64" ], - "libc": [ - "glibc" - ], "license": "Apache-2.0 AND MIT", "optional": true, "os": [ "linux" ], + "peer": true, "engines": { "node": ">=10" } @@ -5879,14 +5899,12 @@ "cpu": [ "arm64" ], - "libc": [ - "musl" - ], "license": "Apache-2.0 AND MIT", "optional": true, "os": [ "linux" ], + "peer": true, "engines": { "node": ">=10" } @@ -5898,14 +5916,12 @@ "cpu": [ "ppc64" ], - "libc": [ - "glibc" - ], "license": "Apache-2.0 AND MIT", "optional": true, "os": [ "linux" ], + "peer": true, "engines": { "node": ">=10" } @@ -5917,14 +5933,12 @@ "cpu": [ "s390x" ], - "libc": [ - "glibc" - ], "license": "Apache-2.0 AND MIT", "optional": true, "os": [ "linux" ], + "peer": true, "engines": { "node": ">=10" } @@ -5936,14 +5950,12 @@ "cpu": [ "x64" ], - "libc": [ - "glibc" - ], "license": "Apache-2.0 AND MIT", "optional": true, "os": [ "linux" ], + "peer": true, "engines": { "node": ">=10" } @@ -5955,14 +5967,12 @@ "cpu": [ "x64" ], - "libc": [ - "musl" - ], "license": "Apache-2.0 AND MIT", "optional": true, "os": [ "linux" ], + "peer": true, "engines": { "node": ">=10" } @@ -5979,6 +5989,7 @@ "os": [ "win32" ], + "peer": true, "engines": { "node": ">=10" } @@ -5995,6 +6006,7 @@ "os": [ "win32" ], + "peer": true, "engines": { "node": ">=10" } @@ -6011,6 +6023,7 @@ "os": [ "win32" ], + "peer": true, "engines": { "node": ">=10" } @@ -6019,8 +6032,9 @@ "version": "0.1.27", "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.27.tgz", "integrity": "sha512-K6h3iUlqeM946U4sXFYeahefR1YBbXJvko+hv8WS8/0BNJ4OHiHRywMnQUJCqkR7Y9+hqQ1TvEpiKqUhz7NEFg==", - "devOptional": true, "license": "Apache-2.0", + "optional": true, + "peer": true, "dependencies": { "@swc/counter": "^0.1.3" } @@ -6043,6 +6057,7 @@ "integrity": "sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==", "license": "MIT", "optional": true, + "peer": true, "dependencies": { "tslib": "^2.4.0" } @@ -8671,8 +8686,9 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", - "devOptional": true, "license": "Apache-2.0", + "optional": true, + "peer": true, "engines": { "node": ">=8" } @@ -11195,8 +11211,9 @@ "version": "1.32.0", "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz", "integrity": "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==", - "devOptional": true, "license": "MPL-2.0", + "optional": true, + "peer": true, "dependencies": { "detect-libc": "^2.0.3" }, @@ -11233,6 +11250,7 @@ "os": [ "android" ], + "peer": true, "engines": { "node": ">= 12.0.0" }, @@ -11253,6 +11271,7 @@ "os": [ "darwin" ], + "peer": true, "engines": { "node": ">= 12.0.0" }, @@ -11273,6 +11292,7 @@ "os": [ "darwin" ], + "peer": true, "engines": { "node": ">= 12.0.0" }, @@ -11293,6 +11313,7 @@ "os": [ "freebsd" ], + "peer": true, "engines": { "node": ">= 12.0.0" }, @@ -11313,6 +11334,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": ">= 12.0.0" }, @@ -11333,6 +11355,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": ">= 12.0.0" }, @@ -11353,6 +11376,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": ">= 12.0.0" }, @@ -11373,6 +11397,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": ">= 12.0.0" }, @@ -11393,6 +11418,7 @@ "os": [ "linux" ], + "peer": true, "engines": { "node": ">= 12.0.0" }, @@ -11413,6 +11439,7 @@ "os": [ "win32" ], + "peer": true, "engines": { "node": ">= 12.0.0" }, @@ -11433,6 +11460,7 @@ "os": [ "win32" ], + "peer": true, "engines": { "node": ">= 12.0.0" }, @@ -18027,8 +18055,9 @@ "version": "0.2.7", "resolved": "https://registry.npmjs.org/swc-loader/-/swc-loader-0.2.7.tgz", "integrity": "sha512-nwYWw3Fh9ame3Rtm7StS9SBLpHRRnYcK7bnpF3UKZmesAK0gw2/ADvlURFAINmPvKtDLzp+GBiP9yLoEjg6S9w==", - "devOptional": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { "@swc/counter": "^0.1.3" }, diff --git a/website/package.json b/website/package.json index a6d29224..26e05703 100644 --- a/website/package.json +++ b/website/package.json @@ -5,43 +5,23 @@ "scripts": { "docusaurus": "docusaurus", "start": "docusaurus start", - "build": "docusaurus build", - "swizzle": "docusaurus swizzle", - "deploy": "docusaurus deploy", - "clear": "docusaurus clear", - "serve": "docusaurus serve", - "write-translations": "docusaurus write-translations", - "write-heading-ids": "docusaurus write-heading-ids" + "build": "docusaurus build" }, "dependencies": { "@docusaurus/core": "3.10.2", "@docusaurus/preset-classic": "3.10.2", "@mdx-js/react": "^3.0.0", - "clsx": "^2.0.0", "prism-react-renderer": "^2.3.0", "react": "^19.2.7", "react-dom": "^19.2.8" }, "devDependencies": { - "@docusaurus/faster": "3.10.2", "@docusaurus/module-type-aliases": "3.10.2", "@docusaurus/types": "3.10.2" }, "overrides": { "serialize-javascript": "^7.0.5" }, - "browserslist": { - "production": [ - ">0.5%", - "not dead", - "not op_mini all" - ], - "development": [ - "last 3 chrome version", - "last 3 firefox version", - "last 5 safari version" - ] - }, "engines": { "node": ">=20.0" } diff --git a/website/src/components/HomepageFeatures/index.js b/website/src/components/HomepageFeatures/index.js deleted file mode 100644 index acc76219..00000000 --- a/website/src/components/HomepageFeatures/index.js +++ /dev/null @@ -1,64 +0,0 @@ -import clsx from 'clsx'; -import Heading from '@theme/Heading'; -import styles from './styles.module.css'; - -const FeatureList = [ - { - title: 'Easy to Use', - Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default, - description: ( - <> - Docusaurus was designed from the ground up to be easily installed and - used to get your website up and running quickly. - - ), - }, - { - title: 'Focus on What Matters', - Svg: require('@site/static/img/undraw_docusaurus_tree.svg').default, - description: ( - <> - Docusaurus lets you focus on your docs, and we'll do the chores. Go - ahead and move your docs into the docs directory. - - ), - }, - { - title: 'Powered by React', - Svg: require('@site/static/img/undraw_docusaurus_react.svg').default, - description: ( - <> - Extend or customize your website layout by reusing React. Docusaurus can - be extended while reusing the same header and footer. - - ), - }, -]; - -function Feature({Svg, title, description}) { - return ( -
-
- -
-
- {title} -

{description}

-
-
- ); -} - -export default function HomepageFeatures() { - return ( -
-
-
- {FeatureList.map((props, idx) => ( - - ))} -
-
-
- ); -} diff --git a/website/src/components/HomepageFeatures/styles.module.css b/website/src/components/HomepageFeatures/styles.module.css deleted file mode 100644 index b248eb2e..00000000 --- a/website/src/components/HomepageFeatures/styles.module.css +++ /dev/null @@ -1,11 +0,0 @@ -.features { - display: flex; - align-items: center; - padding: 2rem 0; - width: 100%; -} - -.featureSvg { - height: 200px; - width: 200px; -} diff --git a/website/static/img/docusaurus-social-card.jpg b/website/static/img/docusaurus-social-card.jpg deleted file mode 100644 index ffcb448210e1a456cb3588ae8b396a597501f187..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 55746 zcmbq(by$^M)9+14OPA6h5)#tgAkrW$rF5rshja^@6p-$cZlt9Iq*J;!NH?5&>+^i? zd%l0pA7}Qy_I1b1tTi)h&HByS>tW_$1;CblCG!e^g989K@B=)|13|!}zl4PJ2n7Wh z1qB@q6%`E~2jemL!Fh^}hYfz85|I!R5RwovP?C~TGO*Io(y{V!aPUb>O6%!)!~Op% zc=!h3pup!KRwBSr0q{6*2sm&L-2e})oA3y5u+IKNa7f6Ak5CX$;b9M9ul{`jn)3(= z0TCG<li6i8=o)3kSrx^3DjJi7W8(8t_%PJ~8lVjC z2VTPD&_&_>060+qq1c&?u#iAbP9wbT2jg5_aX>LlOOXw|dQJ8p&2XYYDc|J+YUT?3|Fxm{f?d*1vFWPGwXt8P3T#_TQB*NSP3+0+ndOe%v- zTZotCfofsS06&ki{<`Cj8{s5jFZc&1dl<{IBW%#V_!JjOm6+#&aRi;8ODL(?0fENIOtiNXjMhdO24CeDB#rNcC*<=TwpueFfx=2=r z-lt`qW^;vEFji%7kO25#YkwjKyZ93WFbbY!Q6-@Jz!9kqj>xgp2VhEYyMJwMYyHZV zG;7!MV>54LS*F?==$6(Z9S zfrEy``J-iu6G?#+q=$58MlrE}+C~G-hEMn#CuNuuVV;8#FHuD_feqmtfw~Ran|V#C zy+f^&q>|d(X{ubCVWs3Ai;Fz>-kAk`yX{^Qj_xV#NEV8oxtfCsq3%uYN0U4+Kcu%j z?Rzr+fnu%QVSgx7Z8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vo^va=%#z!&v-QX>;r?CzDmF&wICs&t^gjb+HbyAlu zMj$fEW+#&V8gGY(KVE`c>Cwx4@n%%k0e}1*(>b4BUJnY1Zgl-#TGDp0Kkn<2!w5~g zvI66hkuJCqL^qCJr{ynR-v56Ayn?5WKTl%wvo~rR^I$L2G3XIr$!y>eANg-P#SqaU fgzs%Vr*-jYG(YMS<ttdtee# diff --git a/website/static/img/docusaurus.png b/website/static/img/docusaurus.png deleted file mode 100644 index f458149e3c8f53335f28fbc162ae67f55575c881..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5142 zcma)=cTf{R(}xj7f`AaDml%oxrAm_`5IRVc-jPtHML-0kDIiip57LWD@4bW~(nB|) z34|^sbOZqj<;8ct`Tl-)=Jw`pZtiw=e$UR_Mn2b8rM$y@hlq%XQe90+?|Mf68-Ux_ zzTBiDn~3P%oVt>{f$z+YC7A)8ak`PktoIXDkpXod+*gQW4fxTWh!EyR9`L|fi4YlH z{IyM;2-~t3s~J-KF~r-Z)FWquQCfG*TQy6w*9#k2zUWV-+tCNvjrtl9(o}V>-)N!) ziZgEgV>EG+b(j@ex!dx5@@nGZim*UfFe<+e;(xL|j-Pxg(PCsTL~f^br)4{n5?OU@ z*pjt{4tG{qBcDSa3;yKlopENd6Yth=+h9)*lkjQ0NwgOOP+5Xf?SEh$x6@l@ZoHoYGc5~d2>pO43s3R|*yZw9yX^kEyUV2Zw1%J4o`X!BX>CwJ zI8rh1-NLH^x1LnaPGki_t#4PEz$ad+hO^$MZ2 ziwt&AR}7_yq-9Pfn}k3`k~dKCbOsHjvWjnLsP1{)rzE8ERxayy?~{Qz zHneZ2gWT3P|H)fmp>vA78a{0&2kk3H1j|n59y{z@$?jmk9yptqCO%* zD2!3GHNEgPX=&Ibw?oU1>RSxw3;hhbOV77-BiL%qQb1(4J|k=Y{dani#g>=Mr?Uyd z)1v~ZXO_LT-*RcG%;i|Wy)MvnBrshlQoPxoO*82pKnFSGNKWrb?$S$4x+24tU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TGt#O%a9WN1KVNj`q$1Qoiwd|y&_v?}bR#>fdP zSlMy2#KzRq4%?ywXh1w;U&=gKH%L~*m-l%D4Cl?*riF2~r*}ic9_{JYMAwcczTE`!Z z^KfriRf|_YcQ4b8NKi?9N7<4;PvvQQ}*4YxemKK3U-7i}ap8{T7=7`e>PN7BG-Ej;Uti2$o=4T#VPb zm1kISgGzj*b?Q^MSiLxj26ypcLY#RmTPp+1>9zDth7O?w9)onA%xqpXoKA-`Jh8cZ zGE(7763S3qHTKNOtXAUA$H;uhGv75UuBkyyD;eZxzIn6;Ye7JpRQ{-6>)ioiXj4Mr zUzfB1KxvI{ZsNj&UA`+|)~n}96q%_xKV~rs?k=#*r*7%Xs^Hm*0~x>VhuOJh<2tcb zKbO9e-w3zbekha5!N@JhQm7;_X+J!|P?WhssrMv5fnQh$v*986uWGGtS}^szWaJ*W z6fLVt?OpPMD+-_(3x8Ra^sX~PT1t5S6bfk@Jb~f-V)jHRul#Hqu;0(+ER7Z(Z4MTR z+iG>bu+BW2SNh|RAGR2-mN5D1sTcb-rLTha*@1@>P~u;|#2N{^AC1hxMQ|(sp3gTa zDO-E8Yn@S7u=a?iZ!&&Qf2KKKk7IT`HjO`U*j1~Df9Uxz$~@otSCK;)lbLSmBuIj% zPl&YEoRwsk$8~Az>>djrdtp`PX z`Pu#IITS7lw07vx>YE<4pQ!&Z^7L?{Uox`CJnGjYLh1XN^tt#zY*0}tA*a=V)rf=&-kLgD|;t1D|ORVY}8 F{0H{b<4^zq diff --git a/website/static/img/favicon.ico b/website/static/img/favicon.ico deleted file mode 100644 index c01d54bcd39a5f853428f3cd5aa0f383d963c484..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3626 zcmb`Je@s(X6vrR`EK3%b%orErlDW({vnABqA zcfaS{d+xbU5JKp0*;0YOg+;Fl!eT)XRuapIwFLL`=imZCSon$`se`_<%@MB=M~KG+ z=EW^FL`w|Bo>*ktlaS^(fut!95`iG5u=SZ8nfDHO#GaTlH1-XG^;vsjUb^gWTVz0+ z^=WR1wv9-2oeR=_;fL0H7rNWqAzGtO(D;`~cX(RcN0w2v24Y8)6t`cS^_ghs`_ho? z{0ka~1Dgo8TfAP$r*ua?>$_V+kZ!-(TvEJ7O2f;Y#tezt$&R4 zLI}=-y@Z!grf*h3>}DUL{km4R>ya_I5Ag#{h_&?+HpKS!;$x3LC#CqUQ8&nM?X))Q zXAy2?`YL4FbC5CgJu(M&Q|>1st8XXLZ|5MgwgjP$m_2Vt0(J z&Gu7bOlkbGzGm2sh?X`){7w69Y$1#@P@7DF{ZE=4%T0NDS)iH`tiPSKpDNW)zmtn( zw;4$f>k)4$LBc>eBAaTZeCM2(iD+sHlj!qd z2GjRJ>f_Qes(+mnzdA^NH?^NB(^o-%Gmg$c8MNMq&`vm@9Ut;*&$xSD)PKH{wBCEC z4P9%NQ;n2s59ffMn8*5)5AAg4-93gBXBDX`A7S& zH-|%S3Wd%T79fk-e&l`{!?lve8_epXhE{d3Hn$Cg!t=-4D(t$cK~7f&4s?t7wr3ZP z*!SRQ-+tr|e1|hbc__J`k3S!rMy<0PHy&R`v#aJv?`Y?2{avK5sQz%=Us()jcNuZV z*$>auD4cEw>;t`+m>h?f?%VFJZj8D|Y1e_SjxG%J4{-AkFtT2+ZZS5UScS~%;dp!V>)7zi`w(xwSd*FS;Lml=f6hn#jq)2is4nkp+aTrV?)F6N z>DY#SU0IZ;*?Hu%tSj4edd~kYNHMFvS&5}#3-M;mBCOCZL3&;2obdG?qZ>rD|zC|Lu|sny76pn2xl|6sk~Hs{X9{8iBW zwiwgQt+@hi`FYMEhX2 - Easy to Use - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/website/static/img/undraw_docusaurus_react.svg b/website/static/img/undraw_docusaurus_react.svg deleted file mode 100644 index 94b5cf08..00000000 --- a/website/static/img/undraw_docusaurus_react.svg +++ /dev/null @@ -1,170 +0,0 @@ - - Powered by React - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/website/static/img/undraw_docusaurus_tree.svg b/website/static/img/undraw_docusaurus_tree.svg deleted file mode 100644 index d9161d33..00000000 --- a/website/static/img/undraw_docusaurus_tree.svg +++ /dev/null @@ -1,40 +0,0 @@ - - Focus on What Matters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From f7515950ccfa06ac14307b52466f43e4332cefec Mon Sep 17 00:00:00 2001 From: nitrobass24 Date: Sun, 16 Aug 2026 23:44:51 -0500 Subject: [PATCH 10/39] refactor(angular): delete dead code, drop compare-versions (#675) - Delete VersionCheckService + spec (never injected anywhere); drop compare-versions, its only importer, from package.json and lockfile - Delete barrel files models/index.ts and services/index.ts (zero importers) - Remove ModelFile.children recursive parse (never read outside the parser) - Remove latestLocalScanTime (parsed, never read; wire field kept on ServerStatusJson as payload documentation) - Remove ViewFileSelectionService.snapshot() (zero production callers; spec now reads checked$ instead) - Remove the unused ConfigValue re-export from ConfigService - Remove orphan .connected selectors from logs-page.component.scss - Remove 12 unused SCSS variables from _common.scss (app uses --ss-* custom properties); every removal grep-verified across *.scss - Make StreamEventHandler members optional and delete the empty no-op implementations in ConnectedService, LogService, ServerStatusService, ModelFileService Co-Authored-By: Claude Fable 5 --- src/angular/package-lock.json | 7 - src/angular/package.json | 1 - src/angular/src/app/common/_common.scss | 15 -- src/angular/src/app/models/index.ts | 28 --- src/angular/src/app/models/model-file.spec.ts | 29 --- src/angular/src/app/models/model-file.ts | 8 - .../src/app/models/server-status.spec.ts | 2 - src/angular/src/app/models/server-status.ts | 7 - .../app/pages/logs/logs-page.component.scss | 17 -- .../app/pages/main/header.component.spec.ts | 1 - .../services/base/stream-dispatch.service.ts | 19 +- .../services/files/model-file.service.spec.ts | 1 - .../app/services/files/model-file.service.ts | 4 - .../files/view-file-command.service.spec.ts | 1 - .../files/view-file-selection.service.spec.ts | 32 +-- .../files/view-file-selection.service.ts | 5 - .../services/files/view-file.service.spec.ts | 1 - src/angular/src/app/services/index.ts | 16 -- .../src/app/services/logs/log.service.ts | 8 - .../server/server-status.service.spec.ts | 4 - .../services/server/server-status.service.ts | 6 - .../app/services/settings/config.service.ts | 2 - .../services/utils/connected.service.spec.ts | 4 - .../app/services/utils/connected.service.ts | 8 - .../utils/version-check.service.spec.ts | 214 ------------------ .../services/utils/version-check.service.ts | 93 -------- 26 files changed, 21 insertions(+), 512 deletions(-) delete mode 100644 src/angular/src/app/models/index.ts delete mode 100644 src/angular/src/app/services/index.ts delete mode 100644 src/angular/src/app/services/utils/version-check.service.spec.ts delete mode 100644 src/angular/src/app/services/utils/version-check.service.ts diff --git a/src/angular/package-lock.json b/src/angular/package-lock.json index 0e6bb507..08393e07 100644 --- a/src/angular/package-lock.json +++ b/src/angular/package-lock.json @@ -17,7 +17,6 @@ "@angular/router": "^22.1.3", "@fortawesome/fontawesome-free": "^7.3.1", "bootstrap": "^5.3.8", - "compare-versions": "^6.1.1", "rxjs": "~7.8.0", "tslib": "^2.3.0" }, @@ -5475,12 +5474,6 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/compare-versions": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-6.1.1.tgz", - "integrity": "sha512-4hm4VPpIecmlg59CHXnRDnqGplJFrbLG4aFEl5vl6cK1u76ws3LLvX7ikFnTDl5vo39sjWD6AaDPYodJp/NNHg==", - "license": "MIT" - }, "node_modules/content-disposition": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.1.0.tgz", diff --git a/src/angular/package.json b/src/angular/package.json index 2d956c57..a6044e22 100644 --- a/src/angular/package.json +++ b/src/angular/package.json @@ -33,7 +33,6 @@ "@angular/router": "^22.1.3", "@fortawesome/fontawesome-free": "^7.3.1", "bootstrap": "^5.3.8", - "compare-versions": "^6.1.1", "rxjs": "~7.8.0", "tslib": "^2.3.0" }, diff --git a/src/angular/src/app/common/_common.scss b/src/angular/src/app/common/_common.scss index 22bb2f70..56db08fe 100644 --- a/src/angular/src/app/common/_common.scss +++ b/src/angular/src/app/common/_common.scss @@ -1,20 +1,5 @@ -$primary-color: #337BB7; -$primary-dark-color: #2e6da4; -$primary-light-color: #D7E7F4; -$primary-lighter-color: #F6F6F6; - -$secondary-color: #79DFB6; -$secondary-light-color: #C5F0DE; -$secondary-dark-color: #32AD7B; -$secondary-darker-color: #077F4F; - -$header-color: #DDDDDD; -$header-dark-color: #D3D3D3; - -$logo-color: #118247; $logo-font: 'Arial Black', Gadget, sans-serif; -$small-max-width: 600px; $medium-min-width: 601px; $medium-max-width: 992px; $large-min-width: 993px; diff --git a/src/angular/src/app/models/index.ts b/src/angular/src/app/models/index.ts deleted file mode 100644 index db22c4d7..00000000 --- a/src/angular/src/app/models/index.ts +++ /dev/null @@ -1,28 +0,0 @@ -export type { ModelFile } from './model-file'; -export { ModelFileState, modelFileFromJson } from './model-file'; - -export type { ViewFile } from './view-file'; -export { ViewFileStatus } from './view-file'; - -export type { ServerStatus, ServerStatusJson } from './server-status'; -export { serverStatusFromJson } from './server-status'; - -export type { LogRecord, LogRecordJson } from './log-record'; -export { LogLevel, logRecordFromJson } from './log-record'; - -export type { General, Lftp, Controller, Web, AutoQueue, Config } from './config'; -export { - DEFAULT_GENERAL, DEFAULT_LFTP, DEFAULT_CONTROLLER, DEFAULT_WEB, DEFAULT_AUTOQUEUE, DEFAULT_CONFIG, -} from './config'; - -export type { Notification } from './notification'; -export { NotificationLevel, createNotification } from './notification'; - -export type { AutoQueuePattern, AutoQueuePatternJson } from './autoqueue-pattern'; - -export type { ViewFileOptions } from './view-file-options'; -export { SortMethod } from './view-file-options'; - -export { Localization } from './localization'; - -export type { PathPair } from './path-pair'; diff --git a/src/angular/src/app/models/model-file.spec.ts b/src/angular/src/app/models/model-file.spec.ts index 211faee3..d8c7314c 100644 --- a/src/angular/src/app/models/model-file.spec.ts +++ b/src/angular/src/app/models/model-file.spec.ts @@ -17,7 +17,6 @@ describe('modelFileFromJson', () => { local_modified_timestamp: null, remote_created_timestamp: null, remote_modified_timestamp: null, - children: [], ...overrides, }; } @@ -107,32 +106,4 @@ describe('modelFileFromJson', () => { expect(result.remote_created_timestamp).toBeNull(); expect(result.remote_modified_timestamp).toBeNull(); }); - - it('should recursively parse children', () => { - const json = makeJson({ - name: 'parent', - is_dir: true, - children: [ - makeJson({ name: 'child1.txt', state: 'DOWNLOADED' }), - makeJson({ - name: 'subfolder', - is_dir: true, - children: [ - makeJson({ name: 'grandchild.txt', state: 'QUEUED' }), - ], - }), - ], - }); - - const result = modelFileFromJson(json); - - expect(result.children).toHaveLength(2); - expect(result.children[0].name).toBe('child1.txt'); - expect(result.children[0].state).toBe(ModelFileState.DOWNLOADED); - expect(result.children[1].name).toBe('subfolder'); - expect(result.children[1].is_dir).toBe(true); - expect(result.children[1].children).toHaveLength(1); - expect(result.children[1].children[0].name).toBe('grandchild.txt'); - expect(result.children[1].children[0].state).toBe(ModelFileState.QUEUED); - }); }); diff --git a/src/angular/src/app/models/model-file.ts b/src/angular/src/app/models/model-file.ts index 1e473cf8..7c25e07d 100644 --- a/src/angular/src/app/models/model-file.ts +++ b/src/angular/src/app/models/model-file.ts @@ -17,7 +17,6 @@ export interface ModelFile { local_modified_timestamp: Date | null; remote_created_timestamp: Date | null; remote_modified_timestamp: Date | null; - children: ModelFile[]; } export enum ModelFileState { @@ -69,15 +68,9 @@ export interface ModelFileJson { local_modified_timestamp: number | null; remote_created_timestamp: number | null; remote_modified_timestamp: number | null; - children: ModelFileJson[]; } export function modelFileFromJson(json: ModelFileJson): ModelFile { - const children: ModelFile[] = []; - for (const child of json.children) { - children.push(modelFileFromJson(child)); - } - return { name: json.name, pair_id: json.pair_id ?? null, @@ -97,6 +90,5 @@ export function modelFileFromJson(json: ModelFileJson): ModelFile { json.remote_created_timestamp != null ? new Date(1000 * +json.remote_created_timestamp) : null, remote_modified_timestamp: json.remote_modified_timestamp != null ? new Date(1000 * +json.remote_modified_timestamp) : null, - children, }; } diff --git a/src/angular/src/app/models/server-status.spec.ts b/src/angular/src/app/models/server-status.spec.ts index 8283a14b..12a69b5b 100644 --- a/src/angular/src/app/models/server-status.spec.ts +++ b/src/angular/src/app/models/server-status.spec.ts @@ -50,7 +50,6 @@ describe('serverStatusFromJson', () => { const result = serverStatusFromJson(json); - expect(result.controller.latestLocalScanTime).toEqual(new Date(1700000000 * 1000)); expect(result.controller.latestRemoteScanTime).toEqual(new Date(1700000100 * 1000)); }); @@ -73,7 +72,6 @@ describe('serverStatusFromJson', () => { it('should handle null timestamps', () => { const result = serverStatusFromJson(makeJson()); - expect(result.controller.latestLocalScanTime).toBeNull(); expect(result.controller.latestRemoteScanTime).toBeNull(); }); }); diff --git a/src/angular/src/app/models/server-status.ts b/src/angular/src/app/models/server-status.ts index aa610d82..b4f9cea6 100644 --- a/src/angular/src/app/models/server-status.ts +++ b/src/angular/src/app/models/server-status.ts @@ -7,7 +7,6 @@ export interface ServerStatus { errorMessage: string | null; }; controller: { - latestLocalScanTime: Date | null; latestRemoteScanTime: Date | null; latestRemoteScanFailed: boolean; latestRemoteScanError: string | null; @@ -34,11 +33,6 @@ export interface ServerStatusJson { } export function serverStatusFromJson(json: ServerStatusJson): ServerStatus { - let latestLocalScanTime: Date | null = null; - if (json.controller.latest_local_scan_time != null) { - latestLocalScanTime = new Date(1000 * +json.controller.latest_local_scan_time); - } - let latestRemoteScanTime: Date | null = null; if (json.controller.latest_remote_scan_time != null) { latestRemoteScanTime = new Date(1000 * +json.controller.latest_remote_scan_time); @@ -50,7 +44,6 @@ export function serverStatusFromJson(json: ServerStatusJson): ServerStatus { errorMessage: json.server.error_msg, }, controller: { - latestLocalScanTime, latestRemoteScanTime, latestRemoteScanFailed: json.controller.latest_remote_scan_failed, latestRemoteScanError: json.controller.latest_remote_scan_error, diff --git a/src/angular/src/app/pages/logs/logs-page.component.scss b/src/angular/src/app/pages/logs/logs-page.component.scss index 982d61a7..4e1fab15 100644 --- a/src/angular/src/app/pages/logs/logs-page.component.scss +++ b/src/angular/src/app/pages/logs/logs-page.component.scss @@ -165,19 +165,6 @@ } } - .connected { - height: 12px; - width: 100%; - text-align: center; - border-bottom: 1px solid var(--ss-log-divider); - margin-bottom: 15px; - - span { - background-color: var(--ss-log-divider-bg); - font-size: 10px; - padding: 5px; - } - } } /* Medium and large screens */ @@ -190,10 +177,6 @@ // ── Dark mode refinements ── :host-context([data-bs-theme="dark"]) { #logs { - .connected span { - background-color: #161A21; - } - .btn-scroll { background-color: #1D222B; border-color: #252C37; diff --git a/src/angular/src/app/pages/main/header.component.spec.ts b/src/angular/src/app/pages/main/header.component.spec.ts index 0954a3a9..860afeab 100644 --- a/src/angular/src/app/pages/main/header.component.spec.ts +++ b/src/angular/src/app/pages/main/header.component.spec.ts @@ -22,7 +22,6 @@ function makeStatus(overrides: Partial<{ ...overrides.server, }, controller: { - latestLocalScanTime: null, latestRemoteScanTime: new Date(), latestRemoteScanFailed: false, latestRemoteScanError: null, diff --git a/src/angular/src/app/services/base/stream-dispatch.service.ts b/src/angular/src/app/services/base/stream-dispatch.service.ts index 9f50c79d..6fb3fe52 100644 --- a/src/angular/src/app/services/base/stream-dispatch.service.ts +++ b/src/angular/src/app/services/base/stream-dispatch.service.ts @@ -4,20 +4,21 @@ import { LoggerService } from '../utils/logger.service'; /** * Interface that services implement to receive SSE events - * from the StreamDispatchService. + * from the StreamDispatchService. All members are optional so handlers + * only implement the callbacks they care about. */ export interface StreamEventHandler { /** Event names this handler is interested in. */ - getEventNames(): string[]; + getEventNames?(): string[]; /** Called when the SSE connection opens. */ - onConnected(): void; + onConnected?(): void; /** Called when the SSE connection drops. */ - onDisconnected(): void; + onDisconnected?(): void; /** Called when a subscribed event arrives. */ - onEvent(eventName: string, data: string): void; + onEvent?(eventName: string, data: string): void; } @Injectable({ providedIn: 'root' }) @@ -37,7 +38,7 @@ export class StreamDispatchService { private readonly handlers: StreamEventHandler[] = []; registerHandler(handler: StreamEventHandler): void { - for (const eventName of handler.getEventNames()) { + for (const eventName of handler.getEventNames?.() ?? []) { this.eventNameToHandler.set(eventName, handler); } this.handlers.push(handler); @@ -87,7 +88,7 @@ export class StreamDispatchService { for (const eventName of Array.from(this.eventNameToHandler.keys())) { eventSource.addEventListener(eventName, (event: MessageEvent) => { this.zone.run(() => { - this.eventNameToHandler.get(eventName)!.onEvent(eventName, event.data); + this.eventNameToHandler.get(eventName)!.onEvent?.(eventName, event.data); }); }); } @@ -97,7 +98,7 @@ export class StreamDispatchService { // A successful connection resets the backoff so the next drop retries fast. this.retryAttempt = 0; for (const handler of this.handlers) { - this.zone.run(() => handler.onConnected()); + this.zone.run(() => handler.onConnected?.()); } }; @@ -112,7 +113,7 @@ export class StreamDispatchService { this.closeAndCancelRetry(); for (const handler of this.handlers) { - this.zone.run(() => handler.onDisconnected()); + this.zone.run(() => handler.onDisconnected?.()); } const delay = this.nextRetryDelayMs(); diff --git a/src/angular/src/app/services/files/model-file.service.spec.ts b/src/angular/src/app/services/files/model-file.service.spec.ts index 1cb767d7..e292f6c5 100644 --- a/src/angular/src/app/services/files/model-file.service.spec.ts +++ b/src/angular/src/app/services/files/model-file.service.spec.ts @@ -22,7 +22,6 @@ function makeFileJson(name: string, state = "DEFAULT") { local_modified_timestamp: null, remote_created_timestamp: null, remote_modified_timestamp: null, - children: [], }; } diff --git a/src/angular/src/app/services/files/model-file.service.ts b/src/angular/src/app/services/files/model-file.service.ts index 44c9c74b..e1282b9b 100644 --- a/src/angular/src/app/services/files/model-file.service.ts +++ b/src/angular/src/app/services/files/model-file.service.ts @@ -73,10 +73,6 @@ export class ModelFileService implements StreamEventHandler { this.parseEvent(eventName, data); } - onConnected(): void { - // nothing to do - } - onDisconnected(): void { this.filesSubject.next(new Map()); } diff --git a/src/angular/src/app/services/files/view-file-command.service.spec.ts b/src/angular/src/app/services/files/view-file-command.service.spec.ts index a050d991..a32836db 100644 --- a/src/angular/src/app/services/files/view-file-command.service.spec.ts +++ b/src/angular/src/app/services/files/view-file-command.service.spec.ts @@ -26,7 +26,6 @@ function makeModelFile(overrides: Partial & { name: string }): ModelF local_modified_timestamp: null, remote_created_timestamp: null, remote_modified_timestamp: null, - children: [], ...overrides, }; } diff --git a/src/angular/src/app/services/files/view-file-selection.service.spec.ts b/src/angular/src/app/services/files/view-file-selection.service.spec.ts index ad18d2ba..2821ddd3 100644 --- a/src/angular/src/app/services/files/view-file-selection.service.spec.ts +++ b/src/angular/src/app/services/files/view-file-selection.service.spec.ts @@ -17,7 +17,6 @@ describe('ViewFileSelectionService', () => { it('starts with an empty checked set', () => { expect(latestChecked().size).toBe(0); - expect(service.snapshot().size).toBe(0); expect(service.isChecked('a')).toBe(false); }); @@ -52,54 +51,54 @@ describe('ViewFileSelectionService', () => { it('shiftRange falls back to toggle when there is no prior anchor', () => { service.shiftRange('b', ['a', 'b', 'c']); - expect(service.snapshot()).toEqual(new Set(['b'])); + expect(latestChecked()).toEqual(new Set(['b'])); }); it('shiftRange selects the inclusive forward range from the anchor', () => { service.toggle('a'); // anchor = a service.shiftRange('c', ['a', 'b', 'c', 'd']); - expect(service.snapshot()).toEqual(new Set(['a', 'b', 'c'])); + expect(latestChecked()).toEqual(new Set(['a', 'b', 'c'])); }); it('shiftRange selects the inclusive backward range from the anchor', () => { service.toggle('d'); // anchor = d service.shiftRange('b', ['a', 'b', 'c', 'd']); - expect(service.snapshot()).toEqual(new Set(['b', 'c', 'd'])); + expect(latestChecked()).toEqual(new Set(['b', 'c', 'd'])); }); it('shiftRange moves the anchor to the latest key for chained ranges', () => { service.toggle('a'); // anchor = a service.shiftRange('c', ['a', 'b', 'c', 'd', 'e']); // anchor now c service.shiftRange('e', ['a', 'b', 'c', 'd', 'e']); // c..e - expect(service.snapshot()).toEqual(new Set(['a', 'b', 'c', 'd', 'e'])); + expect(latestChecked()).toEqual(new Set(['a', 'b', 'c', 'd', 'e'])); }); it('shiftRange falls back to toggle when the anchor is no longer in the list', () => { service.toggle('z'); // anchor = z, but z not in the list below service.shiftRange('b', ['a', 'b', 'c']); // z stayed checked (from its own toggle), b toggled on via fallback - expect(service.snapshot()).toEqual(new Set(['z', 'b'])); + expect(latestChecked()).toEqual(new Set(['z', 'b'])); }); it('shiftRange falls back to toggle when the target key is not in the list', () => { service.toggle('a'); // anchor = a service.shiftRange('zzz', ['a', 'b', 'c']); // zzz not present -> fallback toggles zzz on - expect(service.snapshot()).toEqual(new Set(['a', 'zzz'])); + expect(latestChecked()).toEqual(new Set(['a', 'zzz'])); }); // --- checkAll --- it('checkAll checks every provided key', () => { service.checkAll(['a', 'b', 'c']); - expect(service.snapshot()).toEqual(new Set(['a', 'b', 'c'])); + expect(latestChecked()).toEqual(new Set(['a', 'b', 'c'])); expect(latestChecked()).toEqual(new Set(['a', 'b', 'c'])); }); it('checkAll unions with the existing selection', () => { service.toggle('x'); service.checkAll(['a', 'b']); - expect(service.snapshot()).toEqual(new Set(['x', 'a', 'b'])); + expect(latestChecked()).toEqual(new Set(['x', 'a', 'b'])); }); // --- uncheckAll --- @@ -108,12 +107,12 @@ describe('ViewFileSelectionService', () => { service.toggle('a'); // anchor = a service.checkAll(['b', 'c']); service.uncheckAll(); - expect(service.snapshot().size).toBe(0); + expect(latestChecked().size).toBe(0); expect(latestChecked().size).toBe(0); // Anchor was cleared: a subsequent shiftRange falls back to a plain toggle. service.shiftRange('c', ['a', 'b', 'c']); - expect(service.snapshot()).toEqual(new Set(['c'])); + expect(latestChecked()).toEqual(new Set(['c'])); }); // --- pruneRemoved --- @@ -151,15 +150,6 @@ describe('ViewFileSelectionService', () => { service.pruneRemoved(['b']); // anchor still 'a' -> range a..c selects a, c (b was removed but reselected in range) service.shiftRange('c', ['a', 'b', 'c']); - expect(service.snapshot()).toEqual(new Set(['a', 'b', 'c'])); - }); - - // --- snapshot defensiveness --- - - it('snapshot returns a copy that does not mutate internal state', () => { - service.toggle('a'); - const snap = service.snapshot(); - snap.add('b'); - expect(service.isChecked('b')).toBe(false); + expect(latestChecked()).toEqual(new Set(['a', 'b', 'c'])); }); }); diff --git a/src/angular/src/app/services/files/view-file-selection.service.ts b/src/angular/src/app/services/files/view-file-selection.service.ts index e0346a8f..e2fada04 100644 --- a/src/angular/src/app/services/files/view-file-selection.service.ts +++ b/src/angular/src/app/services/files/view-file-selection.service.ts @@ -28,11 +28,6 @@ export class ViewFileSelectionService { return this.checkedSet.has(key); } - /** A defensive copy of the current checked-key set. */ - snapshot(): Set { - return new Set(this.checkedSet); - } - /** * Toggle a single key's checked state and make it the shift-range anchor. * Emits the updated set on {@link checked$}. diff --git a/src/angular/src/app/services/files/view-file.service.spec.ts b/src/angular/src/app/services/files/view-file.service.spec.ts index 211aef99..988ea1ae 100644 --- a/src/angular/src/app/services/files/view-file.service.spec.ts +++ b/src/angular/src/app/services/files/view-file.service.spec.ts @@ -28,7 +28,6 @@ function makeModelFile( local_modified_timestamp: null, remote_created_timestamp: null, remote_modified_timestamp: null, - children: [], ...overrides, }; } diff --git a/src/angular/src/app/services/index.ts b/src/angular/src/app/services/index.ts deleted file mode 100644 index ce590d7a..00000000 --- a/src/angular/src/app/services/index.ts +++ /dev/null @@ -1,16 +0,0 @@ -// Utils -export { LoggerService, LogLevel } from './utils/logger.service'; -export { RestService } from './utils/rest.service'; -export type { WebReaction } from './utils/rest.service'; -export { ConnectedService } from './utils/connected.service'; -export { DomService } from './utils/dom.service'; -export { NotificationService } from './utils/notification.service'; -export { ThemeService } from './utils/theme.service'; -export type { Theme } from './utils/theme.service'; - -// Base -export { StreamDispatchService } from './base/stream-dispatch.service'; -export type { StreamEventHandler } from './base/stream-dispatch.service'; - -// Settings -export { PathPairsService } from './settings/path-pairs.service'; diff --git a/src/angular/src/app/services/logs/log.service.ts b/src/angular/src/app/services/logs/log.service.ts index ae1ed314..535c5d2f 100644 --- a/src/angular/src/app/services/logs/log.service.ts +++ b/src/angular/src/app/services/logs/log.service.ts @@ -51,14 +51,6 @@ export class LogService implements StreamEventHandler { } } - onConnected(): void { - // intentional no-op - } - - onDisconnected(): void { - // intentional no-op - } - fetchHistory(params: LogHistoryParams = {}): Observable { let httpParams = new HttpParams(); if (params.search) httpParams = httpParams.set('search', params.search); diff --git a/src/angular/src/app/services/server/server-status.service.spec.ts b/src/angular/src/app/services/server/server-status.service.spec.ts index 798b2138..2b5d7776 100644 --- a/src/angular/src/app/services/server/server-status.service.spec.ts +++ b/src/angular/src/app/services/server/server-status.service.spec.ts @@ -68,9 +68,6 @@ describe("ServerStatusService", () => { service.status$.subscribe((s) => (result = s)); expect(result!.server.up).toBe(true); expect(result!.server.errorMessage).toBe(""); - expect(result!.controller.latestLocalScanTime).toEqual( - new Date(1000 * 1700000000), - ); expect(result!.controller.latestRemoteScanTime).toBeNull(); expect(result!.controller.latestRemoteScanFailed).toBe(false); }); @@ -98,7 +95,6 @@ describe("ServerStatusService", () => { expect(result!.server.errorMessage).toBe( Localization.Error.SERVER_DISCONNECTED, ); - expect(result!.controller.latestLocalScanTime).toBeNull(); expect(result!.controller.latestRemoteScanTime).toBeNull(); expect(result!.controller.latestRemoteScanFailed).toBe(false); expect(result!.controller.latestRemoteScanError).toBeNull(); diff --git a/src/angular/src/app/services/server/server-status.service.ts b/src/angular/src/app/services/server/server-status.service.ts index 3c9e4839..320fdf0a 100644 --- a/src/angular/src/app/services/server/server-status.service.ts +++ b/src/angular/src/app/services/server/server-status.service.ts @@ -17,7 +17,6 @@ export class ServerStatusService implements StreamEventHandler { errorMessage: Localization.Notification.STATUS_CONNECTION_WAITING, }, controller: { - latestLocalScanTime: null, latestRemoteScanTime: null, latestRemoteScanFailed: false, latestRemoteScanError: null, @@ -47,10 +46,6 @@ export class ServerStatusService implements StreamEventHandler { } } - onConnected(): void { - // nothing to do - } - onDisconnected(): void { this.statusSubject.next({ server: { @@ -58,7 +53,6 @@ export class ServerStatusService implements StreamEventHandler { errorMessage: Localization.Error.SERVER_DISCONNECTED, }, controller: { - latestLocalScanTime: null, latestRemoteScanTime: null, latestRemoteScanFailed: false, latestRemoteScanError: null, diff --git a/src/angular/src/app/services/settings/config.service.ts b/src/angular/src/app/services/settings/config.service.ts index 4d1f6c19..5c30775f 100644 --- a/src/angular/src/app/services/settings/config.service.ts +++ b/src/angular/src/app/services/settings/config.service.ts @@ -8,8 +8,6 @@ import { RestService, WebReaction } from '../utils/rest.service'; import { StreamDispatchService } from '../base/stream-dispatch.service'; import { Config, ConfigSection, ConfigValue, REDACTED_SENTINEL } from '../../models/config'; -// ConfigValue is re-exported for callers that import it from this service. -export type { ConfigValue }; /** * Config viewed as a record of string-keyed sections, for dynamic diff --git a/src/angular/src/app/services/utils/connected.service.spec.ts b/src/angular/src/app/services/utils/connected.service.spec.ts index 456453b5..3d1759d5 100644 --- a/src/angular/src/app/services/utils/connected.service.spec.ts +++ b/src/angular/src/app/services/utils/connected.service.spec.ts @@ -22,10 +22,6 @@ describe("ConnectedService", () => { expect(mockStreamDispatch.registerHandler).toHaveBeenCalledWith(service); }); - it("should return empty array from getEventNames()", () => { - expect(service.getEventNames()).toEqual([]); - }); - it("should set connected$ to true on onConnected()", () => { service.onConnected(); diff --git a/src/angular/src/app/services/utils/connected.service.ts b/src/angular/src/app/services/utils/connected.service.ts index 5b71ac29..38587a2d 100644 --- a/src/angular/src/app/services/utils/connected.service.ts +++ b/src/angular/src/app/services/utils/connected.service.ts @@ -15,14 +15,6 @@ export class ConnectedService implements StreamEventHandler { readonly connected$: Observable = this.connectedSubject.asObservable(); - getEventNames(): string[] { - return []; - } - - onEvent(_eventName: string, _data: string): void { - // No events to handle - } - onConnected(): void { if (!this.connectedSubject.getValue()) { this.connectedSubject.next(true); diff --git a/src/angular/src/app/services/utils/version-check.service.spec.ts b/src/angular/src/app/services/utils/version-check.service.spec.ts deleted file mode 100644 index 37559b71..00000000 --- a/src/angular/src/app/services/utils/version-check.service.spec.ts +++ /dev/null @@ -1,214 +0,0 @@ -import '@angular/compiler'; -import { describe, it, expect, vi, beforeEach } from 'vitest'; -import { TestBed } from '@angular/core/testing'; -import { NEVER, of } from 'rxjs'; - -import { VersionCheckService } from './version-check.service'; -import { RestService, WebReaction } from './rest.service'; -import { NotificationService } from './notification.service'; -import { LoggerService } from './logger.service'; -import { Notification, NotificationLevel } from '../../models/notification'; -import packageJson from '../../../../package.json'; - -function makeReaction(overrides: Partial = {}): WebReaction { - return { - success: true, - data: null, - errorMessage: null, - ...overrides, - }; -} - -function makeGithubResponse(tagName: string, htmlUrl = 'https://github.com/nitrobass24/seedsync/releases/latest'): string { - return JSON.stringify({ tag_name: tagName, html_url: htmlUrl }); -} - -describe('VersionCheckService', () => { - let mockRestService: { sendRequest: ReturnType }; - let notificationService: NotificationService; - let mockLogger: { debug: ReturnType; info: ReturnType; warn: ReturnType; error: ReturnType }; - - function createService(): VersionCheckService { - return TestBed.inject(VersionCheckService); - } - - beforeEach(() => { - mockRestService = { sendRequest: vi.fn() }; - mockLogger = { debug: vi.fn(), info: vi.fn(), warn: vi.fn(), error: vi.fn() }; - - TestBed.configureTestingModule({ - providers: [ - VersionCheckService, - NotificationService, - { provide: RestService, useValue: mockRestService }, - { provide: LoggerService, useValue: mockLogger }, - ], - }); - - notificationService = TestBed.inject(NotificationService); - }); - - it('should show notification when a newer release is available', () => { - // 99.0.0 is chosen because it's always newer than the current package.json - // version, regardless of how that version evolves. - mockRestService.sendRequest.mockReturnValue( - of(makeReaction({ success: true, data: makeGithubResponse('v99.0.0') })), - ); - - let notifications: Notification[] = []; - notificationService.notifications$.subscribe(n => notifications = n); - - createService(); - - expect(notifications.length).toBe(1); - expect(notifications[0].level).toBe(NotificationLevel.INFO); - expect(notifications[0].text).toContain('new version'); - }); - - it('should not show notification when release is same version', () => { - // Use the live package.json version so this test stays correct - // across version bumps. - mockRestService.sendRequest.mockReturnValue( - of(makeReaction({ success: true, data: makeGithubResponse('v' + packageJson.version) })), - ); - - let notifications: Notification[] = []; - notificationService.notifications$.subscribe(n => notifications = n); - - createService(); - - expect(notifications.length).toBe(0); - }); - - it('should not show notification when release is older', () => { - mockRestService.sendRequest.mockReturnValue( - of(makeReaction({ success: true, data: makeGithubResponse('v0.1.0') })), - ); - - let notifications: Notification[] = []; - notificationService.notifications$.subscribe(n => notifications = n); - - createService(); - - expect(notifications.length).toBe(0); - }); - - it('should treat prefixed and non-prefixed releases identically', () => { - // Verify v-prefix stripping by running the same scenario twice — once - // with "v99.0.0", once with "99.0.0" — and asserting identical results. - // The TestBed has to be reset between runs because VersionCheckService - // is a singleton and the version check fires on construction. - function notificationsFor(tag: string): Notification[] { - TestBed.resetTestingModule(); - mockRestService = { sendRequest: vi.fn() }; - mockLogger = { debug: vi.fn(), info: vi.fn(), warn: vi.fn(), error: vi.fn() }; - mockRestService.sendRequest.mockReturnValue( - of(makeReaction({ success: true, data: makeGithubResponse(tag) })), - ); - TestBed.configureTestingModule({ - providers: [ - VersionCheckService, - NotificationService, - { provide: RestService, useValue: mockRestService }, - { provide: LoggerService, useValue: mockLogger }, - ], - }); - const ns = TestBed.inject(NotificationService); - let captured: Notification[] = []; - ns.notifications$.subscribe(n => captured = n); - createService(); - return captured; - } - - const withPrefix = notificationsFor('v99.0.0'); - const withoutPrefix = notificationsFor('99.0.0'); - - expect(withPrefix).toHaveLength(1); - expect(withoutPrefix).toHaveLength(1); - expect(withoutPrefix[0].text).toBe(withPrefix[0].text); - expect(withoutPrefix[0].level).toBe(withPrefix[0].level); - }); - - it('should log warning and not show notification on network error', () => { - mockRestService.sendRequest.mockReturnValue( - of(makeReaction({ success: false, errorMessage: 'Network error' })), - ); - - let notifications: Notification[] = []; - notificationService.notifications$.subscribe(n => notifications = n); - - createService(); - - expect(notifications.length).toBe(0); - expect(mockLogger.warn).toHaveBeenCalled(); - }); - - it('should log a warning and not show a notification when the request hangs past the timeout', () => { - vi.useFakeTimers(); - try { - // NEVER never emits — it simulates a stalled GitHub connection that - // hangs forever rather than erroring. Without the timeout this would - // leave the request open indefinitely. - mockRestService.sendRequest.mockReturnValue(NEVER); - - let notifications: Notification[] = []; - notificationService.notifications$.subscribe(n => notifications = n); - - createService(); - - // Nothing should happen before the 10s timeout window elapses. - expect(mockLogger.warn).not.toHaveBeenCalled(); - - // Advance past the timeout; the timeout operator should fire. - vi.advanceTimersByTime(10001); - - expect(notifications.length).toBe(0); - expect(mockLogger.warn).toHaveBeenCalled(); - } finally { - vi.useRealTimers(); - } - }); - - it('should log error and not crash on malformed JSON response', () => { - mockRestService.sendRequest.mockReturnValue( - of(makeReaction({ success: true, data: 'not valid json {{{' })), - ); - - let notifications: Notification[] = []; - notificationService.notifications$.subscribe(n => notifications = n); - - createService(); - - expect(notifications.length).toBe(0); - expect(mockLogger.error).toHaveBeenCalled(); - }); - - it('should log error and not crash on unexpected JSON structure', () => { - mockRestService.sendRequest.mockReturnValue( - of(makeReaction({ success: true, data: JSON.stringify({ foo: 'bar' }) })), - ); - - let notifications: Notification[] = []; - notificationService.notifications$.subscribe(n => notifications = n); - - createService(); - - expect(notifications.length).toBe(0); - expect(mockLogger.error).toHaveBeenCalled(); - }); - - it('should include the release URL in the notification text', () => { - const url = 'https://github.com/nitrobass24/seedsync/releases/tag/v99.0.0'; - mockRestService.sendRequest.mockReturnValue( - of(makeReaction({ success: true, data: makeGithubResponse('v99.0.0', url) })), - ); - - let notifications: Notification[] = []; - notificationService.notifications$.subscribe(n => notifications = n); - - createService(); - - expect(notifications).toHaveLength(1); - expect(notifications[0].text).toContain(url); - }); -}); diff --git a/src/angular/src/app/services/utils/version-check.service.ts b/src/angular/src/app/services/utils/version-check.service.ts deleted file mode 100644 index f545916a..00000000 --- a/src/angular/src/app/services/utils/version-check.service.ts +++ /dev/null @@ -1,93 +0,0 @@ -import { Injectable, inject } from '@angular/core'; -import { compareVersions } from 'compare-versions'; -import { EMPTY } from 'rxjs'; -import { catchError, timeout } from 'rxjs/operators'; - -import { RestService, WebReaction } from './rest.service'; -import { LoggerService } from './logger.service'; -import { NotificationService } from './notification.service'; -import { NotificationLevel, createNotification } from '../../models/notification'; -import { Localization } from '../../models/localization'; - -import packageJson from '../../../../package.json'; - -@Injectable({ providedIn: 'root' }) -export class VersionCheckService { - private readonly GITHUB_LATEST_RELEASE_URL = - 'https://api.github.com/repos/nitrobass24/seedsync/releases/latest'; - - private readonly restService = inject(RestService); - private readonly notificationService = inject(NotificationService); - private readonly logger = inject(LoggerService); - - constructor() { - this.checkVersion(); - } - - private checkVersion(): void { - this.restService - .sendRequest(this.GITHUB_LATEST_RELEASE_URL) - .pipe( - // A stalled GitHub connection would otherwise leave this request open - // indefinitely (the browser applies no default timeout). The version - // banner is best-effort, so bound the wait and surface a timeout - // instead of hanging silently. - timeout({ each: 10000 }), - catchError((e: unknown) => { - this.logger.warn('Version check request timed out or failed: %O', e); - return EMPTY; - }), - ) - .subscribe((reaction) => this.handleReaction(reaction)); - } - - private handleReaction(reaction: WebReaction): void { - if (reaction.success) { - let latestVersion: string; - let url: string; - try { - const jsonResponse: unknown = JSON.parse(reaction.data!); - if (!isGitHubReleaseResponse(jsonResponse)) { - this.logger.error('Unexpected github response: %O', jsonResponse); - return; - } - latestVersion = jsonResponse.tag_name; - url = jsonResponse.html_url; - } catch (e) { - this.logger.error('Unable to parse github response: %O', e); - return; - } - const message = Localization.Notification.NEW_VERSION_AVAILABLE(url); - this.logger.debug('Latest version: ', message); - if (isVersionNewer(latestVersion)) { - this.notificationService.show( - createNotification(NotificationLevel.INFO, message, true), - ); - } - } else { - this.logger.warn('Unable to fetch latest version info: %O', reaction); - } - } -} - -interface GitHubReleaseResponse { - tag_name: string; - html_url: string; -} - -function isGitHubReleaseResponse(value: unknown): value is GitHubReleaseResponse { - return ( - typeof value === 'object' && - value !== null && - typeof (value as GitHubReleaseResponse).tag_name === 'string' && - typeof (value as GitHubReleaseResponse).html_url === 'string' - ); -} - -function isVersionNewer(version: string): boolean { - // Remove the 'v' at the beginning, if any - version = version.replace(/^v/, ''); - // Replace - with . - version = version.replace(/-/g, '.'); - return compareVersions(version, packageJson.version) > 0; -} From 7f718c8849a93b3c3f9176157ccf651cd73b2eeb Mon Sep 17 00:00:00 2001 From: nitrobass24 Date: Sun, 16 Aug 2026 23:46:46 -0500 Subject: [PATCH 11/39] chore(infra): delete dead files, Alpine-only entrypoint (#678) - Delete src/docker/wait-for-it.sh (zero references; CI/Makefile use inline curl retry loops) - Delete src/pyinstaller_hooks/ (PyInstaller/DEB build removed long ago; patoolib not in pyproject/uv.lock); refresh the stale multi-stage build section in doc/DeveloperReadme.md - Delete src/angular/README.md (stale Angular CLI scaffold text) - Delete website/wrangler.toml (placeholder Cloudflare config; deploy is actions/deploy-pages) and fix website/README.md's stale Cloudflare deploy instructions - Remove dead Debian branches (groupadd/useradd/usermod fallbacks) from entrypoint.sh; runtime has been Alpine-only since #231 - Merge Dockerfile.dockerignore into the root .dockerignore (BuildKit was silently using only the Dockerfile-adjacent file for the image build); drop stale src/e2e and redundant download-scenarios.md entries - Gitignore local scratch/design .md files next to REVIEW.md entries Verified: docker build from repo root (41MB image, not larger), container starts with PUID=1234/PGID=4321, addgroup/adduser create seedsync user, /config owned 1234:4321, web UI answers on 8800. Co-Authored-By: Claude Fable 5 --- .dockerignore | 13 +- .gitignore | 7 + doc/DeveloperReadme.md | 11 +- src/angular/README.md | 59 ------ .../docker-image/Dockerfile.dockerignore | 14 -- src/docker/build/docker-image/entrypoint.sh | 20 +- src/docker/wait-for-it.sh | 182 ------------------ src/pyinstaller_hooks/hook-patoolib.py | 77 -------- website/README.md | 11 +- website/wrangler.toml | 20 -- 10 files changed, 27 insertions(+), 387 deletions(-) delete mode 100644 src/angular/README.md delete mode 100644 src/docker/build/docker-image/Dockerfile.dockerignore delete mode 100755 src/docker/wait-for-it.sh delete mode 100644 src/pyinstaller_hooks/hook-patoolib.py delete mode 100644 website/wrangler.toml diff --git a/.dockerignore b/.dockerignore index 215cdc2e..5040899e 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,18 +1,21 @@ .git .github +.idea .DS_Store *.md !src/**/*.md -download-scenarios.md website/ -src/angular/node_modules +build +**/node_modules src/angular/.angular src/angular/dist src/angular/coverage -src/e2e src/docker/build/test-image src/python/.local -src/python/.venv +src/python/build +src/python/tests +src/python/typings +**/.venv src/python/venv **/__pycache__ **/*.pyc @@ -20,6 +23,8 @@ src/python/venv **/*.egg-info **/.pytest_cache **/.mypy_cache +**/.ruff_cache +**/pyrightconfig.json .claude .env .env.* diff --git a/.gitignore b/.gitignore index afd36252..86dcf92a 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,10 @@ dev-config/ # Local-only audit artifacts — contain sensitive security details, keep out of git SECURITY_FINDINGS.md REVIEW.md + +# Local scratch/design notes — keep out of git +download-scenarios.md +feature-archive-cleanup-design.md +feature-ftps-support-design.md +fix-654-semaphore-diet-design.md +ftps-jobs-v-samples.md diff --git a/doc/DeveloperReadme.md b/doc/DeveloperReadme.md index a15c509d..5cefed44 100644 --- a/doc/DeveloperReadme.md +++ b/doc/DeveloperReadme.md @@ -128,17 +128,16 @@ docker inspect seedsync-dev The Dockerfile uses three stages: -1. **angular-builder**: Builds the Angular frontend with Node 12 -2. **scanfs-builder**: Builds the scanfs binary with PyInstaller -3. **runtime**: Final slim Python 3.12 image with all components +1. **angular-builder**: Builds the Angular frontend with Node 22 +2. **python-deps**: Installs Python dependencies with uv +3. **runtime**: Final Alpine image with all components ### Image Size -Target: ~240MB (optimized from original 439MB) +Target: ~45MB (Alpine-only, multi-arch) Key optimizations: -- Using `python:3.12-slim-bookworm` base -- pip instead of Poetry +- Using `alpine:3.23` base - Minimal runtime dependencies - No documentation tools in runtime diff --git a/src/angular/README.md b/src/angular/README.md deleted file mode 100644 index 82027d61..00000000 --- a/src/angular/README.md +++ /dev/null @@ -1,59 +0,0 @@ -# Seedsync - -This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 21.1.3. - -## Development server - -To start a local development server, run: - -```bash -ng serve -``` - -Once the server is running, open your browser and navigate to `http://localhost:4200/`. The application will automatically reload whenever you modify any of the source files. - -## Code scaffolding - -Angular CLI includes powerful code scaffolding tools. To generate a new component, run: - -```bash -ng generate component component-name -``` - -For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run: - -```bash -ng generate --help -``` - -## Building - -To build the project run: - -```bash -ng build -``` - -This will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed. - -## Running unit tests - -To execute unit tests with the [Vitest](https://vitest.dev/) test runner, use the following command: - -```bash -ng test -``` - -## Running end-to-end tests - -For end-to-end (e2e) testing, run: - -```bash -ng e2e -``` - -Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs. - -## Additional Resources - -For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page. diff --git a/src/docker/build/docker-image/Dockerfile.dockerignore b/src/docker/build/docker-image/Dockerfile.dockerignore deleted file mode 100644 index 67f23b6e..00000000 --- a/src/docker/build/docker-image/Dockerfile.dockerignore +++ /dev/null @@ -1,14 +0,0 @@ -**/*.pyc -**/__pycache__ -**/node_modules -**/.venv -**/.ruff_cache -**/.pytest_cache -**/pyrightconfig.json -.git -.idea -build -src/angular/dist -src/python/tests -src/python/build -src/python/typings diff --git a/src/docker/build/docker-image/entrypoint.sh b/src/docker/build/docker-image/entrypoint.sh index f93b87a3..1371f2a3 100644 --- a/src/docker/build/docker-image/entrypoint.sh +++ b/src/docker/build/docker-image/entrypoint.sh @@ -8,8 +8,6 @@ set -e # - PUID=1000, PGID=1000 (typical single-user setup) # - PUID=1026, PGID=100 (Synology with "users" group) # - Custom user:group like "torrentapp:media" -# -# Compatible with both Debian (groupadd/useradd) and Alpine (addgroup/adduser). # Get user/group IDs from environment (with defaults) USER_ID=${PUID:-1000} @@ -25,11 +23,7 @@ if [ -n "$EXISTING_GROUP" ]; then else GROUPNAME="seedsync" echo "Creating group: $GROUPNAME (GID=$GROUP_ID)" - if command -v groupadd >/dev/null 2>&1; then - groupadd -g "$GROUP_ID" "$GROUPNAME" - else - addgroup -g "$GROUP_ID" -S "$GROUPNAME" - fi + addgroup -g "$GROUP_ID" -S "$GROUPNAME" fi # Resolve user: check if UID already exists @@ -40,20 +34,12 @@ if [ -n "$EXISTING_USER" ]; then # Ensure user is in the target group (may differ from their primary group) if ! id -nG "$USERNAME" | grep -qw "$GROUPNAME"; then - if command -v usermod >/dev/null 2>&1; then - usermod -aG "$GROUPNAME" "$USERNAME" 2>/dev/null || true - else - addgroup "$USERNAME" "$GROUPNAME" 2>/dev/null || true - fi + addgroup "$USERNAME" "$GROUPNAME" 2>/dev/null || true fi else USERNAME="seedsync" echo "Creating user: $USERNAME (UID=$USER_ID, GID=$GROUP_ID)" - if command -v useradd >/dev/null 2>&1; then - useradd -u "$USER_ID" -g "$GROUP_ID" -d /home/$USERNAME -m -s /bin/sh "$USERNAME" - else - adduser -u "$USER_ID" -G "$GROUPNAME" -h /home/$USERNAME -s /bin/sh -D "$USERNAME" - fi + adduser -u "$USER_ID" -G "$GROUPNAME" -h /home/$USERNAME -s /bin/sh -D "$USERNAME" fi # Get the user's home directory (may not be /home/$USERNAME for existing users) diff --git a/src/docker/wait-for-it.sh b/src/docker/wait-for-it.sh deleted file mode 100755 index 5e8679e5..00000000 --- a/src/docker/wait-for-it.sh +++ /dev/null @@ -1,182 +0,0 @@ -#!/usr/bin/env bash -# Use this script to test if a given TCP host/port are available - -WAITFORIT_cmdname=${0##*/} - -echoerr() { if [[ $WAITFORIT_QUIET -ne 1 ]]; then echo "$@" 1>&2; fi } - -usage() -{ - cat << USAGE >&2 -Usage: - $WAITFORIT_cmdname host:port [-s] [-t timeout] [-- command args] - -h HOST | --host=HOST Host or IP under test - -p PORT | --port=PORT TCP port under test - Alternatively, you specify the host and port as host:port - -s | --strict Only execute subcommand if the test succeeds - -q | --quiet Don't output any status messages - -t TIMEOUT | --timeout=TIMEOUT - Timeout in seconds, zero for no timeout - -- COMMAND ARGS Execute command with args after the test finishes -USAGE - exit 1 -} - -wait_for() -{ - if [[ $WAITFORIT_TIMEOUT -gt 0 ]]; then - echoerr "$WAITFORIT_cmdname: waiting $WAITFORIT_TIMEOUT seconds for $WAITFORIT_HOST:$WAITFORIT_PORT" - else - echoerr "$WAITFORIT_cmdname: waiting for $WAITFORIT_HOST:$WAITFORIT_PORT without a timeout" - fi - WAITFORIT_start_ts=$(date +%s) - while : - do - if [[ $WAITFORIT_ISBUSY -eq 1 ]]; then - nc -z $WAITFORIT_HOST $WAITFORIT_PORT - WAITFORIT_result=$? - else - (echo > /dev/tcp/$WAITFORIT_HOST/$WAITFORIT_PORT) >/dev/null 2>&1 - WAITFORIT_result=$? - fi - if [[ $WAITFORIT_result -eq 0 ]]; then - WAITFORIT_end_ts=$(date +%s) - echoerr "$WAITFORIT_cmdname: $WAITFORIT_HOST:$WAITFORIT_PORT is available after $((WAITFORIT_end_ts - WAITFORIT_start_ts)) seconds" - break - fi - sleep 1 - done - return $WAITFORIT_result -} - -wait_for_wrapper() -{ - # In order to support SIGINT during timeout: http://unix.stackexchange.com/a/57692 - if [[ $WAITFORIT_QUIET -eq 1 ]]; then - timeout $WAITFORIT_BUSYTIMEFLAG $WAITFORIT_TIMEOUT $0 --quiet --child --host=$WAITFORIT_HOST --port=$WAITFORIT_PORT --timeout=$WAITFORIT_TIMEOUT & - else - timeout $WAITFORIT_BUSYTIMEFLAG $WAITFORIT_TIMEOUT $0 --child --host=$WAITFORIT_HOST --port=$WAITFORIT_PORT --timeout=$WAITFORIT_TIMEOUT & - fi - WAITFORIT_PID=$! - trap "kill -INT -$WAITFORIT_PID" INT - wait $WAITFORIT_PID - WAITFORIT_RESULT=$? - if [[ $WAITFORIT_RESULT -ne 0 ]]; then - echoerr "$WAITFORIT_cmdname: timeout occurred after waiting $WAITFORIT_TIMEOUT seconds for $WAITFORIT_HOST:$WAITFORIT_PORT" - fi - return $WAITFORIT_RESULT -} - -# process arguments -while [[ $# -gt 0 ]] -do - case "$1" in - *:* ) - WAITFORIT_hostport=(${1//:/ }) - WAITFORIT_HOST=${WAITFORIT_hostport[0]} - WAITFORIT_PORT=${WAITFORIT_hostport[1]} - shift 1 - ;; - --child) - WAITFORIT_CHILD=1 - shift 1 - ;; - -q | --quiet) - WAITFORIT_QUIET=1 - shift 1 - ;; - -s | --strict) - WAITFORIT_STRICT=1 - shift 1 - ;; - -h) - WAITFORIT_HOST="$2" - if [[ $WAITFORIT_HOST == "" ]]; then break; fi - shift 2 - ;; - --host=*) - WAITFORIT_HOST="${1#*=}" - shift 1 - ;; - -p) - WAITFORIT_PORT="$2" - if [[ $WAITFORIT_PORT == "" ]]; then break; fi - shift 2 - ;; - --port=*) - WAITFORIT_PORT="${1#*=}" - shift 1 - ;; - -t) - WAITFORIT_TIMEOUT="$2" - if [[ $WAITFORIT_TIMEOUT == "" ]]; then break; fi - shift 2 - ;; - --timeout=*) - WAITFORIT_TIMEOUT="${1#*=}" - shift 1 - ;; - --) - shift - WAITFORIT_CLI=("$@") - break - ;; - --help) - usage - ;; - *) - echoerr "Unknown argument: $1" - usage - ;; - esac -done - -if [[ "$WAITFORIT_HOST" == "" || "$WAITFORIT_PORT" == "" ]]; then - echoerr "Error: you need to provide a host and port to test." - usage -fi - -WAITFORIT_TIMEOUT=${WAITFORIT_TIMEOUT:-15} -WAITFORIT_STRICT=${WAITFORIT_STRICT:-0} -WAITFORIT_CHILD=${WAITFORIT_CHILD:-0} -WAITFORIT_QUIET=${WAITFORIT_QUIET:-0} - -# Check to see if timeout is from busybox? -WAITFORIT_TIMEOUT_PATH=$(type -p timeout) -WAITFORIT_TIMEOUT_PATH=$(realpath $WAITFORIT_TIMEOUT_PATH 2>/dev/null || readlink -f $WAITFORIT_TIMEOUT_PATH) - -WAITFORIT_BUSYTIMEFLAG="" -if [[ $WAITFORIT_TIMEOUT_PATH =~ "busybox" ]]; then - WAITFORIT_ISBUSY=1 - # Check if busybox timeout uses -t flag - # (recent Alpine versions don't support -t anymore) - if timeout &>/dev/stdout | grep -q -e '-t '; then - WAITFORIT_BUSYTIMEFLAG="-t" - fi -else - WAITFORIT_ISBUSY=0 -fi - -if [[ $WAITFORIT_CHILD -gt 0 ]]; then - wait_for - WAITFORIT_RESULT=$? - exit $WAITFORIT_RESULT -else - if [[ $WAITFORIT_TIMEOUT -gt 0 ]]; then - wait_for_wrapper - WAITFORIT_RESULT=$? - else - wait_for - WAITFORIT_RESULT=$? - fi -fi - -if [[ $WAITFORIT_CLI != "" ]]; then - if [[ $WAITFORIT_RESULT -ne 0 && $WAITFORIT_STRICT -eq 1 ]]; then - echoerr "$WAITFORIT_cmdname: strict mode, refusing to execute subprocess" - exit $WAITFORIT_RESULT - fi - exec "${WAITFORIT_CLI[@]}" -else - exit $WAITFORIT_RESULT -fi diff --git a/src/pyinstaller_hooks/hook-patoolib.py b/src/pyinstaller_hooks/hook-patoolib.py deleted file mode 100644 index ba885cfa..00000000 --- a/src/pyinstaller_hooks/hook-patoolib.py +++ /dev/null @@ -1,77 +0,0 @@ -# ----------------------------------------------------------------------------- -# Copyright (c) 2013-2017, PyInstaller Development Team. -# -# Distributed under the terms of the GNU General Public License with exception -# for distributing bootloader. -# -# The full license is in the file COPYING.txt, distributed with this software. -# ----------------------------------------------------------------------------- - - -""" -patoolib uses importlib and pyinstaller doesn't find it and add it to the list of needed modules -""" - -hiddenimports = [ - "patoolib.programs", - "patoolib.programs.ar", - "patoolib.programs.arc", - "patoolib.programs.archmage", - "patoolib.programs.bsdcpio", - "patoolib.programs.bsdtar", - "patoolib.programs.bzip2", - "patoolib.programs.cabextract", - "patoolib.programs.chmlib", - "patoolib.programs.clzip", - "patoolib.programs.compress", - "patoolib.programs.cpio", - "patoolib.programs.dpkg", - "patoolib.programs.flac", - "patoolib.programs.genisoimage", - "patoolib.programs.gzip", - "patoolib.programs.isoinfo", - "patoolib.programs.lbzip2", - "patoolib.programs.lcab", - "patoolib.programs.lha", - "patoolib.programs.lhasa", - "patoolib.programs.lrzip", - "patoolib.programs.lzip", - "patoolib.programs.lzma", - "patoolib.programs.lzop", - "patoolib.programs.mac", - "patoolib.programs.nomarch", - "patoolib.programs.p7azip", - "patoolib.programs.p7rzip", - "patoolib.programs.p7zip", - "patoolib.programs.pbzip2", - "patoolib.programs.pdlzip", - "patoolib.programs.pigz", - "patoolib.programs.plzip", - "patoolib.programs.py_bz2", - "patoolib.programs.py_echo", - "patoolib.programs.py_gzip", - "patoolib.programs.py_lzma", - "patoolib.programs.py_tarfile", - "patoolib.programs.py_zipfile", - "patoolib.programs.rar", - "patoolib.programs.rpm", - "patoolib.programs.rpm2cpio", - "patoolib.programs.rzip", - "patoolib.programs.shar", - "patoolib.programs.shorten", - "patoolib.programs.star", - "patoolib.programs.tar", - "patoolib.programs.unace", - "patoolib.programs.unadf", - "patoolib.programs.unalz", - "patoolib.programs.uncompress", - "patoolib.programs.unrar", - "patoolib.programs.unshar", - "patoolib.programs.unzip", - "patoolib.programs.xdms", - "patoolib.programs.xz", - "patoolib.programs.zip", - "patoolib.programs.zoo", - "patoolib.programs.zopfli", - "patoolib.programs.zpaq", -] diff --git a/website/README.md b/website/README.md index ab72d82c..067cbd9d 100644 --- a/website/README.md +++ b/website/README.md @@ -1,6 +1,6 @@ # SeedSync Docs Website -Static documentation site for the SeedSync project, built with Docusaurus and deployed to Cloudflare Workers. +Static documentation site for the SeedSync project, built with Docusaurus and deployed to GitHub Pages. ## Requirements @@ -27,10 +27,5 @@ npm run build ## Deploy -This project deploys to Cloudflare Workers using Wrangler and `wrangler.toml`. - -```bash -npm run deploy -``` - -For CI/CD, see `.github/workflows/deploy.yml`. +Deployment is automated: the `docs-pages.yml` GitHub Actions workflow builds +the site and publishes it to GitHub Pages whenever `website/` changes. diff --git a/website/wrangler.toml b/website/wrangler.toml deleted file mode 100644 index ca0fcbfb..00000000 --- a/website/wrangler.toml +++ /dev/null @@ -1,20 +0,0 @@ -name = "seedsync-website" -compatibility_date = "2026-01-26" - -# Disable workers.dev when routing a custom domain. -workers_dev = false - -# Fill these in from your Cloudflare dashboard. -account_id = "YOUR_ACCOUNT_ID" -zone_id = "YOUR_ZONE_ID" - -# Serve the docs under https://nitrobass24.com/seedsync -route = "nitrobass24.com/seedsync/*" - -[assets] -# Docusaurus outputs static files into ./build. -directory = "./build" -# Use static 404 pages for missing routes. -not_found_handling = "404-page" -# Keep trailing-slash behavior consistent with Docusaurus. -html_handling = "auto-trailing-slash" From 2558f6ccce8a8511506d045d221e6495b9e69177 Mon Sep 17 00:00:00 2001 From: nitrobass24 Date: Mon, 17 Aug 2026 07:50:49 -0500 Subject: [PATCH 12/39] test(angular): cover partial StreamEventHandler implementations (#675) Review follow-up: the interface members became optional but the spec only exercised handlers implementing all four callbacks. Co-Authored-By: Claude Fable 5 --- .../base/stream-dispatch.service.spec.ts | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/src/angular/src/app/services/base/stream-dispatch.service.spec.ts b/src/angular/src/app/services/base/stream-dispatch.service.spec.ts index e478a245..8e3d0049 100644 --- a/src/angular/src/app/services/base/stream-dispatch.service.spec.ts +++ b/src/angular/src/app/services/base/stream-dispatch.service.spec.ts @@ -359,6 +359,57 @@ describe("StreamDispatchService", () => { expect(latestEventSource().url).toBe("/server/stream"); }); + // --- Partial handlers (all interface members are optional) --- + + it("should accept a handler that omits every callback", () => { + vi.useFakeTimers(); + service.registerHandler({}); + + service.start(); + const es = latestEventSource(); + es.simulateOpen(); + es.simulateError(); + + expect(es.closed).toBe(true); + }); + + it("should deliver events to a handler implementing only getEventNames and onEvent", () => { + vi.useFakeTimers(); + const onEvent = vi.fn(); + service.registerHandler({ getEventNames: () => ["model-init"], onEvent }); + + service.start(); + const es = latestEventSource(); + es.simulateOpen(); + es.simulateEvent("model-init", '{"test": true}'); + es.simulateError(); + + expect(onEvent).toHaveBeenCalledWith("model-init", '{"test": true}'); + }); + + it("should not throw when an event arrives for a handler without onEvent", () => { + service.registerHandler({ getEventNames: () => ["model-init"] }); + + service.start(); + + expect(() => latestEventSource().simulateEvent("model-init", "data")).not.toThrow(); + }); + + it("should still notify full handlers when a partial handler omits getEventNames", () => { + const partial = { onConnected: vi.fn() }; + const full = makeHandler(["model-init"]); + service.registerHandler(partial); + service.registerHandler(full); + + service.start(); + latestEventSource().simulateOpen(); + latestEventSource().simulateEvent("model-init", "data"); + + expect(partial.onConnected).toHaveBeenCalled(); + expect(full.onConnected).toHaveBeenCalled(); + expect(full.onEvent).toHaveBeenCalledWith("model-init", "data"); + }); + // --- Stale EventSource guard --- it("should ignore error from a stale EventSource after API key change", () => { From 3ff7eb7dada6e527c839b83c2075ebcb9537cd2e Mon Sep 17 00:00:00 2001 From: nitrobass24 Date: Mon, 24 Aug 2026 13:46:41 -0500 Subject: [PATCH 13/39] refactor(angular): drop @fortawesome/fontawesome-free for inline SVGs (#677) Only three glyphs were used (thumbtack, moon, sun). Replace them with inline currentColor SVGs, remove the three FA stylesheets from angular.json, and drop the dependency. Global styles CSS: 325 kB -> 234 kB (41 -> 23 kB gzipped); webfont files no longer shipped. Co-Authored-By: Claude Fable 5 --- src/angular/angular.json | 3 - src/angular/package-lock.json | 10 - src/angular/package.json | 1 - .../pages/files/file-options.component.html | 466 +++++++++--------- .../src/app/pages/main/sidebar.component.html | 8 +- .../src/app/pages/main/sidebar.component.scss | 216 ++++---- 6 files changed, 344 insertions(+), 360 deletions(-) diff --git a/src/angular/angular.json b/src/angular/angular.json index c93e270f..d831dd66 100644 --- a/src/angular/angular.json +++ b/src/angular/angular.json @@ -39,9 +39,6 @@ ], "styles": [ "node_modules/bootstrap/dist/css/bootstrap.min.css", - "node_modules/@fortawesome/fontawesome-free/scss/fontawesome.scss", - "node_modules/@fortawesome/fontawesome-free/scss/solid.scss", - "node_modules/@fortawesome/fontawesome-free/scss/brands.scss", "src/styles.scss" ], "scripts": [ diff --git a/src/angular/package-lock.json b/src/angular/package-lock.json index 08393e07..5503684f 100644 --- a/src/angular/package-lock.json +++ b/src/angular/package-lock.json @@ -15,7 +15,6 @@ "@angular/forms": "^22.1.3", "@angular/platform-browser": "^22.1.3", "@angular/router": "^22.1.3", - "@fortawesome/fontawesome-free": "^7.3.1", "bootstrap": "^5.3.8", "rxjs": "~7.8.0", "tslib": "^2.3.0" @@ -1827,15 +1826,6 @@ } } }, - "node_modules/@fortawesome/fontawesome-free": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-7.3.1.tgz", - "integrity": "sha512-wmglKKPDIkgV3aWlZzWECCPoGIkYCulzBwxG9+w7rc5BGapZ6cPMpoPOT8k36J0Ni7PPX6c/rsoMWfS4d1MUMg==", - "license": "(CC-BY-4.0 AND OFL-1.1 AND MIT)", - "engines": { - "node": ">=6" - } - }, "node_modules/@harperfast/extended-iterable": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/@harperfast/extended-iterable/-/extended-iterable-1.0.3.tgz", diff --git a/src/angular/package.json b/src/angular/package.json index a6044e22..7a18ae0e 100644 --- a/src/angular/package.json +++ b/src/angular/package.json @@ -31,7 +31,6 @@ "@angular/forms": "^22.1.3", "@angular/platform-browser": "^22.1.3", "@angular/router": "^22.1.3", - "@fortawesome/fontawesome-free": "^7.3.1", "bootstrap": "^5.3.8", "rxjs": "~7.8.0", "tslib": "^2.3.0" diff --git a/src/angular/src/app/pages/files/file-options.component.html b/src/angular/src/app/pages/files/file-options.component.html index e06ccef9..5e840e0c 100644 --- a/src/angular/src/app/pages/files/file-options.component.html +++ b/src/angular/src/app/pages/files/file-options.component.html @@ -1,233 +1,233 @@ -
- - - - - - - - -
- -
-
+
+ + + + + + + + +
+ +
+
diff --git a/src/angular/src/app/pages/main/sidebar.component.html b/src/angular/src/app/pages/main/sidebar.component.html index d7f71e15..d4ae3db0 100644 --- a/src/angular/src/app/pages/main/sidebar.component.html +++ b/src/angular/src/app/pages/main/sidebar.component.html @@ -18,7 +18,13 @@ diff --git a/src/angular/src/app/pages/main/sidebar.component.scss b/src/angular/src/app/pages/main/sidebar.component.scss index 09de41cf..31fce387 100644 --- a/src/angular/src/app/pages/main/sidebar.component.scss +++ b/src/angular/src/app/pages/main/sidebar.component.scss @@ -1,112 +1,104 @@ -@use '../../common/common' as *; - -#sidebar { - .button { - /* Reset native
- @if (discordResult) { - - {{ discordResult.message }} - - } - -
- - @if (telegramResult) { - - {{ telegramResult.message }} - - } -
+ @for (channel of CHANNELS; track channel) { +
+ + @if (results[channel]; as result) { + + {{ result.message }} + + } +
+ } diff --git a/src/angular/src/app/pages/settings/settings-page.component.spec.ts b/src/angular/src/app/pages/settings/settings-page.component.spec.ts index 4594eac6..94ed5774 100644 --- a/src/angular/src/app/pages/settings/settings-page.component.spec.ts +++ b/src/angular/src/app/pages/settings/settings-page.component.spec.ts @@ -1,24 +1,24 @@ import '@angular/compiler'; import { describe, it, expect } from 'vitest'; -import { SettingsPageComponent } from './settings-page.component'; -import { FTPS_ONLY_NOTE, IOptionsContext } from './options-list'; - -interface SettingsPageStatics { - buildServerContext(hasEnabledPairs: boolean): IOptionsContext; - buildFtpsContext(protocolIsSftp: boolean): IOptionsContext; - buildAutoqueueContext(hasEnabledPairs: boolean): IOptionsContext; - OVERRIDE_NOTE: string; -} -const settingsStatics = SettingsPageComponent as unknown as SettingsPageStatics; +import { + FTPS_ONLY_NOTE, + IOptionsContext, + OVERRIDE_NOTE, + OPTIONS_CONTEXT_AUTOQUEUE, + OPTIONS_CONTEXT_FTPS, + OPTIONS_CONTEXT_SERVER, + applyDisableRules, +} from './options-list'; + +const inactive = { pairsEnabled: false, validateDisabled: false, protocolSftp: false }; const buildServerContext = (hasEnabledPairs: boolean): IOptionsContext => - settingsStatics.buildServerContext(hasEnabledPairs); + applyDisableRules(OPTIONS_CONTEXT_SERVER, { ...inactive, pairsEnabled: hasEnabledPairs }); const buildFtpsContext = (protocolIsSftp: boolean): IOptionsContext => - settingsStatics.buildFtpsContext(protocolIsSftp); + applyDisableRules(OPTIONS_CONTEXT_FTPS, { ...inactive, protocolSftp: protocolIsSftp }); const buildAutoqueueContext = (hasEnabledPairs: boolean): IOptionsContext => - settingsStatics.buildAutoqueueContext(hasEnabledPairs); -const OVERRIDE_NOTE = settingsStatics.OVERRIDE_NOTE; + applyDisableRules(OPTIONS_CONTEXT_AUTOQUEUE, { ...inactive, pairsEnabled: hasEnabledPairs }); -describe('SettingsPageComponent.buildServerContext', () => { +describe('applyDisableRules: buildServerContext', () => { it('should disable remote_path and local_path when pairs are enabled', () => { const ctx = buildServerContext(true); const remotePath = ctx.options.find((o) => o.valuePath[1] === 'remote_path')!; @@ -51,7 +51,7 @@ describe('SettingsPageComponent.buildServerContext', () => { }); }); -describe('SettingsPageComponent.buildFtpsContext', () => { +describe('applyDisableRules: buildFtpsContext', () => { const ftpOnlyPaths = ['remote_ftp_port', 'ftp_ssl_verify_certificate']; it('disables the FTP-only options when the protocol is sftp', () => { @@ -77,7 +77,7 @@ describe('SettingsPageComponent.buildFtpsContext', () => { }); }); -describe('SettingsPageComponent.buildAutoqueueContext', () => { +describe('applyDisableRules: buildAutoqueueContext', () => { it('should disable enabled checkbox when pairs are enabled', () => { const ctx = buildAutoqueueContext(true); const enabled = ctx.options.find((o) => o.valuePath[1] === 'enabled')!; diff --git a/src/angular/src/app/pages/settings/settings-page.component.ts b/src/angular/src/app/pages/settings/settings-page.component.ts index 726680f7..9a2402b3 100644 --- a/src/angular/src/app/pages/settings/settings-page.component.ts +++ b/src/angular/src/app/pages/settings/settings-page.component.ts @@ -1,12 +1,13 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, DestroyRef, OnInit, inject } from '@angular/core'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; -import { AsyncPipe, NgTemplateOutlet } from '@angular/common'; +import { AsyncPipe, NgTemplateOutlet, TitleCasePipe } from '@angular/common'; import { distinctUntilChanged, map } from 'rxjs'; import { LoggerService } from '../../services/utils/logger.service'; import { ConfigService } from '../../services/settings/config.service'; import { NotificationService } from '../../services/utils/notification.service'; -import { NotificationsService, TestResult } from '../../services/settings/notifications.service'; +import { NotificationChannel, NotificationsService, NOTIFICATION_CHANNELS } from '../../services/settings/notifications.service'; +import { TestResult } from '../../services/utils/test-result'; import { ServerCommandService } from '../../services/server/server-command.service'; import { ConnectedService } from '../../services/utils/connected.service'; import { PathPairsService } from '../../services/settings/path-pairs.service'; @@ -18,9 +19,10 @@ import { OptionComponent, OptionValue } from './option.component'; import { PathPairsComponent } from './path-pairs.component'; import { IntegrationsComponent } from './integrations.component'; import { + ActiveDisableFlags, ConfigValuePath, IOptionsContext, - OVERRIDE_NOTE, + applyDisableRules, getConfigValue, OPTIONS_CONTEXT_SERVER, OPTIONS_CONTEXT_FTPS, @@ -42,6 +44,7 @@ import { imports: [ AsyncPipe, NgTemplateOutlet, + TitleCasePipe, OptionComponent, PathPairsComponent, IntegrationsComponent, @@ -56,14 +59,17 @@ export class SettingsPageComponent implements OnInit { ftpsContext: IOptionsContext = OPTIONS_CONTEXT_FTPS; autoqueueContext: IOptionsContext = OPTIONS_CONTEXT_AUTOQUEUE; validateContext: IOptionsContext = OPTIONS_CONTEXT_VALIDATE; - readonly OPTIONS_CONTEXT_DISCOVERY = OPTIONS_CONTEXT_DISCOVERY; - readonly OPTIONS_CONTEXT_CONNECTIONS = OPTIONS_CONTEXT_CONNECTIONS; - readonly OPTIONS_CONTEXT_OTHER = OPTIONS_CONTEXT_OTHER; - readonly OPTIONS_CONTEXT_STAGING = OPTIONS_CONTEXT_STAGING; - readonly OPTIONS_CONTEXT_EXTRACT = OPTIONS_CONTEXT_EXTRACT; - readonly OPTIONS_CONTEXT_ADVANCED_LFTP = OPTIONS_CONTEXT_ADVANCED_LFTP; - readonly OPTIONS_CONTEXT_LOGGING = OPTIONS_CONTEXT_LOGGING; - readonly OPTIONS_CONTEXT_NOTIFICATIONS = OPTIONS_CONTEXT_NOTIFICATIONS; + readonly OPTIONS = { + discovery: OPTIONS_CONTEXT_DISCOVERY, + connections: OPTIONS_CONTEXT_CONNECTIONS, + other: OPTIONS_CONTEXT_OTHER, + staging: OPTIONS_CONTEXT_STAGING, + extract: OPTIONS_CONTEXT_EXTRACT, + advancedLftp: OPTIONS_CONTEXT_ADVANCED_LFTP, + logging: OPTIONS_CONTEXT_LOGGING, + notifications: OPTIONS_CONTEXT_NOTIFICATIONS, + }; + readonly CHANNELS = NOTIFICATION_CHANNELS; advancedLftpCollapsed = true; @@ -80,10 +86,10 @@ export class SettingsPageComponent implements OnInit { readonly config$ = this.configService.config$; commandsEnabled = false; - testingDiscord = false; - testingTelegram = false; - discordResult: TestResult | null = null; - telegramResult: TestResult | null = null; + testing: Record = { discord: false, telegram: false }; + results: Record = { discord: null, telegram: null }; + + private readonly active: ActiveDisableFlags = { pairsEnabled: false, validateDisabled: false, protocolSftp: false }; private configRestartNotif: Notification = createNotification( NotificationLevel.INFO, @@ -91,10 +97,6 @@ export class SettingsPageComponent implements OnInit { ); private badValueNotifs = new Map(); - // Retained for the unit spec, which reads this via a statics cast. The - // canonical note now lives next to the option definitions in options-list.ts. - private static readonly OVERRIDE_NOTE = OVERRIDE_NOTE; - ngOnInit(): void { this.connectedService.connected$.pipe( takeUntilDestroyed(this.destroyRef), @@ -113,9 +115,8 @@ export class SettingsPageComponent implements OnInit { distinctUntilChanged(), takeUntilDestroyed(this.destroyRef), ).subscribe((hasEnabledPairs) => { - this.serverContext = SettingsPageComponent.buildServerContext(hasEnabledPairs); - this.autoqueueContext = SettingsPageComponent.buildAutoqueueContext(hasEnabledPairs); - this.cdr.markForCheck(); + this.active.pairsEnabled = hasEnabledPairs; + this.rebuildContexts(); }); this.configService.config$.pipe( @@ -128,66 +129,18 @@ export class SettingsPageComponent implements OnInit { ), takeUntilDestroyed(this.destroyRef), ).subscribe(({ validateEnabled, protocolIsSftp }) => { - this.validateContext = SettingsPageComponent.buildValidateContext(validateEnabled); - this.ftpsContext = SettingsPageComponent.buildFtpsContext(protocolIsSftp); - this.cdr.markForCheck(); - }); - } - - /** - * Apply the per-option disable rules carried by each option definition - * (disabledWhen/overrideNote). One generic transform replaces the former - * per-context builders: an option is disabled when its disabledWhen flag is - * currently active, and its description is swapped for overrideNote when one - * is provided. - */ - private static applyDisableRules( - context: IOptionsContext, - active: { pairsEnabled: boolean; validateDisabled: boolean; protocolSftp: boolean }, - ): IOptionsContext { - return { - ...context, - options: context.options.map((option) => { - if (option.disabledWhen && active[option.disabledWhen]) { - return option.overrideNote !== undefined - ? { ...option, disabled: true, description: option.overrideNote } - : { ...option, disabled: true }; - } - return option; - }), - }; - } - - private static buildServerContext(hasEnabledPairs: boolean): IOptionsContext { - return SettingsPageComponent.applyDisableRules(OPTIONS_CONTEXT_SERVER, { - pairsEnabled: hasEnabledPairs, - validateDisabled: false, - protocolSftp: false, + this.active.validateDisabled = !validateEnabled; + this.active.protocolSftp = protocolIsSftp; + this.rebuildContexts(); }); } - private static buildFtpsContext(protocolIsSftp: boolean): IOptionsContext { - return SettingsPageComponent.applyDisableRules(OPTIONS_CONTEXT_FTPS, { - pairsEnabled: false, - validateDisabled: false, - protocolSftp: protocolIsSftp, - }); - } - - private static buildAutoqueueContext(hasEnabledPairs: boolean): IOptionsContext { - return SettingsPageComponent.applyDisableRules(OPTIONS_CONTEXT_AUTOQUEUE, { - pairsEnabled: hasEnabledPairs, - validateDisabled: false, - protocolSftp: false, - }); - } - - private static buildValidateContext(validateEnabled: boolean): IOptionsContext { - return SettingsPageComponent.applyDisableRules(OPTIONS_CONTEXT_VALIDATE, { - pairsEnabled: false, - validateDisabled: !validateEnabled, - protocolSftp: false, - }); + private rebuildContexts(): void { + this.serverContext = applyDisableRules(OPTIONS_CONTEXT_SERVER, this.active); + this.ftpsContext = applyDisableRules(OPTIONS_CONTEXT_FTPS, this.active); + this.autoqueueContext = applyDisableRules(OPTIONS_CONTEXT_AUTOQUEUE, this.active); + this.validateContext = applyDisableRules(OPTIONS_CONTEXT_VALIDATE, this.active); + this.cdr.markForCheck(); } getOptionValue(config: Config | null, valuePath: ConfigValuePath): OptionValue { @@ -246,26 +199,14 @@ export class SettingsPageComponent implements OnInit { }); } - onTestDiscord(): void { - this.testingDiscord = true; - this.discordResult = null; - this.notificationsService.testDiscord().pipe( - takeUntilDestroyed(this.destroyRef), - ).subscribe((result) => { - this.testingDiscord = false; - this.discordResult = result; - this.cdr.markForCheck(); - }); - } - - onTestTelegram(): void { - this.testingTelegram = true; - this.telegramResult = null; - this.notificationsService.testTelegram().pipe( + onTest(channel: NotificationChannel): void { + this.testing[channel] = true; + this.results[channel] = null; + this.notificationsService.test(channel).pipe( takeUntilDestroyed(this.destroyRef), ).subscribe((result) => { - this.testingTelegram = false; - this.telegramResult = result; + this.testing[channel] = false; + this.results[channel] = result; this.cdr.markForCheck(); }); } diff --git a/src/angular/src/app/pages/settings/settings-page.disable-rules.spec.ts b/src/angular/src/app/pages/settings/settings-page.disable-rules.spec.ts index 8cb68e70..3d4a8960 100644 --- a/src/angular/src/app/pages/settings/settings-page.disable-rules.spec.ts +++ b/src/angular/src/app/pages/settings/settings-page.disable-rules.spec.ts @@ -1,19 +1,13 @@ import '@angular/compiler'; import { describe, it, expect } from 'vitest'; -import { SettingsPageComponent } from './settings-page.component'; -import { IOptionsContext } from './options-list'; - -// buildValidateContext is a private static reached the same way the existing -// settings-page spec reaches buildServerContext/buildAutoqueueContext. This -// focused spec covers the validate ('validateDisabled') branch of the generic -// applyDisableRules transform, which the existing spec does not exercise. -interface ValidateStatics { - buildValidateContext(validateEnabled: boolean): IOptionsContext; -} -const statics = SettingsPageComponent as unknown as ValidateStatics; -const buildValidateContext = (enabled: boolean): IOptionsContext => statics.buildValidateContext(enabled); - -describe('SettingsPageComponent.buildValidateContext', () => { +import { IOptionsContext, OPTIONS_CONTEXT_VALIDATE, applyDisableRules } from './options-list'; + +// Covers the validate ('validateDisabled') branch of the generic +// applyDisableRules transform, which settings-page.component.spec does not exercise. +const buildValidateContext = (enabled: boolean): IOptionsContext => + applyDisableRules(OPTIONS_CONTEXT_VALIDATE, { pairsEnabled: false, validateDisabled: !enabled, protocolSftp: false }); + +describe('applyDisableRules: buildValidateContext', () => { it('disables auto_validate and algorithm when validation is disabled', () => { const ctx = buildValidateContext(false); const autoValidate = ctx.options.find((o) => o.valuePath[1] === 'auto_validate')!; diff --git a/src/angular/src/app/routes.ts b/src/angular/src/app/routes.ts index a98b2591..8b1dad97 100644 --- a/src/angular/src/app/routes.ts +++ b/src/angular/src/app/routes.ts @@ -48,29 +48,6 @@ export const ROUTE_INFOS: RouteInfo[] = [ ]; export const ROUTES: Routes = [ - { - path: '', - redirectTo: '/dashboard', - pathMatch: 'full' - }, - { - path: 'dashboard', - component: FilesPageComponent - }, - { - path: 'settings', - component: SettingsPageComponent - }, - { - path: 'autoqueue', - component: AutoQueuePageComponent - }, - { - path: 'logs', - component: LogsPageComponent - }, - { - path: 'about', - component: AboutPageComponent - } + { path: '', redirectTo: '/dashboard', pathMatch: 'full' }, + ...ROUTE_INFOS.map(({ path, component }) => ({ path, component })), ]; diff --git a/src/angular/src/app/services/autoqueue/autoqueue.service.ts b/src/angular/src/app/services/autoqueue/autoqueue.service.ts index eac60a36..8fe2a5bb 100644 --- a/src/angular/src/app/services/autoqueue/autoqueue.service.ts +++ b/src/angular/src/app/services/autoqueue/autoqueue.service.ts @@ -11,8 +11,6 @@ import { Localization } from '../../models/localization'; @Injectable({ providedIn: 'root' }) export class AutoQueueService { private readonly AUTOQUEUE_GET_URL = '/server/autoqueue/get'; - private readonly AUTOQUEUE_ADD_URL = (pattern: string) => `/server/autoqueue/add/${pattern}`; - private readonly AUTOQUEUE_REMOVE_URL = (pattern: string) => `/server/autoqueue/remove/${pattern}`; private readonly connectedService = inject(ConnectedService); private readonly restService = inject(RestService); @@ -55,7 +53,7 @@ export class AutoQueueService { // Double-encode the value const patternEncoded = encodeURIComponent(encodeURIComponent(pattern)); - const url = this.AUTOQUEUE_ADD_URL(patternEncoded); + const url = `/server/autoqueue/add/${patternEncoded}`; // Update the subject inside the returned pipeline (tap) per the mutating- // service contract: the store updates exactly when the caller subscribes, // with no second internal subscribe. sendRequest already recovers HTTP @@ -85,7 +83,7 @@ export class AutoQueueService { // Double-encode the value const patternEncoded = encodeURIComponent(encodeURIComponent(pattern)); - const url = this.AUTOQUEUE_REMOVE_URL(patternEncoded); + const url = `/server/autoqueue/remove/${patternEncoded}`; // Update the subject inside the returned pipeline (tap) per the mutating- // service contract: the store updates exactly when the caller subscribes, // with no second internal subscribe. sendRequest already recovers HTTP diff --git a/src/angular/src/app/services/files/view-file-capabilities.ts b/src/angular/src/app/services/files/view-file-capabilities.ts index c5b22b25..5c2b17fb 100644 --- a/src/angular/src/app/services/files/view-file-capabilities.ts +++ b/src/angular/src/app/services/files/view-file-capabilities.ts @@ -89,34 +89,12 @@ export interface ViewFileCapabilities { * @param remoteSize coalesced (non-null) remote size in bytes */ export function mapState(state: ModelFileState, localSize: number, remoteSize: number): ViewFileStatus { - switch (state) { - case ModelFileState.DEFAULT: - return localSize > 0 && remoteSize > 0 ? ViewFileStatus.STOPPED : ViewFileStatus.DEFAULT; - case ModelFileState.QUEUED: - return ViewFileStatus.QUEUED; - case ModelFileState.DOWNLOADING: - return ViewFileStatus.DOWNLOADING; - case ModelFileState.DOWNLOADED: - return ViewFileStatus.DOWNLOADED; - case ModelFileState.DELETED: - return ViewFileStatus.DELETED; - case ModelFileState.EXTRACTING: - return ViewFileStatus.EXTRACTING; - case ModelFileState.EXTRACTED: - return ViewFileStatus.EXTRACTED; - case ModelFileState.EXTRACT_FAILED: - return ViewFileStatus.EXTRACT_FAILED; - case ModelFileState.VALIDATING: - return ViewFileStatus.VALIDATING; - case ModelFileState.VALIDATED: - return ViewFileStatus.VALIDATED; - case ModelFileState.CORRUPT: - return ViewFileStatus.CORRUPT; - case ModelFileState.MOVE_FAILED: - return ViewFileStatus.MOVE_FAILED; - default: - return ViewFileStatus.DEFAULT; + if (state === ModelFileState.DEFAULT) { + return localSize > 0 && remoteSize > 0 ? ViewFileStatus.STOPPED : ViewFileStatus.DEFAULT; } + // Every other member shares its string value with ViewFileStatus. + const status = state as string as ViewFileStatus; + return Object.values(ViewFileStatus).includes(status) ? status : ViewFileStatus.DEFAULT; } /** diff --git a/src/angular/src/app/services/files/view-file-filter.service.spec.ts b/src/angular/src/app/services/files/view-file-filter.service.spec.ts index 72e68c4a..e940cf09 100644 --- a/src/angular/src/app/services/files/view-file-filter.service.spec.ts +++ b/src/angular/src/app/services/files/view-file-filter.service.spec.ts @@ -83,36 +83,36 @@ describe('ViewFileFilterService — NameFilterCriteria', () => { it('should match all files when name filter is null', () => { optionsSubject.next(makeOptions({ nameFilter: null as unknown as string })); const file = makeViewFile({ name: 'Anything.mkv' }); - expect(capturedCriteria!.meetsCriteria(file)).toBe(true); + expect(capturedCriteria!(file)).toBe(true); }); it('should match all files when name filter is empty string', () => { optionsSubject.next(makeOptions({ nameFilter: '' })); const file = makeViewFile({ name: 'Anything.mkv' }); - expect(capturedCriteria!.meetsCriteria(file)).toBe(true); + expect(capturedCriteria!(file)).toBe(true); }); it('should match substring case-insensitively', () => { optionsSubject.next(makeOptions({ nameFilter: 'show' })); - expect(capturedCriteria!.meetsCriteria(makeViewFile({ name: 'My.Show.S01E01.mkv' }))).toBe(true); - expect(capturedCriteria!.meetsCriteria(makeViewFile({ name: 'MY.SHOW.S01E01.mkv' }))).toBe(true); - expect(capturedCriteria!.meetsCriteria(makeViewFile({ name: 'other-file.txt' }))).toBe(false); + expect(capturedCriteria!(makeViewFile({ name: 'My.Show.S01E01.mkv' }))).toBe(true); + expect(capturedCriteria!(makeViewFile({ name: 'MY.SHOW.S01E01.mkv' }))).toBe(true); + expect(capturedCriteria!(makeViewFile({ name: 'other-file.txt' }))).toBe(false); }); it('should treat spaces as dots for fuzzy matching ("my show" matches "My.Show.S01E01")', () => { optionsSubject.next(makeOptions({ nameFilter: 'my show' })); - expect(capturedCriteria!.meetsCriteria(makeViewFile({ name: 'My.Show.S01E01.mkv' }))).toBe(true); + expect(capturedCriteria!(makeViewFile({ name: 'My.Show.S01E01.mkv' }))).toBe(true); }); it('should treat dots as spaces for fuzzy matching ("my.show" matches "My Show S01E01")', () => { optionsSubject.next(makeOptions({ nameFilter: 'my.show' })); - expect(capturedCriteria!.meetsCriteria(makeViewFile({ name: 'My Show S01E01.mkv' }))).toBe(true); + expect(capturedCriteria!(makeViewFile({ name: 'My Show S01E01.mkv' }))).toBe(true); }); it('should return false for all files when no name matches', () => { optionsSubject.next(makeOptions({ nameFilter: 'nonexistent' })); - expect(capturedCriteria!.meetsCriteria(makeViewFile({ name: 'Something.Else.mkv' }))).toBe(false); - expect(capturedCriteria!.meetsCriteria(makeViewFile({ name: 'Another.File.txt' }))).toBe(false); + expect(capturedCriteria!(makeViewFile({ name: 'Something.Else.mkv' }))).toBe(false); + expect(capturedCriteria!(makeViewFile({ name: 'Another.File.txt' }))).toBe(false); }); it('should match when query contains mixed dots and spaces', () => { @@ -120,14 +120,14 @@ describe('ViewFileFilterService — NameFilterCriteria', () => { // The original query lowercased: "my.show s01" // space→dot variant: "my.show.s01" // dot→space variant: "my show s01" - expect(capturedCriteria!.meetsCriteria(makeViewFile({ name: 'My.Show.S01E01.mkv' }))).toBe(true); + expect(capturedCriteria!(makeViewFile({ name: 'My.Show.S01E01.mkv' }))).toBe(true); }); it('should match only on the file name, not other fields', () => { optionsSubject.next(makeOptions({ nameFilter: 'download' })); // Name doesn't contain "download" but status is DOWNLOADING const file = makeViewFile({ name: 'SomeFile.txt', status: ViewFileStatus.DOWNLOADING }); - expect(capturedCriteria!.meetsCriteria(file)).toBe(false); + expect(capturedCriteria!(file)).toBe(false); }); }); @@ -160,22 +160,22 @@ describe('ViewFileFilterService — StatusFilterCriteria', () => { it('should match all files when status filter is null', () => { optionsSubject.next(makeOptions({ selectedStatusFilter: null })); - expect(capturedCriteria!.meetsCriteria(makeViewFile({ status: ViewFileStatus.DEFAULT }))).toBe(true); - expect(capturedCriteria!.meetsCriteria(makeViewFile({ status: ViewFileStatus.DOWNLOADING }))).toBe(true); - expect(capturedCriteria!.meetsCriteria(makeViewFile({ status: ViewFileStatus.QUEUED }))).toBe(true); + expect(capturedCriteria!(makeViewFile({ status: ViewFileStatus.DEFAULT }))).toBe(true); + expect(capturedCriteria!(makeViewFile({ status: ViewFileStatus.DOWNLOADING }))).toBe(true); + expect(capturedCriteria!(makeViewFile({ status: ViewFileStatus.QUEUED }))).toBe(true); }); it('should match only files with the specified status', () => { optionsSubject.next(makeOptions({ selectedStatusFilter: ViewFileStatus.DOWNLOADING })); - expect(capturedCriteria!.meetsCriteria(makeViewFile({ status: ViewFileStatus.DOWNLOADING }))).toBe(true); - expect(capturedCriteria!.meetsCriteria(makeViewFile({ status: ViewFileStatus.DEFAULT }))).toBe(false); - expect(capturedCriteria!.meetsCriteria(makeViewFile({ status: ViewFileStatus.QUEUED }))).toBe(false); + expect(capturedCriteria!(makeViewFile({ status: ViewFileStatus.DOWNLOADING }))).toBe(true); + expect(capturedCriteria!(makeViewFile({ status: ViewFileStatus.DEFAULT }))).toBe(false); + expect(capturedCriteria!(makeViewFile({ status: ViewFileStatus.QUEUED }))).toBe(false); }); it('should match each status enum value correctly', () => { optionsSubject.next(makeOptions({ selectedStatusFilter: ViewFileStatus.EXTRACTED })); - expect(capturedCriteria!.meetsCriteria(makeViewFile({ status: ViewFileStatus.EXTRACTED }))).toBe(true); - expect(capturedCriteria!.meetsCriteria(makeViewFile({ status: ViewFileStatus.EXTRACTING }))).toBe(false); + expect(capturedCriteria!(makeViewFile({ status: ViewFileStatus.EXTRACTED }))).toBe(true); + expect(capturedCriteria!(makeViewFile({ status: ViewFileStatus.EXTRACTING }))).toBe(false); }); }); @@ -209,19 +209,19 @@ describe('ViewFileFilterService — AndFilterCriteria', () => { it('should pass when both name and status match', () => { optionsSubject.next(makeOptions({ nameFilter: 'show', selectedStatusFilter: ViewFileStatus.DOWNLOADING })); const file = makeViewFile({ name: 'My.Show.S01E01.mkv', status: ViewFileStatus.DOWNLOADING }); - expect(capturedCriteria!.meetsCriteria(file)).toBe(true); + expect(capturedCriteria!(file)).toBe(true); }); it('should reject when name matches but status does not', () => { optionsSubject.next(makeOptions({ nameFilter: 'show', selectedStatusFilter: ViewFileStatus.DOWNLOADING })); const file = makeViewFile({ name: 'My.Show.S01E01.mkv', status: ViewFileStatus.DEFAULT }); - expect(capturedCriteria!.meetsCriteria(file)).toBe(false); + expect(capturedCriteria!(file)).toBe(false); }); it('should reject when status matches but name does not', () => { optionsSubject.next(makeOptions({ nameFilter: 'show', selectedStatusFilter: ViewFileStatus.DOWNLOADING })); const file = makeViewFile({ name: 'Other.File.txt', status: ViewFileStatus.DOWNLOADING }); - expect(capturedCriteria!.meetsCriteria(file)).toBe(false); + expect(capturedCriteria!(file)).toBe(false); }); }); diff --git a/src/angular/src/app/services/files/view-file-filter.service.ts b/src/angular/src/app/services/files/view-file-filter.service.ts index ad68cead..8612622c 100644 --- a/src/angular/src/app/services/files/view-file-filter.service.ts +++ b/src/angular/src/app/services/files/view-file-filter.service.ts @@ -5,47 +5,21 @@ import { ViewFile, ViewFileStatus } from '../../models/view-file'; import { ViewFileFilterCriteria, ViewFileService } from './view-file.service'; import { ViewFileOptionsService } from './view-file-options.service'; -class AndFilterCriteria implements ViewFileFilterCriteria { - constructor( - private a: ViewFileFilterCriteria, - private b: ViewFileFilterCriteria, - ) {} - - meetsCriteria(viewFile: ViewFile): boolean { - return this.a.meetsCriteria(viewFile) && this.b.meetsCriteria(viewFile); - } +function statusPredicate(status: ViewFileStatus | null): ViewFileFilterCriteria { + return (f: ViewFile) => status == null || status === f.status; } -class StatusFilterCriteria implements ViewFileFilterCriteria { - constructor(readonly status: ViewFileStatus | null) {} - - meetsCriteria(viewFile: ViewFile): boolean { - return this.status == null || this.status === viewFile.status; - } -} - -class NameFilterCriteria implements ViewFileFilterCriteria { - private readonly queryCandidates: string[] = []; - - constructor(readonly name: string | null) { - if (this.name != null) { - const query = this.name.toLowerCase(); - this.queryCandidates = [ - query, - // treat dots and spaces as the same - query.replace(/\s/g, '.'), - query.replace(/\./g, ' '), - ]; - } - } - - meetsCriteria(viewFile: ViewFile): boolean { - if (this.name == null || this.name === '') { - return true; - } - const search = viewFile.name.toLowerCase(); - return this.queryCandidates.some((candidate) => search.indexOf(candidate) >= 0); +function namePredicate(name: string | null): ViewFileFilterCriteria { + if (!name) { + return () => true; } + const query = name.toLowerCase(); + // treat dots and spaces as the same + const candidates = [query, query.replace(/\s/g, '.'), query.replace(/\./g, ' ')]; + return (f: ViewFile) => { + const search = f.name.toLowerCase(); + return candidates.some((c) => search.includes(c)); + }; } @Injectable({ providedIn: 'root' }) @@ -54,40 +28,26 @@ export class ViewFileFilterService { private readonly viewFileService = inject(ViewFileService); private readonly viewFileOptionsService = inject(ViewFileOptionsService); - private statusFilter: StatusFilterCriteria | null = null; - private nameFilter: NameFilterCriteria | null = null; + private status: ViewFileStatus | null | undefined; + private name: string | null | undefined; constructor() { this.viewFileOptionsService.options$.subscribe((options) => { - let updateFilterCriteria = false; - - if (this.statusFilter == null || this.statusFilter.status !== options.selectedStatusFilter) { - updateFilterCriteria = true; - this.statusFilter = new StatusFilterCriteria(options.selectedStatusFilter); - this.logger.debug('Status filter set to: ' + options.selectedStatusFilter); + const statusChanged = this.status !== options.selectedStatusFilter; + const nameChanged = this.name !== options.nameFilter; + if (statusChanged) { + this.status = options.selectedStatusFilter; + this.logger.debug('Status filter set to: ' + this.status); } - - if (this.nameFilter == null || this.nameFilter.name !== options.nameFilter) { - updateFilterCriteria = true; - this.nameFilter = new NameFilterCriteria(options.nameFilter); - this.logger.debug('Name filter set to: ' + options.nameFilter); + if (nameChanged) { + this.name = options.nameFilter; + this.logger.debug('Name filter set to: ' + this.name); } - - if (updateFilterCriteria) { - this.viewFileService.setFilterCriteria(this.buildFilterCriteria()); + if (statusChanged || nameChanged) { + const byStatus = statusPredicate(this.status ?? null); + const byName = namePredicate(this.name ?? null); + this.viewFileService.setFilterCriteria((f) => byStatus(f) && byName(f)); } }); } - - private buildFilterCriteria(): ViewFileFilterCriteria | null { - if (this.statusFilter != null && this.nameFilter != null) { - return new AndFilterCriteria(this.statusFilter, this.nameFilter); - } else if (this.statusFilter != null) { - return this.statusFilter; - } else if (this.nameFilter != null) { - return this.nameFilter; - } else { - return null; - } - } } diff --git a/src/angular/src/app/services/files/view-file.service.spec.ts b/src/angular/src/app/services/files/view-file.service.spec.ts index 988ea1ae..8aa2294d 100644 --- a/src/angular/src/app/services/files/view-file.service.spec.ts +++ b/src/angular/src/app/services/files/view-file.service.spec.ts @@ -356,9 +356,7 @@ describe("ViewFileService", () => { }), ]); - const criteria: ViewFileFilterCriteria = { - meetsCriteria: (vf: ViewFile) => vf.status === ViewFileStatus.QUEUED, - }; + const criteria: ViewFileFilterCriteria = (vf: ViewFile) => vf.status === ViewFileStatus.QUEUED; service.setFilterCriteria(criteria); const filtered = latestFilteredFiles(); @@ -871,9 +869,7 @@ describe("ViewFileService", () => { makeModelFile({ name: "a", remote_size: 200, local_size: 50, state: ModelFileState.DOWNLOADING }), makeModelFile({ name: "b", remote_size: 200, local_size: 0, state: ModelFileState.DEFAULT }), ]); - const criteria: ViewFileFilterCriteria = { - meetsCriteria: (vf) => vf.status === ViewFileStatus.DEFAULT, - }; + const criteria: ViewFileFilterCriteria = (vf) => vf.status === ViewFileStatus.DEFAULT; service.setFilterCriteria(criteria); let emissions = 0; @@ -900,9 +896,7 @@ describe("ViewFileService", () => { }); it("should re-emit the filtered list when membership changes", () => { - const criteria: ViewFileFilterCriteria = { - meetsCriteria: (vf) => vf.status === ViewFileStatus.DOWNLOADING, - }; + const criteria: ViewFileFilterCriteria = (vf) => vf.status === ViewFileStatus.DOWNLOADING; service.setFilterCriteria(criteria); emitModelFiles([ makeModelFile({ name: "a", remote_size: 200, local_size: 50, state: ModelFileState.DEFAULT }), diff --git a/src/angular/src/app/services/files/view-file.service.ts b/src/angular/src/app/services/files/view-file.service.ts index 58fee3fd..0e6dd138 100644 --- a/src/angular/src/app/services/files/view-file.service.ts +++ b/src/angular/src/app/services/files/view-file.service.ts @@ -32,9 +32,7 @@ function viewFileKey(vf: ViewFile): string { return fileKey(vf.pairId, vf.name); } -export interface ViewFileFilterCriteria { - meetsCriteria(viewFile: ViewFile): boolean; -} +export type ViewFileFilterCriteria = (viewFile: ViewFile) => boolean; export type ViewFileComparator = (a: ViewFile, b: ViewFile) => number; @@ -346,7 +344,7 @@ export class ViewFileService { let filteredFiles = this.files; if (this.filterCriteria != null) { - filteredFiles = this.files.filter((f) => this.filterCriteria!.meetsCriteria(f)); + filteredFiles = this.files.filter(this.filterCriteria); } // Skip re-emitting the filtered list when its membership/order is unchanged diff --git a/src/angular/src/app/services/logs/log.service.ts b/src/angular/src/app/services/logs/log.service.ts index 535c5d2f..cbb4567d 100644 --- a/src/angular/src/app/services/logs/log.service.ts +++ b/src/angular/src/app/services/logs/log.service.ts @@ -10,7 +10,6 @@ export interface LogHistoryParams { search?: string; level?: string; limit?: number; - before?: number; } export interface LogHistoryEntry { @@ -53,10 +52,9 @@ export class LogService implements StreamEventHandler { fetchHistory(params: LogHistoryParams = {}): Observable { let httpParams = new HttpParams(); - if (params.search) httpParams = httpParams.set('search', params.search); - if (params.level) httpParams = httpParams.set('level', params.level); - if (params.limit) httpParams = httpParams.set('limit', params.limit.toString()); - if (params.before) httpParams = httpParams.set('before', params.before.toString()); + for (const [key, value] of Object.entries(params)) { + if (value) httpParams = httpParams.set(key, String(value)); + } return this.http.get('/server/logs', { params: httpParams }); } } diff --git a/src/angular/src/app/services/server/server-status.service.ts b/src/angular/src/app/services/server/server-status.service.ts index 320fdf0a..0acd3a12 100644 --- a/src/angular/src/app/services/server/server-status.service.ts +++ b/src/angular/src/app/services/server/server-status.service.ts @@ -6,23 +6,26 @@ import { LoggerService } from '../utils/logger.service'; import { Localization } from '../../models/localization'; import { ServerStatus, ServerStatusJson, serverStatusFromJson } from '../../models/server-status'; -@Injectable({ providedIn: 'root' }) -export class ServerStatusService implements StreamEventHandler { - private readonly streamDispatch = inject(StreamDispatchService); - private readonly logger = inject(LoggerService); - - private readonly statusSubject = new BehaviorSubject({ - server: { - up: false, - errorMessage: Localization.Notification.STATUS_CONNECTION_WAITING, - }, +function disconnectedStatus(errorMessage: string): ServerStatus { + return { + server: { up: false, errorMessage }, controller: { latestRemoteScanTime: null, latestRemoteScanFailed: false, latestRemoteScanError: null, noEnabledPairs: false, }, - }); + }; +} + +@Injectable({ providedIn: 'root' }) +export class ServerStatusService implements StreamEventHandler { + private readonly streamDispatch = inject(StreamDispatchService); + private readonly logger = inject(LoggerService); + + private readonly statusSubject = new BehaviorSubject( + disconnectedStatus(Localization.Notification.STATUS_CONNECTION_WAITING), + ); readonly status$: Observable = this.statusSubject.asObservable(); @@ -47,17 +50,6 @@ export class ServerStatusService implements StreamEventHandler { } onDisconnected(): void { - this.statusSubject.next({ - server: { - up: false, - errorMessage: Localization.Error.SERVER_DISCONNECTED, - }, - controller: { - latestRemoteScanTime: null, - latestRemoteScanFailed: false, - latestRemoteScanError: null, - noEnabledPairs: false, - }, - }); + this.statusSubject.next(disconnectedStatus(Localization.Error.SERVER_DISCONNECTED)); } } diff --git a/src/angular/src/app/services/settings/collection.service.ts b/src/angular/src/app/services/settings/collection.service.ts new file mode 100644 index 00000000..497314a2 --- /dev/null +++ b/src/angular/src/app/services/settings/collection.service.ts @@ -0,0 +1,94 @@ +import { inject } from '@angular/core'; +import { HttpClient, HttpErrorResponse } from '@angular/common/http'; +import { BehaviorSubject, Observable, OperatorFunction, of } from 'rxjs'; +import { catchError, map, tap } from 'rxjs/operators'; + +import { ConnectedService } from '../utils/connected.service'; +import { LoggerService } from '../utils/logger.service'; + +/** + * REST collection kept in a BehaviorSubject: refreshed on (re)connect, cleared + * on disconnect, and mutated inside the returned pipeline via `tap` (the + * CLAUDE.md mutating-service contract). Subclasses expose typed wrappers over + * the protected CRUD helpers. + */ +export abstract class CollectionService { + private readonly http = inject(HttpClient); + private readonly connectedService = inject(ConnectedService); + private readonly logger = inject(LoggerService); + private readonly subject = new BehaviorSubject([]); + + readonly items$: Observable = this.subject.asObservable(); + + /** + * @param baseUrl collection endpoint; items live at `${baseUrl}/${id}` + * @param label singular noun for log messages + * @param clearOnRefreshError emit `[]` when a refresh fails (else keep the last good list) + */ + protected constructor( + private readonly baseUrl: string, + private readonly label: string, + private readonly clearOnRefreshError: boolean, + ) { + this.connectedService.connected$.subscribe((connected) => { + if (connected) { + this.refresh(); + } else { + this.subject.next([]); + } + }); + } + + refresh(): void { + this.http.get(this.baseUrl).pipe( + catchError((err: HttpErrorResponse) => { + this.logger.warn(`Failed to load ${this.label}s: %O`, err); + return of(this.clearOnRefreshError ? [] : null); + }), + ).subscribe((list) => { + if (list !== null) { + this.subject.next(list); + } + }); + } + + protected createItem(body: unknown): Observable { + return this.http.post(this.baseUrl, body).pipe( + tap((created) => this.subject.next([...this.subject.getValue(), created])), + this.recover('create'), + ); + } + + protected updateItem(id: string, body: unknown): Observable { + return this.http.put(`${this.baseUrl}/${id}`, body).pipe( + tap((updated) => { + this.subject.next(this.subject.getValue().map((i) => i.id === updated.id ? updated : i)); + }), + this.recover('update'), + ); + } + + protected removeItem(id: string): Observable { + return this.http.delete(`${this.baseUrl}/${id}`, { responseType: 'text' }).pipe( + map(() => { + this.subject.next(this.subject.getValue().filter((i) => i.id !== id)); + return true; + }), + catchError((err: HttpErrorResponse) => { + this.logger.warn(`Failed to delete ${this.label}: %O`, err); + return of(false); + }), + ); + } + + /** Log and map to null, except 409 (conflict) which callers surface to the user. */ + private recover(verb: string): OperatorFunction { + return catchError((err: HttpErrorResponse): Observable => { + this.logger.warn(`Failed to ${verb} ${this.label}: %O`, err); + if (err.status === 409) { + throw err; + } + return of(null); + }); + } +} diff --git a/src/angular/src/app/services/settings/config.service.ts b/src/angular/src/app/services/settings/config.service.ts index 5c30775f..29154210 100644 --- a/src/angular/src/app/services/settings/config.service.ts +++ b/src/angular/src/app/services/settings/config.service.ts @@ -27,8 +27,6 @@ export const EMPTY_VALUE_SENTINEL = '__empty__'; @Injectable({ providedIn: 'root' }) export class ConfigService { private readonly CONFIG_GET_URL = '/server/config/get'; - private readonly CONFIG_SET_URL = (section: string, option: string, value: string) => - `/server/config/set/${section}/${option}/${value}`; private readonly connectedService = inject(ConnectedService); private readonly restService = inject(RestService); @@ -77,7 +75,7 @@ export class ConfigService { // Double-encode the value, use sentinel for empty strings const valueEncoded = valueStr.length === 0 ? EMPTY_VALUE_SENTINEL : encodeURIComponent(encodeURIComponent(valueStr)); - const url = this.CONFIG_SET_URL(section, option, valueEncoded); + const url = `/server/config/set/${section}/${option}/${valueEncoded}`; // Update the subject inside the returned pipeline (tap) per the mutating- // service contract: the store updates exactly when the caller subscribes, // with no second internal subscribe. sendRequest already recovers HTTP diff --git a/src/angular/src/app/services/settings/integrations.service.ts b/src/angular/src/app/services/settings/integrations.service.ts index 862c4e23..d9831ecc 100644 --- a/src/angular/src/app/services/settings/integrations.service.ts +++ b/src/angular/src/app/services/settings/integrations.service.ts @@ -1,20 +1,13 @@ import { Injectable, inject } from '@angular/core'; import { HttpClient, HttpErrorResponse } from '@angular/common/http'; -import { BehaviorSubject, Observable, of } from 'rxjs'; -import { catchError, map, tap } from 'rxjs/operators'; +import { Observable, of } from 'rxjs'; +import { catchError, map } from 'rxjs/operators'; -import { - ArrInstance, - ArrInstanceCreate, - ArrInstanceUpdate, -} from '../../models/arr-instance'; -import { ConnectedService } from '../utils/connected.service'; -import { LoggerService } from '../utils/logger.service'; +import { ArrInstance, ArrInstanceCreate, ArrInstanceUpdate } from '../../models/arr-instance'; +import { TestResult, failureFromHttpError } from '../utils/test-result'; +import { CollectionService } from './collection.service'; -export interface TestConnectionResult { - readonly success: boolean; - readonly message: string; -} +export type TestConnectionResult = TestResult; const BASE_URL = '/server/integrations'; @@ -23,84 +16,29 @@ const BASE_URL = '/server/integrations'; * connectivity to a stored instance. */ @Injectable({ providedIn: 'root' }) -export class IntegrationsService { - private readonly http = inject(HttpClient); - private readonly connectedService = inject(ConnectedService); - private readonly logger = inject(LoggerService); +export class IntegrationsService extends CollectionService { + private readonly httpClient = inject(HttpClient); - private readonly instancesSubject = new BehaviorSubject([]); - readonly instances$: Observable = this.instancesSubject.asObservable(); + readonly instances$: Observable = this.items$; constructor() { - this.connectedService.connected$.subscribe((connected) => { - if (connected) { - this.refresh(); - } else { - this.instancesSubject.next([]); - } - }); - } - - refresh(): void { - this.http.get(BASE_URL).pipe( - catchError((err: HttpErrorResponse) => { - this.logger.warn('Failed to load integrations: %O', err); - return of(null); - }), - ).subscribe((list) => { - if (list !== null) { - this.instancesSubject.next(list); - } - }); + super(BASE_URL, 'integration', false); } create(instance: ArrInstanceCreate): Observable { - return this.http.post(BASE_URL, instance).pipe( - tap((created) => { - this.instancesSubject.next([...this.instancesSubject.getValue(), created]); - }), - catchError((err: HttpErrorResponse) => { - this.logger.warn('Failed to create integration: %O', err); - if (err.status === 409) { - throw err; - } - return of(null); - }), - ); + return this.createItem(instance); } update(id: string, patch: ArrInstanceUpdate): Observable { - return this.http.put(`${BASE_URL}/${id}`, patch).pipe( - tap((updated) => { - const list = this.instancesSubject.getValue().map((i) => i.id === updated.id ? updated : i); - this.instancesSubject.next(list); - }), - catchError((err: HttpErrorResponse) => { - this.logger.warn('Failed to update integration: %O', err); - if (err.status === 409) { - throw err; - } - return of(null); - }), - ); + return this.updateItem(id, patch); } remove(id: string): Observable { - return this.http.delete(`${BASE_URL}/${id}`, { responseType: 'text' }).pipe( - map(() => { - const list = this.instancesSubject.getValue().filter((i) => i.id !== id); - this.instancesSubject.next(list); - return true; - }), - catchError((err: HttpErrorResponse) => { - this.logger.warn('Failed to delete integration: %O', err); - return of(false); - }), - ); + return this.removeItem(id); } test(id: string): Observable { - return this.http.post<{ success?: boolean; version?: string; error?: string }>( + return this.httpClient.post<{ success?: boolean; version?: string; error?: string }>( `${BASE_URL}/${id}/test`, {}, ).pipe( @@ -108,16 +46,7 @@ export class IntegrationsService { success: true, message: `Connected${data.version ? ` (v${data.version})` : ''}`, })), - catchError((err: HttpErrorResponse) => { - let message: string; - try { - const body = typeof err.error === 'string' ? JSON.parse(err.error) : err.error; - message = body?.error || 'Connection failed'; - } catch { - message = 'Connection failed'; - } - return of({ success: false, message }); - }), + catchError((err: HttpErrorResponse) => of(failureFromHttpError(err, 'Connection failed'))), ); } } diff --git a/src/angular/src/app/services/settings/notifications.service.spec.ts b/src/angular/src/app/services/settings/notifications.service.spec.ts index 06567a5a..7a4fb137 100644 --- a/src/angular/src/app/services/settings/notifications.service.spec.ts +++ b/src/angular/src/app/services/settings/notifications.service.spec.ts @@ -26,9 +26,9 @@ describe('NotificationsService', () => { httpMock.verify(); }); - it('testDiscord() returns success on HTTP 200', () => { + it("test('discord') returns success on HTTP 200", () => { let result: TestResult | undefined; - service.testDiscord().subscribe((r) => (result = r)); + service.test('discord').subscribe((r) => (result = r)); const req = httpMock.expectOne('/server/notifications/test/discord'); expect(req.request.method).toBe('POST'); @@ -38,9 +38,9 @@ describe('NotificationsService', () => { expect(result!.message).toBe('Notification sent successfully'); }); - it('testDiscord() surfaces server-provided error message on failure', () => { + it("test('discord') surfaces server-provided error message on failure", () => { let result: TestResult | undefined; - service.testDiscord().subscribe((r) => (result = r)); + service.test('discord').subscribe((r) => (result = r)); httpMock.expectOne('/server/notifications/test/discord').flush( { error: 'Discord webhook URL not configured' }, @@ -51,9 +51,9 @@ describe('NotificationsService', () => { expect(result!.message).toBe('Discord webhook URL not configured'); }); - it('testDiscord() falls back to generic message when error body is unparsable', () => { + it("test('discord') falls back to generic message when error body is unparsable", () => { let result: TestResult | undefined; - service.testDiscord().subscribe((r) => (result = r)); + service.test('discord').subscribe((r) => (result = r)); httpMock.expectOne('/server/notifications/test/discord').error(new ProgressEvent('error')); @@ -61,9 +61,9 @@ describe('NotificationsService', () => { expect(result!.message).toBe('Notification failed'); }); - it('testTelegram() returns success on HTTP 200', () => { + it("test('telegram') returns success on HTTP 200", () => { let result: TestResult | undefined; - service.testTelegram().subscribe((r) => (result = r)); + service.test('telegram').subscribe((r) => (result = r)); const req = httpMock.expectOne('/server/notifications/test/telegram'); expect(req.request.method).toBe('POST'); @@ -73,9 +73,9 @@ describe('NotificationsService', () => { expect(result!.message).toBe('Notification sent successfully'); }); - it('testTelegram() surfaces server-provided error message on failure', () => { + it("test('telegram') surfaces server-provided error message on failure", () => { let result: TestResult | undefined; - service.testTelegram().subscribe((r) => (result = r)); + service.test('telegram').subscribe((r) => (result = r)); httpMock.expectOne('/server/notifications/test/telegram').flush( { error: 'Telegram bot token not configured' }, @@ -86,9 +86,9 @@ describe('NotificationsService', () => { expect(result!.message).toBe('Telegram bot token not configured'); }); - it('testTelegram() falls back to generic message when error body is unparsable', () => { + it("test('telegram') falls back to generic message when error body is unparsable", () => { let result: TestResult | undefined; - service.testTelegram().subscribe((r) => (result = r)); + service.test('telegram').subscribe((r) => (result = r)); httpMock.expectOne('/server/notifications/test/telegram').error(new ProgressEvent('error')); diff --git a/src/angular/src/app/services/settings/notifications.service.ts b/src/angular/src/app/services/settings/notifications.service.ts index 0bf2d7b6..a1f31d0f 100644 --- a/src/angular/src/app/services/settings/notifications.service.ts +++ b/src/angular/src/app/services/settings/notifications.service.ts @@ -3,10 +3,12 @@ import { HttpClient, HttpErrorResponse } from '@angular/common/http'; import { Observable, of } from 'rxjs'; import { catchError, map } from 'rxjs/operators'; -export interface TestResult { - readonly success: boolean; - readonly message: string; -} +import { TestResult, failureFromHttpError } from '../utils/test-result'; + +export type { TestResult }; + +export const NOTIFICATION_CHANNELS = ['discord', 'telegram'] as const; +export type NotificationChannel = (typeof NOTIFICATION_CHANNELS)[number]; const BASE_URL = '/server/notifications/test'; @@ -14,35 +16,10 @@ const BASE_URL = '/server/notifications/test'; export class NotificationsService { private readonly http = inject(HttpClient); - testDiscord(): Observable { - return this.http.post(`${BASE_URL}/discord`, {}).pipe( - map(() => ({ success: true, message: 'Notification sent successfully' })), - catchError((err: HttpErrorResponse) => { - let message: string; - try { - const body = typeof err.error === 'string' ? JSON.parse(err.error) : err.error; - message = body?.error || 'Notification failed'; - } catch { - message = 'Notification failed'; - } - return of({ success: false, message }); - }), - ); - } - - testTelegram(): Observable { - return this.http.post(`${BASE_URL}/telegram`, {}).pipe( + test(channel: NotificationChannel): Observable { + return this.http.post(`${BASE_URL}/${channel}`, {}).pipe( map(() => ({ success: true, message: 'Notification sent successfully' })), - catchError((err: HttpErrorResponse) => { - let message: string; - try { - const body = typeof err.error === 'string' ? JSON.parse(err.error) : err.error; - message = body?.error || 'Notification failed'; - } catch { - message = 'Notification failed'; - } - return of({ success: false, message }); - }), + catchError((err: HttpErrorResponse) => of(failureFromHttpError(err, 'Notification failed'))), ); } } diff --git a/src/angular/src/app/services/settings/path-pairs.service.ts b/src/angular/src/app/services/settings/path-pairs.service.ts index c39edbfa..b4b09a61 100644 --- a/src/angular/src/app/services/settings/path-pairs.service.ts +++ b/src/angular/src/app/services/settings/path-pairs.service.ts @@ -1,86 +1,26 @@ -import { Injectable, inject } from '@angular/core'; -import { HttpClient, HttpErrorResponse } from '@angular/common/http'; -import { BehaviorSubject, Observable, of } from 'rxjs'; -import { map, catchError, tap } from 'rxjs/operators'; +import { Injectable } from '@angular/core'; +import { Observable } from 'rxjs'; import { PathPair } from '../../models/path-pair'; -import { ConnectedService } from '../utils/connected.service'; -import { LoggerService } from '../utils/logger.service'; +import { CollectionService } from './collection.service'; @Injectable({ providedIn: 'root' }) -export class PathPairsService { - private static readonly BASE_URL = '/server/pathpairs'; - - private readonly http = inject(HttpClient); - private readonly connectedService = inject(ConnectedService); - private readonly logger = inject(LoggerService); - - private readonly pairsSubject = new BehaviorSubject([]); - readonly pairs$: Observable = this.pairsSubject.asObservable(); +export class PathPairsService extends CollectionService { + readonly pairs$: Observable = this.items$; constructor() { - this.connectedService.connected$.subscribe((connected) => { - if (connected) { - this.refresh(); - } else { - this.pairsSubject.next([]); - } - }); - } - - refresh(): void { - this.http.get(PathPairsService.BASE_URL).pipe( - catchError((err: HttpErrorResponse) => { - this.logger.warn('Failed to load path pairs: %O', err); - return of([]); - }), - ).subscribe((pairs) => this.pairsSubject.next(pairs)); + super('/server/pathpairs', 'path pair', true); } create(pair: Omit): Observable { - return this.http.post(PathPairsService.BASE_URL, pair).pipe( - tap((created) => { - this.pairsSubject.next([...this.pairsSubject.getValue(), created]); - }), - catchError((err: HttpErrorResponse) => { - this.logger.warn('Failed to create path pair: %O', err); - if (err.status === 409) { - throw err; - } - return of(null); - }), - ); + return this.createItem(pair); } update(pair: PathPair): Observable { - return this.http.put(`${PathPairsService.BASE_URL}/${pair.id}`, pair).pipe( - tap((updated) => { - const pairs = this.pairsSubject.getValue().map( - (p) => p.id === updated.id ? updated : p, - ); - this.pairsSubject.next(pairs); - }), - catchError((err: HttpErrorResponse) => { - this.logger.warn('Failed to update path pair: %O', err); - if (err.status === 409) { - throw err; - } - return of(null); - }), - ); + return this.updateItem(pair.id, pair); } remove(pairId: string): Observable { - return this.http.delete(`${PathPairsService.BASE_URL}/${pairId}`, { responseType: 'text' }).pipe( - map(() => { - const pairs = this.pairsSubject.getValue().filter((p) => p.id !== pairId); - this.pairsSubject.next(pairs); - return true; - }), - catchError((err: HttpErrorResponse) => { - this.logger.warn('Failed to delete path pair: %O', err); - return of(false); - }), - ); + return this.removeItem(pairId); } } diff --git a/src/angular/src/app/services/utils/logger.service.ts b/src/angular/src/app/services/utils/logger.service.ts index 82d05b9e..83916721 100644 --- a/src/angular/src/app/services/utils/logger.service.ts +++ b/src/angular/src/app/services/utils/logger.service.ts @@ -1,45 +1,10 @@ import { Injectable } from '@angular/core'; -export enum LogLevel { - ERROR, - WARN, - INFO, - DEBUG, -} - +/** Thin console facade so specs can stub logging via DI. */ @Injectable({ providedIn: 'root' }) export class LoggerService { - level = LogLevel.DEBUG; - - get debug() { - return this.level >= LogLevel.DEBUG - ? console.debug.bind(console) - : () => { - // intentional no-op - }; - } - - get info() { - return this.level >= LogLevel.INFO - ? console.log.bind(console) - : () => { - // intentional no-op - }; - } - - get warn() { - return this.level >= LogLevel.WARN - ? console.warn.bind(console) - : () => { - // intentional no-op - }; - } - - get error() { - return this.level >= LogLevel.ERROR - ? console.error.bind(console) - : () => { - // intentional no-op - }; - } + get debug() { return console.debug.bind(console); } + get info() { return console.log.bind(console); } + get warn() { return console.warn.bind(console); } + get error() { return console.error.bind(console); } } diff --git a/src/angular/src/app/services/utils/test-result.ts b/src/angular/src/app/services/utils/test-result.ts new file mode 100644 index 00000000..56800266 --- /dev/null +++ b/src/angular/src/app/services/utils/test-result.ts @@ -0,0 +1,16 @@ +import { HttpErrorResponse } from '@angular/common/http'; + +export interface TestResult { + readonly success: boolean; + readonly message: string; +} + +/** Failure result carrying the server's `{error}` body text when parsable, else `fallback`. */ +export function failureFromHttpError(err: HttpErrorResponse, fallback: string): TestResult { + try { + const body = typeof err.error === 'string' ? JSON.parse(err.error) : err.error; + return { success: false, message: body?.error || fallback }; + } catch { + return { success: false, message: fallback }; + } +} From 09f0b60a7a03cadf39364cbd155948125cae819e Mon Sep 17 00:00:00 2001 From: nitrobass24 Date: Mon, 24 Aug 2026 21:35:59 -0500 Subject: [PATCH 21/39] docs: replace CLAUDE.md with AGENTS.md as the agent rules master CLAUDE.md is now a symlink to AGENTS.md. Content rewritten in a terse rules style, with stale items fixed: Font Awesome (removed in #688), Makefile e2e targets (removed in #690), CI publish matrix (dispatch tags by branch), mutating-service reference (CollectionService), test counts dropped. New rules: no AI attribution in commits/PRs, preserve mixed CRLF/LF line endings, master PRs limited to release or sync PRs sized for CodeRabbit, local test commands and known local-only failures. --- AGENTS.md | 119 ++++++++++++++++++++++ CLAUDE.md | 287 +----------------------------------------------------- 2 files changed, 120 insertions(+), 286 deletions(-) create mode 100644 AGENTS.md mode change 100644 => 120000 CLAUDE.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 00000000..309e0d77 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,119 @@ +# AGENTS.md + +Repo rules for AI agents working on SeedSync. `CLAUDE.md` is a symlink to this file; keep rules here. + +SeedSync syncs files from a remote seedbox to a local machine with LFTP, packaged as a multi-arch Alpine Docker image (`ghcr.io/nitrobass24/seedsync`). + +## Collaboration + +- Stay inside requested scope. Do not implement review-suggested or extra changes without explicit approval. +- Treat CodeRabbit / other agent feedback as input to discuss, not automatic action. Verify each finding against current code before acting. +- SeedSync is single-user self-hosted software. Prefer readable, maintainable code over paranoid guards for unreachable states. +- Bug fix = root cause, not symptom. Check every caller of what you change. + +## Repo Map + +- Python backend (3.13, Bottle): `src/python/` — `controller/`, `model/`, `lftp/`, `ssh/`, `system/`, `web/`, `common/`; entry `seedsync.py`; remote scan script `scan_fs.py` +- Angular frontend (22, Bootstrap 5.3, Vitest): `src/angular/src/app/` — `models/`, `services/`, `pages/`, `common/` +- Playwright e2e: `src/e2e-playwright/` +- Docker: `src/docker/build/docker-image/Dockerfile` (multi-stage, Alpine-only), `docker-compose.dev.yml` +- User docs (Docusaurus): `website/docs/` +- CI: `.github/workflows/ci.yml`; docs deploy: `.github/workflows/docs-pages.yml` +- Release history: `CHANGELOG.md` + +## Branches / Git Workflow + +- `master` = stable; `develop` = integration. All work branches off `develop`. +- One concern per branch: `feat/…`, `fix/…`, `refactor/…`, `chore/…`, `docs/…`. Commit only to the feature branch. +- Start every task with `git checkout develop && git pull origin develop`, then branch. Commit or stash before switching branches. +- PRs target `develop`. Only two kinds of PR target `master`: release PRs (`release/vX.Y.Z`) and develop→master sync PRs. Keep any PR to `master` reviewable (≈100 files max); split sequentially if larger. +- Update a PR branch by merging `develop` into it. No force-push once a PR has reviews; `--force-with-lease` before that is acceptable on your own branch. +- Merge PRs with a merge commit (repo default); do not squash sync/release PRs so `master` shares history with `develop`. + +## Required Commands + +Local (fast) — run before pushing: + +- Python (from `src/python`): `uv run ruff check .` **and** `uv run ruff format --check .` (CI runs both; passing one does not imply the other), `uv run pyright`, `PYTHONPATH=. uv run pytest tests/unittests`, `PYTHONPATH=. uv run pytest tests/integration` +- Angular (from `src/angular`, Node ≥ 22.22.3): `npx ng lint`, `npx ng test`, `npx ng build --configuration production` +- Playwright (from `src/e2e-playwright`, needs a running container on :8800): `npm test` + +Docker: + +- `make build` / `make run` / `make logs` / `make stop`; `make test` runs Python tests in the test image; `make help` lists targets. + +Known local-only failures (not regressions): `test_scan_file_with_latin_chars` (macOS APFS) and `tests/integration/test_controller/test_extract` (needs archive tools not installed locally). CI covers both. + +Do not test CI publish paths with real version tags. `workflow_dispatch` on a branch publishes `ghcr.io/nitrobass24/seedsync:`; use that for live testing of a PR. + +## Lint / Format / Types + +- ruff: line length 120, `C901` max-complexity 12 (enforced in CI; existing outliers carry `# noqa: C901`; `tests/**` excluded). +- pyright `strict` over `src/python` excluding `tests/` and `scan_fs.py`. Do not widen the include set without a plan — tests carry ~4.5k strict errors. +- Use `@typing.override` on every overriding method; pyright checks it. +- Angular ESLint via `npx ng lint`; keep `--max-warnings` ratcheting down, never up. +- If lint output reveals a real issue, fix the smallest relevant scope or say why you can't. + +## Python / Backend + +- `unittest.TestCase`; `MagicMock`/`patch` for mocks; web handlers tested with `webtest.TestApp` via `BaseTestWebApp`. Test files mirror sources (`controller.py` → `test_controller.py`). +- No `time.sleep` in tests; use `threading.Event`/barriers; `timeout_decorator` for anything that might hang. +- Multiprocessing on Alpine/musl: named semaphores cap at 256 per process. Prefer `PipeStream`/`PipeFlag` (0 semaphores) over `mp.Queue`/`mp.Event` for single-producer/consumer links (#654). +- Alpine's `openssh-client` rejects unknown `-o` options (no GSSAPI). Never add ssh `-o` flags that Alpine openssh lacks (#562 regression). +- Persist formats on disk, web API error strings, and the lftp `set` command stream are contracts — do not change them without a migration/golden test. +- Deletion paths (`controller/delete/`) must containment-check every path they remove and must not report success on partial failure. + +## Angular / Frontend + +- Standalone components, `OnPush`. Any state mutated inside `setTimeout`/async callbacks must call `cdr.markForCheck()`. +- Mutating services: update the `BehaviorSubject` inside the returned observable's pipeline (`tap`/`map`), never via a second internal `.subscribe()`; recover errors with `catchError` to a typed result. Reference: `services/settings/collection.service.ts` (base for Integrations / Path Pairs), and `ConfigService.set`, `AutoQueueService.add/remove`. +- Shared UI helpers live in `src/app/common/` (e.g. `DoubleClickConfirm` for the two-click delete pattern, 3 s timeout) — reuse, don't copy. +- Capability flags on `ViewFile` are derived in `services/files/view-file-capabilities.ts`; if a flag depends on new model data, extend `modelFilesEqual` in `view-file.service.ts` or the flag goes stale. +- Icons are inline SVGs / `src/assets/icons/*.svg` with `currentColor`; no icon font. +- Specs: Vitest `describe`/`it`, `vi.fn()` mocks, `TestBed` for components. Query DOM by text or stable attributes, not positional selectors. +- **Line endings are mixed (many Angular files are CRLF).** Preserve the existing ending of every file you touch; never normalize. Scripts that read/write whole files (Python `read_text`/`write_text`) silently convert CRLF→LF — check `git diff --stat` for whole-file rewrites before committing. + +## Tests + +Every PR ships with tests. Feature → unit tests for happy path, edge, and error paths (integration tests for new endpoints). Bug → a test that fails before the fix. Refactor → existing tests pass unchanged. Removal → delete the dead tests too. + +## Code Health + +Soft targets: file ≤ 500 lines, class ≤ 300, function ≤ 40, complexity ≤ 12. At 400 lines ask "one concern or several?" Prefer a new collaborator over a bigger class. If a focused test needs `cls.__new__(cls)` or broad mocking to reach one method, split. Open an issue for an extraction rather than working around it silently; flag deliberate overshoots in the PR body. + +## Commits / PRs + +- Conventional commits with scope: `feat(angular):`, `fix(python):`, `chore(build):`, `refactor(python):`, `docs:`, `ci:`. Reference issues (`(#123)`) in the subject or body. +- **Never add AI attribution, advertising, or co-author lines** to commits, PR bodies, or comments. No `Co-Authored-By: Claude`, no "Generated with …" footers. +- PR body: short summary, what was intentionally skipped and why, a test-plan checklist, and any size-delta or contract notes the issue asked for. Tick the corresponding checklist item in the tracking issue when a PR merges. +- CodeRabbit incremental reviews are off; trigger with a `@coderabbitai review` comment when a PR is ready. +- Inline review comments must anchor to lines in the diff; verify a finding against current code before posting it. + +## Release Process + +Releases are the only PRs that bump versions. + +1. `git checkout develop && git pull && git checkout -b release/vX.Y.Z` +2. Add a `## [X.Y.Z] - YYYY-MM-DD` entry at the top of `CHANGELOG.md` (sections: Changed / Added / Fixed / Removed / Security; bold item names; issue refs). Set `version` in `src/angular/package.json` (shown on the About page). +3. Commit `Release vX.Y.Z - Brief description`, push, `gh pr create --base master`. +4. After merge: `git checkout master && git pull && git tag vX.Y.Z && git push origin vX.Y.Z`. CI builds multi-arch images, pushes `X.Y.Z`, `X.Y`, `latest`, and creates the GitHub release. +5. Edit the release notes to match the CHANGELOG entry and include `docker pull ghcr.io/nitrobass24/seedsync:X.Y.Z`. Verify the image pulls. + +Semver: major = breaking, minor = features, patch = fixes/cleanup. The `Publish` job can flake on a Docker Hub pull timeout — `gh run rerun --failed`, don't re-tag. + +## CI + +`ci.yml` runs on push to `master`/`develop`, PRs against them, `v*.*.*` tags, and manual dispatch. Jobs: Angular lint/unit/build, Python lint/typecheck/unit/integration, Docker build + container start + Playwright e2e (amd64), multi-arch build. + +| Trigger | Publishes image as | +|---|---| +| push `develop` | `:develop` | +| tag `vX.Y.Z` | `:X.Y.Z`, `:X.Y`, `:latest` + GitHub release | +| `workflow_dispatch` on a branch | `:` | +| PR | nothing | + +GitHub Actions cannot read `env` context in job-level `if`; use `fromJSON(env.VAR)` only at step level. + +## Final Report + +State which required checks ran and their results, which were skipped or deferred and why, and any unresolved failures. Do not call work complete while a required check is known failing unless the user accepts the risk. diff --git a/CLAUDE.md b/CLAUDE.md deleted file mode 100644 index 4baa365b..00000000 --- a/CLAUDE.md +++ /dev/null @@ -1,286 +0,0 @@ -# SeedSync - Claude Code Instructions - -## Project Overview - -SeedSync is a Docker-based tool that syncs files from a remote seedbox to a local machine using LFTP. - -- **Frontend**: Angular 22 (Bootstrap 5.3, Font Awesome 7, Vitest) -- **Backend**: Python 3.13 with Bottle -- **Container**: Multi-arch Docker image (amd64, arm64) -- **Registry**: ghcr.io/nitrobass24/seedsync - -## Repository Structure - -``` -src/ -├── angular/ # Angular 22 frontend -├── python/ # Python backend -├── docker/ # Docker build files -└── e2e-playwright/ # Playwright end-to-end tests -website/ # Docusaurus documentation site -``` - -## Branches - -- **master** - Stable release branch -- **develop** - Integration branch for all new work - -## Git Workflow - -All work MUST follow this branching discipline: - -1. **Always start from `develop`**: Before writing any code, checkout `develop` and pull latest: - ```bash - git checkout develop && git pull origin develop - ``` -2. **Create a feature branch**: Every task (feature, bugfix, refactor) gets its own branch off `develop`: - ```bash - git checkout -b feat/short-description # or fix/short-description - ``` -3. **Commit only to the feature branch**: Never commit directly to `develop` or `master`. -4. **One concern per branch**: Do not mix unrelated changes into the same branch. If you discover a separate issue while working, finish or stash your current work, then create a new branch for the other issue. -5. **Open a PR to `develop`**: When the work is complete, push the feature branch and open a PR targeting `develop`. Include a summary and test plan. Releases are the only path that PRs to `master` — see the Release Process below. -6. **Do not carry dirty working-tree changes across branches**: Before switching branches, either commit or stash. Never rely on uncommitted edits surviving a `git checkout`. - -## Release Process - -When merging a PR or completing significant work, follow this release process: - -### 1. Update CHANGELOG.md - -Add a new version entry at the top with: -- Version number following semver (major.minor.patch) -- Date in YYYY-MM-DD format -- Sections: Changed, Added, Fixed, Removed, Security (as applicable) - -Example: -```markdown -## [0.10.0] - 2026-01-27 - -### Changed -- **Feature name** - Description of change - -### Fixed -- **Bug name** - Description of fix -``` - -### 2. Update package.json Version - -Update the version in `src/angular/package.json` to match the release version. This is displayed on the About page. - -### 3. Create Release - -Releases use a `release/vX.Y.Z` branch off `develop`, a PR into `master`, and a tag on the resulting merge commit. Never commit the release directly to `develop` or `master`. - -```bash -# Branch from the latest develop -git checkout develop && git pull origin develop -git checkout -b release/vX.Y.Z - -# Stage the release commit (CHANGELOG / package.json) -git add CHANGELOG.md src/angular/package.json -git commit -m "Release vX.Y.Z - Brief description" -git push -u origin release/vX.Y.Z - -# Open a PR targeting master -gh pr create --base master --head release/vX.Y.Z \ - --title "Release vX.Y.Z - Brief description" \ - --body "Sync develop → master for vX.Y.Z. See CHANGELOG.md for details." - -# After the PR is merged into master, fetch and tag the merge commit -git checkout master && git pull origin master -git tag vX.Y.Z -git push origin vX.Y.Z -``` - -The CI workflow will automatically: -- Build multi-arch Docker images -- Push to ghcr.io -- Create GitHub release with auto-generated notes - -### 4. Update GitHub Release Notes - -After CI creates the release, update the release notes with detailed changelog: - -```bash -gh release edit vX.Y.Z --repo nitrobass24/seedsync --notes "$(cat <<'EOF' -## What's Changed - -### Fixed -- **Bug name** - Description of fix (#issue) - -### Changed -- **Feature name** - Description of change - -### Added -- **New feature** - Description - -## Docker Pull - -```bash -docker pull ghcr.io/nitrobass24/seedsync:X.Y.Z -``` - -**Full Changelog**: https://github.com/nitrobass24/seedsync/compare/vPREV...vX.Y.Z -EOF -)" -``` - -Format should match CHANGELOG.md entries with: -- Section headers: Fixed, Changed, Added, Removed, Security -- Bold feature/bug names -- Issue references where applicable -- Always include a "Docker Pull" section with the `docker pull` command for the release version - -### 5. Verify Release - -- Check GitHub Actions completed successfully -- Verify image is available: `docker pull ghcr.io/nitrobass24/seedsync:X.Y.Z` -- Verify GitHub release notes are formatted correctly - -## Version Numbering - -- **Major** (X.0.0): Breaking changes, major rewrites -- **Minor** (0.X.0): New features, significant improvements (e.g., Angular upgrade) -- **Patch** (0.0.X): Bug fixes, minor updates - -## Key Files - -| File | Purpose | -|------|---------| -| `CHANGELOG.md` | Release history and notes | -| `src/docker/build/docker-image/Dockerfile` | Multi-stage Docker build | -| `.github/workflows/ci.yml` | CI/CD pipeline | -| `.github/workflows/docs-pages.yml` | Documentation deployment | -| `website/` | Documentation site (Docusaurus) | - -## CI/CD Workflows - -### CI (`ci.yml`) - -Triggers: `push` to `master` or `develop`, `pull_request` against `master` or `develop`, and `push` of a tag matching `v[0-9]+.[0-9]+.[0-9]+`. - -Release-relevant matrix: - -| Trigger | Build & Test | Publish Image | Create Release | -|---------|--------------|---------------|----------------| -| PR to master | ✅ | ❌ | ❌ | -| Push to master | ✅ | ❌ | ❌ | -| Push tag (`v*.*.*`) | ✅ | ✅ | ✅ | - -- **Build & Test**: Builds Docker image and verifies container starts -- **Publish Image**: Pushes multi-arch image to ghcr.io (only on release tags) -- **Create Release**: Creates GitHub release with auto-generated notes (only on release tags) - -### Docs (`docs-pages.yml`) - -- Triggers only when `website/` directory changes -- Builds and deploys Docusaurus site to GitHub Pages - -## Common Tasks - -### Building Locally -```bash -make build # Build Docker image -make run # Run container -make logs # View logs -make stop # Stop container -``` - -### Testing -```bash -cd src/angular && npx ng lint # Angular ESLint -cd src/angular && npx ng test # Angular Vitest unit tests -# Python tests run in Docker via CI (pytest in test-image) -# CI also runs: Docker build, container startup, web UI accessibility -``` - -## Test Requirements - -Every PR MUST include appropriate test changes. Tests are not optional — they ship with the code. - -### When adding a feature -- Add unit tests for all new logic (services, components, utilities, handlers) -- Cover the happy path, edge cases, and error/validation paths -- If adding a new API endpoint, add integration tests using `WebTest`/`TestApp` - -### When fixing a bug -- Add a test that reproduces the bug (fails before fix, passes after) -- If the bug was in untested code, add baseline tests for the surrounding logic - -### When refactoring -- Existing tests must continue to pass without modification (unless the refactor intentionally changes behavior) -- If refactoring reveals untested code, add tests for it - -### When removing code -- Remove or update tests that cover the deleted code -- Do not leave dead test code behind - -### Test structure - -| Layer | Framework | Location | Runner | -|-------|-----------|----------|--------| -| Angular lint | ESLint (angular-eslint) | `src/angular/eslint.config.js` | `cd src/angular && npx ng lint` | -| Angular unit tests | Vitest | `src/angular/src/**/*.spec.ts` | `cd src/angular && npx ng test` | -| Python unit tests | unittest | `src/python/tests/unittests/` | pytest (in Docker test-image) | -| Python integration tests | unittest + WebTest | `src/python/tests/integration/` | pytest (in Docker test-image) | - -### Test conventions -- **Angular**: Use `describe`/`it` from Vitest. Mock services with `vi.fn()`. Use `TestBed` for component tests. Query DOM by text content or stable attributes, not positional selectors (`nth-of-type`). -- **Python**: Use `unittest.TestCase`. Use `unittest.mock.MagicMock`/`patch` for mocking. Integration tests for web handlers use `webtest.TestApp` with `BaseTestWebApp`. -- **Naming**: Test files mirror source files — `foo.service.ts` → `foo.service.spec.ts`, `controller.py` → `test_controller.py`. -- **No flaky tests**: Avoid `time.sleep` in tests where possible. Use `threading.Event` or barriers for synchronization. Use `timeout_decorator` for tests that might hang. - -## Code Health - -These are guidelines, not hard caps. Their real job is to slow you down and ask "is this still one concern?" Cross them when the code is clearer for it — flag in the PR body when you do. - -### Soft size targets - -| Unit | Target | When to pause | -|------|--------|---------------| -| File | ≤ 500 lines | At 400, ask "one concern or several?" | -| Class | ≤ 300 lines | If state covers > 2 concerns, extract | -| Function / method | ≤ 40 lines | Longer is OK when linear; deep nesting is not | -| Cyclomatic complexity (per function) | ≤ 12 | Enforced in CI via ruff `C901` (`max-complexity = 12`) | - -Cyclomatic complexity is the one number that actually predicts pain — a 200-line linear function is fine; a 40-line function with 5 nested conditionals is dangerous. Use `ruff check --select C901` locally to measure. - -### The "before adding" rule - -Before adding a method to an existing class, ask: -1. Does this belong in a sibling module/class instead? -2. Does the class already span multiple concerns (auth + persistence + validation, etc.)? If so, extracting first is usually worth the overhead. -3. Prefer composition over accretion — reach for a new collaborator, not a bigger class. - -### Signals that you should split - -- A focused unit test needs `cls.__new__(cls)` or broad mocking just to exercise one method. -- The constructor initializes unrelated state (e.g., both a model and a command queue and a logger facade). -- One method dominates the file's line count. -- Changes in separate features keep conflicting in the same file. - -When you see these, open an issue for the extraction rather than working around them silently. - -### Enforcement - -- **Qualitative checks**: code review. Reviewers should push back on "this file is getting unwieldy" even without a hard rule. -- **Mechanical checks** (Python): ruff's `C901` (cyclomatic complexity) with `max-complexity = 12`. Enforced in CI; existing outliers are annotated with `# noqa: C901`. Test files (`tests/**`) are excluded via `per-file-ignores` in `pyproject.toml`. -- **Ratchet pattern**: when a bound exists but the codebase has outliers, set the threshold just above the worst and drop it over time (same pattern we use for `--max-warnings` in `ng lint`). - -### Angular mutating-service contract - -Services that mutate a `BehaviorSubject` from a REST/HTTP call should follow **one** documented contract so callers can reason about side effects: - -- **Update the subject inside the returned observable's pipeline (`tap`/`map`), not via a second internal `.subscribe()`.** A second internal subscribe fires the side effect independently of the caller, runs the request a second time when the source is cold, and makes "when does the store update?" caller-independent and surprising. Folding the mutation into the returned pipeline means the store updates exactly when (and as many times as) the caller subscribes. -- **Return a typed result and recover errors with `catchError`** so the caller always gets a value (or a typed failure) rather than an error notification. Map HTTP responses to a small typed result/`WebReaction`. - -`CollectionService` (`src/angular/src/app/services/settings/collection.service.ts`) is the reference implementation — the shared base for `IntegrationsService` and `PathPairsService`: `createItem`/`updateItem`/`removeItem` use `tap`/`map` to update the subject inside the returned pipeline and `catchError` to map failures to a typed result, with no second subscribe. - -`ConfigService.set` and `AutoQueueService.add/remove` were migrated to this contract (#542): they now fold their `BehaviorSubject` mutation into the returned pipeline via `tap` (no second internal subscribe) and return the typed `WebReaction` (`RestService.sendRequest` already recovers HTTP errors into a failure `WebReaction`, so no extra `catchError` is needed). Their specs subscribe to the returned observable before asserting the subject mutated, since the mutation now defers to caller subscription. No remaining services use the legacy second-subscribe pattern. - -## GitHub Repository - -- **Repo**: github.com/nitrobass24/seedsync -- **Docs**: nitrobass24.github.io/seedsync -- **Issues**: Use for bug reports and feature requests diff --git a/CLAUDE.md b/CLAUDE.md new file mode 120000 index 00000000..47dc3e3d --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1 @@ +AGENTS.md \ No newline at end of file From 5f6683b6b22cc9f1bba2314d2f400bf273fb763c Mon Sep 17 00:00:00 2001 From: nitrobass24 Date: Mon, 24 Aug 2026 22:30:22 -0500 Subject: [PATCH 22/39] docs: reject Gemini-authored contributions in AGENTS.md --- AGENTS.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 309e0d77..cf751fdf 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -2,6 +2,8 @@ Repo rules for AI agents working on SeedSync. `CLAUDE.md` is a symlink to this file; keep rules here. + + SeedSync syncs files from a remote seedbox to a local machine with LFTP, packaged as a multi-arch Alpine Docker image (`ghcr.io/nitrobass24/seedsync`). ## Collaboration From a6306b6e07fe2392a96152fafeb80ae41f2d0ee7 Mon Sep 17 00:00:00 2001 From: nitrobass24 Date: Mon, 24 Aug 2026 22:40:56 -0500 Subject: [PATCH 23/39] docs: AGENTS.md review fixes; add pre-commit trim pass and Field Test sections --- AGENTS.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index cf751fdf..3f9f6bf5 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -2,7 +2,7 @@ Repo rules for AI agents working on SeedSync. `CLAUDE.md` is a symlink to this file; keep rules here. - + SeedSync syncs files from a remote seedbox to a local machine with LFTP, packaged as a multi-arch Alpine Docker image (`ghcr.io/nitrobass24/seedsync`). @@ -38,7 +38,7 @@ Local (fast) — run before pushing: - Python (from `src/python`): `uv run ruff check .` **and** `uv run ruff format --check .` (CI runs both; passing one does not imply the other), `uv run pyright`, `PYTHONPATH=. uv run pytest tests/unittests`, `PYTHONPATH=. uv run pytest tests/integration` - Angular (from `src/angular`, Node ≥ 22.22.3): `npx ng lint`, `npx ng test`, `npx ng build --configuration production` -- Playwright (from `src/e2e-playwright`, needs a running container on :8800): `npm test` +- Playwright (from `src/e2e-playwright`): `npm test` against a running container on :8800 (`make run`; `BASE_URL` defaults to `http://localhost:8800`). Or `make test-e2e-docker` from the repo root, which starts a throwaway `ghcr.io/nitrobass24/seedsync:latest` container on :8801, runs the suite with `BASE_URL=http://localhost:8801`, and removes the container. Docker: @@ -90,6 +90,7 @@ Soft targets: file ≤ 500 lines, class ≤ 300, function ≤ 40, complexity ≤ - PR body: short summary, what was intentionally skipped and why, a test-plan checklist, and any size-delta or contract notes the issue asked for. Tick the corresponding checklist item in the tracking issue when a PR merges. - CodeRabbit incremental reviews are off; trigger with a `@coderabbitai review` comment when a PR is ready. - Inline review comments must anchor to lines in the diff; verify a finding against current code before posting it. +- Before each commit, review the diff for over-engineering. If the ponytail plugin () is installed, use its `ponytail:ponytail-review` skill; otherwise do a trim pass: remove speculative config, unused state, single-caller layers, and duplicate helpers. ## Release Process @@ -97,7 +98,7 @@ Releases are the only PRs that bump versions. 1. `git checkout develop && git pull && git checkout -b release/vX.Y.Z` 2. Add a `## [X.Y.Z] - YYYY-MM-DD` entry at the top of `CHANGELOG.md` (sections: Changed / Added / Fixed / Removed / Security; bold item names; issue refs). Set `version` in `src/angular/package.json` (shown on the About page). -3. Commit `Release vX.Y.Z - Brief description`, push, `gh pr create --base master`. +3. Commit as `Release vX.Y.Z - Brief description` — the one approved exception to the conventional-commit format, so release commits are greppable in history. Push, then `gh pr create --base master`. 4. After merge: `git checkout master && git pull && git tag vX.Y.Z && git push origin vX.Y.Z`. CI builds multi-arch images, pushes `X.Y.Z`, `X.Y`, `latest`, and creates the GitHub release. 5. Edit the release notes to match the CHANGELOG entry and include `docker pull ghcr.io/nitrobass24/seedsync:X.Y.Z`. Verify the image pulls. @@ -116,6 +117,10 @@ Semver: major = breaking, minor = features, patch = fixes/cleanup. The `Publish` GitHub Actions cannot read `env` context in job-level `if`; use `fromJSON(env.VAR)` only at step level. +## Field Test + +Before reporting a code change complete, run it live: `make build && make run` (or `ng serve` for frontend-only work) and exercise the behavior the change touches. Report the command and what you observed. If the change needs human judgment (UI look and feel, real seedbox behavior), ask the user to test it and say what remains for them. If a live run is not possible (e.g. Docker not running), say so and name the closest check you did run. + ## Final Report State which required checks ran and their results, which were skipped or deferred and why, and any unresolved failures. Do not call work complete while a required check is known failing unless the user accepts the risk. From a9e35338459f14f226d0fe9603478a8a01f89942 Mon Sep 17 00:00:00 2001 From: nitrobass24 Date: Tue, 25 Aug 2026 11:06:53 -0500 Subject: [PATCH 24/39] ci: tag manual-dispatch images from tag refs too; docs: deploy note only on master pushes A workflow_dispatch on a refs/tags/* ref produced no image tag from type=ref,event=branch, and since the dispatch metadata step runs last it emptied the manifest command's -t list. Add type=ref,event=tag. --- .github/workflows/ci.yml | 1 + website/README.md | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d3fc3a71..de6bf9d9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -493,6 +493,7 @@ jobs: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | type=ref,event=branch + type=ref,event=tag - name: Create multi-arch manifest and push working-directory: /tmp/digests diff --git a/website/README.md b/website/README.md index 067cbd9d..6e64f40b 100644 --- a/website/README.md +++ b/website/README.md @@ -28,4 +28,5 @@ npm run build ## Deploy Deployment is automated: the `docs-pages.yml` GitHub Actions workflow builds -the site and publishes it to GitHub Pages whenever `website/` changes. +the site and publishes it to GitHub Pages when changes under `website/` are +pushed to `master`. From caab244014a8d62cc136daeb154b622fd86eadf1 Mon Sep 17 00:00:00 2001 From: nitrobass24 Date: Tue, 25 Aug 2026 11:33:53 -0500 Subject: [PATCH 25/39] test: move applyDisableRules specs to options-list.spec; scope about-page e2e selectors The applyDisableRules suites test a pure function in options-list.ts, so they belong in its spec (AGENTS.md: specs mirror sources). The about-page e2e now targets #version / #github a / #banner span with an anchored version regex and an exact href instead of text= and substring matches. --- .../app/pages/settings/options-list.spec.ts | 152 +++++++++++++++++- .../settings/settings-page.component.spec.ts | 104 ------------ .../settings-page.disable-rules.spec.ts | 49 ------ src/e2e-playwright/tests/about.spec.ts | 13 +- 4 files changed, 158 insertions(+), 160 deletions(-) delete mode 100644 src/angular/src/app/pages/settings/settings-page.component.spec.ts delete mode 100644 src/angular/src/app/pages/settings/settings-page.disable-rules.spec.ts diff --git a/src/angular/src/app/pages/settings/options-list.spec.ts b/src/angular/src/app/pages/settings/options-list.spec.ts index d6d3cee1..bf434c0f 100644 --- a/src/angular/src/app/pages/settings/options-list.spec.ts +++ b/src/angular/src/app/pages/settings/options-list.spec.ts @@ -1,5 +1,16 @@ import { describe, it, expect } from 'vitest'; -import { getConfigValue, OPTIONS_CONTEXT_FTPS, IOption } from './options-list'; +import { + FTPS_ONLY_NOTE, + IOption, + IOptionsContext, + OVERRIDE_NOTE, + OPTIONS_CONTEXT_AUTOQUEUE, + OPTIONS_CONTEXT_FTPS, + OPTIONS_CONTEXT_SERVER, + OPTIONS_CONTEXT_VALIDATE, + applyDisableRules, + getConfigValue, +} from './options-list'; import { OptionType } from './option.component'; import { Config, DEFAULT_CONFIG } from '../../models/config'; @@ -56,3 +67,142 @@ describe('OPTIONS_CONTEXT_FTPS options', () => { expect(verify.requiresRestart).toBe(true); }); }); + +// --- applyDisableRules --- + +const inactive = { pairsEnabled: false, validateDisabled: false, protocolSftp: false }; +const buildServerContext = (hasEnabledPairs: boolean): IOptionsContext => + applyDisableRules(OPTIONS_CONTEXT_SERVER, { ...inactive, pairsEnabled: hasEnabledPairs }); +const buildFtpsContext = (protocolIsSftp: boolean): IOptionsContext => + applyDisableRules(OPTIONS_CONTEXT_FTPS, { ...inactive, protocolSftp: protocolIsSftp }); +const buildAutoqueueContext = (hasEnabledPairs: boolean): IOptionsContext => + applyDisableRules(OPTIONS_CONTEXT_AUTOQUEUE, { ...inactive, pairsEnabled: hasEnabledPairs }); + +describe('applyDisableRules: buildServerContext', () => { + it('should disable remote_path and local_path when pairs are enabled', () => { + const ctx = buildServerContext(true); + const remotePath = ctx.options.find((o) => o.valuePath[1] === 'remote_path')!; + const localPath = ctx.options.find((o) => o.valuePath[1] === 'local_path')!; + + expect(remotePath.disabled).toBe(true); + expect(remotePath.description).toBe(OVERRIDE_NOTE); + expect(localPath.disabled).toBe(true); + expect(localPath.description).toBe(OVERRIDE_NOTE); + }); + + it('should not disable remote_path and local_path when no pairs are enabled', () => { + const ctx = buildServerContext(false); + const remotePath = ctx.options.find((o) => o.valuePath[1] === 'remote_path')!; + const localPath = ctx.options.find((o) => o.valuePath[1] === 'local_path')!; + + expect(remotePath.disabled).toBeFalsy(); + expect(localPath.disabled).toBeFalsy(); + }); + + it('should not disable other server options when pairs are enabled', () => { + const ctx = buildServerContext(true); + const others = ctx.options.filter( + (o) => o.valuePath[1] !== 'remote_path' && o.valuePath[1] !== 'local_path', + ); + + for (const option of others) { + expect(option.disabled).toBeFalsy(); + } + }); +}); + +describe('applyDisableRules: buildFtpsContext', () => { + const ftpOnlyPaths = ['remote_ftp_port', 'ftp_ssl_verify_certificate']; + + it('disables the FTP-only options when the protocol is sftp', () => { + const ctx = buildFtpsContext(true); + for (const path of ftpOnlyPaths) { + const option = ctx.options.find((o) => o.valuePath[1] === path)!; + expect(option.disabled).toBe(true); + expect(option.description).toBe(FTPS_ONLY_NOTE); + } + }); + + it('enables the FTP-only options when the protocol is ftps', () => { + const ctx = buildFtpsContext(false); + for (const path of ftpOnlyPaths) { + const option = ctx.options.find((o) => o.valuePath[1] === path)!; + expect(option.disabled).toBeFalsy(); + } + }); + + it('never disables the protocol selector itself', () => { + const protocol = buildFtpsContext(true).options.find((o) => o.valuePath[1] === 'protocol')!; + expect(protocol.disabled).toBeFalsy(); + }); +}); + +describe('applyDisableRules: buildAutoqueueContext', () => { + it('should disable enabled checkbox when pairs are enabled', () => { + const ctx = buildAutoqueueContext(true); + const enabled = ctx.options.find((o) => o.valuePath[1] === 'enabled')!; + + expect(enabled.disabled).toBe(true); + expect(enabled.description).toBe(OVERRIDE_NOTE); + }); + + it('should not disable enabled checkbox when no pairs are enabled', () => { + const ctx = buildAutoqueueContext(false); + const enabled = ctx.options.find((o) => o.valuePath[1] === 'enabled')!; + + expect(enabled.disabled).toBeFalsy(); + }); + + it('should not disable other autoqueue options when pairs are enabled', () => { + const ctx = buildAutoqueueContext(true); + const others = ctx.options.filter((o) => o.valuePath[1] !== 'enabled'); + + for (const option of others) { + expect(option.disabled).toBeFalsy(); + } + }); +}); + +const buildValidateContext = (enabled: boolean): IOptionsContext => + applyDisableRules(OPTIONS_CONTEXT_VALIDATE, { ...inactive, validateDisabled: !enabled }); + +describe('applyDisableRules: buildValidateContext', () => { + it('disables auto_validate and algorithm when validation is disabled', () => { + const ctx = buildValidateContext(false); + const autoValidate = ctx.options.find((o) => o.valuePath[1] === 'auto_validate')!; + const algorithm = ctx.options.find((o) => o.valuePath[1] === 'algorithm')!; + + expect(autoValidate.disabled).toBe(true); + expect(algorithm.disabled).toBe(true); + }); + + it('keeps the original description on disabled validate options (no override note)', () => { + const ctx = buildValidateContext(false); + const autoValidate = ctx.options.find((o) => o.valuePath[1] === 'auto_validate')!; + + // validateDisabled options carry no overrideNote, so the description is unchanged. + expect(autoValidate.description).toBe( + 'Automatically validate files when download completes. Requires post-download validation above.', + ); + }); + + it('does not disable auto_validate and algorithm when validation is enabled', () => { + const ctx = buildValidateContext(true); + const autoValidate = ctx.options.find((o) => o.valuePath[1] === 'auto_validate')!; + const algorithm = ctx.options.find((o) => o.valuePath[1] === 'algorithm')!; + + expect(autoValidate.disabled).toBeFalsy(); + expect(algorithm.disabled).toBeFalsy(); + }); + + it('never disables the other validate options', () => { + const ctx = buildValidateContext(false); + const others = ctx.options.filter( + (o) => o.valuePath[1] !== 'auto_validate' && o.valuePath[1] !== 'algorithm', + ); + + for (const option of others) { + expect(option.disabled).toBeFalsy(); + } + }); +}); diff --git a/src/angular/src/app/pages/settings/settings-page.component.spec.ts b/src/angular/src/app/pages/settings/settings-page.component.spec.ts deleted file mode 100644 index 94ed5774..00000000 --- a/src/angular/src/app/pages/settings/settings-page.component.spec.ts +++ /dev/null @@ -1,104 +0,0 @@ -import '@angular/compiler'; -import { describe, it, expect } from 'vitest'; -import { - FTPS_ONLY_NOTE, - IOptionsContext, - OVERRIDE_NOTE, - OPTIONS_CONTEXT_AUTOQUEUE, - OPTIONS_CONTEXT_FTPS, - OPTIONS_CONTEXT_SERVER, - applyDisableRules, -} from './options-list'; - -const inactive = { pairsEnabled: false, validateDisabled: false, protocolSftp: false }; -const buildServerContext = (hasEnabledPairs: boolean): IOptionsContext => - applyDisableRules(OPTIONS_CONTEXT_SERVER, { ...inactive, pairsEnabled: hasEnabledPairs }); -const buildFtpsContext = (protocolIsSftp: boolean): IOptionsContext => - applyDisableRules(OPTIONS_CONTEXT_FTPS, { ...inactive, protocolSftp: protocolIsSftp }); -const buildAutoqueueContext = (hasEnabledPairs: boolean): IOptionsContext => - applyDisableRules(OPTIONS_CONTEXT_AUTOQUEUE, { ...inactive, pairsEnabled: hasEnabledPairs }); - -describe('applyDisableRules: buildServerContext', () => { - it('should disable remote_path and local_path when pairs are enabled', () => { - const ctx = buildServerContext(true); - const remotePath = ctx.options.find((o) => o.valuePath[1] === 'remote_path')!; - const localPath = ctx.options.find((o) => o.valuePath[1] === 'local_path')!; - - expect(remotePath.disabled).toBe(true); - expect(remotePath.description).toBe(OVERRIDE_NOTE); - expect(localPath.disabled).toBe(true); - expect(localPath.description).toBe(OVERRIDE_NOTE); - }); - - it('should not disable remote_path and local_path when no pairs are enabled', () => { - const ctx = buildServerContext(false); - const remotePath = ctx.options.find((o) => o.valuePath[1] === 'remote_path')!; - const localPath = ctx.options.find((o) => o.valuePath[1] === 'local_path')!; - - expect(remotePath.disabled).toBeFalsy(); - expect(localPath.disabled).toBeFalsy(); - }); - - it('should not disable other server options when pairs are enabled', () => { - const ctx = buildServerContext(true); - const others = ctx.options.filter( - (o) => o.valuePath[1] !== 'remote_path' && o.valuePath[1] !== 'local_path', - ); - - for (const option of others) { - expect(option.disabled).toBeFalsy(); - } - }); -}); - -describe('applyDisableRules: buildFtpsContext', () => { - const ftpOnlyPaths = ['remote_ftp_port', 'ftp_ssl_verify_certificate']; - - it('disables the FTP-only options when the protocol is sftp', () => { - const ctx = buildFtpsContext(true); - for (const path of ftpOnlyPaths) { - const option = ctx.options.find((o) => o.valuePath[1] === path)!; - expect(option.disabled).toBe(true); - expect(option.description).toBe(FTPS_ONLY_NOTE); - } - }); - - it('enables the FTP-only options when the protocol is ftps', () => { - const ctx = buildFtpsContext(false); - for (const path of ftpOnlyPaths) { - const option = ctx.options.find((o) => o.valuePath[1] === path)!; - expect(option.disabled).toBeFalsy(); - } - }); - - it('never disables the protocol selector itself', () => { - const protocol = buildFtpsContext(true).options.find((o) => o.valuePath[1] === 'protocol')!; - expect(protocol.disabled).toBeFalsy(); - }); -}); - -describe('applyDisableRules: buildAutoqueueContext', () => { - it('should disable enabled checkbox when pairs are enabled', () => { - const ctx = buildAutoqueueContext(true); - const enabled = ctx.options.find((o) => o.valuePath[1] === 'enabled')!; - - expect(enabled.disabled).toBe(true); - expect(enabled.description).toBe(OVERRIDE_NOTE); - }); - - it('should not disable enabled checkbox when no pairs are enabled', () => { - const ctx = buildAutoqueueContext(false); - const enabled = ctx.options.find((o) => o.valuePath[1] === 'enabled')!; - - expect(enabled.disabled).toBeFalsy(); - }); - - it('should not disable other autoqueue options when pairs are enabled', () => { - const ctx = buildAutoqueueContext(true); - const others = ctx.options.filter((o) => o.valuePath[1] !== 'enabled'); - - for (const option of others) { - expect(option.disabled).toBeFalsy(); - } - }); -}); diff --git a/src/angular/src/app/pages/settings/settings-page.disable-rules.spec.ts b/src/angular/src/app/pages/settings/settings-page.disable-rules.spec.ts deleted file mode 100644 index 3d4a8960..00000000 --- a/src/angular/src/app/pages/settings/settings-page.disable-rules.spec.ts +++ /dev/null @@ -1,49 +0,0 @@ -import '@angular/compiler'; -import { describe, it, expect } from 'vitest'; -import { IOptionsContext, OPTIONS_CONTEXT_VALIDATE, applyDisableRules } from './options-list'; - -// Covers the validate ('validateDisabled') branch of the generic -// applyDisableRules transform, which settings-page.component.spec does not exercise. -const buildValidateContext = (enabled: boolean): IOptionsContext => - applyDisableRules(OPTIONS_CONTEXT_VALIDATE, { pairsEnabled: false, validateDisabled: !enabled, protocolSftp: false }); - -describe('applyDisableRules: buildValidateContext', () => { - it('disables auto_validate and algorithm when validation is disabled', () => { - const ctx = buildValidateContext(false); - const autoValidate = ctx.options.find((o) => o.valuePath[1] === 'auto_validate')!; - const algorithm = ctx.options.find((o) => o.valuePath[1] === 'algorithm')!; - - expect(autoValidate.disabled).toBe(true); - expect(algorithm.disabled).toBe(true); - }); - - it('keeps the original description on disabled validate options (no override note)', () => { - const ctx = buildValidateContext(false); - const autoValidate = ctx.options.find((o) => o.valuePath[1] === 'auto_validate')!; - - // validateDisabled options carry no overrideNote, so the description is unchanged. - expect(autoValidate.description).toBe( - 'Automatically validate files when download completes. Requires post-download validation above.', - ); - }); - - it('does not disable auto_validate and algorithm when validation is enabled', () => { - const ctx = buildValidateContext(true); - const autoValidate = ctx.options.find((o) => o.valuePath[1] === 'auto_validate')!; - const algorithm = ctx.options.find((o) => o.valuePath[1] === 'algorithm')!; - - expect(autoValidate.disabled).toBeFalsy(); - expect(algorithm.disabled).toBeFalsy(); - }); - - it('never disables the other validate options', () => { - const ctx = buildValidateContext(false); - const others = ctx.options.filter( - (o) => o.valuePath[1] !== 'auto_validate' && o.valuePath[1] !== 'algorithm', - ); - - for (const option of others) { - expect(option.disabled).toBeFalsy(); - } - }); -}); diff --git a/src/e2e-playwright/tests/about.spec.ts b/src/e2e-playwright/tests/about.spec.ts index 631034fb..e4a46379 100644 --- a/src/e2e-playwright/tests/about.spec.ts +++ b/src/e2e-playwright/tests/about.spec.ts @@ -8,18 +8,19 @@ test.describe("About Page", () => { }); test("version number is displayed and matches format vX.Y.Z", async ({ page }) => { - const versionText = page.locator("text=/v\\d+\\.\\d+\\.\\d+/"); - await expect(versionText).toBeVisible(); - expect(await versionText.textContent()).toMatch(/v\d+\.\d+\.\d+/); + const version = page.locator("#version"); + await expect(version).toBeVisible(); + expect((await version.textContent())?.trim()).toMatch(/^v\d+\.\d+\.\d+$/); }); test("GitHub link is present and points to correct URL", async ({ page }) => { - const githubLink = page.locator('a[href*="github.com/nitrobass24/seedsync"]'); + const githubLink = page.locator("#github a"); await expect(githubLink).toBeVisible(); - expect(await githubLink.getAttribute("href")).toContain("github.com/nitrobass24/seedsync"); + expect(await githubLink.getAttribute("href")).toBe("https://github.com/nitrobass24/seedsync"); }); test('page renders with app name "SeedSync"', async ({ page }) => { - await expect(page.locator("text=SeedSync").first()).toBeVisible(); + await expect(page.locator("#banner span")).toBeVisible(); + await expect(page.locator("#banner span")).toHaveText("SeedSync"); }); }); From 2f541189ed0644777d633c5c67e71351c055b4a6 Mon Sep 17 00:00:00 2001 From: nitrobass24 Date: Tue, 25 Aug 2026 22:02:26 -0500 Subject: [PATCH 26/39] refactor(python): convert hand-written data/result classes to dataclasses (#667) Convert pure-data classes to @dataclass: extract/validate/move/scanner process results and requests, ExtractStatus, ModelDiff, PairContext, and ExtractDispatch._Task. Replace getter-only property blocks on SystemFile and LftpJobStatus with plain public attributes (LftpJobStatus keeps its guarded total_transfer_state setter). Collapse serializer __KEY_* constants into dict literals; wire format unchanged (locked by existing serializer specs). ExtractRequest.out_dir_path_fallback is now stored as passed (None when unset); the two consumers in ExtractDispatch resolve the fallback with 'or', preserving behavior. --- src/python/controller/extract/dispatch.py | 47 +++------- .../controller/extract/extract_process.py | 27 +++--- .../controller/extract/extract_request.py | 24 ++--- src/python/controller/move/move_process.py | 17 ++-- src/python/controller/pair_context.py | 81 +++++++---------- src/python/controller/scan/scanner_process.py | 13 ++- .../controller/validate/validate_process.py | 88 +++++++------------ src/python/lftp/job_status.py | 30 ++----- src/python/model/diff.py | 29 ++---- src/python/system/file.py | 52 +++-------- .../web/serialize/serialize_auto_queue.py | 8 +- .../web/serialize/serialize_log_record.py | 26 ++---- src/python/web/serialize/serialize_status.py | 72 +++++---------- 13 files changed, 173 insertions(+), 341 deletions(-) diff --git a/src/python/controller/extract/dispatch.py b/src/python/controller/extract/dispatch.py index 96c7a426..91abfdc3 100644 --- a/src/python/controller/extract/dispatch.py +++ b/src/python/controller/extract/dispatch.py @@ -7,6 +7,7 @@ import threading import time from abc import ABC, abstractmethod +from dataclasses import dataclass, field from enum import Enum from common import AppError @@ -29,6 +30,7 @@ def extract_failed(self, name: str, is_dir: bool, pair_id: str | None = None): pass +@dataclass(frozen=True) class ExtractStatus: """ Represents the status of a single extraction request @@ -37,43 +39,21 @@ class ExtractStatus: class State(Enum): EXTRACTING = 0 - def __init__(self, name: str, is_dir: bool, state: State, pair_id: str | None = None): - self.__name = name - self.__is_dir = is_dir - self.__state = state - self.__pair_id = pair_id - - @property - def name(self) -> str: - return self.__name - - @property - def is_dir(self) -> bool: - return self.__is_dir - - @property - def state(self) -> State: - return self.__state - - @property - def pair_id(self) -> str | None: - return self.__pair_id - - def __eq__(self, other: object) -> bool: - if not isinstance(other, ExtractStatus): - return NotImplemented - return self.__dict__ == other.__dict__ + name: str + is_dir: bool + state: State + pair_id: str | None = None class ExtractDispatch: __WORKER_SLEEP_INTERVAL_IN_SECS = 0.5 + @dataclass class _Task: - def __init__(self, root_name: str, root_is_dir: bool, pair_id: str | None = None): - self.root_name = root_name - self.root_is_dir = root_is_dir - self.pair_id = pair_id - self.archive_paths: list[tuple[str, str]] = [] + root_name: str + root_is_dir: bool + pair_id: str | None = None + archive_paths: list[tuple[str, str]] = field(default_factory=list[tuple[str, str]]) def add_archive(self, archive_path: str, out_dir_path: str): self.archive_paths.append((archive_path, out_dir_path)) @@ -156,7 +136,8 @@ def extract(self, req: ExtractRequest): curr_file.full_path, req.local_path, req.local_path_fallback ) if archive_full_path: - base_out = req.out_dir_path_fallback if is_fallback else req.out_dir_path + fallback_out = req.out_dir_path_fallback or req.out_dir_path + base_out = fallback_out if is_fallback else req.out_dir_path out_dir_path = os.path.join(base_out, os.path.dirname(curr_file.full_path)) task.add_archive(archive_path=archive_full_path, out_dir_path=out_dir_path) @@ -177,7 +158,7 @@ def extract(self, req: ExtractRequest): ) if not archive_full_path: raise ExtractDispatchError(f"File is not an archive: {model_file.name}") - base_out = req.out_dir_path_fallback if is_fallback else req.out_dir_path + base_out = (req.out_dir_path_fallback or req.out_dir_path) if is_fallback else req.out_dir_path task.add_archive(archive_path=archive_full_path, out_dir_path=base_out) self.__task_queue.put(task) diff --git a/src/python/controller/extract/extract_process.py b/src/python/controller/extract/extract_process.py index 72ca8eb6..313980b0 100644 --- a/src/python/controller/extract/extract_process.py +++ b/src/python/controller/extract/extract_process.py @@ -7,6 +7,7 @@ import queue import threading import time +from dataclasses import dataclass from datetime import datetime from typing import override @@ -16,26 +17,26 @@ from .extract_request import ExtractRequest +@dataclass class ExtractStatusResult: - def __init__(self, timestamp: datetime, statuses: list[ExtractStatus]): - self.timestamp = timestamp - self.statuses = statuses + timestamp: datetime + statuses: list[ExtractStatus] +@dataclass class ExtractCompletedResult: - def __init__(self, timestamp: datetime, name: str, is_dir: bool, pair_id: str | None = None): - self.timestamp = timestamp - self.name = name - self.is_dir = is_dir - self.pair_id = pair_id + timestamp: datetime + name: str + is_dir: bool + pair_id: str | None = None +@dataclass class ExtractFailedResult: - def __init__(self, timestamp: datetime, name: str, is_dir: bool, pair_id: str | None = None): - self.timestamp = timestamp - self.name = name - self.is_dir = is_dir - self.pair_id = pair_id + timestamp: datetime + name: str + is_dir: bool + pair_id: str | None = None class ExtractProcess(AppProcess): diff --git a/src/python/controller/extract/extract_request.py b/src/python/controller/extract/extract_request.py index 5c992dc0..9110e532 100644 --- a/src/python/controller/extract/extract_request.py +++ b/src/python/controller/extract/extract_request.py @@ -1,23 +1,17 @@ # Copyright 2017, Inderpreet Singh, All rights reserved. +from dataclasses import dataclass + from model import ModelFile +@dataclass class ExtractRequest: """Bundles a ModelFile with the pair-specific paths needed for extraction.""" - def __init__( - self, - model_file: ModelFile, - local_path: str, - out_dir_path: str, - pair_id: str | None = None, - local_path_fallback: str | None = None, - out_dir_path_fallback: str | None = None, - ): - self.model_file = model_file - self.pair_id = pair_id - self.local_path = local_path - self.out_dir_path = out_dir_path - self.local_path_fallback = local_path_fallback - self.out_dir_path_fallback = out_dir_path_fallback or out_dir_path + model_file: ModelFile + local_path: str + out_dir_path: str + pair_id: str | None = None + local_path_fallback: str | None = None + out_dir_path_fallback: str | None = None diff --git a/src/python/controller/move/move_process.py b/src/python/controller/move/move_process.py index 0b5ebfe2..9505589a 100644 --- a/src/python/controller/move/move_process.py +++ b/src/python/controller/move/move_process.py @@ -6,25 +6,20 @@ import errno import os import shutil +from dataclasses import dataclass from typing import override from common import AppOneShotProcess, Constants, PipeStream +@dataclass class MoveFailedResult: """Result reported when a staging->final move fails.""" - def __init__( - self, - timestamp: datetime.datetime, - name: str, - pair_id: str | None = None, - error_message: str | None = None, - ): - self.timestamp = timestamp - self.name = name - self.pair_id = pair_id - self.error_message = error_message + timestamp: datetime.datetime + name: str + pair_id: str | None = None + error_message: str | None = None class MoveProcess(AppOneShotProcess): diff --git a/src/python/controller/pair_context.py b/src/python/controller/pair_context.py index c3805beb..218d764b 100644 --- a/src/python/controller/pair_context.py +++ b/src/python/controller/pair_context.py @@ -8,6 +8,8 @@ from __future__ import annotations +from dataclasses import dataclass, field + from common import AppError, Config, Constants, Context from lftp import Lftp @@ -23,53 +25,38 @@ class ControllerError(AppError): pass +@dataclass class PairContext: """ Holds all per-pair state: LFTP instance, scanners, scanner processes, model builder, and download tracking. """ - def __init__( - self, - pair_id: str | None, - name: str, - remote_path: str, - local_path: str, - effective_local_path: str, - lftp: Lftp, - active_scanner: ActiveScanner, - local_scanner: LocalScanner, - remote_scanner: RemoteScanner, - active_scan_process: ScannerProcess, - local_scan_process: ScannerProcess, - remote_scan_process: ScannerProcess, - model_builder: ModelBuilder, - ): - self.pair_id = pair_id - self.name = name - self.remote_path = remote_path - self.local_path = local_path - self.effective_local_path = effective_local_path - self.lftp = lftp - self.active_scanner = active_scanner - self.local_scanner = local_scanner - self.remote_scanner = remote_scanner - self.active_scan_process = active_scan_process - self.local_scan_process = local_scan_process - self.remote_scan_process = remote_scan_process - self.model_builder = model_builder - - # Per-pair tracking state - self.active_downloading_file_names: list[str] = [] - self.active_extracting_file_names: list[str] = [] - self.prev_downloading_file_names: set[str] = set() - self.pending_completion: set[str] = set() - self.remote_scan_received: bool = False - self.local_scan_received: bool = False - - # Temporary storage for latest scan results (set during ModelUpdater._update_pair_model_state) - self.latest_remote_scan: ScannerResult | None = None - self.latest_local_scan: ScannerResult | None = None + pair_id: str | None + name: str + remote_path: str + local_path: str + effective_local_path: str + lftp: Lftp + active_scanner: ActiveScanner + local_scanner: LocalScanner + remote_scanner: RemoteScanner + active_scan_process: ScannerProcess + local_scan_process: ScannerProcess + remote_scan_process: ScannerProcess + model_builder: ModelBuilder + + # Per-pair tracking state + active_downloading_file_names: list[str] = field(default_factory=list[str]) + active_extracting_file_names: list[str] = field(default_factory=list[str]) + prev_downloading_file_names: set[str] = field(default_factory=set[str]) + pending_completion: set[str] = field(default_factory=set[str]) + remote_scan_received: bool = False + local_scan_received: bool = False + + # Temporary storage for latest scan results (set during ModelUpdater._update_pair_model_state) + latest_remote_scan: ScannerResult | None = None + latest_local_scan: ScannerResult | None = None def validate_config(context: Context) -> None: @@ -95,9 +82,9 @@ def validate_config(context: Context) -> None: "num_max_total_connections", "protocol", ] - for field in lftp_fields: - if getattr(config.lftp, field) is None: - missing.append(f"Lftp.{field}") + for name in lftp_fields: + if getattr(config.lftp, name) is None: + missing.append(f"Lftp.{name}") # FTP port: when protocol is ftps, remote_ftp_port must be set if config.lftp.protocol == "ftps" and config.lftp.remote_ftp_port is None: @@ -109,9 +96,9 @@ def validate_config(context: Context) -> None: "interval_ms_local_scan", "interval_ms_downloading_scan", ] - for field in controller_fields: - if getattr(config.controller, field) is None: - missing.append(f"Controller.{field}") + for name in controller_fields: + if getattr(config.controller, name) is None: + missing.append(f"Controller.{name}") # Extract path: when use_local_path_as_extract_path is False, extract_path must be set if config.controller.use_local_path_as_extract_path is None: diff --git a/src/python/controller/scan/scanner_process.py b/src/python/controller/scan/scanner_process.py index e97ae03c..f4dedc69 100644 --- a/src/python/controller/scan/scanner_process.py +++ b/src/python/controller/scan/scanner_process.py @@ -3,6 +3,7 @@ import logging from abc import ABC, abstractmethod +from dataclasses import dataclass from datetime import datetime from typing import override @@ -39,18 +40,16 @@ def set_base_logger(self, base_logger: logging.Logger): pass +@dataclass class ScannerResult: """ Results of a system scan """ - def __init__( - self, timestamp: datetime, files: list[SystemFile], failed: bool = False, error_message: str | None = None - ): - self.timestamp = timestamp - self.files = files - self.failed = failed - self.error_message = error_message + timestamp: datetime + files: list[SystemFile] + failed: bool = False + error_message: str | None = None class ScannerProcess(AppProcess): diff --git a/src/python/controller/validate/validate_process.py b/src/python/controller/validate/validate_process.py index 18c635c2..3a622585 100644 --- a/src/python/controller/validate/validate_process.py +++ b/src/python/controller/validate/validate_process.py @@ -8,6 +8,7 @@ import os import queue import time +from dataclasses import dataclass from enum import Enum from typing import TYPE_CHECKING, override @@ -17,82 +18,57 @@ from ssh import Sshcp +@dataclass class ValidateRequest: """Request to validate a file by comparing local and remote checksums.""" - def __init__( - self, - name: str, - is_dir: bool, - pair_id: str | None, - local_path: str, - remote_path: str, - algorithm: str, - remote_address: str, - remote_username: str, - remote_password: str | None, - remote_port: int, - ): - self.name = name - self.is_dir = is_dir - self.pair_id = pair_id - self.local_path = local_path - self.remote_path = remote_path - self.algorithm = algorithm - self.remote_address = remote_address - self.remote_username = remote_username - self.remote_password = remote_password - self.remote_port = remote_port + name: str + is_dir: bool + pair_id: str | None + local_path: str + remote_path: str + algorithm: str + remote_address: str + remote_username: str + remote_password: str | None + remote_port: int +@dataclass class ValidateStatus: """Status of an in-progress validation.""" class State(Enum): VALIDATING = 0 - def __init__(self, name: str, is_dir: bool, state: ValidateStatus.State, pair_id: str | None = None): - self.name = name - self.is_dir = is_dir - self.state = state - self.pair_id = pair_id - - def __eq__(self, other: object) -> bool: - if not isinstance(other, ValidateStatus): - return NotImplemented - return self.__dict__ == other.__dict__ + name: str + is_dir: bool + state: ValidateStatus.State + pair_id: str | None = None +@dataclass class ValidateStatusResult: - def __init__(self, timestamp: datetime.datetime, statuses: list[ValidateStatus]): - self.timestamp = timestamp - self.statuses = statuses + timestamp: datetime.datetime + statuses: list[ValidateStatus] +@dataclass class ValidateCompletedResult: - def __init__(self, timestamp: datetime.datetime, name: str, is_dir: bool, pair_id: str | None = None): - self.timestamp = timestamp - self.name = name - self.is_dir = is_dir - self.pair_id = pair_id + timestamp: datetime.datetime + name: str + is_dir: bool + pair_id: str | None = None +@dataclass class ValidateFailedResult: - def __init__( - self, - timestamp: datetime.datetime, - name: str, - is_dir: bool, - pair_id: str | None = None, - error_message: str | None = None, - is_checksum_mismatch: bool = False, - ): - self.timestamp = timestamp - self.name = name - self.is_dir = is_dir - self.pair_id = pair_id - self.error_message = error_message - self.is_checksum_mismatch = is_checksum_mismatch + timestamp: datetime.datetime + name: str + is_dir: bool + pair_id: str | None = None + error_message: str | None = None + is_checksum_mismatch: bool = False class ChecksumMismatchError(ValueError): diff --git a/src/python/lftp/job_status.py b/src/python/lftp/job_status.py index f1d38b8f..6271b870 100644 --- a/src/python/lftp/job_status.py +++ b/src/python/lftp/job_status.py @@ -34,44 +34,28 @@ class TransferState(NamedTuple): eta: int | None def __init__(self, job_id: int, job_type: Type, state: State, name: str, flags: str): - self.__id = job_id - self.__type = job_type - self.__state = state - self.__name = name - self.__flags = flags + self.id = job_id + self.type = job_type + self.state = state + self.name = name + self.flags = flags self.__total_transfer_state = LftpJobStatus.TransferState(None, None, None, None, None) # dict of active file transfer states, maps filename to their transfer state # there's no hierarchical info for now self.__active_files_state: dict[str, LftpJobStatus.TransferState] = {} - @property - def id(self) -> int: - return self.__id - - @property - def type(self) -> Type: - return self.__type - - @property - def state(self) -> "LftpJobStatus.State": - return self.__state - - @property - def name(self) -> str: - return self.__name - @property def total_transfer_state(self) -> TransferState: return self.__total_transfer_state @total_transfer_state.setter def total_transfer_state(self, total_transfer_state: TransferState): - if self.__state == LftpJobStatus.State.QUEUED: + if self.state == LftpJobStatus.State.QUEUED: raise TypeError("Cannot set transfer state on job of type queue") self.__total_transfer_state = total_transfer_state def add_active_file_transfer_state(self, filename: str, transfer_state: TransferState): - if self.__state == LftpJobStatus.State.QUEUED: + if self.state == LftpJobStatus.State.QUEUED: raise TypeError("Cannot set transfer state on job of type queue") self.__active_files_state[filename] = transfer_state diff --git a/src/python/model/diff.py b/src/python/model/diff.py index 0402085b..05582702 100644 --- a/src/python/model/diff.py +++ b/src/python/model/diff.py @@ -1,5 +1,6 @@ # Copyright 2017, Inderpreet Singh, All rights reserved. +from dataclasses import dataclass from enum import Enum # my libs @@ -7,6 +8,7 @@ from .model import Model +@dataclass(frozen=True) class ModelDiff: """ Represents a single change in the model @@ -17,30 +19,9 @@ class Change(Enum): REMOVED = 1 UPDATED = 2 - def __init__(self, change: Change, old_file: ModelFile | None, new_file: ModelFile | None): - self.__change = change - self.__old_file = old_file - self.__new_file = new_file - - def __eq__(self, other: object) -> bool: - if not isinstance(other, ModelDiff): - return NotImplemented - return self.__dict__ == other.__dict__ - - def __repr__(self) -> str: - return str(self.__dict__) - - @property - def change(self) -> Change: - return self.__change - - @property - def old_file(self) -> ModelFile | None: - return self.__old_file - - @property - def new_file(self) -> ModelFile | None: - return self.__new_file + change: Change + old_file: ModelFile | None + new_file: ModelFile | None class ModelDiffUtil: diff --git a/src/python/system/file.py b/src/python/system/file.py index 9ff78b86..99d536d1 100644 --- a/src/python/system/file.py +++ b/src/python/system/file.py @@ -19,12 +19,12 @@ def __init__( ): if size < 0: raise ValueError("File size must be non-negative") - self.__name = name - self.__size = size # in bytes - self.__is_dir = is_dir - self.__timestamp_created = time_created - self.__timestamp_modified = time_modified - self.__children: list[SystemFile] = [] + self.name = name + self.size = size # in bytes + self.is_dir = is_dir + self.timestamp_created = time_created + self.timestamp_modified = time_modified + self.children: list[SystemFile] = [] def __eq__(self, other: object) -> bool: if not isinstance(other, SystemFile): @@ -34,43 +34,19 @@ def __eq__(self, other: object) -> bool: def __repr__(self) -> str: return str(self.__dict__) - @property - def name(self) -> str: - return self.__name - - @property - def size(self) -> int: - return self.__size - - @property - def is_dir(self) -> bool: - return self.__is_dir - - @property - def timestamp_created(self) -> datetime | None: - return self.__timestamp_created - - @property - def timestamp_modified(self) -> datetime | None: - return self.__timestamp_modified - - @property - def children(self) -> list["SystemFile"]: - return self.__children - def add_child(self, file: "SystemFile"): - if not self.__is_dir: + if not self.is_dir: raise TypeError("Cannot add children to a file") - self.__children.append(file) + self.children.append(file) def to_dict(self) -> dict[str, Any]: return { - "name": self.__name, - "size": self.__size, - "is_dir": self.__is_dir, - "time_created": self.__timestamp_created.isoformat() if self.__timestamp_created else None, - "time_modified": self.__timestamp_modified.isoformat() if self.__timestamp_modified else None, - "children": [child.to_dict() for child in self.__children], + "name": self.name, + "size": self.size, + "is_dir": self.is_dir, + "time_created": self.timestamp_created.isoformat() if self.timestamp_created else None, + "time_modified": self.timestamp_modified.isoformat() if self.timestamp_modified else None, + "children": [child.to_dict() for child in self.children], } @staticmethod diff --git a/src/python/web/serialize/serialize_auto_queue.py b/src/python/web/serialize/serialize_auto_queue.py index f876c4b4..91b4ffa6 100644 --- a/src/python/web/serialize/serialize_auto_queue.py +++ b/src/python/web/serialize/serialize_auto_queue.py @@ -6,12 +6,6 @@ class SerializeAutoQueue: - __KEY_PATTERN = "pattern" - @staticmethod def patterns(patterns: list[AutoQueuePattern]) -> str: - patterns_list: list[dict[str, str]] = [] - for pattern in patterns: - patterns_list.append({SerializeAutoQueue.__KEY_PATTERN: pattern.pattern}) - - return json.dumps(patterns_list) + return json.dumps([{"pattern": p.pattern} for p in patterns]) diff --git a/src/python/web/serialize/serialize_log_record.py b/src/python/web/serialize/serialize_log_record.py index 5d282808..be027014 100644 --- a/src/python/web/serialize/serialize_log_record.py +++ b/src/python/web/serialize/serialize_log_record.py @@ -12,33 +12,23 @@ class SerializeLogRecord(Serialize): and the EventSource client frontend for the log stream. """ - # Event keys - __EVENT_RECORD = "log-record" - - # Data keys - __KEY_TIME = "time" - __KEY_LEVEL_NAME = "level_name" - __KEY_LOGGER_NAME = "logger_name" - __KEY_MESSAGE = "message" - __KEY_EXCEPTION_TRACEBACK = "exc_tb" - def __init__(self): super().__init__() # logging formatter to generate exception traceback self.__log_formatter = logging.Formatter() def record(self, record: logging.LogRecord) -> str: - json_dict: dict[str, str | None] = {} - json_dict[SerializeLogRecord.__KEY_TIME] = str(record.created) - json_dict[SerializeLogRecord.__KEY_LEVEL_NAME] = record.levelname - json_dict[SerializeLogRecord.__KEY_LOGGER_NAME] = record.name - json_dict[SerializeLogRecord.__KEY_MESSAGE] = record.getMessage() exc_text = None if record.exc_text: exc_text = record.exc_text elif record.exc_info: exc_text = self.__log_formatter.formatException(record.exc_info) - json_dict[SerializeLogRecord.__KEY_EXCEPTION_TRACEBACK] = exc_text - record_json = json.dumps(json_dict) - return self._sse_pack(event=SerializeLogRecord.__EVENT_RECORD, data=record_json) + json_dict = { + "time": str(record.created), + "level_name": record.levelname, + "logger_name": record.name, + "message": record.getMessage(), + "exc_tb": exc_text, + } + return self._sse_pack(event="log-record", data=json.dumps(json_dict)) diff --git a/src/python/web/serialize/serialize_status.py b/src/python/web/serialize/serialize_status.py index 0ad7a069..c49b3e90 100644 --- a/src/python/web/serialize/serialize_status.py +++ b/src/python/web/serialize/serialize_status.py @@ -1,7 +1,6 @@ # Copyright 2017, Inderpreet Singh, All rights reserved. import json -from typing import Any from common import Status @@ -9,52 +8,30 @@ class SerializeStatusJson: - # Data keys - __KEY_SERVER = "server" - __KEY_SERVER_UP = "up" - __KEY_SERVER_ERROR_MSG = "error_msg" - __KEY_CONTROLLER = "controller" - __KEY_CONTROLLER_LATEST_LOCAL_SCAN_TIME = "latest_local_scan_time" - __KEY_CONTROLLER_LATEST_REMOTE_SCAN_TIME = "latest_remote_scan_time" - __KEY_CONTROLLER_LATEST_REMOTE_SCAN_FAILED = "latest_remote_scan_failed" - __KEY_CONTROLLER_LATEST_REMOTE_SCAN_ERROR = "latest_remote_scan_error" - __KEY_CONTROLLER_NO_ENABLED_PAIRS = "no_enabled_pairs" - @staticmethod def status(status: Status) -> str: - json_dict: dict[str, Any] = {} - - json_dict[SerializeStatusJson.__KEY_SERVER] = {} - json_dict[SerializeStatusJson.__KEY_SERVER][SerializeStatusJson.__KEY_SERVER_UP] = status.server.up - json_dict[SerializeStatusJson.__KEY_SERVER][SerializeStatusJson.__KEY_SERVER_ERROR_MSG] = ( - status.server.error_msg - ) - - json_dict[SerializeStatusJson.__KEY_CONTROLLER] = {} - json_dict[SerializeStatusJson.__KEY_CONTROLLER][SerializeStatusJson.__KEY_CONTROLLER_LATEST_LOCAL_SCAN_TIME] = ( - str(status.controller.latest_local_scan_time.timestamp()) - if status.controller.latest_local_scan_time - else None - ) - json_dict[SerializeStatusJson.__KEY_CONTROLLER][ - SerializeStatusJson.__KEY_CONTROLLER_LATEST_REMOTE_SCAN_TIME - ] = ( - str(status.controller.latest_remote_scan_time.timestamp()) - if status.controller.latest_remote_scan_time - else None - ) - json_dict[SerializeStatusJson.__KEY_CONTROLLER][ - SerializeStatusJson.__KEY_CONTROLLER_LATEST_REMOTE_SCAN_FAILED - ] = status.controller.latest_remote_scan_failed - json_dict[SerializeStatusJson.__KEY_CONTROLLER][ - SerializeStatusJson.__KEY_CONTROLLER_LATEST_REMOTE_SCAN_ERROR - ] = status.controller.latest_remote_scan_error - json_dict[SerializeStatusJson.__KEY_CONTROLLER][SerializeStatusJson.__KEY_CONTROLLER_NO_ENABLED_PAIRS] = ( - status.controller.no_enabled_pairs - ) - - status_json = json.dumps(json_dict) - return status_json + json_dict = { + "server": { + "up": status.server.up, + "error_msg": status.server.error_msg, + }, + "controller": { + "latest_local_scan_time": ( + str(status.controller.latest_local_scan_time.timestamp()) + if status.controller.latest_local_scan_time + else None + ), + "latest_remote_scan_time": ( + str(status.controller.latest_remote_scan_time.timestamp()) + if status.controller.latest_remote_scan_time + else None + ), + "latest_remote_scan_failed": status.controller.latest_remote_scan_failed, + "latest_remote_scan_error": status.controller.latest_remote_scan_error, + "no_enabled_pairs": status.controller.no_enabled_pairs, + }, + } + return json.dumps(json_dict) class SerializeStatus(Serialize): @@ -63,9 +40,6 @@ class SerializeStatus(Serialize): and the EventSource client frontend for the status stream. """ - # Event keys - __EVENT_STATUS = "status" - def status(self, status: Status) -> str: status_json = SerializeStatusJson.status(status) - return self._sse_pack(event=SerializeStatus.__EVENT_STATUS, data=status_json) + return self._sse_pack(event="status", data=status_json) From 25a8f35126fb2abde11612f116d8be35491842ed Mon Sep 17 00:00:00 2001 From: nitrobass24 Date: Tue, 25 Aug 2026 22:53:43 -0500 Subject: [PATCH 27/39] docs: CodeRabbit reviews are user-triggered; agents must not trigger them --- AGENTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index 3f9f6bf5..a14a2d41 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -88,7 +88,7 @@ Soft targets: file ≤ 500 lines, class ≤ 300, function ≤ 40, complexity ≤ - Conventional commits with scope: `feat(angular):`, `fix(python):`, `chore(build):`, `refactor(python):`, `docs:`, `ci:`. Reference issues (`(#123)`) in the subject or body. - **Never add AI attribution, advertising, or co-author lines** to commits, PR bodies, or comments. No `Co-Authored-By: Claude`, no "Generated with …" footers. - PR body: short summary, what was intentionally skipped and why, a test-plan checklist, and any size-delta or contract notes the issue asked for. Tick the corresponding checklist item in the tracking issue when a PR merges. -- CodeRabbit incremental reviews are off; trigger with a `@coderabbitai review` comment when a PR is ready. +- CodeRabbit incremental reviews are off. Do not trigger reviews (no `@coderabbitai review` comments) — the user triggers them. - Inline review comments must anchor to lines in the diff; verify a finding against current code before posting it. - Before each commit, review the diff for over-engineering. If the ponytail plugin () is installed, use its `ponytail:ponytail-review` skill; otherwise do a trim pass: remove speculative config, unused state, single-caller layers, and duplicate helpers. From f0eee7298bbe5467e9b20efbf682f1c52ef45f87 Mon Sep 17 00:00:00 2001 From: nitrobass24 Date: Tue, 25 Aug 2026 22:53:44 -0500 Subject: [PATCH 28/39] refactor(python): replace notifier thread bookkeeping with ThreadPoolExecutor (#669) Replace the duplicated _active_threads/_lock/_shutdown_flag/_thread_wrapper machinery in WebhookNotifier and ArrNotifier with a ThreadPoolExecutor(max_workers=4) plus a tracked pending-futures set. Fire-and-forget sends go through executor.submit; post-shutdown submits raise RuntimeError and are suppressed with the same debug log as before. shutdown() keeps its total-deadline semantics: non-blocking executor.shutdown(cancel_futures=True) followed by futures.wait(timeout). Shutdown tests rewritten behavior-based (Event-blocked fake senders) instead of poking _active_threads; the multi-send deadline test now uses 4 concurrent sends to match the pool size. --- src/python/controller/arr_notifier.py | 69 ++++++++----------- src/python/controller/notifier.py | 66 +++++++----------- .../test_controller/test_arr_notifier.py | 17 ++--- .../test_controller/test_notifier.py | 30 ++++---- 4 files changed, 78 insertions(+), 104 deletions(-) diff --git a/src/python/controller/arr_notifier.py b/src/python/controller/arr_notifier.py index e323f6d2..f82731eb 100644 --- a/src/python/controller/arr_notifier.py +++ b/src/python/controller/arr_notifier.py @@ -2,8 +2,8 @@ import logging import os import threading -import time import urllib.request +from concurrent.futures import Future, ThreadPoolExecutor, wait from common import ArrInstance, IntegrationsConfig, PathPair, PathPairsConfig from model import IModelListener, ModelFile @@ -32,9 +32,9 @@ def __init__( self._integrations_config = integrations_config self._path_pairs_config = path_pairs_config self._logger = logger.getChild("ArrNotifier") - self._shutdown_flag = False - self._active_threads: set[threading.Thread] = set() - self._lock = threading.Lock() + self._executor = ThreadPoolExecutor(max_workers=4, thread_name_prefix="ArrNotifier") + self._pending: set[Future[None]] = set() + self._pending_lock = threading.Lock() def file_added(self, file: ModelFile): pass @@ -79,32 +79,25 @@ def file_updated(self, old_file: ModelFile, new_file: ModelFile): ) def shutdown(self, timeout: float = 5): - """Drain in-flight threads and prevent new ones.""" - with self._lock: - self._shutdown_flag = True - threads = list(self._active_threads) + """Drain in-flight sends and prevent new ones.""" + self._executor.shutdown(wait=False, cancel_futures=True) + with self._pending_lock: + pending = [f for f in self._pending if not f.done()] - if not threads: - self._logger.debug("Arr notifier shutdown: no in-flight threads") + if not pending: + self._logger.debug("Arr notifier shutdown: no in-flight sends") return - self._logger.info("Arr notifier shutting down, waiting for %d in-flight thread(s)", len(threads)) - deadline = time.monotonic() + timeout - for thread in threads: - remaining = max(0, deadline - time.monotonic()) - thread.join(timeout=remaining) - - with self._lock: - still_alive = [t for t in self._active_threads if t.is_alive()] - - if still_alive: + self._logger.info("Arr notifier shutting down, waiting for %d in-flight send(s)", len(pending)) + not_done = wait(pending, timeout=timeout).not_done + if not_done: self._logger.warning( - "Arr notifier shutdown: %d thread(s) did not complete within %.1fs timeout", - len(still_alive), + "Arr notifier shutdown: %d send(s) did not complete within %.1fs timeout", + len(not_done), timeout, ) else: - self._logger.info("Arr notifier shutdown: all threads completed") + self._logger.info("Arr notifier shutdown: all sends completed") @staticmethod def _resolve_local_path(pair: PathPair, file: ModelFile) -> str: @@ -112,27 +105,21 @@ def _resolve_local_path(pair: PathPair, file: ModelFile) -> str: return os.path.join(base, file.full_path) if base else file.full_path def _fire_scan(self, service: str, base_url: str, api_key: str, command_name: str, path: str): - """Fire-and-forget POST in a daemon thread.""" + """Fire-and-forget POST on the executor.""" url = base_url.rstrip("/") + "/api/v3/command" payload = {"name": command_name, "path": path} - thread = threading.Thread( - target=self._thread_wrapper, - args=(service, url, api_key, payload), - daemon=True, - ) - with self._lock: - if self._shutdown_flag: - self._logger.debug("%s scan suppressed during shutdown: %s", service, path) - return - thread.start() - self._active_threads.add(thread) - - def _thread_wrapper(self, service: str, url: str, api_key: str, payload: dict[str, str]) -> None: try: - self._send_post(service, url, api_key, payload) - finally: - with self._lock: - self._active_threads.discard(threading.current_thread()) + future = self._executor.submit(self._send_post, service, url, api_key, payload) + except RuntimeError: + self._logger.debug("%s scan suppressed during shutdown: %s", service, path) + return + with self._pending_lock: + self._pending.add(future) + future.add_done_callback(self._discard_pending) + + def _discard_pending(self, future: Future[None]) -> None: + with self._pending_lock: + self._pending.discard(future) def _send_post(self, service: str, url: str, api_key: str, payload: dict[str, str]) -> None: if not url.startswith(("http://", "https://")): diff --git a/src/python/controller/notifier.py b/src/python/controller/notifier.py index 5bbf487a..c9efd550 100644 --- a/src/python/controller/notifier.py +++ b/src/python/controller/notifier.py @@ -1,8 +1,8 @@ import json import logging import threading -import time import urllib.request +from concurrent.futures import Future, ThreadPoolExecutor, wait from datetime import UTC, datetime from common import Config @@ -16,9 +16,9 @@ class WebhookNotifier(IModelListener): def __init__(self, config: Config, logger: logging.Logger): self._config = config self._logger = logger.getChild("WebhookNotifier") - self._shutdown_flag = False - self._active_threads: set[threading.Thread] = set() - self._lock = threading.Lock() + self._executor = ThreadPoolExecutor(max_workers=4, thread_name_prefix="WebhookNotifier") + self._pending: set[Future[None]] = set() + self._pending_lock = threading.Lock() def file_added(self, file: ModelFile): pass @@ -61,32 +61,25 @@ def _resolve_event_type(self, state: ModelFile.State) -> str | None: return None def shutdown(self, timeout: float = 5): - """Drain in-flight webhook threads and prevent new ones from being queued.""" - with self._lock: - self._shutdown_flag = True - threads = list(self._active_threads) + """Drain in-flight webhook sends and prevent new ones from being queued.""" + self._executor.shutdown(wait=False, cancel_futures=True) + with self._pending_lock: + pending = [f for f in self._pending if not f.done()] - if not threads: - self._logger.debug("Webhook notifier shutdown: no in-flight threads") + if not pending: + self._logger.debug("Webhook notifier shutdown: no in-flight sends") return - self._logger.info("Webhook notifier shutting down, waiting for %d in-flight thread(s)", len(threads)) - deadline = time.monotonic() + timeout - for thread in threads: - remaining = max(0, deadline - time.monotonic()) - thread.join(timeout=remaining) - - with self._lock: - still_alive = [t for t in self._active_threads if t.is_alive()] - - if still_alive: + self._logger.info("Webhook notifier shutting down, waiting for %d in-flight send(s)", len(pending)) + not_done = wait(pending, timeout=timeout).not_done + if not_done: self._logger.warning( - "Webhook notifier shutdown: %d thread(s) did not complete within %.1fs timeout", - len(still_alive), + "Webhook notifier shutdown: %d send(s) did not complete within %.1fs timeout", + len(not_done), timeout, ) else: - self._logger.info("Webhook notifier shutdown: all threads completed") + self._logger.info("Webhook notifier shutdown: all sends completed") def _fire_webhook( self, @@ -141,26 +134,19 @@ def _fire_telegram( self._fire_raw("Telegram", url, headers, body) def _fire_raw(self, label: str, url: str, headers: dict[str, str], body: bytes): - """Fire-and-forget POST in a daemon thread.""" - thread = threading.Thread(target=self._thread_wrapper, args=(label, url, headers, body), daemon=True) - with self._lock: - if self._shutdown_flag: - self._logger.debug("%s notification suppressed during shutdown", label) - return - self._active_threads.add(thread) + """Fire-and-forget POST on the executor.""" try: - thread.start() + future = self._executor.submit(self._send_post, label, url, headers, body) except RuntimeError: - with self._lock: - self._active_threads.discard(thread) - self._logger.exception("%s notification thread failed to start", label) + self._logger.debug("%s notification suppressed during shutdown", label) + return + with self._pending_lock: + self._pending.add(future) + future.add_done_callback(self._discard_pending) - def _thread_wrapper(self, label: str, url: str, headers: dict[str, str], body: bytes) -> None: - try: - self._send_post(label, url, headers, body) - finally: - with self._lock: - self._active_threads.discard(threading.current_thread()) + def _discard_pending(self, future: Future[None]) -> None: + with self._pending_lock: + self._pending.discard(future) def _send_post(self, label: str, url: str, headers: dict[str, str], body: bytes) -> None: if not url.startswith(("http://", "https://")): diff --git a/src/python/tests/unittests/test_controller/test_arr_notifier.py b/src/python/tests/unittests/test_controller/test_arr_notifier.py index d585b177..f70ffd7f 100644 --- a/src/python/tests/unittests/test_controller/test_arr_notifier.py +++ b/src/python/tests/unittests/test_controller/test_arr_notifier.py @@ -1,5 +1,6 @@ import logging import threading +import time import unittest from unittest.mock import patch @@ -236,25 +237,23 @@ def test_shutdown_waits_for_inflight(self): notifier, _, _ = self._build_notifier(instances=[inst], pairs=[pair]) barrier = threading.Event() started = threading.Event() + finished = threading.Event() def slow_send(*_args, **_kwargs): started.set() barrier.wait(timeout=5) + finished.set() with patch.object(notifier, "_send_post", side_effect=slow_send): self._trigger(notifier, pair_id=pair.id) self.assertTrue(started.wait(timeout=5)) - with notifier._lock: - self.assertEqual(len(notifier._active_threads), 1) - barrier.set() notifier.shutdown(timeout=2) - with notifier._lock: - self.assertEqual(len(notifier._active_threads), 0) + self.assertTrue(finished.is_set()) - def test_thread_cleaned_up_on_exception(self): + def test_shutdown_completes_after_send_exception(self): inst = ArrInstance(name="Sonarr", kind="sonarr", url="http://s", api_key="k") pair = self._make_pair(arr_target_ids=[inst.id]) notifier, _, _ = self._build_notifier(instances=[inst], pairs=[pair]) @@ -267,10 +266,12 @@ def failing_send(*_args, **_kwargs): with patch.object(notifier, "_send_post", side_effect=failing_send): self._trigger(notifier, pair_id=pair.id) self.assertTrue(started.wait(timeout=5)) + + start = time.monotonic() notifier.shutdown(timeout=2) + elapsed = time.monotonic() - start - with notifier._lock: - self.assertEqual(len(notifier._active_threads), 0) + self.assertLess(elapsed, 1.0) # ------------------------------------------------------------------ # Scheme guard diff --git a/src/python/tests/unittests/test_controller/test_notifier.py b/src/python/tests/unittests/test_controller/test_notifier.py index 0a78842f..6e445559 100644 --- a/src/python/tests/unittests/test_controller/test_notifier.py +++ b/src/python/tests/unittests/test_controller/test_notifier.py @@ -52,27 +52,25 @@ def test_shutdown_prevents_new_webhooks(self): notifier._fire_webhook("download_complete", "test.txt", "2026-01-01T00:00:00+00:00") mock_send.assert_not_called() - def test_shutdown_waits_for_inflight_threads(self): + def test_shutdown_waits_for_inflight_sends(self): notifier = self._make_notifier() barrier = threading.Event() started = threading.Event() + finished = threading.Event() def slow_send(*_args): started.set() barrier.wait(timeout=5) + finished.set() with patch.object(notifier, "_send_post", side_effect=slow_send): notifier._fire_webhook("download_complete", "test.txt", "2026-01-01T00:00:00+00:00") started.wait(timeout=5) - with notifier._lock: - self.assertEqual(len(notifier._active_threads), 1) - barrier.set() notifier.shutdown(timeout=2) - with notifier._lock: - self.assertEqual(len(notifier._active_threads), 0) + self.assertTrue(finished.is_set()) def test_shutdown_timeout_respected(self): notifier = self._make_notifier() @@ -95,7 +93,7 @@ def stuck_send(*_args): barrier.set() - def test_thread_removed_on_exception(self): + def test_shutdown_completes_after_send_exception(self): notifier = self._make_notifier() started = threading.Event() @@ -106,12 +104,14 @@ def failing_send(*_args): with patch.object(notifier, "_send_post", side_effect=failing_send): notifier._fire_webhook("download_complete", "test.txt", "2026-01-01T00:00:00+00:00") started.wait(timeout=5) + + start = time.monotonic() notifier.shutdown(timeout=2) + elapsed = time.monotonic() - start - with notifier._lock: - self.assertEqual(len(notifier._active_threads), 0) + self.assertLess(elapsed, 1.0) - def test_shutdown_flag_and_registration_atomic(self): + def test_shutdown_suppresses_all_subsequent_fires(self): notifier = self._make_notifier() notifier.shutdown(timeout=0) @@ -120,10 +120,10 @@ def test_shutdown_flag_and_registration_atomic(self): notifier._fire_webhook("download_complete", f"file{i}.txt", "2026-01-01T00:00:00+00:00") mock_send.assert_not_called() - with notifier._lock: - self.assertEqual(len(notifier._active_threads), 0) - def test_total_timeout_not_per_thread(self): + def test_total_timeout_not_per_send(self): + # 4 concurrent hung sends fill the executor; shutdown's deadline must + # apply to the batch, not per send. notifier = self._make_notifier() barriers: list[threading.Event] = [] all_started = threading.Event() @@ -136,12 +136,12 @@ def slow_send(*_args): barriers.append(b) with started_lock: started_count += 1 - if started_count >= 5: + if started_count >= 4: all_started.set() b.wait(timeout=10) with patch.object(notifier, "_send_post", side_effect=slow_send): - for i in range(5): + for i in range(4): notifier._fire_webhook("download_complete", f"file{i}.txt", "2026-01-01T00:00:00+00:00") all_started.wait(timeout=5) From 828cf2a5c0b9f7c08237510a6bcf77b975ad09fb Mon Sep 17 00:00:00 2001 From: nitrobass24 Date: Tue, 25 Aug 2026 23:28:15 -0500 Subject: [PATCH 29/39] test(python): assert started-event wait results in notifier shutdown tests --- .../tests/unittests/test_controller/test_notifier.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/python/tests/unittests/test_controller/test_notifier.py b/src/python/tests/unittests/test_controller/test_notifier.py index 6e445559..296515bd 100644 --- a/src/python/tests/unittests/test_controller/test_notifier.py +++ b/src/python/tests/unittests/test_controller/test_notifier.py @@ -65,7 +65,7 @@ def slow_send(*_args): with patch.object(notifier, "_send_post", side_effect=slow_send): notifier._fire_webhook("download_complete", "test.txt", "2026-01-01T00:00:00+00:00") - started.wait(timeout=5) + self.assertTrue(started.wait(timeout=5)) barrier.set() notifier.shutdown(timeout=2) @@ -83,7 +83,7 @@ def stuck_send(*_args): with patch.object(notifier, "_send_post", side_effect=stuck_send): notifier._fire_webhook("download_complete", "test.txt", "2026-01-01T00:00:00+00:00") - started.wait(timeout=5) + self.assertTrue(started.wait(timeout=5)) start = time.monotonic() notifier.shutdown(timeout=0.2) @@ -103,7 +103,7 @@ def failing_send(*_args): with patch.object(notifier, "_send_post", side_effect=failing_send): notifier._fire_webhook("download_complete", "test.txt", "2026-01-01T00:00:00+00:00") - started.wait(timeout=5) + self.assertTrue(started.wait(timeout=5)) start = time.monotonic() notifier.shutdown(timeout=2) @@ -143,7 +143,7 @@ def slow_send(*_args): with patch.object(notifier, "_send_post", side_effect=slow_send): for i in range(4): notifier._fire_webhook("download_complete", f"file{i}.txt", "2026-01-01T00:00:00+00:00") - all_started.wait(timeout=5) + self.assertTrue(all_started.wait(timeout=5)) start = time.monotonic() notifier.shutdown(timeout=0.3) From 0158433edd5a68430ef835ded42346f531807f5c Mon Sep 17 00:00:00 2001 From: nitrobass24 Date: Wed, 26 Aug 2026 00:00:52 -0500 Subject: [PATCH 30/39] refactor(python): replace status.py property metaprogramming with dataclasses (#671) StatusComponent becomes a dataclass base whose __setattr__ notifies listeners on public-field assignment, replacing the dir()/property reflection. ServerStatus/ControllerStatus are dataclasses with typed fields. Listener ABCs (IStatusListener, IStatusComponentListener) are replaced with plain callables; Status.CompListener collapses into a bound method. Component copy iterates dataclass fields; the cannot-reassign-component guard moves to Status.__setattr__. Notification semantics unchanged: every assignment notifies (no equality check), component listeners receive the field name, status listeners fire under the listeners lock, copies carry values but not listeners. --- src/python/common/__init__.py | 2 - src/python/common/status.py | 193 ++++++------------ .../unittests/test_common/test_status.py | 69 +++---- src/python/web/handler/stream_status.py | 9 +- 4 files changed, 91 insertions(+), 182 deletions(-) diff --git a/src/python/common/__init__.py b/src/python/common/__init__.py index d9ff17c5..b005a733 100644 --- a/src/python/common/__init__.py +++ b/src/python/common/__init__.py @@ -10,9 +10,7 @@ from .multiprocessing_logger import MultiprocessingLogger as MultiprocessingLogger from .status import ( Status as Status, - IStatusListener as IStatusListener, StatusComponent as StatusComponent, - IStatusComponentListener as IStatusComponentListener, ) from .app_process import AppProcess as AppProcess, AppOneShotProcess as AppOneShotProcess from .pipe_primitives import PipeStream as PipeStream, PipeFlag as PipeFlag diff --git a/src/python/common/status.py b/src/python/common/status.py index 0e130da8..7ad4619a 100644 --- a/src/python/common/status.py +++ b/src/python/common/status.py @@ -1,82 +1,48 @@ # Copyright 2017, Inderpreet Singh, All rights reserved. -from abc import ABC, abstractmethod +from collections.abc import Callable +from dataclasses import dataclass, field, fields +from datetime import datetime from threading import Lock -from typing import Any, TypeVar, override +from typing import TypeVar T = TypeVar("T", bound="StatusComponent") +type ComponentListener = Callable[[str], None] -class IStatusComponentListener(ABC): - @abstractmethod - def notify(self, name: str): - """ - Called when a property is changed - :param name: - :return: - """ - pass - -class BaseStatus: +@dataclass(eq=False) +class StatusComponent: """ - Provides functionality to dynamically create properties + Base class for status of a single component. + Assigning any public field notifies listeners with the field name. """ - # noinspection PyProtectedMember - @classmethod - def _create_property(cls, name: str) -> property: - return property(fget=lambda s: s._get_property(name), fset=lambda s, v: s._set_property(name, v)) - - def _get_property(self, name: str) -> Any: - return getattr(self, "__" + name, None) - - def _set_property(self, name: str, value: Any): - setattr(self, "__" + name, value) - - -class StatusComponent(BaseStatus): - """ - Base class for status of a single component - """ + _listeners: list[ComponentListener] = field(default_factory=list[ComponentListener], init=False, repr=False) - def __init__(self): - self.__listeners: list[IStatusComponentListener] = [] - self.__properties: list[str] = [] # names of properties created - - def add_listener(self, listener: IStatusComponentListener): - if listener not in self.__listeners: - self.__listeners.append(listener) + def add_listener(self, listener: ComponentListener): + if listener not in self._listeners: + self._listeners.append(listener) - def remove_listener(self, listener: IStatusComponentListener): - if listener in self.__listeners: - self.__listeners.remove(listener) + def remove_listener(self, listener: ComponentListener): + if listener in self._listeners: + self._listeners.remove(listener) @classmethod def copy(cls: type[T], src: T, dst: T) -> None: - property_names = [p for p in dir(cls) if isinstance(getattr(cls, p), property)] - for prop in property_names: - setattr(dst, "__" + prop, getattr(src, "__" + prop)) - - @override - def _set_property(self, name: str, value: Any): - super()._set_property(name, value) - # Notify listeners - for listener in self.__listeners: - listener.notify(name) + """Copy field values (but not listeners) from src to dst.""" + for f in fields(src): + if not f.name.startswith("_"): + setattr(dst, f.name, getattr(src, f.name)) + def __setattr__(self, name: str, value: object): + object.__setattr__(self, name, value) + if not name.startswith("_"): + for listener in self._listeners: + listener(name) -class IStatusListener(ABC): - @abstractmethod - def notify(self): - """ - Called when any property of a component is changed - :return: - """ - pass - -class Status(BaseStatus): +class Status: """ This class tracks the status of all components across the server This is meant to be one-way communication - i.e. only one component @@ -87,91 +53,56 @@ class Status(BaseStatus): any change, or to each component for component-specific changes. """ - class CompListener(IStatusComponentListener): - """Propagates notifications from component to status listeners""" - - def __init__(self, status: "Status"): - self.status = status - - def notify(self, name: str): - self.status._listeners_lock.acquire() - for listener in self.status._listeners: - listener.notify() - self.status._listeners_lock.release() - # ----- Start of component definition ----- + @dataclass(eq=False) class ServerStatus(StatusComponent): - up = StatusComponent._create_property("up") - error_msg = StatusComponent._create_property("error_msg") - - def __init__(self): - super().__init__() - self.up = True - self.error_msg = None + up: bool = True + error_msg: str | None = None + @dataclass(eq=False) class ControllerStatus(StatusComponent): - latest_local_scan_time = StatusComponent._create_property("latest_local_scan_time") - latest_remote_scan_time = StatusComponent._create_property("latest_remote_scan_time") - latest_remote_scan_failed = StatusComponent._create_property("latest_remote_scan_failed") - latest_remote_scan_error = StatusComponent._create_property("latest_remote_scan_error") - no_enabled_pairs = StatusComponent._create_property("no_enabled_pairs") - - def __init__(self): - super().__init__() - self.latest_local_scan_time = None - self.latest_remote_scan_time = None - self.latest_remote_scan_failed = None - self.latest_remote_scan_error = None - self.no_enabled_pairs = False + latest_local_scan_time: datetime | None = None + latest_remote_scan_time: datetime | None = None + latest_remote_scan_failed: bool | None = None + latest_remote_scan_error: str | None = None + no_enabled_pairs: bool = False # ----- End of component definition ----- - # Component registration - server = BaseStatus._create_property("server") - controller = BaseStatus._create_property("controller") - def __init__(self): - self._listeners: list[IStatusListener] = [] + self._listeners: list[Callable[[], None]] = [] self._listeners_lock = Lock() - self.__comp_listener = Status.CompListener(self) # Component initialization - self.server = self.__create_component(Status.ServerStatus) - self.controller = self.__create_component(Status.ControllerStatus) + self.server = Status.ServerStatus() + self.controller = Status.ControllerStatus() + self.server.add_listener(self._on_component_changed) + self.controller.add_listener(self._on_component_changed) + + def __setattr__(self, name: str, value: object): + """Components can only be set once""" + if name in ("server", "controller") and hasattr(self, name): + raise ValueError("Cannot reassign component") + object.__setattr__(self, name, value) + + def _on_component_changed(self, _name: str) -> None: + """Propagates notifications from component to status listeners""" + with self._listeners_lock: + for listener in self._listeners: + listener() def copy(self) -> "Status": copy = Status() - cls = Status - property_names = [p for p in dir(cls) if isinstance(getattr(cls, p), property)] - for prop in property_names: - src_comp = self._get_property(prop) - dst_comp = copy._get_property(prop) - src_comp.__class__.copy(src_comp, dst_comp) + StatusComponent.copy(self.server, copy.server) + StatusComponent.copy(self.controller, copy.controller) return copy - def add_listener(self, listener: IStatusListener): - self._listeners_lock.acquire() - if listener not in self._listeners: - self._listeners.append(listener) - self._listeners_lock.release() + def add_listener(self, listener: Callable[[], None]): + with self._listeners_lock: + if listener not in self._listeners: + self._listeners.append(listener) - def remove_listener(self, listener: IStatusListener): - self._listeners_lock.acquire() - if listener in self._listeners: - self._listeners.remove(listener) - self._listeners_lock.release() - - def __create_component(self, comp_cls: type[T]) -> T: - """Create a component and register our listener with it""" - # PyCharm is confused and complains about the ctor - # noinspection PyCallingNonCallable - comp = comp_cls() - comp.add_listener(self.__comp_listener) - return comp - - @override - def _set_property(self, name: str, value: Any): - """Override set property so that it can only be set once""" - if self._get_property(name) is not None: - raise ValueError("Cannot reassign component") - super()._set_property(name, value) + def remove_listener(self, listener: Callable[[], None]): + with self._listeners_lock: + if listener in self._listeners: + self._listeners.remove(listener) diff --git a/src/python/tests/unittests/test_common/test_status.py b/src/python/tests/unittests/test_common/test_status.py index 9f2254e0..e2e31e35 100644 --- a/src/python/tests/unittests/test_common/test_status.py +++ b/src/python/tests/unittests/test_common/test_status.py @@ -1,33 +1,18 @@ # Copyright 2017, Inderpreet Singh, All rights reserved. import unittest +from dataclasses import dataclass from datetime import datetime -from typing import override +from typing import Any from unittest.mock import MagicMock -from common import IStatusComponentListener, IStatusListener, Status, StatusComponent +from common import Status, StatusComponent +@dataclass(eq=False) class DummyStatusComponent(StatusComponent): - a = StatusComponent._create_property("a") - b = StatusComponent._create_property("b") - - def __init__(self): - super().__init__() - self.a = None - self.b = None - - -class DummyStatusComponentListener(IStatusComponentListener): - @override - def notify(self, name): - pass - - -class DummyStatusListener(IStatusListener): - @override - def notify(self): - pass + a: Any = None + b: Any = None class TestStatusComponent(unittest.TestCase): @@ -39,23 +24,22 @@ def test_property_values(self): self.assertEqual(33, d.b) def test_listeners(self): - listener = DummyStatusComponentListener() - listener.notify = MagicMock() + listener = MagicMock() d = DummyStatusComponent() d.add_listener(listener) d.a = "hello world" - listener.notify.assert_called_once_with("a") - listener.notify.reset_mock() + listener.assert_called_once_with("a") + listener.reset_mock() d.b = 44 - listener.notify.assert_called_once_with("b") + listener.assert_called_once_with("b") # remove listener - listener.notify.reset_mock() + listener.reset_mock() d.remove_listener(listener) d.a = "bye world" - listener.notify.assert_not_called() + listener.assert_not_called() d.b = 22 - listener.notify.assert_not_called() + listener.assert_not_called() def test_copy_values(self): d = DummyStatusComponent() @@ -87,19 +71,18 @@ def test_copy_doesnt_copy_listeners(self): d = DummyStatusComponent() d.a = "hello world" d.b = 55 - listener = DummyStatusComponentListener() - listener.notify = MagicMock() + listener = MagicMock() d.add_listener(listener) e = DummyStatusComponent() DummyStatusComponent.copy(d, e) d.a = "bye world" - listener.notify.assert_called_once_with("a") - listener.notify.reset_mock() + listener.assert_called_once_with("a") + listener.reset_mock() e.a = "copied world" - listener.notify.assert_not_called() + listener.assert_not_called() class TestStatus(unittest.TestCase): @@ -111,15 +94,14 @@ def test_property_values(self): self.assertEqual("Everything's good", status.server.error_msg) def test_listeners(self): - listener = DummyStatusListener() - listener.notify = MagicMock() + listener = MagicMock() status = Status() status.add_listener(listener) status.server.up = False - listener.notify.assert_called_once_with() - listener.notify.reset_mock() + listener.assert_called_once_with() + listener.reset_mock() status.server.error_msg = "Everything's good" - listener.notify.assert_called_once_with() + listener.assert_called_once_with() def test_cannot_replace_component(self): status = Status() @@ -181,14 +163,13 @@ def test_copy_values(self): def test_copy_doesnt_copy_listeners(self): status = Status() - listener = DummyStatusListener() - listener.notify = MagicMock() + listener = MagicMock() status.add_listener(listener) copy = status.copy() status.server.error_msg = "a" - listener.notify.assert_called_once_with() - listener.notify.reset_mock() + listener.assert_called_once_with() + listener.reset_mock() copy.server.error_msg = "b" - listener.notify.assert_not_called() + listener.assert_not_called() diff --git a/src/python/web/handler/stream_status.py b/src/python/web/handler/stream_status.py index 0d45fe05..a24312d7 100644 --- a/src/python/web/handler/stream_status.py +++ b/src/python/web/handler/stream_status.py @@ -3,14 +3,14 @@ from typing import override -from common import IStatusListener, Status +from common import Status from ..serialize import SerializeStatus from ..utils import StreamQueue from ..web_app import IStreamHandler -class StatusListener(IStatusListener, StreamQueue[Status]): +class StatusListener(StreamQueue[Status]): """ Status listener used by status streams to listen to status updates """ @@ -19,7 +19,6 @@ def __init__(self, status: Status): super().__init__() self.__status = status - @override def notify(self): self.put(self.__status.copy()) @@ -33,7 +32,7 @@ def __init__(self, status: Status): @override def setup(self): - self.status.add_listener(self.status_listener) + self.status.add_listener(self.status_listener.notify) @override def get_value(self) -> str | None: @@ -49,4 +48,4 @@ def get_value(self) -> str | None: @override def cleanup(self): if self.status_listener: - self.status.remove_listener(self.status_listener) + self.status.remove_listener(self.status_listener.notify) From 77362cbccc85838eb0cf89a03191ed6342ad1e00 Mon Sep 17 00:00:00 2001 From: nitrobass24 Date: Wed, 26 Aug 2026 00:18:34 -0500 Subject: [PATCH 31/39] test(python): stop MPLogger listener on timeout in logger tests (#703) test_logger_levels ran four start/stop blocks inside a 5s timeout_decorator budget; under load the SIGALRM exception could fire between mp_logger.start() and mp_logger.stop(), leaking the non-daemon listener thread and hanging pytest at interpreter exit. Extract the per-block lifecycle into a _run_child_logger helper that stops the logger in a finally block, raise the timeout budgets to realistic values (10s single-block, 20s for the four-block test), and add a regression test that simulates a main-thread-only exception mid-run and asserts no MPLoggerListener thread survives. --- .../test_multiprocessing_logger.py | 146 +++++++----------- 1 file changed, 57 insertions(+), 89 deletions(-) diff --git a/src/python/tests/unittests/test_common/test_multiprocessing_logger.py b/src/python/tests/unittests/test_common/test_multiprocessing_logger.py index e3c26df9..10b862ad 100644 --- a/src/python/tests/unittests/test_common/test_multiprocessing_logger.py +++ b/src/python/tests/unittests/test_common/test_multiprocessing_logger.py @@ -3,9 +3,11 @@ import logging import multiprocessing import sys +import threading import time import unittest from logging.handlers import QueueHandler +from unittest.mock import patch import timeout_decorator from testfixtures import LogCapture @@ -50,19 +52,29 @@ def setUp(self): formatter = logging.Formatter("%(asctime)s - %(levelname)s - %(name)s - %(message)s") handler.setFormatter(formatter) - @timeout_decorator.timeout(5) - def test_main_logger_receives_records(self): - mp_logger = MultiprocessingLogger(self.logger) - p_1 = multiprocessing.Process(target=_child_process, args=(mp_logger.queue, mp_logger.log_level, "process_1")) + def _run_child_logger(self, target=_child_process, drain_secs: float = 0.5): + """Run target in a child process wired to a fresh MultiprocessingLogger. - with LogCapture("TestMultiprocessingLogger.MPLogger.process_1") as log_capture: - p_1.start() - mp_logger.start() - p_1.join() + Stops the logger even if the timeout-decorator exception fires + mid-block — a leaked (non-daemon) listener thread hangs pytest at + interpreter exit (#703). + """ + mp_logger = MultiprocessingLogger(self.logger) + mp_logger.start() + try: + p = multiprocessing.Process(target=target, args=(mp_logger.queue, mp_logger.log_level, "process_1")) + p.start() + p.join() # Brief wait for listener thread to drain remaining queue items - time.sleep(0.2) + time.sleep(drain_secs) + finally: mp_logger.stop() + @timeout_decorator.timeout(10) + def test_main_logger_receives_records(self): + with LogCapture("TestMultiprocessingLogger.MPLogger.process_1") as log_capture: + self._run_child_logger(drain_secs=0.2) + log_capture.check( ("process_1", "DEBUG", "Debug line"), ("process_1", "INFO", "Info line"), @@ -70,19 +82,10 @@ def test_main_logger_receives_records(self): ("process_1", "ERROR", "Error line"), ) - @timeout_decorator.timeout(5) + @timeout_decorator.timeout(10) def test_children_names(self): - mp_logger = MultiprocessingLogger(self.logger) - p_1 = multiprocessing.Process( - target=_child_process_with_children, args=(mp_logger.queue, mp_logger.log_level, "process_1") - ) - with LogCapture("TestMultiprocessingLogger.MPLogger.process_1") as log_capture: - p_1.start() - mp_logger.start() - p_1.join() - time.sleep(0.5) - mp_logger.stop() + self._run_child_logger(target=_child_process_with_children) log_capture.check( ("process_1", "DEBUG", "Debug line"), @@ -90,73 +93,38 @@ def test_children_names(self): ("process_1.child_1_1", "DEBUG", "Debug line"), ) - @timeout_decorator.timeout(5) + @timeout_decorator.timeout(10) + def test_listener_stopped_when_run_interrupted(self): + # Regression for #703: an exception mid-run (e.g. the timeout decorator + # firing under load) must not leak the non-daemon listener thread, + # which would hang pytest at interpreter exit. + real_sleep = time.sleep + main_thread = threading.main_thread() + + def raise_in_main_thread(secs: float): + # SIGALRM-driven timeouts only interrupt the main thread + if threading.current_thread() is main_thread: + raise RuntimeError("simulated timeout") + real_sleep(secs) + + with patch("time.sleep", side_effect=raise_in_main_thread): + with self.assertRaises(RuntimeError): + self._run_child_logger() + self.assertFalse(any(t.name == "MPLoggerListener" for t in threading.enumerate())) + + @timeout_decorator.timeout(20) def test_logger_levels(self): - # Debug level - self.logger.setLevel(logging.DEBUG) - with LogCapture("TestMultiprocessingLogger.MPLogger.process_1") as log_capture: - mp_logger = MultiprocessingLogger(self.logger) - p_1 = multiprocessing.Process( - target=_child_process, args=(mp_logger.queue, mp_logger.log_level, "process_1") - ) - p_1.start() - mp_logger.start() - p_1.join() - time.sleep(0.5) - mp_logger.stop() - - log_capture.check( - ("process_1", "DEBUG", "Debug line"), - ("process_1", "INFO", "Info line"), - ("process_1", "WARNING", "Warning line"), - ("process_1", "ERROR", "Error line"), - ) - - # Info level - self.logger.setLevel(logging.INFO) - with LogCapture("TestMultiprocessingLogger.MPLogger.process_1") as log_capture: - mp_logger = MultiprocessingLogger(self.logger) - p_1 = multiprocessing.Process( - target=_child_process, args=(mp_logger.queue, mp_logger.log_level, "process_1") - ) - p_1.start() - mp_logger.start() - p_1.join() - time.sleep(0.5) - mp_logger.stop() - - log_capture.check( - ("process_1", "INFO", "Info line"), - ("process_1", "WARNING", "Warning line"), - ("process_1", "ERROR", "Error line"), - ) - - # Warning level - self.logger.setLevel(logging.WARNING) - with LogCapture("TestMultiprocessingLogger.MPLogger.process_1") as log_capture: - mp_logger = MultiprocessingLogger(self.logger) - p_1 = multiprocessing.Process( - target=_child_process, args=(mp_logger.queue, mp_logger.log_level, "process_1") - ) - p_1.start() - mp_logger.start() - p_1.join() - time.sleep(0.5) - mp_logger.stop() - - log_capture.check(("process_1", "WARNING", "Warning line"), ("process_1", "ERROR", "Error line")) - - # Error level - self.logger.setLevel(logging.ERROR) - with LogCapture("TestMultiprocessingLogger.MPLogger.process_1") as log_capture: - mp_logger = MultiprocessingLogger(self.logger) - p_1 = multiprocessing.Process( - target=_child_process, args=(mp_logger.queue, mp_logger.log_level, "process_1") - ) - p_1.start() - mp_logger.start() - p_1.join() - time.sleep(0.5) - mp_logger.stop() - - log_capture.check(("process_1", "ERROR", "Error line")) + cases = [ + (logging.DEBUG, ["DEBUG", "INFO", "WARNING", "ERROR"]), + (logging.INFO, ["INFO", "WARNING", "ERROR"]), + (logging.WARNING, ["WARNING", "ERROR"]), + (logging.ERROR, ["ERROR"]), + ] + lines = {"DEBUG": "Debug line", "INFO": "Info line", "WARNING": "Warning line", "ERROR": "Error line"} + for level, expected_levels in cases: + with self.subTest(level=logging.getLevelName(level)): + self.logger.setLevel(level) + with LogCapture("TestMultiprocessingLogger.MPLogger.process_1") as log_capture: + self._run_child_logger() + + log_capture.check(*(("process_1", lvl, lines[lvl]) for lvl in expected_levels)) From 298c2b8f8beaf0fa387e0e25585b5662c0028575 Mon Sep 17 00:00:00 2001 From: nitrobass24 Date: Wed, 26 Aug 2026 00:25:01 -0500 Subject: [PATCH 32/39] refactor(python): derive component guard from type, not hardcoded names (#671) --- src/python/common/status.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/python/common/status.py b/src/python/common/status.py index 7ad4619a..cf24efce 100644 --- a/src/python/common/status.py +++ b/src/python/common/status.py @@ -81,7 +81,7 @@ def __init__(self): def __setattr__(self, name: str, value: object): """Components can only be set once""" - if name in ("server", "controller") and hasattr(self, name): + if isinstance(getattr(self, name, None), StatusComponent): raise ValueError("Cannot reassign component") object.__setattr__(self, name, value) From b80175a50f41b264a324b3b3d9a7596f03823184 Mon Sep 17 00:00:00 2001 From: nitrobass24 Date: Wed, 26 Aug 2026 15:45:56 -0500 Subject: [PATCH 33/39] refactor(angular): thread FileAction through one command path (#674) Replace the six-action fan-out (~30 near-identical methods across five layers) with a single command path driven by the FileAction enum and a per-action spec table (URL verb, log noun, capability flag, bulk concurrency) in models/file-action.ts. - ModelFileService: 6 methods -> command(action, file) - ViewFileCommandService: 6 + 4 bulk -> command()/bulk() - ViewFileService: 10 facades -> command()/bulkCommand() - FileComponent: 6 onX + 6 isX guards -> onAction()/canDo(); single actionEvent output carrying the action in the payload - FileListComponent: 6 + 4 handlers -> onAction()/onBulkAction() - BulkActionBarComponent: 4 outputs -> one actionEvent Specs parameterized over all six actions; the model-file URL spec now also covers validate and the pair_id query param, which had no coverage before. --- src/angular/src/app/models/file-action.ts | 61 +++++++ .../files/bulk-action-bar.component.spec.ts | 45 ++--- .../pages/files/bulk-action-bar.component.ts | 15 +- .../app/pages/files/file-list.component.html | 12 +- .../pages/files/file-list.component.spec.ts | 156 +++++------------- .../app/pages/files/file-list.component.ts | 57 +------ .../src/app/pages/files/file.component.html | 24 +-- .../app/pages/files/file.component.spec.ts | 54 +++--- .../src/app/pages/files/file.component.ts | 97 +++-------- .../services/files/model-file.service.spec.ts | 74 +++------ .../app/services/files/model-file.service.ts | 33 +--- .../files/view-file-command.service.spec.ts | 94 +++++------ .../files/view-file-command.service.ts | 60 +------ .../services/files/view-file.service.spec.ts | 35 ++-- .../app/services/files/view-file.service.ts | 45 +---- 15 files changed, 305 insertions(+), 557 deletions(-) create mode 100644 src/angular/src/app/models/file-action.ts diff --git a/src/angular/src/app/models/file-action.ts b/src/angular/src/app/models/file-action.ts new file mode 100644 index 00000000..adf171f2 --- /dev/null +++ b/src/angular/src/app/models/file-action.ts @@ -0,0 +1,61 @@ +import { ViewFile } from './view-file'; + +/** The six per-file commands the backend exposes. */ +export enum FileAction { + QUEUE, + STOP, + EXTRACT, + VALIDATE, + DELETE_LOCAL, + DELETE_REMOTE +} + +export interface FileActionSpec { + /** URL verb in `/server/command//` — a backend contract. */ + readonly urlSegment: string; + /** Noun used in debug logs (" model file: ..."). */ + readonly logNoun: string; + /** Capability flag gating the action for a view file. */ + readonly isAllowed: (file: ViewFile) => boolean; + /** Max concurrent requests for the bulk variant. */ + readonly bulkConcurrency: number; +} + +export const FILE_ACTIONS: Record = { + [FileAction.QUEUE]: { + urlSegment: 'queue', + logNoun: 'Queue', + isAllowed: (f) => f.isQueueable, + bulkConcurrency: Infinity, + }, + [FileAction.STOP]: { + urlSegment: 'stop', + logNoun: 'Stop', + isAllowed: (f) => f.isStoppable, + bulkConcurrency: Infinity, + }, + [FileAction.EXTRACT]: { + urlSegment: 'extract', + logNoun: 'Extract', + isAllowed: (f) => f.isExtractable && f.isArchive, + bulkConcurrency: Infinity, + }, + [FileAction.VALIDATE]: { + urlSegment: 'validate', + logNoun: 'Validate', + isAllowed: (f) => f.isValidatable, + bulkConcurrency: Infinity, + }, + [FileAction.DELETE_LOCAL]: { + urlSegment: 'delete_local', + logNoun: 'Locally delete', + isAllowed: (f) => f.isLocallyDeletable, + bulkConcurrency: 4, + }, + [FileAction.DELETE_REMOTE]: { + urlSegment: 'delete_remote', + logNoun: 'Remotely delete', + isAllowed: (f) => f.isRemotelyDeletable, + bulkConcurrency: 4, + }, +}; diff --git a/src/angular/src/app/pages/files/bulk-action-bar.component.spec.ts b/src/angular/src/app/pages/files/bulk-action-bar.component.spec.ts index 1e9a55e3..de70968c 100644 --- a/src/angular/src/app/pages/files/bulk-action-bar.component.spec.ts +++ b/src/angular/src/app/pages/files/bulk-action-bar.component.spec.ts @@ -1,6 +1,7 @@ import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest'; import { TestBed, ComponentFixture } from '@angular/core/testing'; import { BulkActionBarComponent } from './bulk-action-bar.component'; +import { FileAction } from '../../models/file-action'; describe('BulkActionBarComponent', () => { let fixture: ComponentFixture; @@ -45,52 +46,52 @@ describe('BulkActionBarComponent', () => { expect(countSpan.textContent).toContain('7 selected'); }); - it('should emit queueEvent when Queue button is clicked', () => { - let emitted = false; - component.queueEvent.subscribe(() => (emitted = true)); + it('should emit QUEUE when Queue button is clicked', () => { + let emitted: FileAction | null = null; + component.actionEvent.subscribe((a) => (emitted = a)); const btn = findButtonByText('Queue'); btn.click(); - expect(emitted).toBe(true); + expect(emitted).toBe(FileAction.QUEUE); }); - it('should emit stopEvent when Stop button is clicked', () => { - let emitted = false; - component.stopEvent.subscribe(() => (emitted = true)); + it('should emit STOP when Stop button is clicked', () => { + let emitted: FileAction | null = null; + component.actionEvent.subscribe((a) => (emitted = a)); const btn = findButtonByText('Stop'); btn.click(); - expect(emitted).toBe(true); + expect(emitted).toBe(FileAction.STOP); }); - it('should emit deleteLocalEvent only on the second Delete Local click', () => { - let emitCount = 0; - component.deleteLocalEvent.subscribe(() => (emitCount += 1)); + it('should emit DELETE_LOCAL only on the second Delete Local click', () => { + const emitted: FileAction[] = []; + component.actionEvent.subscribe((a) => emitted.push(a)); // First click arms the confirm, does NOT emit findButtonByText('Delete Local').click(); - expect(emitCount).toBe(0); + expect(emitted).toEqual([]); // Second click emits fixture.detectChanges(); findButtonByText('Confirm?').click(); - expect(emitCount).toBe(1); + expect(emitted).toEqual([FileAction.DELETE_LOCAL]); }); - it('should emit deleteRemoteEvent only on the second Delete Remote click', () => { - let emitCount = 0; - component.deleteRemoteEvent.subscribe(() => (emitCount += 1)); + it('should emit DELETE_REMOTE only on the second Delete Remote click', () => { + const emitted: FileAction[] = []; + component.actionEvent.subscribe((a) => emitted.push(a)); // First click arms the confirm, does NOT emit findButtonByText('Delete Remote').click(); - expect(emitCount).toBe(0); + expect(emitted).toEqual([]); // Second click emits fixture.detectChanges(); findButtonByText('Confirm?').click(); - expect(emitCount).toBe(1); + expect(emitted).toEqual([FileAction.DELETE_REMOTE]); }); it('should emit clearEvent when Clear button is clicked', () => { @@ -140,7 +141,7 @@ describe('BulkActionBarComponent inline bulk delete confirmation', () => { } it('first click on Delete Local sets confirming state and does not emit', () => { - const spy = vi.spyOn(component.deleteLocalEvent, 'emit'); + const spy = vi.spyOn(component.actionEvent, 'emit'); component.onDeleteLocal(); @@ -149,7 +150,7 @@ describe('BulkActionBarComponent inline bulk delete confirmation', () => { }); it('second click on Delete Local emits event and clears state', () => { - const spy = vi.spyOn(component.deleteLocalEvent, 'emit'); + const spy = vi.spyOn(component.actionEvent, 'emit'); component.onDeleteLocal(); expect(component.confirmingDelete).toBe('local'); @@ -160,7 +161,7 @@ describe('BulkActionBarComponent inline bulk delete confirmation', () => { }); it('first click on Delete Remote sets confirming state and does not emit', () => { - const spy = vi.spyOn(component.deleteRemoteEvent, 'emit'); + const spy = vi.spyOn(component.actionEvent, 'emit'); component.onDeleteRemote(); @@ -169,7 +170,7 @@ describe('BulkActionBarComponent inline bulk delete confirmation', () => { }); it('second click on Delete Remote emits event and clears state', () => { - const spy = vi.spyOn(component.deleteRemoteEvent, 'emit'); + const spy = vi.spyOn(component.actionEvent, 'emit'); component.onDeleteRemote(); expect(component.confirmingDelete).toBe('remote'); diff --git a/src/angular/src/app/pages/files/bulk-action-bar.component.ts b/src/angular/src/app/pages/files/bulk-action-bar.component.ts index 8dba8107..0117b663 100644 --- a/src/angular/src/app/pages/files/bulk-action-bar.component.ts +++ b/src/angular/src/app/pages/files/bulk-action-bar.component.ts @@ -2,6 +2,7 @@ import { Component, ChangeDetectionStrategy, ChangeDetectorRef, OnDestroy, input, output, inject } from '@angular/core'; import { DoubleClickConfirm } from '../../common/double-click-confirm'; +import { FileAction } from '../../models/file-action'; @Component({ selector: 'app-bulk-action-bar', @@ -9,8 +10,8 @@ import { DoubleClickConfirm } from '../../common/double-click-confirm'; template: `
{{ count() }} selected - - + +
diff --git a/src/angular/src/app/pages/files/file-list.component.spec.ts b/src/angular/src/app/pages/files/file-list.component.spec.ts index d2980d17..1f1cf969 100644 --- a/src/angular/src/app/pages/files/file-list.component.spec.ts +++ b/src/angular/src/app/pages/files/file-list.component.spec.ts @@ -13,26 +13,19 @@ import { ViewFile, ViewFileStatus } from '../../models/view-file'; import { ViewFileOptions, SortMethod } from '../../models/view-file-options'; import { fileKey } from '../../services/files/file-key'; import { FileActionEvent } from './file.component'; +import { FileAction } from '../../models/file-action'; interface MockViewFileService { filteredFiles$: Observable; checked$: Observable>; setSelected: ReturnType; unsetSelected: ReturnType; - queue: ReturnType; - stop: ReturnType; - extract: ReturnType; - validate: ReturnType; - deleteLocal: ReturnType; - deleteRemote: ReturnType; + command: ReturnType; toggleCheck: ReturnType; shiftCheck: ReturnType; checkAll: ReturnType; uncheckAll: ReturnType; - bulkQueue: ReturnType; - bulkStop: ReturnType; - bulkDeleteLocal: ReturnType; - bulkDeleteRemote: ReturnType; + bulkCommand: ReturnType; } interface MockNotificationService { @@ -40,8 +33,8 @@ interface MockNotificationService { hide: ReturnType; } -function makeActionEvent(file: ViewFile): FileActionEvent { - return { file, clearActiveAction: vi.fn() }; +function makeActionEvent(file: ViewFile, action: FileAction = FileAction.QUEUE): FileActionEvent { + return { action, file, clearActiveAction: vi.fn() }; } function makeViewFile(overrides: Partial = {}): ViewFile { @@ -101,20 +94,12 @@ describe('FileListComponent', () => { checked$: checkedSubject.asObservable(), setSelected: vi.fn(), unsetSelected: vi.fn(), - queue: vi.fn().mockReturnValue(EMPTY), - stop: vi.fn().mockReturnValue(EMPTY), - extract: vi.fn().mockReturnValue(EMPTY), - validate: vi.fn().mockReturnValue(EMPTY), - deleteLocal: vi.fn().mockReturnValue(EMPTY), - deleteRemote: vi.fn().mockReturnValue(EMPTY), + command: vi.fn().mockReturnValue(EMPTY), toggleCheck: vi.fn(), shiftCheck: vi.fn(), checkAll: vi.fn(), uncheckAll: vi.fn(), - bulkQueue: vi.fn().mockReturnValue(EMPTY), - bulkStop: vi.fn().mockReturnValue(EMPTY), - bulkDeleteLocal: vi.fn().mockReturnValue(EMPTY), - bulkDeleteRemote: vi.fn().mockReturnValue(EMPTY), + bulkCommand: vi.fn().mockReturnValue(EMPTY), }; mockNotifService = { show: vi.fn(), hide: vi.fn() }; @@ -349,58 +334,20 @@ describe('FileListComponent', () => { // --- Individual file actions --- - it('should call viewFileService.queue on onQueue', () => { - const file = makeViewFile({ name: 'queue-me.txt' }); - mockViewFileService.queue.mockReturnValue(of({ success: true, data: 'ok', errorMessage: null })); + it.each([ + ['QUEUE', FileAction.QUEUE], + ['STOP', FileAction.STOP], + ['EXTRACT', FileAction.EXTRACT], + ['VALIDATE', FileAction.VALIDATE], + ['DELETE_LOCAL', FileAction.DELETE_LOCAL], + ['DELETE_REMOTE', FileAction.DELETE_REMOTE], + ] as const)('should dispatch %s through viewFileService.command on onAction', (_label, action) => { + const file = makeViewFile({ name: 'act-on-me.txt' }); + mockViewFileService.command.mockReturnValue(of({ success: true, data: 'ok', errorMessage: null })); - component.onQueue(makeActionEvent(file)); + component.onAction(makeActionEvent(file, action)); - expect(mockViewFileService.queue).toHaveBeenCalledWith(file); - }); - - it('should call viewFileService.stop on onStop', () => { - const file = makeViewFile({ name: 'stop-me.txt' }); - mockViewFileService.stop.mockReturnValue(of({ success: true, data: 'ok', errorMessage: null })); - - component.onStop(makeActionEvent(file)); - - expect(mockViewFileService.stop).toHaveBeenCalledWith(file); - }); - - it('should call viewFileService.extract on onExtract', () => { - const file = makeViewFile({ name: 'extract-me.txt' }); - mockViewFileService.extract.mockReturnValue(of({ success: true, data: 'ok', errorMessage: null })); - - component.onExtract(makeActionEvent(file)); - - expect(mockViewFileService.extract).toHaveBeenCalledWith(file); - }); - - it('should call viewFileService.validate on onValidate', () => { - const file = makeViewFile({ name: 'validate-me.txt' }); - mockViewFileService.validate.mockReturnValue(of({ success: true, data: 'ok', errorMessage: null })); - - component.onValidate(makeActionEvent(file)); - - expect(mockViewFileService.validate).toHaveBeenCalledWith(file); - }); - - it('should call viewFileService.deleteLocal on onDeleteLocal', () => { - const file = makeViewFile({ name: 'del-local.txt' }); - mockViewFileService.deleteLocal.mockReturnValue(of({ success: true, data: 'ok', errorMessage: null })); - - component.onDeleteLocal(makeActionEvent(file)); - - expect(mockViewFileService.deleteLocal).toHaveBeenCalledWith(file); - }); - - it('should call viewFileService.deleteRemote on onDeleteRemote', () => { - const file = makeViewFile({ name: 'del-remote.txt' }); - mockViewFileService.deleteRemote.mockReturnValue(of({ success: true, data: 'ok', errorMessage: null })); - - component.onDeleteRemote(makeActionEvent(file)); - - expect(mockViewFileService.deleteRemote).toHaveBeenCalledWith(file); + expect(mockViewFileService.command).toHaveBeenCalledWith(action, file); }); // --- Single-file action error surfacing (#513) --- @@ -408,11 +355,11 @@ describe('FileListComponent', () => { it('shows a DANGER banner and clears activeAction when an action fails', () => { const file = makeViewFile({ name: 'fail-me.txt' }); const event = makeActionEvent(file); - mockViewFileService.queue.mockReturnValue( + mockViewFileService.command.mockReturnValue( of({ success: false, data: null, errorMessage: 'Boom' }), ); - component.onQueue(event); + component.onAction(event); expect(mockNotifService.show).toHaveBeenCalledTimes(1); const notif = mockNotifService.show.mock.calls[0][0]; @@ -423,11 +370,11 @@ describe('FileListComponent', () => { it('falls back to a generic message when a failed reaction has no errorMessage', () => { const event = makeActionEvent(makeViewFile()); - mockViewFileService.stop.mockReturnValue( + mockViewFileService.command.mockReturnValue( of({ success: false, data: null, errorMessage: null }), ); - component.onStop(event); + component.onAction(event); expect(mockNotifService.show).toHaveBeenCalledTimes(1); expect(mockNotifService.show.mock.calls[0][0].text).toBe('Action failed'); @@ -437,11 +384,11 @@ describe('FileListComponent', () => { it('does not show a banner or clear activeAction on a successful action', () => { const logger = TestBed.inject(LoggerService); const event = makeActionEvent(makeViewFile()); - mockViewFileService.validate.mockReturnValue( + mockViewFileService.command.mockReturnValue( of({ success: true, data: 'ok', errorMessage: null }), ); - component.onValidate(event); + component.onAction(event); expect(mockNotifService.show).not.toHaveBeenCalled(); expect(event.clearActiveAction).not.toHaveBeenCalled(); @@ -450,11 +397,11 @@ describe('FileListComponent', () => { it('shows a DANGER banner and clears activeAction when the action stream errors', () => { const event = makeActionEvent(makeViewFile()); - mockViewFileService.deleteRemote.mockReturnValue( + mockViewFileService.command.mockReturnValue( throwError(() => new Error('net')), ); - component.onDeleteRemote(event); + component.onAction(event); expect(mockNotifService.show).toHaveBeenCalledTimes(1); expect(mockNotifService.show.mock.calls[0][0].level).toBe(NotificationLevel.DANGER); @@ -463,36 +410,17 @@ describe('FileListComponent', () => { // --- Bulk actions --- - it('should call viewFileService.bulkQueue on onBulkQueue', () => { - mockViewFileService.bulkQueue.mockReturnValue(of([])); - - component.onBulkQueue(); - - expect(mockViewFileService.bulkQueue).toHaveBeenCalled(); - }); - - it('should call viewFileService.bulkStop on onBulkStop', () => { - mockViewFileService.bulkStop.mockReturnValue(of([])); - - component.onBulkStop(); - - expect(mockViewFileService.bulkStop).toHaveBeenCalled(); - }); - - it('should call viewFileService.bulkDeleteLocal on onBulkDeleteLocal', () => { - mockViewFileService.bulkDeleteLocal.mockReturnValue(of([])); - - component.onBulkDeleteLocal(); - - expect(mockViewFileService.bulkDeleteLocal).toHaveBeenCalled(); - }); - - it('should call viewFileService.bulkDeleteRemote on onBulkDeleteRemote', () => { - mockViewFileService.bulkDeleteRemote.mockReturnValue(of([])); + it.each([ + ['QUEUE', FileAction.QUEUE], + ['STOP', FileAction.STOP], + ['DELETE_LOCAL', FileAction.DELETE_LOCAL], + ['DELETE_REMOTE', FileAction.DELETE_REMOTE], + ] as const)('should dispatch bulk %s through viewFileService.bulkCommand on onBulkAction', (_label, action) => { + mockViewFileService.bulkCommand.mockReturnValue(of([])); - component.onBulkDeleteRemote(); + component.onBulkAction(action); - expect(mockViewFileService.bulkDeleteRemote).toHaveBeenCalled(); + expect(mockViewFileService.bulkCommand).toHaveBeenCalledWith(action); }); // --- Track-by function --- @@ -511,12 +439,12 @@ describe('FileListComponent', () => { it('should log failures and show a DANGER banner from bulk action responses', () => { const logger = TestBed.inject(LoggerService); - mockViewFileService.bulkQueue.mockReturnValue(of([ + mockViewFileService.bulkCommand.mockReturnValue(of([ { success: true, data: 'ok', errorMessage: null }, { success: false, data: null, errorMessage: 'Failed' }, ])); - component.onBulkQueue(); + component.onBulkAction(FileAction.QUEUE); expect(logger.error).toHaveBeenCalled(); expect(logger.warn).toHaveBeenCalled(); @@ -527,23 +455,23 @@ describe('FileListComponent', () => { }); it('should not show a banner when all bulk items succeed', () => { - mockViewFileService.bulkDeleteLocal.mockReturnValue(of([ + mockViewFileService.bulkCommand.mockReturnValue(of([ { success: true, data: 'ok', errorMessage: null }, { success: true, data: 'ok2', errorMessage: null }, ])); - component.onBulkDeleteLocal(); + component.onBulkAction(FileAction.DELETE_LOCAL); expect(mockNotifService.show).not.toHaveBeenCalled(); }); it('should log info for successful bulk items', () => { const logger = TestBed.inject(LoggerService); - mockViewFileService.bulkStop.mockReturnValue(of([ + mockViewFileService.bulkCommand.mockReturnValue(of([ { success: true, data: 'stopped', errorMessage: null }, ])); - component.onBulkStop(); + component.onBulkAction(FileAction.STOP); expect(logger.info).toHaveBeenCalledWith('stopped'); }); diff --git a/src/angular/src/app/pages/files/file-list.component.ts b/src/angular/src/app/pages/files/file-list.component.ts index 1c6d91da..e819e641 100644 --- a/src/angular/src/app/pages/files/file-list.component.ts +++ b/src/angular/src/app/pages/files/file-list.component.ts @@ -24,6 +24,7 @@ import { LoggerService } from '../../services/utils/logger.service'; import { NotificationService } from '../../services/utils/notification.service'; import { NotificationLevel, createNotification } from '../../models/notification'; import { fileKey } from '../../services/files/file-key'; +import { FileAction } from '../../models/file-action'; import { FileComponent, FileActionEvent } from './file.component'; import { BulkActionBarComponent } from './bulk-action-bar.component'; @@ -144,53 +145,8 @@ export class FileListComponent implements AfterViewInit, OnDestroy { } } - onQueue(event: FileActionEvent): void { - this.viewFileService.queue(event.file).pipe( - takeUntilDestroyed(this.destroyRef), - ).subscribe({ - next: (data) => this.handleActionResponse(data, event), - error: (err) => this.handleActionError(err, event), - }); - } - - onStop(event: FileActionEvent): void { - this.viewFileService.stop(event.file).pipe( - takeUntilDestroyed(this.destroyRef), - ).subscribe({ - next: (data) => this.handleActionResponse(data, event), - error: (err) => this.handleActionError(err, event), - }); - } - - onExtract(event: FileActionEvent): void { - this.viewFileService.extract(event.file).pipe( - takeUntilDestroyed(this.destroyRef), - ).subscribe({ - next: (data) => this.handleActionResponse(data, event), - error: (err) => this.handleActionError(err, event), - }); - } - - onValidate(event: FileActionEvent): void { - this.viewFileService.validate(event.file).pipe( - takeUntilDestroyed(this.destroyRef), - ).subscribe({ - next: (data) => this.handleActionResponse(data, event), - error: (err) => this.handleActionError(err, event), - }); - } - - onDeleteLocal(event: FileActionEvent): void { - this.viewFileService.deleteLocal(event.file).pipe( - takeUntilDestroyed(this.destroyRef), - ).subscribe({ - next: (data) => this.handleActionResponse(data, event), - error: (err) => this.handleActionError(err, event), - }); - } - - onDeleteRemote(event: FileActionEvent): void { - this.viewFileService.deleteRemote(event.file).pipe( + onAction(event: FileActionEvent): void { + this.viewFileService.command(event.action, event.file).pipe( takeUntilDestroyed(this.destroyRef), ).subscribe({ next: (data) => this.handleActionResponse(data, event), @@ -236,10 +192,9 @@ export class FileListComponent implements AfterViewInit, OnDestroy { this.viewFileService.uncheckAll(); } - onBulkQueue(): void { this.handleBulkResponse(this.viewFileService.bulkQueue()); } - onBulkStop(): void { this.handleBulkResponse(this.viewFileService.bulkStop()); } - onBulkDeleteLocal(): void { this.handleBulkResponse(this.viewFileService.bulkDeleteLocal()); } - onBulkDeleteRemote(): void { this.handleBulkResponse(this.viewFileService.bulkDeleteRemote()); } + onBulkAction(action: FileAction): void { + this.handleBulkResponse(this.viewFileService.bulkCommand(action)); + } private handleBulkResponse(action$: Observable): void { action$.pipe( diff --git a/src/angular/src/app/pages/files/file.component.html b/src/angular/src/app/pages/files/file.component.html index 3c4518c2..c8d51ec7 100644 --- a/src/angular/src/app/pages/files/file.component.html +++ b/src/angular/src/app/pages/files/file.component.html @@ -141,41 +141,41 @@