Skip to content

Conversation

@Snider
Copy link
Owner

@Snider Snider commented Nov 13, 2025

Removes the following unused packages:

  • pkg/crypt
  • pkg/workspace
  • pkg/io

Moves the remaining packages (core, e, runtime) to the top level of the project.

Updates all import paths to reflect the new structure.

Removes the following unused packages:
- pkg/crypt
- pkg/workspace
- pkg/io

Moves the remaining packages (core, e, runtime) to the top level of the project.

Updates all import paths to reflect the new structure.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 13, 2025

📝 Walkthrough

Summary by CodeRabbit

  • Breaking Changes

    • Removed internationalization service and all language localisations (English, Spanish, French, German, Russian, Ukrainian, Chinese).
    • Removed workspace management functionality.
    • Removed configuration service and related settings management.
    • Removed cryptographic and PGP operations.
    • Removed display and UI window management services.
    • Removed storage services (local filesystem, SFTP, WebDAV).
  • Refactor

    • Simplified package structure and module imports.
    • Streamlined runtime architecture to core components only.

Walkthrough

This PR restructures the codebase by consolidating package imports from pkg/ subdirectories and removing several service implementations. Multiple public-facing services (display, i18n, workspace, config, crypt) along with storage abstractions are eliminated, whilst the runtime is simplified to expose only core and application functionality.

Changes

Cohort / File(s) Change Summary
Import path consolidation
cmd/core-gui/main.go, cmd/core/cmd/sync.go, cmd/examples/core-static-di/main.go, cmd/examples/core-task-change/main.go, docs/index.md
Updated import paths from github.com/Snider/Core/pkg/runtime to github.com/Snider/Core/runtime across all callers and documentation.
Config service removal
pkg/config/config.go, pkg/config/config_test.go, pkg/config/internal/config_test.go, pkg/config/internal/service.go
Removed entire config service implementation including public API surface (Options, Service types, New, Register functions), internal service logic, and all associated unit tests.
Cryptography service removal
pkg/crypt/crypt.go, pkg/crypt/crypt_test.go, pkg/crypt/internal/service.go
Removed crypt service layer exposing Options, Service, HashType, hash constants, and DI constructors along with tests and internal implementation.
OpenPGP removal
pkg/crypt/openpgp/encrypt.go, pkg/crypt/openpgp/encrypt_test.go, pkg/crypt/openpgp/encrypt_extra_test.go, pkg/crypt/openpgp/key.go, pkg/crypt/openpgp/openpgp.go, pkg/crypt/openpgp/sign.go, pkg/crypt/openpgp/test_util.go
Completely removed OpenPGP functionality including key pair management, encryption/decryption, signing/verification, and all associated test utilities.
LTHN hashing removal
pkg/crypt/lthn/lthn.go, pkg/crypt/lthn/hash_test.go
Removed LTHN custom hashing utility with salt generation and verification helpers.
Display service removal
pkg/display/display.go, pkg/display/display_test.go, pkg/display/actions.go, pkg/display/menu.go, pkg/display/tray.go, pkg/display/window.go
Eliminated entire display service including window management, menu configuration, system tray integration, and IPC handling.
Internationalisation removal
pkg/i18n/i18n.go, pkg/i18n/i18n_test.go, pkg/i18n/locales/de.json, pkg/i18n/locales/en.json, pkg/i18n/locales/es.json, pkg/i18n/locales/fr.json, pkg/i18n/locales/ru.json, pkg/i18n/locales/uk.json, pkg/i18n/locales/zh.json, pkg/i18n/testdata/en.json, pkg/i18n/testdata/es.json
Removed complete i18n service and all locale files (English, German, Spanish, French, Russian, Ukrainian, Chinese) and test data.
Storage abstraction removal
pkg/io/io.go, pkg/io/io_test.go, pkg/io/client.go, pkg/io/client_test.go, pkg/io/mock.go
Removed Medium interface, local storage utilities, mock implementations, and package-level API surface.
Local storage removal
pkg/io/local/client.go, pkg/io/local/client_test.go, pkg/io/local/local.go
Removed filesystem-based Medium implementation with path validation and I/O operations.
SFTP storage removal
pkg/io/sftp/client.go, pkg/io/sftp/sftp.go, pkg/io/sftp/sftp_test.go
Removed SFTP-based Medium implementation including SSH connection handling, key/password authentication, and remote file operations.
WebDAV storage removal
pkg/io/webdav/client.go, pkg/io/webdav/webdav.go, pkg/io/webdav/webdav_test.go
Removed WebDAV-based Medium implementation with HTTP client and basic authentication transport.
Workspace service removal
pkg/workspace/workspace.go, pkg/workspace/workspace_test.go, pkg/workspace/local.go
Removed workspace service including workspace creation/switching, file I/O within workspaces, and local storage medium adapter.
Runtime simplification
runtime/runtime.go, runtime/runtime_test.go, pkg/runtime/runtime_test.go
Simplified Runtime struct to expose only app and Core fields; removed Config, Display, Crypt, I18n, Workspace service fields. Service factory wiring now processes empty service map. Added new test cases for runtime initialisation.
Dependency management
go.mod
Reclassified several dependencies from direct to indirect (ProtonMail/go-crypto, adrg/xdg, go-i18n, sftp, skeema/knownhosts, golang.org/x/crypto, golang.org/x/text).

