21 Commits

Author SHA1 Message Date
DragonSpirit 49efcde301 another stage of refactoring
CI / Build NRO (push) Successful in 29s
CI / Format check (push) Successful in 28s
CI / Layering check (push) Successful in 2s
CI / Build NRO (pull_request) Successful in 29s
CI / Format check (pull_request) Successful in 27s
CI / Layering check (pull_request) Successful in 1s
2026-05-14 23:30:25 +03:00
DragonSpirit 6f8ede035f refactor: phase 6 cleanup — RAII handles and io::restore split
- AccountProfileHandle RAII wrapper in handles.hpp; applied in
  account.cpp (getUser, iconPath) replacing manual accountProfileClose
- FILE* in iconPath replaced with existing FileHandle RAII wrapper
- io::restore split into clearSaveRoot + extractAndCommit static helpers;
  public signature unchanged
- sendAll/recvAll kept as bool — callers don't propagate the error string,
  Result<void> would add noise without benefit

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-03 14:56:38 +03:00
DragonSpirit 836956394a chore: remove stale deps/** linguist-vendored from .gitattributes
CI / Build NRO (push) Successful in 31s
CI / Format check (push) Successful in 50s
CI / Layering check (push) Successful in 2s
deps/ directory was removed with asprintf cleanup.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-03 13:02:30 +03:00
DragonSpirit 9b18a32b0c build: replace Plutonium submodule with ExternalProject_Add fetch
Plutonium is now downloaded at build time via ExternalProject_Add
(GIT_REPOSITORY + GIT_TAG) instead of being a git submodule.
Removes lib/, .gitmodules, and the linguist-vendored entry for it.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-03 13:00:36 +03:00
DragonSpirit 82df796a4a build: migrate Plutonium to ExternalProject_Add + IMPORTED target
CI / Build NRO (push) Successful in 36s
CI / Format check (push) Successful in 48s
CI / Layering check (push) Successful in 1s
Replaces add_custom_command/add_custom_target with ExternalProject_Add,
which correctly declares BUILD_BYPRODUCTS for Ninja and propagates include
paths via INTERFACE_INCLUDE_DIRECTORIES on the IMPORTED STATIC target.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-02 20:57:27 +03:00
DragonSpirit 33a1ce73af chore: remove vendored deps/asprintf
CI / Build NRO (push) Successful in 2m54s
CI / Format check (push) Successful in 5m18s
CI / Layering check (push) Successful in 2s
vasprintf/asprintf are provided by devkitpro newlib (<stdio.h>).
deps/asprintf was never compiled by CMake (GLOB_RECURSE covers src/ only).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-02 20:49:42 +03:00
DragonSpirit 9339e7dbfe finish refactor, add docs and CI
CI / Build NRO (push) Successful in 29s
CI / Format check (push) Successful in 11s
CI / Layering check (push) Successful in 1s
2026-04-27 03:22:12 +03:00
DragonSpirit dc65a4c8a9 refactor: phases 5 & 6 — TransferService, Result<T>, RAII
Phase 5 — TransferService extraction:
- New nxst::TransferService owns all sender/receiver state, threads, and atomics
  (previously 11 file-statics across transfer_sender.cpp + transfer_receiver.cpp)
- startReceive() calls io::restore internally; UI never touches infra/fs or infra/net
- TitlesLayout routes all transfer ops through mainApp->transfer
- g_currentUId removed from global scope; TitlesLayout::InitTitles(AccountUid)
- MainApplication gains transfer member; layout refs renamed to snake_case
- userAppExit() updated to cancel via service

Phase 6 — Result<T> + RAII:
- include/nxst/domain/result.hpp: 85-line tagged-union Result<T,E> + Result<void,E>
- include/nxst/infra/fs/handles.hpp: FsFileSystemHandle (auto fsFsClose),
  FileHandle (auto fclose) — eliminates manual close on every error path
- io::backup / io::restore return nxst::Result<std::string> (was tuple<bool,Result,string>)
- new u8[] + malloc in copyFile/restore replaced with std::vector<u8>
- NACP save-creation extracted to createSaveIfNeeded() helper in io.cpp

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-27 01:27:16 +03:00
DragonSpirit 895fee6235 phase 5: transfer service 2026-04-27 01:21:16 +03:00
DragonSpirit b5c506cf03 refactor: phase 0 & 1 2026-04-26 20:02:15 +03:00
DragonSpirit 844093e3e7 fix leaked client socket after receiving file 2026-04-26 17:06:01 +03:00
DragonSpirit 64b30e9835 redesign, broadcast server crash fix 2026-04-26 12:41:58 +03:00
DragonSpirit 4ffa6ed970 flow improvements 2026-04-25 20:11:49 +03:00
DragonSpirit 22b669fae0 create backup only when receiver found 2026-04-25 10:46:20 +03:00
DragonSpirit a2e874de85 ui improve 2026-04-25 10:34:50 +03:00
DragonSpirit 7515e0334b arch codereview 2026-04-25 09:55:34 +03:00
DragonSpirit 3e19149cb4 first working prototype 2026-04-24 19:15:58 +03:00
DragonSpirit 97c460fb5a transfer to switch 2024-11-22 00:09:18 +03:00
DragonSpirit 3851d474d0 fix transfer 2024-11-05 00:27:24 +03:00
DragonSpirit d2f369af9a draft transfer implementation 2024-08-25 01:29:51 +03:00
DragonSpirit 31953464e7 initial commit 2024-07-14 20:20:03 +03:00