Commit Graph
108 Commits
Author SHA1 Message Date
objz 257cec9f41 fix(tui): unify popup background theming 2026-07-28 14:12:38 +02:00
objz e14075ad8d fix(discovery): update page keybindings 2026-07-28 14:12:38 +02:00
objz 1742f62cd0 feat(discovery): add CurseForge and modpack browsing 2026-07-28 14:12:38 +02:00
objz c6205a337c refactor: reorganize source and tests 2026-07-27 11:28:57 +02:00
objz 15d76c18a0 refactor: clarify content and tui ownership 2026-07-27 11:03:46 +02:00
objz 64bb5e2d16 fix(tui): harden rendering and centralize tests 2026-07-27 01:09:33 +02:00
objz 1de0c7e139 fix(tui): render wrapped keybind footers 2026-07-27 00:37:14 +02:00
objz 6138e248cb test(tui): externalize and expand UI coverage 2026-07-26 23:57:13 +02:00
objz 130661f144 feat(content): manage discovery installs incrementally 2026-07-26 14:05:49 +02:00
objz 8a2a562235 feat(tui): integrate content migration workflow 2026-07-25 12:14:46 +02:00
objz a05b030862 feat(content): install Modrinth project versions 2026-07-23 00:29:05 +02:00
objz 19c47cdf7b feat(content): refine Modrinth discovery streaming 2026-07-22 22:22:00 +02:00
objz 4ba9c65f73 fix(tui): route account deletes through shared confirmation 2026-07-10 16:39:43 +02:00
objz be01370ab2 feature(tui): added delete button to every content type 2026-07-10 16:35:55 +02:00
objz 269814945d feat(tui): manage config profiles from settings 2026-07-10 16:12:48 +02:00
objz a58e6fb76d style: apply rustfmt 2026-06-16 09:58:34 +02:00
objz 5f43128a80 added: tests for patches helpers, forge installer detection, url_encode, profile fetchers
Closes the seven remaining tractable coverage gaps the final review
flagged. All tests-only or tiny *_from variants matching the existing
pattern. 18 new tests.

- src/instance/launch/patches.rs: seven inline tests for the lwjgl3ify
  patch helpers that were entirely untested before. strip_replaced_libs
  has happy + no-op cases. parse_add_opens covers the basic Add-Opens
  extraction, the MANIFEST.MF continuation-line case (the tricky one:
  jar manifests wrap lines with a trailing space + leading-space marker
  that gets stripped on join), missing manifest, and missing file.
  add_lwjgl3 verifies that only jars that actually exist in lib_dir
  end up on the classpath.

- src/net/forge.rs: three inline tests for has_legacy_install_profile.
  Builds synthetic forge installer zips in a tempdir with and without
  the versionInfo key in install_profile.json; covers the missing-jar
  branch with a path that doesn't exist.

- src/net/modrinth.rs: five-case rstest for url_encode covering the
  unreserved set, space, RFC 3986 reserved characters, multi-byte UTF-8
  (the encoder operates per-byte so emoji exercises the multi-byte
  path), and empty input.

- src/net/fabric.rs / src/net/quilt.rs: added fetch_*_profile_from and
  fetch_*_profile_with_raw_from variants mirroring the existing pattern.
  Existing fetch_*_profile and *_with_raw delegate to them with the
  upstream constants.

- tests/net_loaders.rs: two new wiremock tests (fabric_fetch_profile
  parses libraries, quilt_fetch_profile parses libraries) using the
  new _from variants.

- src/tui/widgets/popups/import_modpack/render.rs: extra snapshot for
  the Confirm step when loader_version is None (vanilla pack or old
  mmc pack). The previous Confirm snapshot covered Some(_) only.

Production touches stay minimal: the four new pub fn delegators in
fabric.rs and quilt.rs, all behaviour-preserving.
2026-05-27 18:19:26 +02:00
objz 0d1b7984fc added: deferred tests-only items (extra wizard snapshots + library/asset downloads)
Closes the "zero production touches" subset of the deferred coverage
items the audit had flagged.

- src/tui/widgets/popups/new_instance/render.rs: three new snapshots
  for the Version, LoaderVersion, and Confirm steps. Each pre-populates
  WIZARD_STATE so ensure_versions_loaded and ensure_loader_versions_loaded
  short-circuit on LoadState::Loaded and never spawn a network task. The
  TEST_SERIAL mutex established in the earlier batch serialises against
  the existing Name/Loader snapshots.

- src/tui/widgets/popups/import_modpack/render.rs: two new snapshots
  for the Version step (synthetic VersionInfo entries) and the Confirm
  step (synthetic ImportSummary). Same serialisation pattern.

- tests/net_mojang.rs: three new wiremock tests.
  download_libraries_writes_artifact_to_meta_dir constructs a synthetic
  VersionMeta whose single library points at the wiremock server, then
  asserts the bytes land at meta_dir/libraries/<artifact.path>.
  download_libraries_skips_when_destination_exists verifies the cache
  hit path via wiremock's expect(0).
  download_assets_writes_index_when_objects_is_empty exercises the
  index fetch+write code path with an empty objects map so the per-asset
  download loop never fires.

  Zero production touches. download_libraries already takes a
  VersionMeta whose libraries carry their own URLs; download_assets'
  index fetch reads from meta.asset_index.url (also configurable
  per-call), so the empty-objects path doesn't need ASSETS_BASE_URL
  overridable. Full per-asset coverage lands in a separate commit.