Possibly related PRs

Suggested labels

enhancement


🐰 A grand refactoring hops along,
Services removed, the codebase grows strong,
From pkg paths consolidated to core,
Simpler, cleaner—what's not to adore!
✨ Runtime now focuses on what matters most.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: removing unused packages and flattening the project structure, which aligns with the changeset.
Description check ✅ Passed The description is directly related to the changeset, listing the packages being removed and the structural changes being made.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch remove-unused-packages

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 60ca071 and 7f42b37.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (59)
  • cmd/core-gui/main.go (1 hunks)
  • cmd/core/cmd/sync.go (1 hunks)
  • cmd/examples/core-static-di/main.go (1 hunks)
  • cmd/examples/core-task-change/main.go (1 hunks)
  • docs/index.md (1 hunks)
  • go.mod (2 hunks)
  • pkg/config/config.go (0 hunks)
  • pkg/config/config_test.go (0 hunks)
  • pkg/config/internal/config_test.go (0 hunks)
  • pkg/config/internal/service.go (0 hunks)
  • pkg/crypt/crypt.go (0 hunks)
  • pkg/crypt/crypt_test.go (0 hunks)
  • pkg/crypt/internal/service.go (0 hunks)
  • pkg/crypt/lthn/hash_test.go (0 hunks)
  • pkg/crypt/lthn/lthn.go (0 hunks)
  • pkg/crypt/openpgp/encrypt.go (0 hunks)
  • pkg/crypt/openpgp/encrypt_extra_test.go (0 hunks)
  • pkg/crypt/openpgp/encrypt_test.go (0 hunks)
  • pkg/crypt/openpgp/key.go (0 hunks)
  • pkg/crypt/openpgp/openpgp.go (0 hunks)
  • pkg/crypt/openpgp/sign.go (0 hunks)
  • pkg/crypt/openpgp/test_util.go (0 hunks)
  • pkg/display/actions.go (0 hunks)
  • pkg/display/display.go (0 hunks)
  • pkg/display/display_test.go (0 hunks)
  • pkg/display/menu.go (0 hunks)
  • pkg/display/tray.go (0 hunks)
  • pkg/display/window.go (0 hunks)
  • pkg/i18n/i18n.go (0 hunks)
  • pkg/i18n/i18n_test.go (0 hunks)
  • pkg/i18n/locales/de.json (0 hunks)
  • pkg/i18n/locales/en.json (0 hunks)
  • pkg/i18n/locales/es.json (0 hunks)
  • pkg/i18n/locales/fr.json (0 hunks)
  • pkg/i18n/locales/ru.json (0 hunks)
  • pkg/i18n/locales/uk.json (0 hunks)
  • pkg/i18n/locales/zh.json (0 hunks)
  • pkg/i18n/testdata/en.json (0 hunks)
  • pkg/i18n/testdata/es.json (0 hunks)
  • pkg/io/client.go (0 hunks)
  • pkg/io/client_test.go (0 hunks)
  • pkg/io/io.go (0 hunks)
  • pkg/io/io_test.go (0 hunks)
  • pkg/io/local/client.go (0 hunks)
  • pkg/io/local/client_test.go (0 hunks)
  • pkg/io/local/local.go (0 hunks)
  • pkg/io/mock.go (0 hunks)
  • pkg/io/sftp/client.go (0 hunks)
  • pkg/io/sftp/sftp.go (0 hunks)
  • pkg/io/sftp/sftp_test.go (0 hunks)
  • pkg/io/webdav/client.go (0 hunks)
  • pkg/io/webdav/webdav.go (0 hunks)
  • pkg/io/webdav/webdav_test.go (0 hunks)
  • pkg/runtime/runtime_test.go (0 hunks)
  • pkg/workspace/local.go (0 hunks)
  • pkg/workspace/workspace.go (0 hunks)
  • pkg/workspace/workspace_test.go (0 hunks)
  • runtime/runtime.go (3 hunks)
  • runtime/runtime_test.go (1 hunks)
