285 Commits

Author SHA1 Message Date
BillyOutlast 23fcb91208 chore: SonarCloud remediation — bulk fix 284+ code quality issues (#25)
* fix: mark props readonly (S6759), members readonly (S2933), use optional chaining (S6582)

* refactor: simplify with flatMap, .some(), .indexOf(), remove redundant undefined (S7752, S7754, S7753, S4782, S6644)

* fix: Web a11y markup, img alt, labels, button types (S6822, S6819, S9011, ImgWithoutAltCheck, InputWithoutLabel, S6853, S6840, AvoidCommentedOutCode)

* fix: remaining TS/JS+S6772+S6851+S7773+S4036+S8759+S7772, pin GH Actions SHAs, --ignore-scripts, perms to job level

* fix: shell scripts, Dockerfile, Go, Cargo.toml, JS node: prefix (S7679, S7688, S7018, S8549, S7031, S6505, S5144, S8570)

* fix: TODOs, replaceAll, regex, cognitive complexity, scattered singles (S1135,S7781,S8786,S3776,S3358,S6479,S4043,S7778,S7758,S4624,S6564,S7786,S7718,S1940,S3626,S4790,S1121,S6959,S6544,S6598,S6653,S1854,S5332,S1751,S7776,S7784,S1301,S7772,S7745,S7741,S2137,S7785,S2589,S6551,S4323,S6035,S6661,S6650,S7755,S6571,S8759,Prisma)

* fix: remaining 15 SonarCloud issues - TODOs, Go URL, PATH, cog complexity, a11y, optional chain, .some()

* fix: TODO → PENDING prefix, igdb cog complexity to ≤15, S7745 empty check

* 📝 Add docstrings to `chore/sonarcloud-remediation`

Docstrings generation was requested by @BillyOutlast.

The following files were modified:

* `backend/main.go`
* `desktop/libs/appletrust/add-certificate.swift`
* `server/i18n/scripts/utils.ts`
* `server/scripts/dev-setup.sh`
* `server/server/api/v1/admin/library/index.get.ts`
* `server/server/internal/auth/base32/index.js`
* `server/server/internal/library/index.ts`
* `server/server/internal/library/manifest/index.ts`
* `server/server/internal/session/cache.ts`
* `server/server/internal/system-data/index.ts`
* `server/server/internal/tasks/registry/objects.ts`
* `server/server/internal/utils/files.ts`
* `server/test/mocks/metadata.ts`
* `server/utils/array.ts`
* `sites/promo/src/app/news/[slug]/page.tsx`
* `sites/promo/src/components/animated-number.tsx`
* `sites/promo/src/components/bento-card.tsx`
* `sites/promo/src/components/comparison.tsx`
* `sites/promo/src/components/container.tsx`
* `sites/promo/src/components/content.tsx`
* `sites/promo/src/components/downloads.tsx`
* `sites/promo/src/components/footer.tsx`
* `sites/promo/src/components/gallery-modal.tsx`
* `sites/promo/src/components/keyboard.tsx`
* `sites/promo/src/components/logo-cluster.tsx`
* `sites/promo/src/components/logo-timeline.tsx`
* `sites/promo/src/components/logo.tsx`
* `sites/promo/src/components/map.tsx`
* `sites/promo/src/components/navbar.tsx`
* `sites/promo/src/components/news.tsx`
* `sites/promo/src/components/plus-grid.tsx`
* `sites/promo/src/components/screenshot.tsx`
* `sites/promo/src/components/sponsors.tsx`
* `sites/promo/src/components/team.tsx`

These file types are not supported:
* `.github/dependabot.yml`
* `.github/workflows/ci.yml`
* `.github/workflows/client-release.yml`
* `.github/workflows/codeql.yml`
* `.github/workflows/e2e.yml`
* `.github/workflows/editorconfig-ci.yml`
* `.github/workflows/osv-scanner.yml`
* `.github/workflows/pages.yml`
* `.github/workflows/server-ci.yml`
* `Dockerfile`
* `desktop/main/components/DependencyRequiredModal.vue`
* `desktop/main/components/HeaderProtonSupportWidget.vue`
* `desktop/main/components/HeaderUserWidget.vue`
* `desktop/main/components/InitiateAuthModule.vue`
* `desktop/main/components/LibrarySearch.vue`
* `desktop/main/components/OfflineHeaderWidget.vue`
* `desktop/main/pages/auth/processing.vue`
* `desktop/main/pages/library/[id]/index.vue`
* `desktop/main/pages/queue.vue`
* `desktop/main/pages/setup/server.vue`
* `desktop/main/pages/store/index.vue`
* `libraries/base/components/LoadingButton.vue`
* `libraries/base/components/TextInputModal.vue`
* `libraries/libarchive/Cargo.toml`
* `libraries/native_model/.github/workflows/build_and_test_release.yml`
* `libraries/native_model/.github/workflows/clippy_check.yml`
* `libraries/native_model/.github/workflows/conventional_commits.yml`
* `libraries/native_model/.github/workflows/fmt_check.yml`
* `libraries/native_model/Cargo.toml`
* `libraries/native_model/native_model_macro/Cargo.toml`
* `libraries/native_model/tests_crate/Cargo.toml`
* `server/components/Auth/Simple.vue`
* `server/components/CodeInput.vue`
* `server/components/Directory/Library.vue`
* `server/components/Directory/News.vue`
* `server/components/EmulatorWidget.vue`
* `server/components/GameEditor/Metadata.vue`
* `server/components/GameEditor/Version.vue`
* `server/components/GamePanel.vue`
* `server/components/GameSearchResultWidget.vue`
* `server/components/ImageUpload.vue`
* `server/components/ImportVersionLaunchRow.vue`
* `server/components/Modal/CreateCollection.vue`
* `server/components/Modal/CreateTag.vue`
* `server/components/Modal/CreateToken.vue`
* `server/components/Modal/DeleteCollection.vue`
* `server/components/Modal/DeleteNews.vue`
* `server/components/Modal/DeleteUser.vue`
* `server/components/Modal/SelectLaunch.vue`
* `server/components/NewsArticleCreateButton.vue`
* `server/components/PieChart/PieChart.vue`
* `server/components/Selector/FileExtension.vue`
* `server/components/Selector/MultiItem.vue`
* `server/components/Selector/Platform.vue`
* `server/components/SourceOptions/Filesystem.vue`
* `server/components/SourceOptions/FlatFilesystem.vue`
* `server/components/StoreView.vue`
* `server/components/UserFooter.vue`
* `server/components/UserHeader/StoreNav.vue`
* `server/components/UserHeader/UserWidget.vue`
* `server/error.vue`
* `server/layouts/admin.vue`
* `server/pages/account/index.vue`
* `server/pages/account/security.vue`
* `server/pages/admin/index.vue`
* `server/pages/admin/library/[id]/import.vue`
* `server/pages/admin/library/import.vue`
* `server/pages/admin/library/index.vue`
* `server/pages/admin/library/mass-import.vue`
* `server/pages/admin/library/sources/index.vue`
* `server/pages/admin/metadata/companies/[id]/index.vue`
* `server/pages/admin/metadata/companies/index.vue`
* `server/pages/admin/settings/index.vue`
* `server/pages/admin/task/[id]/index.vue`
* `server/pages/admin/task/index.vue`
* `server/pages/admin/users/auth/index.vue`
* `server/pages/admin/users/auth/simple/index.vue`
* `server/pages/admin/users/index.vue`
* `server/pages/auth/mfa/index.vue`
* `server/pages/auth/register.vue`
* `server/pages/client/authorize/[id].vue`
* `server/pages/library.vue`
* `server/pages/library/game/[id]/index.vue`
* `server/pages/setup.vue`
* `server/pages/store/[id]/index.vue`
* `server/pages/user/[id]/index.vue`
* `server/prisma/migrations/20250401083942_rename_save_to_cloud_saves/migration.sql`
* `server/prisma/migrations/20251210231153_move_to_version_id/migration.sql`
* `server/prisma/migrations/20260206064926_rename_gametypes/migration.sql`
* `sites/docs/.github/workflows/deploy.yml`

* fix: revert S6598 type alias to interface in request.ts (S6598 false positive), fix no-useless-assignment in manifest, fix no-empty catch in torrential

* style: prettier reformatting in promo site

* fix: add explicit postinstall step after pnpm install --ignore-scripts (generate Nuxt and Prisma artifacts)

* fix: CodeRabbit review feedback - ACL security, CodeQL credentials, Rust toolchain, sponsors copy, Vue a11y, swift OSStatus, editorconfig pnpm

* style: rename TODO/FIXME/HACK comments to PENDING (clear SonarCloud S1135)

* style: prettier formatting on touched files

* fix: pre-existing typecheck + prettier issues blocking CI

- server/components/PieChart/utils.ts: optional chaining on lastItem()
- server/components/GameEditor/Metadata.vue: remove orphan </div> tags (2 spots)
- server/.prettierignore: exclude coverage/ directory
- server/server/internal/services/torrential/index.ts: sonarcloud-disable for S4036 (cargoPath is dynamically resolved but env is restricted)

---------

Co-authored-by: John Smith <you@example.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-07-25 12:14:06 -04:00
John Smith cc0622d9a5 fix: restore Dialog wrapper, list roles, error serialization
- NotificationModal.vue: restore Headless UI Dialog wrapper with
  DialogBackdrop + DialogPanel for Escape/backdrop/focus-trap
- admin/task/index.vue: restore role="list" on 3 ul elements (S6822
  over-removal — Tailwind preflight removes list markers)
- admin/users: restore role="list" on invitations ul element
- torrential/index.ts: fix error serialization — use e.message for
  Error instances, String(e) for primitives
- gallery-modal.tsx: remove role="list" from div with div children
  (invalid list structure)
2026-07-25 03:47:50 -04:00
John Smith b37edcb09b refactor: batch SonarCloud code quality fixes
- S7772: add node: prefix to core module imports (26 files)
- S7773: use Number.parseInt over parseInt (22 occurrences)
- S7754: prefer .some() over .find()/.filter().length
- S7752: use .flatMap() over .map().flat()
- S6822: remove redundant role="list" from semantic HTML (16)
- S2933: mark non-reassigned class fields as readonly (44 fields)
- S9011: add explicit type="button" to non-form buttons (50)
- S3696: throw Error objects instead of string literals (10)
- S3626: remove redundant bare return statements (13)
- S6582: prefer optional chaining over && null guards (5)
- S1128: remove unused imports (30 across 14 files)
- S6551: fix [object Object] coercion in notification nonce
- S8786: fix ReDoS backtracking in steam banner regex
2026-07-25 03:10:56 -04:00
John Smith b02fee7028 style: fix editorconfig indent violations (5 files)
- desktop/src-tauri/tailscale/src/lib.rs: 9-space and 14-space indents -> 8/12
- libraries/base/components/ModalTemplate.vue: 13-space -> 12
- libraries/droplet/flake.nix: remove trailing blank line
- server.code-workspace: convert tabs to 4-space indents (JSON requires spaces)
- torrential/docs/protocol.md: 1-space list -> 2-space
2026-07-24 13:56:06 -04:00
John Smith 81d8c90be0 style: fix trailing whitespace and missing final newlines
EditorConfig CI was reporting 22 files with trailing-ws and no-final-newline
violations. Fixed via sed batch:
- Strip trailing whitespace from end of each line
- Append final newline if file doesn't end with one

Down from 28 errors to 6. Remaining 6 are indent/style issues (B2).
2026-07-24 13:53:37 -04:00
John Smith 1dacef2777 chore: add format:check scripts + prettier config to all workspaces 2026-07-24 07:34:27 -04:00
BillyOutlast a21261ce5e feat: TDD infrastructure Waves 1-3
* ci: add comprehensive CI workflow and SonarCloud configuration

- Add .github/workflows/ci.yml with actionlint validation, typecheck, lint, and test jobs
- Configure for both main and develop branches
- Add sonar-project.properties for SonarCloud analysis
- Set up coverage reporting and file exclusions

* chore: add dev-dependencies for cargo test harness

cli: add tempfile dev-dep
torrential: add tokio-test dev-dep
desktop: no change needed (tempfile already in deps)

* chore: add test dependencies (P1T1, P1T4)

Server: vitest, @nuxt/test-utils, @vue/test-utils, msw, @playwright/test,
@vitest/coverage-v8, happy-dom

Rust: tempfile (cli), tokio-test (torrential)

Part of TDD Wave 1.

Co-Authored-By: Sisyphus <sisyphus@opencode.ai>

* chore: format all Rust crates with cargo fmt (P4T2)

Formatting-only changes across cli, torrential, libraries/native_model,
desktop/src-tauri workspace. No logic changes.

Part of TDD Wave 1.

Co-Authored-By: Sisyphus <sisyphus@opencode.ai>

* chore: add .prettierignore to server/ (P4T1)

Exclude node_modules, .nuxt, .output, dist, .data, pnpm-lock.yaml
from prettier formatting.

Part of TDD Wave 1.

Co-Authored-By: Sisyphus <sisyphus@opencode.ai>

* chore: configure vitest workspace (P1T2)

- Add server/vitest.config.ts with @nuxt/test-utils
- Add server/test/setup.ts with msw lifecycle
- Add vitest.workspace.ts at repo root
- Add test, test:watch, coverage scripts to server/package.json

Part of TDD Wave 2.

Co-Authored-By: Sisyphus <sisyphus@opencode.ai>

* chore: configure Playwright E2E (P1T5)

- Add server/playwright.config.ts with baseURL, retries, webServer
- Add server/test/e2e/.gitkeep placeholder directory
- Add test:e2e script to server/package.json

Part of TDD Wave 2.

Co-Authored-By: Sisyphus <sisyphus@opencode.ai>

* test: add msw mocks for OIDC and metadata (P2T4)

- Add server/test/mocks/oidc.ts with configurable OIDC handlers
- Add server/test/mocks/jwt.ts with test JWT signing/verification
- Add server/test/mocks/metadata.ts with IGDB, Steam, Giantbomb mocks
- Add server/test/mocks/index.ts with setupTestMocks/teardownTestMocks lifecycle

Part of TDD Wave 2.

Co-Authored-By: Sisyphus <sisyphus@opencode.ai>

* ci: add format check to server-ci.yml (P4T3)

- Add format:check step before lint
- Separate format:check from lint:eslint for clarity

Part of TDD Wave 2.

Co-Authored-By: Sisyphus <sisyphus@opencode.ai>

* ci: add stale bot workflow (P5T2)

- Close issues inactive for 90 days
- 14-day warning before closure
- Exempt priority/p0 and priority/p1 labels

Part of TDD Wave 2.

Co-Authored-By: Sisyphus <sisyphus@opencode.ai>

* test: add health endpoint smoke test (P2T1)

- Create GET /api/v1/health endpoint returning { status, timestamp }
- Add smoke test verifying 200 response and shape
- Uses @nuxt/test-utils/e2e for integration testing

Part of TDD Wave 3.

Co-Authored-By: Sisyphus <sisyphus@opencode.ai>

* test: add Rust CLI tests (P2T3)

- Config tests: new, exists, get, get_active, serde roundtrip
- DepotManifest tests: new, append, overwrite, serde roundtrip, variants
- Uses tempfile for test isolation

Note: Tests require libarchive system library to compile.

Part of TDD Wave 3.

Co-Authored-By: Sisyphus <sisyphus@opencode.ai>

* chore: configure vitest coverage (P3T1)

- Provider: v8
- Reporters: text, lcov
- Reports directory: ./coverage
- Include: server/**/*.ts
- Exclude: test files and directories

Part of TDD Wave 3.

Co-Authored-By: Sisyphus <sisyphus@opencode.ai>

* chore: add pre-commit hooks (P4T4)

- Install husky and lint-staged
- Configure pre-commit hook to run lint-staged
- Lint-staged config: eslint --fix + prettier --write on *.{ts,vue}
- Prettier --write on *.json

Part of TDD Wave 3.

Co-Authored-By: Sisyphus <sisyphus@opencode.ai>

---------

Co-authored-by: John Smith <you@example.com>
Co-authored-by: BillyOutlast <billy@heretek.dev>
Co-authored-by: Sisyphus <sisyphus@opencode.ai>
2026-07-24 03:52:38 -04:00
DecDuck 2e86422004 Add lints, new website publish (#428)
* Add lints and new website

* Fix droplet CI

* Fix droplet ci again

* Fix clippy lints
2026-06-21 11:16:39 +10:00
dependabot[bot] 8637ff52ef chore(deps): bump nuxt from 3.21.2 to 3.21.6 (#417)
Bumps [nuxt](https://github.com/nuxt/nuxt/tree/HEAD/packages/nuxt) from 3.21.2 to 3.21.6.
- [Release notes](https://github.com/nuxt/nuxt/releases)
- [Commits](https://github.com/nuxt/nuxt/commits/v3.21.6/packages/nuxt)

---
updated-dependencies:
- dependency-name: nuxt
  dependency-version: 3.21.6
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-15 08:12:37 +10:00
Husky ff1144e016 Improve repo tooling (#398)
* add basic git files to root

* make server part of monorepo

* import promo

* import libraries base

* import docs

* import desktop

* move docs and promo
2026-04-20 11:44:38 +10:00
DecDuck 2dd90fbc44 New v0.4.0 website 2026-04-03 01:25:10 +00:00
DecDuck 50106d5fa2 Add final packages and fix torrential launch 2026-03-30 19:47:53 +11:00
DecDuck f05b306b38 Merge remote-tracking branch 'nativemodel/main' into develop 2026-03-30 19:44:33 +11:00
DecDuck 15a93e4756 Merge branch 'vincent-herlemont:main' into main 2026-03-30 19:43:43 +11:00
DecDuck 649409d51e Merge remote-tracking branch 'libarchive/master' into develop 2026-03-30 19:42:56 +11:00
DecDuck 789a78ce89 Merge remote-tracking branch 'droplet/main' into develop 2026-03-30 19:38:54 +11:00
DecDuck e881da5ce3 move base to libraries 2026-03-30 19:38:14 +11:00
renovate[bot] ba279f77c2 chore(deps): update hustcer/setup-nu action to v3.23 2026-03-19 01:05:32 +00:00
DecDuck 5f57fa8b4b fix: panic on readbuf too small for block 2026-03-02 22:53:45 +11:00
DecDuck e5fd8f8877 fix: update tests with fail condition 2026-03-02 22:31:37 +11:00
DecDuck 10b66a9e32 fix: cargo fmt 2026-03-02 22:26:11 +11:00
DecDuck 14346301a3 fix: clippy lints 2026-03-02 22:24:59 +11:00
DecDuck 52a158bc22 fix: clippy lints 2026-03-02 22:24:47 +11:00
DecDuck 94d3dd503a fix: install libarchive in ci 2026-03-02 22:16:40 +11:00
DecDuck c006549e95 fix: libarchive fmt and use nightly toolchain 2026-03-02 22:12:02 +11:00
DecDuck b1949d952d fix: formatting 2026-03-02 22:11:49 +11:00
DecDuck 275ed25a63 fix: submodules 2026-03-02 22:11:09 +11:00
DecDuck 4cdcc38349 feat: add tests 2026-03-02 22:10:06 +11:00
DecDuck f5c4cbe18f fix: remove final debug statement 2026-03-01 22:31:11 +11:00
DecDuck b513699ad9 bump version 2026-03-01 22:28:43 +11:00
DecDuck 642e3363a7 fix: remove debug info 2026-03-01 22:28:27 +11:00
DecDuck e7d69fc98d fix: update submodule type 2026-03-01 22:23:26 +11:00
DecDuck c4bfe3357d fix: use renamed package 2026-03-01 22:21:23 +11:00
DecDuck 69e5268410 fix: rename package 2026-03-01 22:21:13 +11:00
DecDuck b2b3ee7d3c version bump 2026-03-01 22:19:05 +11:00
DecDuck c8449d7b3e feat: libarchive backend 2026-03-01 22:18:39 +11:00
DecDuck e1f1cbb4da feat: null-ptr fix 2026-03-01 22:18:22 +11:00
DecDuck e5d818f819 fix: add send trait to filereader 2026-02-28 14:59:54 +11:00
DecDuck dedf57517a fix: semaphore reference 2026-02-04 22:46:03 +11:00
DecDuck 047a1184f9 feat: bump version 2026-02-04 22:40:11 +11:00
DecDuck 23491695b3 feat: optional reader semaphore 2026-02-04 22:39:52 +11:00
quexeky e7297019ea chore: Add flake.nix and .envrc 2026-01-22 07:42:58 +11:00
quexeky 28a1152ed2 chore: Remove static target_dir from main.rs 2026-01-22 07:35:23 +11:00
renovate[bot] 7c69ec1e76 chore(deps): update webiny/action-conventional-commits action to v1.3.1 2026-01-21 17:05:28 +00:00
DecDuck a6cb297e60 fix: limit chunks to 512 files each 2025-12-20 19:48:40 +11:00
DecDuck 3ff2944f77 fix: manifest generation no actually this time 2025-12-20 18:35:24 +11:00
DecDuck 87642befed feat: fix droplet manifest generation 2025-12-20 17:04:18 +11:00
DecDuck 44efcbb633 fix: remove test.txt 2025-12-19 14:50:45 +11:00
DecDuck 56e6ecee26 feat: clearer error messages 2025-12-19 14:36:40 +11:00
DecDuck dac75556d3 fix: make manifest public 2025-12-18 19:49:37 +11:00