2026-05-27 18:03:57 +02:00
objz 41d6da8008 added: ratatui snapshots for instance_list and wizard popups
Phase E added snapshots for the ErrorPopup; this extends the same
pattern to the three other high-value widgets the audit flagged.

- src/tui/widgets/instances.rs: two snapshots covering the instance
  list with three synthetic instances (verifies layout, "Never played"
  rendering, scrollbar gutter) and the empty list. State is passed in
  via the existing State::with_instances constructor; no global state
  involved.

- src/tui/widgets/popups/new_instance/render.rs: two snapshots covering
  the Name step (default) and Loader step (hardcoded loader list, no
  network). WIZARD_STATE is global, so the tests reset it under its
  mutex and serialise via a per-module TEST_SERIAL mutex to prevent
  cross-test races. The Version and LoaderVersion steps are skipped
  here because their render path calls ensure_versions_loaded which
  tokio::spawns a network task; covering them would need a fully
  pre-populated state and is deferred.

- src/tui/widgets/popups/import_modpack/render.rs: two snapshots
  covering the Input step (default) and the Fetching step (just a
  spinner + label, no network triggered by render). Same global-state
  serialisation pattern as new_instance.

Snapshots live next to each widget under snapshots/ as plain text and
are committed to git.
2026-05-27 17:22:33 +02:00
objz 2163fef175 added: INFO-level snapshot + popup_area unit tests; rename narrow_frame test 2026-05-26 21:00:06 +02:00
objz c15cb9a378 added: ratatui snapshot tests for ErrorPopup (4 scenarios) 2026-05-26 20:59:59 +02:00
objz 1feb1679ff fix: clippy errors 2026-04-26 21:27:14 +02:00
objz 5dbb2be873 no-mistakes(lint): fix(lint): rustfmt formatting in mods.rs 2026-04-25 14:25:04 +02:00
objz 5f3f7890aa added mmc/prism modpack import and refactored import module
split import.rs into import/ module with mod.rs, mrpack.rs, mmc.rs.
auto-detects pack format from zip contents (modrinth.index.json or
mmc-pack.json). moved input parsing from net/modrinth.rs to the
import module since it handles routing for all formats now.
2026-04-20 19:24:47 +02:00
objz 52787b57c7 fix: switch default profile to terminal and fixed some comments 2026-04-18 19:44:59 +02:00
objz 47dad69321 refactor: upgrade crates and restructure project 2026-04-18 16:59:27 +02:00
objz 3047086fa2 fix(theme): align popup_import fields with popup_new_instance pattern 2026-03-28 18:48:22 +01:00
objz f7349cada3 feat(theme): add dedicated popup_import theme section 2026-03-28 18:14:35 +01:00
objz 9070bef585 fix(tui): use error_buffer for import errors 2026-03-15 16:38:44 +01:00
objz 344358762f fix(tui): remove duplicate hint text from import input step 2026-03-15 16:12:27 +01:00
objz dcadf1b1cc fix(tui): remove source step, add keybind hints 2026-03-15 15:24:18 +01:00
objz 8a9d6f9941 feat(tui): add import modpack wizard rendering 2026-03-14 15:28:19 +01:00
objz 6f44652622 feat(tui): add import wizard state machine and input handling 2026-03-14 15:05:42 +01:00
objz 4f597d04b2 fix: resolve clippy warnings 2026-02-07 17:08:47 +01:00
objz 80210364d5 feat(theme): add palette system and per-element theming 2026-01-24 19:18:09 +01:00
objz 9e65fb43d8 feat(tui): auto-wrap keybind lines, show profiles keybinds 2026-01-10 15:55:33 +01:00
objz f65341c0a2 feat(tui): add mods tab with icons and toggle, fix version sorting 2025-11-01 16:45:37 +01:00
objz 2adac8306b fix(tui): running indicator, throbber, popup styling, buffer OOB 2025-11-01 16:03:12 +01:00
objz 3e7a05b6e5 fix(tui): play triangle indicator, kill on Esc, popup fg colors 2025-11-01 15:08:44 +01:00
objz 09d548272b feat(tui): improve tab navigation 2025-10-18 16:15:09 +02:00
objz d4ffcca61c refactor: use THEME for all colors, add theme fields, fix forge installer 2025-10-04 19:15:38 +02:00
objz eeb4333b94 fix: add placeholder to name input, remove gray popup background 2025-10-04 18:42:15 +02:00
objz dcd62f06d7 fix: suppress keybinds in input mode, fix profiles, add slide-in errors 2025-10-04 18:08:42 +02:00
objz 59ad22e6e8 feat: integrate tui-logger, ratatui-textarea, throbber, tui-widget-list, tui-scrollview 2025-09-20 15:41:17 +02:00
objz c70d247a2b feat: upgrade to ratatui 0.30, use native APIs 2025-09-20 14:48:33 +02:00
objz 6bbf95edf5 feat: add search framework with search bar in block title 2025-09-06 20:24:48 +02:00
objz b4a2bca9c3 style: show only non-obvious keybinds in all popup hints 2025-09-06 20:05:31 +02:00
objz 045e330cbd style: trim wizard keybind hints to essentials only 2025-08-30 16:42:17 +02:00
objz 6bcfab5b72 fix: consistent vim keybinds, Esc closes, h/l wizard nav 2025-08-30 16:18:03 +02:00
objz 5177f078a9 feat: fetch game versions from loader APIs 2025-08-30 15:08:22 +02:00