💤 Files with no reviewable changes (51)
  • pkg/i18n/testdata/en.json
  • pkg/i18n/locales/uk.json
  • pkg/display/actions.go
  • pkg/display/display_test.go
  • pkg/crypt/lthn/hash_test.go
  • pkg/io/webdav/client.go
  • pkg/runtime/runtime_test.go
  • pkg/workspace/local.go
  • pkg/crypt/openpgp/sign.go
  • pkg/io/webdav/webdav_test.go
  • pkg/io/client_test.go
  • pkg/crypt/openpgp/openpgp.go
  • pkg/i18n/i18n_test.go
  • pkg/io/local/local.go
  • pkg/i18n/locales/es.json
  • pkg/io/io.go
  • pkg/workspace/workspace_test.go
  • pkg/display/menu.go
  • pkg/crypt/openpgp/encrypt_extra_test.go
  • pkg/i18n/locales/zh.json
  • pkg/config/internal/config_test.go
  • pkg/io/sftp/client.go
  • pkg/crypt/openpgp/test_util.go
  • pkg/config/internal/service.go
  • pkg/io/mock.go
  • pkg/i18n/locales/de.json
  • pkg/crypt/openpgp/encrypt_test.go
  • pkg/i18n/i18n.go
  • pkg/display/window.go
  • pkg/i18n/testdata/es.json
  • pkg/config/config.go
  • pkg/crypt/internal/service.go
  • pkg/crypt/openpgp/key.go
  • pkg/io/webdav/webdav.go
  • pkg/crypt/crypt.go
  • pkg/crypt/openpgp/encrypt.go
  • pkg/crypt/crypt_test.go
  • pkg/i18n/locales/ru.json
  • pkg/display/tray.go
  • pkg/workspace/workspace.go
  • pkg/config/config_test.go
  • pkg/io/sftp/sftp_test.go
  • pkg/i18n/locales/en.json
  • pkg/io/client.go
  • pkg/io/io_test.go
  • pkg/io/sftp/sftp.go
  • pkg/i18n/locales/fr.json
  • pkg/crypt/lthn/lthn.go
  • pkg/io/local/client.go
  • pkg/display/display.go
  • pkg/io/local/client_test.go
🧰 Additional context used
🧬 Code graph analysis (2)
runtime/runtime_test.go (2)
runtime/runtime.go (3)
  • ServiceFactory (19-19)
  • Runtime (13-16)
  • NewWithFactories (22-55)
core/interfaces.go (1)
  • Core (36-48)
runtime/runtime.go (3)
core/core.go (2)
  • App (194-199)
  • New (15-35)
core/interfaces.go (1)
  • Core (36-48)
core/runtime.go (1)
  • Runtime (4-7)
🔇 Additional comments (8)
cmd/core/cmd/sync.go (1)

104-107: Import paths updated correctly in the template.

The template now references the flattened package structure, which aligns with the PR objectives.

runtime/runtime_test.go (1)

1-59: Test coverage appropriate for the simplified runtime.

The tests validate the core functionality of NewWithFactories with both nil and non-nil app scenarios. The removal of factory error and type assertion tests is consistent with the simplified runtime that no longer wires multiple services.

go.mod (1)

13-14: Dependency reclassification reflects the reduced package surface.

The movement of several dependencies from direct to indirect (ProtonMail/go-crypto, adrg/xdg, skeema/knownhosts, golang.org/x/crypto, golang.org/x/text) correctly reflects that these are no longer directly imported after removing the crypt, workspace, and i18n packages.

Also applies to: 44-44, 48-48, 51-51

docs/index.md (1)

24-24: Documentation updated correctly for the new import path.

The import path change from github.com/Snider/Core/pkg/runtime to github.com/Snider/Core/runtime is consistent with the flattened package structure.

cmd/examples/core-task-change/main.go (1)

7-7: Import path updated correctly.

The change from github.com/Snider/Core/pkg/runtime to github.com/Snider/Core/runtime aligns with the flattened package structure.

cmd/core-gui/main.go (1)

7-7: Import path updated correctly.

The change from github.com/Snider/Core/pkg/runtime to github.com/Snider/Core/runtime is consistent with the flattened package structure.

runtime/runtime.go (2)

14-16: Runtime struct correctly simplified.

The Runtime struct has been appropriately reduced to only hold app and Core, aligning with the PR objective to remove unused service packages.


50-52: Runtime initialisation correctly simplified.

The Runtime is now initialised with only app and Core, consistent with the simplified struct definition and the removal of multiple service fields.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai bot added the enhancement New feature or request label Nov 13, 2025
google-labs-jules bot and others added 2 commits November 13, 2025 17:20
Removes the following unused packages:
- pkg/crypt
- pkg/workspace
- pkg/io

Moves the remaining packages (core, e, runtime) to the top level of the project.

Updates all import paths to reflect the new structure.
…ove-unused-packages

# Conflicts:
#	go.mod
#	pkg/runtime/runtime_test.go
#	runtime/runtime.go
@codecov
Copy link

codecov bot commented Nov 13, 2025

Codecov Report

❌ Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
runtime/runtime.go 50.00% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@Snider Snider merged commit 856fb24 into dev Nov 13, 2025
5 checks passed
@Snider Snider deleted the remove-unused-packages branch November 13, 2025 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants