You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b1f33ea
Browse filesBrowse the repository at this point in the historyBrowse files
* chore: rm unused files
* use github.com/adrg/xdg for dir support
remove migration
* add category.go
* chore: formatting
* refactor: replace custom implementations with open-source libraries
- Use github.com/dustin/go-humanize for size formatting
- Use github.com/skratchdot/open-golang/open for opening browsers/files
- Use github.com/kennygrant/sanitize for filename sanitization
- Update tests to reflect new library behaviors
- Fix remaining ConvertBytesToHumanReadable usage causing build errors
* fix tests
* add fallbacks to paths
* fix flaky test
* remove redundant Megabyte
* effort to remove magic numbers
* yet another attempt to fix flaky test
* blablabla
* remove test
* fix ci
* update build.yml
* update lint.yml
* feat(config): add categories type and default definitions
* replace category with categories.go
* feat(config): implement category matching and path resolution with tests
* feat(config): integrate categories into general settings
* feat(tui): auto route downloads based on categories
* fix(tui): only auto-route categories on default download paths
* feat(tui): establish model states and keybindings for category manager
* feat(tui): implement split pane UI for category manager
* feat(tui): implement edit mode and regex configuration for categories
* feat(tui): connect settings menu to category manager
* fix(tui): restore category routing and filtering flows
* fix(config): honor runtime XDG path overrides
* ci: detect go coverprofile support correctly
* fix(config): preserve explicit empty categories in settings
* fix(startup): migrate legacy state db into state dir
* fix(utils): fallback when sanitization yields extension-only name
* fix(config): default category paths fallback to downloads
* ci: pin lint tool and scope coverage profile to Linux
* test(cmd): isolate XDG state and enforce strict JSON assertions
* fix(startup): migrate state only after single-instance lock
* fix(config): harden category/path handling and unify size constants
* fix(tui): validate category edits and harden routing edge cases
* ci: use supported setup-go version selector
* fix(cmd): tighten file migration close handling and test env setup
* fix(config): harden runtime/category edge cases and metric underflow
* fix(tui): surface category match errors and route filename uniqueness by final path
* ci: only clear stale failure comment after successful matrix
* fix(cmd): harden migration sidecar handling and file mode copy
* fix(config): guard nil categories and normalize fallback paths
* fix(tui): preserve request ids when queuing local downloads
* ci: fail when test job fails without parsed failing artifacts
* fix(cmd): abort on migration errors and serialize XDG test isolation
* fix(config): validate category regex and only use existing default dirs
* fix(core): stop report loop on shutdown and check persisted ID collisions
* fix(pool): guard progressCh sends to prevent panic on closed channel
Worker goroutines in WorkerPool outlive GracefulShutdown because
taskChan was never closed. If a worker picks up a late task and
errors, it sends on progressCh which may already be closed by
LocalDownloadService.Shutdown, causing panic: send on closed channel.
Add a progressDone channel that is closed at the end of
GracefulShutdown. A new trySendProgress helper selects on
progressDone before sending, silently dropping the message if
shutdown is in progress. Also close taskChan after wg.Wait
so worker goroutines exit their range loop.
Fixes flaky CI failures where all tests pass individually but
go test exits non-zero due to an unrecovered goroutine panic.
* fix: apply review findings — pin Go version, surface GetDownload errors, reorder lock acquisition
1. CI: pin test job to go-version 1.24.4 with check-latest false,
matching the release job's toolchain.
2. local_service.go: propagate state.GetDownload errors in the
duplicate-ID check instead of silently treating DB failures as
uniqueness passes. state.go: GetDownload returns nil,nil when
the DB is uninitialized (consistent with LoadMasterList).
3. server.go: move AcquireLock() before mustInitializeGlobalState()
in both serverCmd and serverStartCmd to prevent concurrent DB
mutations when two processes start simultaneously.
4. http_handler_test.go: initialize state DB so the stricter
GetDownload error check has a working database.
* fix(download): guard ProgressCh sends in TUIDownload against closed channel
TUIDownload sends DownloadStartedMsg and DownloadCompleteMsg directly
on cfg.ProgressCh, bypassing the pool's trySendProgress guard. During
shutdown, the channel is closed while a worker goroutine may still be
inside TUIDownload, causing panic: send on closed channel.
Add safeSendProgress helper that uses defer/recover to catch panics
from sending on a closed channel. Apply it to both direct sends in
manager.go.
* chore: go mod tidy — promote go-humanize to direct dependency
* chore: go fmt
* chore: fix ci
* fix lint errors
* dont reinvent the wheel
* chore: update lint version
* Goroutine leak fixes
* chore: fix typo
* chore: update go version to 1.25.0
* qol
---------
Co-authored-by: Meet Mehta <supercoolpencil@duck.com>
Co-authored-by: Meet Mehta <--global>
0 commit comments